=============================================================================== a0014b54 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014b54: 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 ) { a0014b58: 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 ) { a0014b5c: 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 ) { a0014b60: e1a06000 mov r6, r0 a0014b64: e1a0a001 mov sl, r1 a0014b68: e1a07002 mov r7, r2 a0014b6c: 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 ) { a0014b70: 8a000013 bhi a0014bc4 <_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 ) { a0014b74: e5905048 ldr r5, [r0, #72] ; 0x48 a0014b78: e3550000 cmp r5, #0 a0014b7c: 0a000009 beq a0014ba8 <_CORE_message_queue_Broadcast+0x54> *count = 0; a0014b80: e3a00000 mov r0, #0 a0014b84: e5880000 str r0, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014b88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0014b8c: e594002c ldr r0, [r4, #44] ; 0x2c a0014b90: e1a0100a mov r1, sl a0014b94: e1a02007 mov r2, r7 a0014b98: eb002260 bl a001d520 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014b9c: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a0014ba0: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014ba4: e5837000 str r7, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a0014ba8: e1a00006 mov r0, r6 a0014bac: eb0009fe bl a00173ac <_Thread_queue_Dequeue> a0014bb0: e2504000 subs r4, r0, #0 a0014bb4: 1afffff4 bne a0014b8c <_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; a0014bb8: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014bbc: e1a00004 mov r0, r4 a0014bc0: 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; a0014bc4: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0014bc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000dc30 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc30: e92d40f0 push {r4, r5, r6, r7, lr} /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dc34: e3130003 tst r3, #3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc38: e1a04000 mov r4, r0 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dc3c: e3a00000 mov r0, #0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc40: e1a06002 mov r6, r2 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; a000dc44: e5842044 str r2, [r4, #68] ; 0x44 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc48: e1a05001 mov r5, r1 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dc4c: e5840048 str r0, [r4, #72] ; 0x48 the_message_queue->maximum_message_size = maximum_message_size; a000dc50: e584304c str r3, [r4, #76] ; 0x4c CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; a000dc54: e5840060 str r0, [r4, #96] ; 0x60 the_message_queue->notify_argument = the_argument; a000dc58: e5840064 str r0, [r4, #100] ; 0x64 /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dc5c: 01a02003 moveq r2, r3 a000dc60: 0a000003 beq a000dc74 <_CORE_message_queue_Initialize+0x44> allocated_message_size += sizeof(uint32_t); a000dc64: e2832004 add r2, r3, #4 allocated_message_size &= ~(sizeof(uint32_t) - 1); a000dc68: e3c22003 bic r2, r2, #3 } if (allocated_message_size < maximum_message_size) a000dc6c: e1520003 cmp r2, r3 a000dc70: 3a00001e bcc a000dcf0 <_CORE_message_queue_Initialize+0xc0> /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); a000dc74: e2827014 add r7, r2, #20 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * a000dc78: e0000796 mul r0, r6, r7 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) a000dc7c: e1500002 cmp r0, r2 a000dc80: 3a000018 bcc a000dce8 <_CORE_message_queue_Initialize+0xb8> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dc84: eb000b21 bl a0010910 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) a000dc88: e3500000 cmp r0, #0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dc8c: e1a01000 mov r1, r0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) a000dc90: e584005c str r0, [r4, #92] ; 0x5c _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) a000dc94: 0a000015 beq a000dcf0 <_CORE_message_queue_Initialize+0xc0> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( a000dc98: e2840068 add r0, r4, #104 ; 0x68 a000dc9c: e1a02006 mov r2, r6 a000dca0: e1a03007 mov r3, r7 a000dca4: eb00149c bl a0012f1c <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a000dca8: e2843054 add r3, r4, #84 ; 0x54 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( a000dcac: e5951000 ldr r1, [r5] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a000dcb0: e5843050 str r3, [r4, #80] ; 0x50 the_chain->permanent_null = NULL; a000dcb4: e3a03000 mov r3, #0 a000dcb8: e5843054 str r3, [r4, #84] ; 0x54 the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); a000dcbc: e2843050 add r3, r4, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); a000dcc0: e5843058 str r3, [r4, #88] ; 0x58 _Thread_queue_Initialize( a000dcc4: e1a00004 mov r0, r4 a000dcc8: e3510001 cmp r1, #1 a000dccc: 13a01000 movne r1, #0 a000dcd0: 03a01001 moveq r1, #1 a000dcd4: e3a02080 mov r2, #128 ; 0x80 a000dcd8: e3a03006 mov r3, #6 a000dcdc: eb000826 bl a000fd7c <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; a000dce0: e3a00001 mov r0, #1 a000dce4: e8bd80f0 pop {r4, r5, r6, r7, pc} */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; a000dce8: e3a00000 mov r0, #0 <== NOT EXECUTED a000dcec: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } a000dcf0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0006c80 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c80: 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; a0006c84: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c88: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c8c: e59f44c8 ldr r4, [pc, #1224] ; a000715c <_Heap_Walk+0x4dc> int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a0006c90: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a0006c94: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006c98: e31200ff tst r2, #255 ; 0xff 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; a0006c9c: e590c020 ldr ip, [r0, #32] Heap_Block *const last_block = heap->last_block; a0006ca0: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006ca4: e59f34b4 ldr r3, [pc, #1204] ; a0007160 <_Heap_Walk+0x4e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006ca8: e1a06000 mov r6, r0 a0006cac: e1a05001 mov r5, r1 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006cb0: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006cb4: e59f34a8 ldr r3, [pc, #1192] ; a0007164 <_Heap_Walk+0x4e4> Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; a0006cb8: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; a0006cbc: 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() ) ) { a0006cc0: e5933000 ldr r3, [r3] a0006cc4: e3530003 cmp r3, #3 a0006cc8: 1a000118 bne a0007130 <_Heap_Walk+0x4b0> 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)( a0006ccc: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006cd0: e59d2020 ldr r2, [sp, #32] a0006cd4: e58dc000 str ip, [sp] a0006cd8: e5903018 ldr r3, [r0, #24] a0006cdc: e58d3004 str r3, [sp, #4] a0006ce0: e590301c ldr r3, [r0, #28] a0006ce4: e58d200c str r2, [sp, #12] a0006ce8: e59f2478 ldr r2, [pc, #1144] ; a0007168 <_Heap_Walk+0x4e8> a0006cec: e58d3008 str r3, [sp, #8] a0006cf0: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006cf4: e58d3010 str r3, [sp, #16] a0006cf8: e5903008 ldr r3, [r0, #8] a0006cfc: e58d3014 str r3, [sp, #20] a0006d00: e590300c ldr r3, [r0, #12] a0006d04: e1a00001 mov r0, r1 a0006d08: e3a01000 mov r1, #0 a0006d0c: e58d3018 str r3, [sp, #24] a0006d10: e1a03009 mov r3, r9 a0006d14: e12fff34 blx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a0006d18: e3590000 cmp r9, #0 a0006d1c: 1a000005 bne a0006d38 <_Heap_Walk+0xb8> (*printer)( source, true, "page size is zero\n" ); a0006d20: e1a00005 mov r0, r5 a0006d24: e3a01001 mov r1, #1 a0006d28: e59f243c ldr r2, [pc, #1084] ; a000716c <_Heap_Walk+0x4ec> a0006d2c: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006d30: e1a08009 mov r8, r9 a0006d34: ea0000fe b a0007134 <_Heap_Walk+0x4b4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a0006d38: e2198003 ands r8, r9, #3 (*printer)( a0006d3c: 11a00005 movne r0, r5 a0006d40: 13a01001 movne r1, #1 a0006d44: 159f2424 ldrne r2, [pc, #1060] ; a0007170 <_Heap_Walk+0x4f0> a0006d48: 11a03009 movne r3, r9 a0006d4c: 1a0000ff bne a0007150 <_Heap_Walk+0x4d0> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006d50: e59d0024 ldr r0, [sp, #36] ; 0x24 a0006d54: e1a01009 mov r1, r9 a0006d58: ebffe745 bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a0006d5c: e250b000 subs fp, r0, #0 a0006d60: 0a000005 beq a0006d7c <_Heap_Walk+0xfc> (*printer)( a0006d64: e1a00005 mov r0, r5 a0006d68: e3a01001 mov r1, #1 a0006d6c: e59f2400 ldr r2, [pc, #1024] ; a0007174 <_Heap_Walk+0x4f4> a0006d70: e59d3024 ldr r3, [sp, #36] ; 0x24 a0006d74: e12fff34 blx r4 a0006d78: ea0000ed b a0007134 <_Heap_Walk+0x4b4> a0006d7c: e59dc020 ldr ip, [sp, #32] a0006d80: e1a01009 mov r1, r9 a0006d84: e28c0008 add r0, ip, #8 a0006d88: ebffe739 bl a0000a74 <__umodsi3> ); return false; } if ( a0006d8c: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a0006d90: 11a00005 movne r0, r5 a0006d94: 13a01001 movne r1, #1 a0006d98: 159f23d8 ldrne r2, [pc, #984] ; a0007178 <_Heap_Walk+0x4f8> a0006d9c: 159d3020 ldrne r3, [sp, #32] a0006da0: 1a0000c3 bne a00070b4 <_Heap_Walk+0x434> 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; a0006da4: e59d2020 ldr r2, [sp, #32] a0006da8: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a0006dac: e2188001 ands r8, r8, #1 (*printer)( a0006db0: 01a00005 moveq r0, r5 a0006db4: 03a01001 moveq r1, #1 a0006db8: 059f23bc ldreq r2, [pc, #956] ; a000717c <_Heap_Walk+0x4fc> a0006dbc: 0a000009 beq a0006de8 <_Heap_Walk+0x168> - 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; a0006dc0: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006dc4: e5937004 ldr r7, [r3, #4] a0006dc8: 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); a0006dcc: 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; a0006dd0: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a0006dd4: e2188001 ands r8, r8, #1 a0006dd8: 1a000004 bne a0006df0 <_Heap_Walk+0x170> (*printer)( a0006ddc: e59f239c ldr r2, [pc, #924] ; a0007180 <_Heap_Walk+0x500> a0006de0: e1a00005 mov r0, r5 a0006de4: e3a01001 mov r1, #1 a0006de8: e12fff34 blx r4 a0006dec: ea0000d0 b a0007134 <_Heap_Walk+0x4b4> ); return false; } if ( a0006df0: e59dc020 ldr ip, [sp, #32] a0006df4: e157000c cmp r7, ip a0006df8: 0a000005 beq a0006e14 <_Heap_Walk+0x194> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a0006dfc: e1a00005 mov r0, r5 <== NOT EXECUTED a0006e00: e3a01001 mov r1, #1 <== NOT EXECUTED a0006e04: e59f2378 ldr r2, [pc, #888] ; a0007184 <_Heap_Walk+0x504> <== NOT EXECUTED a0006e08: e12fff34 blx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006e0c: e1a0800a mov r8, sl <== NOT EXECUTED a0006e10: ea0000c7 b a0007134 <_Heap_Walk+0x4b4> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a0006e14: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } a0006e18: 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 ); a0006e1c: e1a0a006 mov sl, r6 a0006e20: ea000032 b a0006ef0 <_Heap_Walk+0x270> 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; a0006e24: e5963020 ldr r3, [r6, #32] a0006e28: e1530008 cmp r3, r8 a0006e2c: 83a0c000 movhi ip, #0 a0006e30: 8a000003 bhi a0006e44 <_Heap_Walk+0x1c4> a0006e34: e596c024 ldr ip, [r6, #36] ; 0x24 a0006e38: e15c0008 cmp ip, r8 a0006e3c: 33a0c000 movcc ip, #0 a0006e40: 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 ) ) { a0006e44: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( a0006e48: 01a00005 moveq r0, r5 a0006e4c: 03a01001 moveq r1, #1 a0006e50: 059f2330 ldreq r2, [pc, #816] ; a0007188 <_Heap_Walk+0x508> a0006e54: 0a000012 beq a0006ea4 <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006e58: e2880008 add r0, r8, #8 a0006e5c: e1a0100b mov r1, fp a0006e60: ebffe703 bl a0000a74 <__umodsi3> ); return false; } if ( a0006e64: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a0006e68: 11a00005 movne r0, r5 a0006e6c: 13a01001 movne r1, #1 a0006e70: 159f2314 ldrne r2, [pc, #788] ; a000718c <_Heap_Walk+0x50c> a0006e74: 11a03008 movne r3, r8 a0006e78: 1a0000b4 bne a0007150 <_Heap_Walk+0x4d0> - 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; a0006e7c: e5983004 ldr r3, [r8, #4] a0006e80: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } a0006e84: 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; a0006e88: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0006e8c: e2133001 ands r3, r3, #1 a0006e90: e58d302c str r3, [sp, #44] ; 0x2c a0006e94: 0a000008 beq a0006ebc <_Heap_Walk+0x23c> (*printer)( a0006e98: e59f22f0 ldr r2, [pc, #752] ; a0007190 <_Heap_Walk+0x510> a0006e9c: e1a00005 mov r0, r5 a0006ea0: e3a01001 mov r1, #1 a0006ea4: e1a03008 mov r3, r8 a0006ea8: e58dc01c str ip, [sp, #28] a0006eac: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006eb0: e59dc01c ldr ip, [sp, #28] a0006eb4: e1a0800c mov r8, ip a0006eb8: ea00009d b a0007134 <_Heap_Walk+0x4b4> ); return false; } if ( free_block->prev != prev_block ) { a0006ebc: e598300c ldr r3, [r8, #12] a0006ec0: e153000a cmp r3, sl a0006ec4: 0a000007 beq a0006ee8 <_Heap_Walk+0x268> (*printer)( a0006ec8: e58d3000 str r3, [sp] a0006ecc: e1a00005 mov r0, r5 a0006ed0: e1a03008 mov r3, r8 a0006ed4: e3a01001 mov r1, #1 a0006ed8: e59f22b4 ldr r2, [pc, #692] ; a0007194 <_Heap_Walk+0x514> a0006edc: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006ee0: e59d802c ldr r8, [sp, #44] ; 0x2c a0006ee4: ea000092 b a0007134 <_Heap_Walk+0x4b4> return false; } prev_block = free_block; free_block = free_block->next; a0006ee8: e1a0a008 mov sl, r8 a0006eec: 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 ) { a0006ef0: e1580006 cmp r8, r6 a0006ef4: 1affffca bne a0006e24 <_Heap_Walk+0x1a4> a0006ef8: ea000000 b a0006f00 <_Heap_Walk+0x280> block->prev_size ); } block = next_block; } while ( block != first_block ); a0006efc: e1a07008 mov r7, r8 return true; } a0006f00: 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; a0006f04: 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; a0006f08: 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); a0006f0c: 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; a0006f10: e1520008 cmp r2, r8 a0006f14: 83a0b000 movhi fp, #0 a0006f18: 8a000003 bhi a0006f2c <_Heap_Walk+0x2ac> a0006f1c: e596b024 ldr fp, [r6, #36] ; 0x24 a0006f20: e15b0008 cmp fp, r8 a0006f24: 33a0b000 movcc fp, #0 a0006f28: 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 ) ) { a0006f2c: e21bb0ff ands fp, fp, #255 ; 0xff a0006f30: 1a000006 bne a0006f50 <_Heap_Walk+0x2d0> (*printer)( a0006f34: e58d8000 str r8, [sp] a0006f38: e1a00005 mov r0, r5 a0006f3c: e3a01001 mov r1, #1 a0006f40: e59f2250 ldr r2, [pc, #592] ; a0007198 <_Heap_Walk+0x518> a0006f44: e1a03007 mov r3, r7 a0006f48: e12fff34 blx r4 a0006f4c: ea000059 b a00070b8 <_Heap_Walk+0x438> 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; a0006f50: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006f54: e1a0000a mov r0, sl a0006f58: e1a01009 mov r1, r9 a0006f5c: e057b002 subs fp, r7, r2 a0006f60: 13a0b001 movne fp, #1 a0006f64: e58d301c str r3, [sp, #28] a0006f68: ebffe6c1 bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a0006f6c: e3500000 cmp r0, #0 a0006f70: e59d301c ldr r3, [sp, #28] a0006f74: 0a000005 beq a0006f90 <_Heap_Walk+0x310> a0006f78: e35b0000 cmp fp, #0 (*printer)( a0006f7c: 158da000 strne sl, [sp] a0006f80: 11a00005 movne r0, r5 a0006f84: 13a01001 movne r1, #1 a0006f88: 159f220c ldrne r2, [pc, #524] ; a000719c <_Heap_Walk+0x51c> a0006f8c: 1a000013 bne a0006fe0 <_Heap_Walk+0x360> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a0006f90: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006f94: e15a000c cmp sl, ip a0006f98: 2a000008 bcs a0006fc0 <_Heap_Walk+0x340> a0006f9c: e35b0000 cmp fp, #0 a0006fa0: 0a000006 beq a0006fc0 <_Heap_Walk+0x340> (*printer)( a0006fa4: e88d1400 stm sp, {sl, ip} a0006fa8: e1a00005 mov r0, r5 a0006fac: e3a01001 mov r1, #1 a0006fb0: e59f21e8 ldr r2, [pc, #488] ; a00071a0 <_Heap_Walk+0x520> a0006fb4: e1a03007 mov r3, r7 a0006fb8: e12fff34 blx r4 a0006fbc: ea000064 b a0007154 <_Heap_Walk+0x4d4> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a0006fc0: e1580007 cmp r8, r7 a0006fc4: 8a000008 bhi a0006fec <_Heap_Walk+0x36c> a0006fc8: e35b0000 cmp fp, #0 a0006fcc: 0a000006 beq a0006fec <_Heap_Walk+0x36c> (*printer)( a0006fd0: e59f21cc ldr r2, [pc, #460] ; a00071a4 <_Heap_Walk+0x524> a0006fd4: e58d8000 str r8, [sp] a0006fd8: e1a00005 mov r0, r5 a0006fdc: e3a01001 mov r1, #1 a0006fe0: e1a03007 mov r3, r7 a0006fe4: e12fff34 blx r4 a0006fe8: ea000059 b a0007154 <_Heap_Walk+0x4d4> 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; a0006fec: e203b001 and fp, r3, #1 a0006ff0: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a0006ff4: e3130001 tst r3, #1 a0006ff8: 1a000038 bne a00070e0 <_Heap_Walk+0x460> 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 ? a0006ffc: 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)( a0007000: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } a0007004: 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)( a0007008: e1520003 cmp r2, r3 a000700c: 059f0194 ldreq r0, [pc, #404] ; a00071a8 <_Heap_Walk+0x528> a0007010: 0a000003 beq a0007024 <_Heap_Walk+0x3a4> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a0007014: e59f3190 ldr r3, [pc, #400] ; a00071ac <_Heap_Walk+0x52c> a0007018: e1520006 cmp r2, r6 a000701c: e59f018c ldr r0, [pc, #396] ; a00071b0 <_Heap_Walk+0x530> a0007020: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? a0007024: 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)( a0007028: e1530001 cmp r3, r1 a000702c: 059f1180 ldreq r1, [pc, #384] ; a00071b4 <_Heap_Walk+0x534> a0007030: 0a000003 beq a0007044 <_Heap_Walk+0x3c4> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a0007034: e59fc17c ldr ip, [pc, #380] ; a00071b8 <_Heap_Walk+0x538> a0007038: e1530006 cmp r3, r6 a000703c: e59f116c ldr r1, [pc, #364] ; a00071b0 <_Heap_Walk+0x530> a0007040: 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)( a0007044: e58d2004 str r2, [sp, #4] a0007048: e58d0008 str r0, [sp, #8] a000704c: e58d300c str r3, [sp, #12] a0007050: e58d1010 str r1, [sp, #16] a0007054: e1a03007 mov r3, r7 a0007058: e58da000 str sl, [sp] a000705c: e1a00005 mov r0, r5 a0007060: e3a01000 mov r1, #0 a0007064: e59f2150 ldr r2, [pc, #336] ; a00071bc <_Heap_Walk+0x53c> a0007068: e12fff34 blx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a000706c: e5983000 ldr r3, [r8] a0007070: e15a0003 cmp sl, r3 a0007074: 0a000008 beq a000709c <_Heap_Walk+0x41c> (*printer)( a0007078: e58d3004 str r3, [sp, #4] a000707c: e58da000 str sl, [sp] a0007080: e58d8008 str r8, [sp, #8] a0007084: e1a00005 mov r0, r5 a0007088: e3a01001 mov r1, #1 a000708c: e59f212c ldr r2, [pc, #300] ; a00071c0 <_Heap_Walk+0x540> a0007090: e1a03007 mov r3, r7 a0007094: e12fff34 blx r4 a0007098: ea00002d b a0007154 <_Heap_Walk+0x4d4> ); return false; } if ( !prev_used ) { a000709c: e35b0000 cmp fp, #0 a00070a0: 1a000006 bne a00070c0 <_Heap_Walk+0x440> (*printer)( a00070a4: e59f2118 ldr r2, [pc, #280] ; a00071c4 <_Heap_Walk+0x544> a00070a8: e1a00005 mov r0, r5 a00070ac: e3a01001 mov r1, #1 a00070b0: e1a03007 mov r3, r7 a00070b4: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a00070b8: e1a0800b mov r8, fp a00070bc: ea00001c b a0007134 <_Heap_Walk+0x4b4> block = next_block; } while ( block != first_block ); return true; } a00070c0: e5963008 ldr r3, [r6, #8] a00070c4: ea000002 b a00070d4 <_Heap_Walk+0x454> { 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 ) { a00070c8: e1530007 cmp r3, r7 a00070cc: 0a000014 beq a0007124 <_Heap_Walk+0x4a4> return true; } free_block = free_block->next; a00070d0: 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 ) { a00070d4: e1530006 cmp r3, r6 a00070d8: 1afffffa bne a00070c8 <_Heap_Walk+0x448> a00070dc: ea000017 b a0007140 <_Heap_Walk+0x4c0> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a00070e0: e35b0000 cmp fp, #0 a00070e4: 0a000006 beq a0007104 <_Heap_Walk+0x484> (*printer)( a00070e8: e58da000 str sl, [sp] a00070ec: e1a00005 mov r0, r5 a00070f0: e3a01000 mov r1, #0 a00070f4: e59f20cc ldr r2, [pc, #204] ; a00071c8 <_Heap_Walk+0x548> a00070f8: e1a03007 mov r3, r7 a00070fc: e12fff34 blx r4 a0007100: ea000007 b a0007124 <_Heap_Walk+0x4a4> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a0007104: e58da000 str sl, [sp] a0007108: e5973000 ldr r3, [r7] a000710c: e1a00005 mov r0, r5 a0007110: e1a0100b mov r1, fp a0007114: e58d3004 str r3, [sp, #4] a0007118: e59f20ac ldr r2, [pc, #172] ; a00071cc <_Heap_Walk+0x54c> a000711c: e1a03007 mov r3, r7 a0007120: e12fff34 blx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); a0007124: e59d2020 ldr r2, [sp, #32] a0007128: e1580002 cmp r8, r2 a000712c: 1affff72 bne a0006efc <_Heap_Walk+0x27c> 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; a0007130: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } a0007134: e1a00008 mov r0, r8 a0007138: e28dd030 add sp, sp, #48 ; 0x30 a000713c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a0007140: e59f2088 ldr r2, [pc, #136] ; a00071d0 <_Heap_Walk+0x550> a0007144: e1a00005 mov r0, r5 a0007148: e3a01001 mov r1, #1 a000714c: e1a03007 mov r3, r7 a0007150: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007154: e3a08000 mov r8, #0 a0007158: eafffff5 b a0007134 <_Heap_Walk+0x4b4> =============================================================================== a002077c <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { a002077c: e92d41f0 push {r4, r5, r6, r7, r8, lr} /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { a0020780: e5903010 ldr r3, [r0, #16] a0020784: e59f5110 ldr r5, [pc, #272] ; a002089c <_POSIX_signals_Unblock_thread+0x120> a0020788: e59f810c ldr r8, [pc, #268] ; a002089c <_POSIX_signals_Unblock_thread+0x120> a002078c: e241c001 sub ip, r1, #1 a0020790: e0035005 and r5, r3, r5 a0020794: e3a06001 mov r6, #1 a0020798: e1550008 cmp r5, r8 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { a002079c: e1a04000 mov r4, r0 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; a00207a0: e5907108 ldr r7, [r0, #264] ; 0x108 a00207a4: e1a0cc16 lsl ip, r6, ip /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { a00207a8: 1a000019 bne a0020814 <_POSIX_signals_Unblock_thread+0x98> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { a00207ac: e5903030 ldr r3, [r0, #48] ; 0x30 a00207b0: e11c0003 tst ip, r3 a00207b4: 1a000002 bne a00207c4 <_POSIX_signals_Unblock_thread+0x48> a00207b8: e59750d0 ldr r5, [r7, #208] ; 0xd0 a00207bc: e1dc5005 bics r5, ip, r5 a00207c0: 0a000033 beq a0020894 <_POSIX_signals_Unblock_thread+0x118> the_thread->Wait.return_code = EINTR; a00207c4: e3a03004 mov r3, #4 the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { a00207c8: e3520000 cmp r2, #0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; a00207cc: e5843034 str r3, [r4, #52] ; 0x34 the_info = (siginfo_t *) the_thread->Wait.return_argument; a00207d0: e5943028 ldr r3, [r4, #40] ; 0x28 if ( !info ) { the_info->si_signo = signo; a00207d4: 05831000 streq r1, [r3] the_info->si_code = SI_USER; a00207d8: 03a01001 moveq r1, #1 a00207dc: 09830006 stmibeq r3, {r1, r2} a00207e0: 0a000007 beq a0020804 <_POSIX_signals_Unblock_thread+0x88> the_info->si_value.sival_int = 0; } else { *the_info = *info; a00207e4: e1a00002 mov r0, r2 a00207e8: e490c004 ldr ip, [r0], #4 a00207ec: e1a01003 mov r1, r3 a00207f0: e481c004 str ip, [r1], #4 a00207f4: e5922004 ldr r2, [r2, #4] a00207f8: e5832004 str r2, [r3, #4] a00207fc: e5903004 ldr r3, [r0, #4] a0020800: e5813004 str r3, [r1, #4] } _Thread_queue_Extract_with_proxy( the_thread ); a0020804: e1a00004 mov r0, r4 a0020808: ebffaf68 bl a000c5b0 <_Thread_queue_Extract_with_proxy> return true; a002080c: e3a05001 mov r5, #1 a0020810: ea00001f b a0020894 <_POSIX_signals_Unblock_thread+0x118> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { a0020814: e59750d0 ldr r5, [r7, #208] ; 0xd0 a0020818: e1dc5005 bics r5, ip, r5 a002081c: 0a00001c beq a0020894 <_POSIX_signals_Unblock_thread+0x118> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { a0020820: e2135201 ands r5, r3, #268435456 ; 0x10000000 a0020824: 0a000010 beq a002086c <_POSIX_signals_Unblock_thread+0xf0> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); a0020828: e59f5070 ldr r5, [pc, #112] ; a00208a0 <_POSIX_signals_Unblock_thread+0x124> the_thread->Wait.return_code = EINTR; a002082c: e3a02004 mov r2, #4 a0020830: e5802034 str r2, [r0, #52] ; 0x34 a0020834: e0035005 and r5, r3, r5 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) a0020838: e3550000 cmp r5, #0 a002083c: 0a000002 beq a002084c <_POSIX_signals_Unblock_thread+0xd0> _Thread_queue_Extract_with_proxy( the_thread ); a0020840: ebffaf5a bl a000c5b0 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; a0020844: e3a05000 mov r5, #0 <== NOT EXECUTED a0020848: ea000011 b a0020894 <_POSIX_signals_Unblock_thread+0x118> <== NOT EXECUTED * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { a002084c: e2133008 ands r3, r3, #8 a0020850: 0a00000e beq a0020890 <_POSIX_signals_Unblock_thread+0x114> (void) _Watchdog_Remove( &the_thread->Timer ); a0020854: e2800048 add r0, r0, #72 ; 0x48 a0020858: ebffb1ec bl a000d010 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a002085c: e1a00004 mov r0, r4 a0020860: e59f103c ldr r1, [pc, #60] ; a00208a4 <_POSIX_signals_Unblock_thread+0x128> a0020864: ebffacaa bl a000bb14 <_Thread_Clear_state> a0020868: ea000009 b a0020894 <_POSIX_signals_Unblock_thread+0x118> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { a002086c: e3530000 cmp r3, #0 a0020870: 1a000007 bne a0020894 <_POSIX_signals_Unblock_thread+0x118> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) a0020874: e59f202c ldr r2, [pc, #44] ; a00208a8 <_POSIX_signals_Unblock_thread+0x12c> a0020878: e5925000 ldr r5, [r2] a002087c: e3550000 cmp r5, #0 a0020880: 0a000003 beq a0020894 <_POSIX_signals_Unblock_thread+0x118> a0020884: e5921004 ldr r1, [r2, #4] a0020888: e1500001 cmp r0, r1 _Thread_Dispatch_necessary = true; a002088c: 05c26010 strbeq r6, [r2, #16] } } return false; a0020890: e1a05003 mov r5, r3 } a0020894: e1a00005 mov r0, r5 a0020898: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0005e18 <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005e18: e59f30b4 ldr r3, [pc, #180] ; a0005ed4 <_TOD_Validate+0xbc> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a0005e1c: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005e20: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005e24: e593100c ldr r1, [r3, #12] if ((!the_tod) || a0005e28: 0a000021 beq a0005eb4 <_TOD_Validate+0x9c> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a0005e2c: e59f00a4 ldr r0, [pc, #164] ; a0005ed8 <_TOD_Validate+0xc0> a0005e30: eb004688 bl a0017858 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005e34: e5943018 ldr r3, [r4, #24] a0005e38: e1530000 cmp r3, r0 a0005e3c: 2a000020 bcs a0005ec4 <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || a0005e40: e5943014 ldr r3, [r4, #20] a0005e44: e353003b cmp r3, #59 ; 0x3b a0005e48: 8a00001d bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a0005e4c: e5943010 ldr r3, [r4, #16] a0005e50: e353003b cmp r3, #59 ; 0x3b a0005e54: 8a00001a bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a0005e58: e594300c ldr r3, [r4, #12] a0005e5c: e3530017 cmp r3, #23 a0005e60: 8a000017 bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a0005e64: e5943004 ldr r3, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || a0005e68: e3530000 cmp r3, #0 a0005e6c: 0a000012 beq a0005ebc <_TOD_Validate+0xa4> (the_tod->month == 0) || a0005e70: e353000c cmp r3, #12 a0005e74: 8a000012 bhi a0005ec4 <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005e78: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a0005e7c: e59f1058 ldr r1, [pc, #88] ; a0005edc <_TOD_Validate+0xc4> a0005e80: e1520001 cmp r2, r1 a0005e84: 9a000010 bls a0005ecc <_TOD_Validate+0xb4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a0005e88: e5940008 ldr r0, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005e8c: e3500000 cmp r0, #0 a0005e90: 0a00000e beq a0005ed0 <_TOD_Validate+0xb8> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a0005e94: e3120003 tst r2, #3 a0005e98: e59f2040 ldr r2, [pc, #64] ; a0005ee0 <_TOD_Validate+0xc8> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a0005e9c: 0283300d addeq r3, r3, #13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a0005ea0: e7924103 ldr r4, [r2, r3, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( a0005ea4: e1500004 cmp r0, r4 a0005ea8: 83a00000 movhi r0, #0 a0005eac: 93a00001 movls r0, #1 a0005eb0: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a0005eb4: e1a00004 mov r0, r4 <== NOT EXECUTED a0005eb8: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005ebc: e1a00003 mov r0, r3 <== NOT EXECUTED a0005ec0: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005ec4: e3a00000 mov r0, #0 a0005ec8: e8bd8010 pop {r4, pc} a0005ecc: e3a00000 mov r0, #0 if ( the_tod->day > days_in_month ) return false; return true; } a0005ed0: e8bd8010 pop {r4, pc} =============================================================================== a0013fc8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a0013fc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0013fcc: e24dd018 sub sp, sp, #24 a0013fd0: 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; a0013fd4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0013fd8: e28ba004 add sl, fp, #4 a0013fdc: e28d7004 add r7, sp, #4 a0013fe0: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013fe4: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; a0013fe8: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); a0013fec: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0013ff0: e1a0500d mov r5, sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a0013ff4: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; a0013ff8: e98d2008 stmib sp, {r3, sp} */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0013ffc: 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; a0014000: 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 ); a0014004: 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; a0014008: e59f2154 ldr r2, [pc, #340] ; a0014164 <_Timer_server_Body+0x19c> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001400c: e1a00009 mov r0, r9 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0014010: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a0014014: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014018: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a001401c: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014020: e0611003 rsb r1, r1, r3 a0014024: eb0010fe bl a0018424 <_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(); a0014028: e59f3138 ldr r3, [pc, #312] ; a0014168 <_Timer_server_Body+0x1a0> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a001402c: 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(); a0014030: 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 ) { a0014034: e1560002 cmp r6, r2 a0014038: 9a000004 bls a0014050 <_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 ); a001403c: e0621006 rsb r1, r2, r6 a0014040: e1a00008 mov r0, r8 a0014044: e1a02005 mov r2, r5 a0014048: eb0010f5 bl a0018424 <_Watchdog_Adjust_to_chain> a001404c: ea000004 b a0014064 <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { a0014050: 2a000003 bcs a0014064 <_Timer_server_Body+0x9c> /* * 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 ); a0014054: e1a00008 mov r0, r8 a0014058: e3a01001 mov r1, #1 a001405c: e0662002 rsb r2, r6, r2 a0014060: eb0010c7 bl a0018384 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; a0014064: 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 ); a0014068: e5940078 ldr r0, [r4, #120] ; 0x78 a001406c: eb00029b bl a0014ae0 <_Chain_Get> if ( timer == NULL ) { a0014070: e2506000 subs r6, r0, #0 a0014074: 0a000009 beq a00140a0 <_Timer_server_Body+0xd8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a0014078: e5963038 ldr r3, [r6, #56] ; 0x38 a001407c: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a0014080: 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 ) { a0014084: 0a000002 beq a0014094 <_Timer_server_Body+0xcc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a0014088: e3530003 cmp r3, #3 a001408c: 1afffff5 bne a0014068 <_Timer_server_Body+0xa0> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a0014090: e1a00008 mov r0, r8 a0014094: e2861010 add r1, r6, #16 a0014098: eb00110c bl a00184d0 <_Watchdog_Insert> a001409c: eafffff1 b a0014068 <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); a00140a0: ebffff96 bl a0013f00 if ( _Chain_Is_empty( insert_chain ) ) { a00140a4: e59d300c ldr r3, [sp, #12] a00140a8: e153000a cmp r3, sl a00140ac: 1a000006 bne a00140cc <_Timer_server_Body+0x104> ts->insert_chain = NULL; a00140b0: e5846078 str r6, [r4, #120] ; 0x78 a00140b4: 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 ) ) { a00140b8: e59d3000 ldr r3, [sp] a00140bc: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; a00140c0: 13a06000 movne r6, #0 a00140c4: 1a000002 bne a00140d4 <_Timer_server_Body+0x10c> a00140c8: ea000013 b a001411c <_Timer_server_Body+0x154> a00140cc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED a00140d0: eaffffcc b a0014008 <_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 ); a00140d4: ebffff89 bl a0013f00 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a00140d8: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a00140dc: e1520007 cmp r2, r7 a00140e0: 0a00000b beq a0014114 <_Timer_server_Body+0x14c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a00140e4: e5923000 ldr r3, [r2] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { a00140e8: e3520000 cmp r2, #0 the_chain->first = new_first; a00140ec: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); a00140f0: e5835004 str r5, [r3, #4] a00140f4: 0a000006 beq a0014114 <_Timer_server_Body+0x14c> watchdog->state = WATCHDOG_INACTIVE; a00140f8: e5826008 str r6, [r2, #8] a00140fc: 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 ); a0014100: e592301c ldr r3, [r2, #28] a0014104: e5920020 ldr r0, [r2, #32] a0014108: e5921024 ldr r1, [r2, #36] ; 0x24 a001410c: e12fff33 blx r3 } a0014110: eaffffef b a00140d4 <_Timer_server_Body+0x10c> a0014114: e129f000 msr CPSR_fc, r0 a0014118: eaffffb8 b a0014000 <_Timer_server_Body+0x38> } else { ts->active = false; a001411c: e3a03000 mov r3, #0 a0014120: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); a0014124: ebffff79 bl a0013f10 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); a0014128: e3a01008 mov r1, #8 a001412c: e5940000 ldr r0, [r4] a0014130: eb000e45 bl a0017a4c <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a0014134: e1a00004 mov r0, r4 a0014138: ebffff7a bl a0013f28 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a001413c: e1a00004 mov r0, r4 a0014140: ebffff8c bl a0013f78 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a0014144: eb000bbe bl a0017044 <_Thread_Enable_dispatch> ts->active = true; a0014148: e3a03001 mov r3, #1 a001414c: 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 ); a0014150: e2840008 add r0, r4, #8 a0014154: eb001133 bl a0018628 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014158: e2840040 add r0, r4, #64 ; 0x40 a001415c: eb001131 bl a0018628 <_Watchdog_Remove> a0014160: eaffffa6 b a0014000 <_Timer_server_Body+0x38> =============================================================================== a000a1e0 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) a000a1e0: e3500000 cmp r0, #0 a000a1e4: 0a00000b beq a000a218 a000a1e8: e5903000 ldr r3, [r0] a000a1ec: e3530000 cmp r3, #0 a000a1f0: 0a000008 beq a000a218 return EINVAL; switch ( policy ) { a000a1f4: e3510004 cmp r1, #4 a000a1f8: 8a000008 bhi a000a220 a000a1fc: e3a03001 mov r3, #1 a000a200: e1a03113 lsl r3, r3, r1 a000a204: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; a000a208: 15801014 strne r1, [r0, #20] return 0; a000a20c: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { a000a210: 112fff1e bxne lr a000a214: ea000001 b a000a220 <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; a000a218: e3a00016 mov r0, #22 a000a21c: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; a000a220: e3a00086 mov r0, #134 ; 0x86 } } a000a224: e12fff1e bx lr =============================================================================== a0005d14 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { a0005d14: e92d40f0 push {r4, r5, r6, r7, lr} POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; a0005d18: e59f50a8 ldr r5, [pc, #168] ; a0005dc8 a0005d1c: e3510000 cmp r1, #0 a0005d20: 11a05001 movne r5, r1 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) a0005d24: e5953004 ldr r3, [r5, #4] int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { a0005d28: e1a07000 mov r7, r0 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) a0005d2c: e3530001 cmp r3, #1 a0005d30: 0a000020 beq a0005db8 return EINVAL; if ( !the_attr->is_initialized ) a0005d34: e5953000 ldr r3, [r5] a0005d38: e3530000 cmp r3, #0 a0005d3c: 0a00001f beq a0005dc0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0005d40: e59f3084 ldr r3, [pc, #132] ; a0005dcc a0005d44: e5932000 ldr r2, [r3] a0005d48: e2822001 add r2, r2, #1 a0005d4c: e5832000 str r2, [r3] RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); a0005d50: e59f6078 ldr r6, [pc, #120] ; a0005dd0 a0005d54: e1a00006 mov r0, r6 a0005d58: eb00092b bl a000820c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { a0005d5c: e2504000 subs r4, r0, #0 a0005d60: 1a000002 bne a0005d70 _Thread_Enable_dispatch(); a0005d64: eb000c56 bl a0008ec4 <_Thread_Enable_dispatch> return ENOMEM; a0005d68: e3a0000c mov r0, #12 a0005d6c: e8bd80f0 pop {r4, r5, r6, r7, pc} } the_cond->process_shared = the_attr->process_shared; a0005d70: e5953004 ldr r3, [r5, #4] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; a0005d74: e3a05000 mov r5, #0 _Thread_queue_Initialize( a0005d78: e2840018 add r0, r4, #24 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; a0005d7c: e5843010 str r3, [r4, #16] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _Thread_queue_Initialize( a0005d80: e1a01005 mov r1, r5 a0005d84: e59f2048 ldr r2, [pc, #72] ; a0005dd4 a0005d88: e3a03074 mov r3, #116 ; 0x74 return ENOMEM; } the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; a0005d8c: e5845014 str r5, [r4, #20] _Thread_queue_Initialize( a0005d90: eb000e3f bl a0009694 <_Thread_queue_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0005d94: e596201c ldr r2, [r6, #28] Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( a0005d98: e5943008 ldr r3, [r4, #8] a0005d9c: e1d410b8 ldrh r1, [r4, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0005da0: 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; a0005da4: e584500c str r5, [r4, #12] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; a0005da8: e5873000 str r3, [r7] _Thread_Enable_dispatch(); a0005dac: eb000c44 bl a0008ec4 <_Thread_Enable_dispatch> return 0; a0005db0: e1a00005 mov r0, r5 a0005db4: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return EINVAL; a0005db8: e3a00016 mov r0, #22 <== NOT EXECUTED a0005dbc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( !the_attr->is_initialized ) return EINVAL; a0005dc0: e3a00016 mov r0, #22 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } a0005dc4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000700c : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) a000700c: e3500000 cmp r0, #0 a0007010: 0a000007 beq a0007034 a0007014: e5903000 ldr r3, [r0] a0007018: e3530000 cmp r3, #0 a000701c: 0a000004 beq a0007034 return EINVAL; switch ( pshared ) { a0007020: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; a0007024: 95801004 strls r1, [r0, #4] return 0; a0007028: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { a000702c: 912fff1e bxls lr a0007030: ea000001 b a000703c <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; a0007034: e3a00016 mov r0, #22 a0007038: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; a000703c: e3a00016 mov r0, #22 <== NOT EXECUTED } } a0007040: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0006a78 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) a0006a78: e3500000 cmp r0, #0 a0006a7c: 0a000007 beq a0006aa0 return EINVAL; if ( !attr->is_initialized ) a0006a80: e5903000 ldr r3, [r0] a0006a84: e3530000 cmp r3, #0 a0006a88: 0a000004 beq a0006aa0 return EINVAL; switch ( pshared ) { a0006a8c: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; a0006a90: 95801004 strls r1, [r0, #4] return 0; a0006a94: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { a0006a98: 912fff1e bxls lr a0006a9c: ea000001 b a0006aa8 <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; a0006aa0: e3a00016 mov r0, #22 a0006aa4: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; a0006aa8: e3a00016 mov r0, #22 <== NOT EXECUTED } } a0006aac: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0005978 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0005978: e92d4030 push {r4, r5, lr} a000597c: e1a04002 mov r4, r2 a0005980: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); a0005984: eb000139 bl a0005e70 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { a0005988: e3500000 cmp r0, #0 a000598c: 0a000003 beq a00059a0 sc = rtems_event_send( task, events ); a0005990: e1a00004 mov r0, r4 a0005994: e1a01005 mov r1, r5 } return sc; } a0005998: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a000599c: eafffda8 b a0005044 } return sc; } a00059a0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a00059a4 : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { a00059a4: e92d4030 push {r4, r5, lr} a00059a8: e1a04001 mov r4, r1 RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); a00059ac: e1a01003 mov r1, r3 a00059b0: e1a05002 mov r5, r2 a00059b4: eb000150 bl a0005efc <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { a00059b8: e3500000 cmp r0, #0 a00059bc: 0a000003 beq a00059d0 sc = rtems_event_send( task, events ); a00059c0: e1a00004 mov r0, r4 a00059c4: e1a01005 mov r1, r5 } return sc; } a00059c8: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); a00059cc: eafffd9c b a0005044 } return sc; } a00059d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0005a28 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a0005a28: e92d4030 push {r4, r5, lr} a0005a2c: e1a04002 mov r4, r2 a0005a30: e1a05003 mov r5, r3 RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); a0005a34: eb00015b bl a0005fa8 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { a0005a38: e3500000 cmp r0, #0 a0005a3c: 0a000003 beq a0005a50 sc = rtems_event_send( task, events ); a0005a40: e1a00004 mov r0, r4 a0005a44: e1a01005 mov r1, r5 } return sc; } a0005a48: e8bd4030 pop {r4, r5, lr} { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a0005a4c: eafffd7c b a0005044 } return sc; } a0005a50: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a0005704 : struct sigaction *oact ) { ISR_Level level; if ( oact ) a0005704: e3520000 cmp r2, #0 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { a0005708: e92d40f0 push {r4, r5, r6, r7, lr} a000570c: e1a04000 mov r4, r0 a0005710: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) a0005714: 0a00000a beq a0005744 *oact = _POSIX_signals_Vectors[ sig ]; a0005718: e3a0300c mov r3, #12 a000571c: e0030394 mul r3, r4, r3 a0005720: e59f00dc ldr r0, [pc, #220] ; a0005804 a0005724: e0801003 add r1, r0, r3 a0005728: e7900003 ldr r0, [r0, r3] a000572c: e1a03002 mov r3, r2 a0005730: e4830004 str r0, [r3], #4 a0005734: e5910004 ldr r0, [r1, #4] a0005738: e5820004 str r0, [r2, #4] a000573c: e5912008 ldr r2, [r1, #8] a0005740: e5832004 str r2, [r3, #4] if ( !sig ) a0005744: e3540000 cmp r4, #0 a0005748: 0a000004 beq a0005760 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); a000574c: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) a0005750: e353001f cmp r3, #31 a0005754: 8a000001 bhi a0005760 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) a0005758: e3540009 cmp r4, #9 a000575c: 1a000004 bne a0005774 rtems_set_errno_and_return_minus_one( EINVAL ); a0005760: eb002140 bl a000dc68 <__errno> a0005764: e3a03016 mov r3, #22 a0005768: e5803000 str r3, [r0] a000576c: e3e00000 mvn r0, #0 a0005770: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { a0005774: e3550000 cmp r5, #0 a0005778: 0a00001f beq a00057fc static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000577c: e10f7000 mrs r7, CPSR a0005780: e3873080 orr r3, r7, #128 ; 0x80 a0005784: 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 ) { a0005788: e5953008 ldr r3, [r5, #8] a000578c: e59f6070 ldr r6, [pc, #112] ; a0005804 a0005790: e3530000 cmp r3, #0 a0005794: 1a000009 bne a00057c0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; a0005798: e283300c add r3, r3, #12 a000579c: e0040493 mul r4, r3, r4 a00057a0: e59f1060 ldr r1, [pc, #96] ; a0005808 a00057a4: e0863004 add r3, r6, r4 a00057a8: e0812004 add r2, r1, r4 a00057ac: e7911004 ldr r1, [r1, r4] a00057b0: e7861004 str r1, [r6, r4] a00057b4: e9920006 ldmib r2, {r1, r2} a00057b8: e9830006 stmib r3, {r1, r2} a00057bc: ea00000b b a00057f0 } else { _POSIX_signals_Clear_process_signals( sig ); a00057c0: e1a00004 mov r0, r4 a00057c4: eb001597 bl a000ae28 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; a00057c8: e3a0300c mov r3, #12 a00057cc: e0040493 mul r4, r3, r4 a00057d0: e1a03005 mov r3, r5 a00057d4: e4931004 ldr r1, [r3], #4 a00057d8: e0862004 add r2, r6, r4 a00057dc: e7861004 str r1, [r6, r4] a00057e0: e5951004 ldr r1, [r5, #4] a00057e4: e5821004 str r1, [r2, #4] a00057e8: e5933004 ldr r3, [r3, #4] a00057ec: e5823008 str r3, [r2, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00057f0: e129f007 msr CPSR_fc, r7 * 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; a00057f4: e3a00000 mov r0, #0 a00057f8: e8bd80f0 pop {r4, r5, r6, r7, pc} a00057fc: e1a00005 mov r0, r5 <== NOT EXECUTED } a0005800: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a0007e20 : int sigwait( const sigset_t *set, int *sig ) { a0007e20: e92d4010 push {r4, lr} a0007e24: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); a0007e28: e3a01000 mov r1, #0 a0007e2c: e1a02001 mov r2, r1 a0007e30: ebffff84 bl a0007c48 if ( status != -1 ) { a0007e34: e3700001 cmn r0, #1 a0007e38: 0a000004 beq a0007e50 if ( sig ) a0007e3c: e3540000 cmp r4, #0 a0007e40: 0a000005 beq a0007e5c *sig = status; a0007e44: e5840000 str r0, [r4] return 0; a0007e48: e3a00000 mov r0, #0 a0007e4c: e8bd8010 pop {r4, pc} } return errno; a0007e50: eb002067 bl a000fff4 <__errno> a0007e54: e5900000 ldr r0, [r0] a0007e58: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; a0007e5c: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } a0007e60: e8bd8010 pop {r4, pc} <== NOT EXECUTED