30013580 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013580: e590304c ldr r3, [r0, #76] size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 30013584: e92d41f0 push {r4, r5, r6, r7, r8, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013588: e1530002 cmp r3, r2 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 3001358c: e1a07000 mov r7, r0 30013590: e1a06002 mov r6, r2 30013594: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30013598: 33a00001 movcc r0, #1 ; 0x1 3001359c: 38bd81f0 popcc {r4, r5, r6, r7, r8, pc} * 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 ) { 300135a0: e5973048 ldr r3, [r7, #72] 300135a4: e3530000 cmp r3, #0 ; 0x0 * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 300135a8: 01a05003 moveq r5, r3 * 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 ) { 300135ac: 0a000009 beq 300135d8 <_CORE_message_queue_Broadcast+0x58> *count = 0; 300135b0: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 300135b4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 300135b8: e5823000 str r3, [r2] <== NOT EXECUTED 300135bc: e1a00003 mov r0, r3 <== NOT EXECUTED 300135c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 300135c4: e594002c ldr r0, [r4, #44] 300135c8: eb001dee bl 3001ad88 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 300135cc: e5943028 ldr r3, [r4, #40] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 300135d0: e2855001 add r5, r5, #1 ; 0x1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 300135d4: e5836000 str r6, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 300135d8: e1a00007 mov r0, r7 300135dc: eb000993 bl 30015c30 <_Thread_queue_Dequeue> 300135e0: e2504000 subs r4, r0, #0 ; 0x0 300135e4: e1a01008 mov r1, r8 300135e8: e1a02006 mov r2, r6 300135ec: 1afffff4 bne 300135c4 <_CORE_message_queue_Broadcast+0x44> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 300135f0: e59d301c ldr r3, [sp, #28] 300135f4: e1a00004 mov r0, r4 300135f8: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 300135fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30014cb8 <_CORE_message_queue_Insert_message>: ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 30014cb8: e3520102 cmp r2, #-2147483648 ; 0x80000000 void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 30014cbc: e92d4030 push {r4, r5, lr} ISR_Level level; bool notify = false; the_message->priority = submit_type; 30014cc0: e5812008 str r2, [r1, #8] void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 30014cc4: e1a05001 mov r5, r1 30014cc8: e1a04000 mov r4, r0 ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 30014ccc: 0a000037 beq 30014db0 <_CORE_message_queue_Insert_message+0xf8> 30014cd0: e3720106 cmn r2, #-2147483647 ; 0x80000001 30014cd4: 0a000023 beq 30014d68 <_CORE_message_queue_Insert_message+0xb0> CORE_message_queue_Buffer_control *this_message; Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; 30014cd8: e5901050 ldr r1, [r0, #80] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30014cdc: e2800054 add r0, r0, #84 ; 0x54 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 30014ce0: e1500001 cmp r0, r1 <== NOT EXECUTED 30014ce4: 1a00001b bne 30014d58 <_CORE_message_queue_Insert_message+0xa0> <== NOT EXECUTED 30014ce8: e1a01000 mov r1, r0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 30014cec: e10fc000 mrs ip, CPSR <== NOT EXECUTED 30014cf0: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 30014cf4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED if ( the_message_queue->number_of_pending_messages++ == 0 ) notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 30014cf8: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 30014cfc: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30014d00: e5930000 ldr r0, [r3] <== NOT EXECUTED 30014d04: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED after_node->next = the_node; 30014d08: e5835000 str r5, [r3] <== NOT EXECUTED 30014d0c: e5842048 str r2, [r4, #72] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30014d10: e5853004 str r3, [r5, #4] <== NOT EXECUTED 30014d14: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED 30014d18: 33a02000 movcc r2, #0 ; 0x0 <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 30014d1c: e5805004 str r5, [r0, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 30014d20: e5850000 str r0, [r5] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 30014d24: e129f00c msr CPSR_fc, ip <== NOT EXECUTED * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 30014d28: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30014d2c: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED 30014d30: e5943060 ldr r3, [r4, #96] 30014d34: e3530000 cmp r3, #0 ; 0x0 30014d38: 08bd8030 popeq {r4, r5, pc} (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 30014d3c: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 30014d40: e1a0e00f mov lr, pc <== NOT EXECUTED 30014d44: e12fff13 bx r3 <== NOT EXECUTED 30014d48: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { the_node = the_node->next; 30014d4c: e5911000 ldr r1, [r1] <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_header; the_header = &the_message_queue->Pending_messages; the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { 30014d50: e1500001 cmp r0, r1 <== NOT EXECUTED 30014d54: 0affffe3 beq 30014ce8 <_CORE_message_queue_Insert_message+0x30> <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 30014d58: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 30014d5c: e1520003 cmp r2, r3 <== NOT EXECUTED 30014d60: aafffff9 bge 30014d4c <_CORE_message_queue_Insert_message+0x94> <== NOT EXECUTED 30014d64: eaffffe0 b 30014cec <_CORE_message_queue_Insert_message+0x34> <== NOT EXECUTED the_message->priority = submit_type; switch ( submit_type ) { case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 30014d68: e10f0000 mrs r0, CPSR 30014d6c: e38030c0 orr r3, r0, #192 ; 0xc0 30014d70: e129f003 msr CPSR_fc, r3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 30014d74: e2843054 add r3, r4, #84 ; 0x54 30014d78: e5813000 str r3, [r1] if ( the_message_queue->number_of_pending_messages++ == 0 ) 30014d7c: e5942048 ldr r2, [r4, #72] old_last_node = the_chain->last; 30014d80: e5941058 ldr r1, [r4, #88] 30014d84: e2823001 add r3, r2, #1 ; 0x1 the_chain->last = the_node; 30014d88: e5845058 str r5, [r4, #88] 30014d8c: e5843048 str r3, [r4, #72] 30014d90: e2722001 rsbs r2, r2, #1 ; 0x1 30014d94: 33a02000 movcc r2, #0 ; 0x0 old_last_node->next = the_node; the_node->previous = old_last_node; 30014d98: e5851004 str r1, [r5, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 30014d9c: e5815000 str r5, [r1] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 30014da0: e129f000 msr CPSR_fc, r0 * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 30014da4: e3520000 cmp r2, #0 ; 0x0 30014da8: 1affffe0 bne 30014d30 <_CORE_message_queue_Insert_message+0x78> 30014dac: e8bd8030 pop {r4, r5, pc} notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 30014db0: e10fc000 mrs ip, CPSR 30014db4: e38c30c0 orr r3, ip, #192 ; 0xc0 30014db8: e129f003 msr CPSR_fc, r3 if ( the_message_queue->number_of_pending_messages++ == 0 ) 30014dbc: e5901048 ldr r1, [r0, #72] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30014dc0: e5900050 ldr r0, [r0, #80] 30014dc4: e2812001 add r2, r1, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 30014dc8: e2843050 add r3, r4, #80 ; 0x50 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30014dcc: e5853004 str r3, [r5, #4] 30014dd0: e5842048 str r2, [r4, #72] before_node = after_node->next; after_node->next = the_node; 30014dd4: e5845050 str r5, [r4, #80] the_node->next = before_node; before_node->previous = the_node; 30014dd8: e5805004 str r5, [r0, #4] 30014ddc: e2712001 rsbs r2, r1, #1 ; 0x1 30014de0: 33a02000 movcc r2, #0 ; 0x0 Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 30014de4: e5850000 str r0, [r5] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 30014de8: e129f00c msr CPSR_fc, ip * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 30014dec: e3520000 cmp r2, #0 ; 0x0 30014df0: 1affffce bne 30014d30 <_CORE_message_queue_Insert_message+0x78> 30014df4: e8bd8030 pop {r4, r5, pc} 30011d50 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 30011d50: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 30011d54: e59f8118 ldr r8, [pc, #280] ; 30011e74 <_CORE_message_queue_Seize+0x124> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 30011d58: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 30011d5c: e598c000 ldr ip, [r8] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 30011d60: e1a00003 mov r0, r3 CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30011d64: e3a03000 mov r3, #0 ; 0x0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 30011d68: e1a07002 mov r7, r2 30011d6c: e59da020 ldr sl, [sp, #32] 30011d70: e5dd201c ldrb r2, [sp, #28] CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30011d74: e58c3034 str r3, [ip, #52] _ISR_Disable( level ); 30011d78: e10f6000 mrs r6, CPSR 30011d7c: e38630c0 orr r3, r6, #192 ; 0xc0 30011d80: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30011d84: e5954050 ldr r4, [r5, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30011d88: e2853054 add r3, r5, #84 ; 0x54 30011d8c: e1540003 cmp r4, r3 30011d90: 0a000021 beq 30011e1c <_CORE_message_queue_Seize+0xcc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30011d94: e5941000 ldr r1, [r4] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 30011d98: e5952048 ldr r2, [r5, #72] the_chain->first = new_first; 30011d9c: e1a03005 mov r3, r5 30011da0: e5a31050 str r1, [r3, #80]! 30011da4: e2422001 sub r2, r2, #1 ; 0x1 new_first->previous = _Chain_Head(the_chain); 30011da8: e5813004 str r3, [r1, #4] 30011dac: e5852048 str r2, [r5, #72] _ISR_Enable( level ); 30011db0: e129f006 msr CPSR_fc, r6 *size_p = the_message->Contents.size; 30011db4: e594300c ldr r3, [r4, #12] _Thread_Executing->Wait.count = the_message->priority; 30011db8: e5981000 ldr r1, [r8] 30011dbc: e5942008 ldr r2, [r4, #8] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 30011dc0: e5803000 str r3, [r0] _Thread_Executing->Wait.count = the_message->priority; _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 30011dc4: e2846010 add r6, r4, #16 ; 0x10 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = the_message->priority; 30011dc8: e5812024 str r2, [r1, #36] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011dcc: e5902000 ldr r2, [r0] 30011dd0: e1a01006 mov r1, r6 30011dd4: e1a00007 mov r0, r7 30011dd8: eb00136d bl 30016b94 * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 30011ddc: e1a00005 mov r0, r5 30011de0: ebffead4 bl 3000c938 <_Thread_queue_Dequeue> if ( !the_thread ) { 30011de4: e2501000 subs r1, r0, #0 ; 0x0 30011de8: 0a00001d beq 30011e64 <_CORE_message_queue_Seize+0x114> * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 30011dec: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 30011df0: e5912030 ldr r2, [r1, #48] <== NOT EXECUTED * There was a thread waiting to send a message. This code * puts the messages in the message queue on behalf of the * waiting task. */ the_message->priority = the_thread->Wait.count; 30011df4: e5843008 str r3, [r4, #8] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 30011df8: e584200c str r2, [r4, #12] <== NOT EXECUTED 30011dfc: e1a00006 mov r0, r6 <== NOT EXECUTED 30011e00: e591102c ldr r1, [r1, #44] <== NOT EXECUTED 30011e04: eb001362 bl 30016b94 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 30011e08: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED 30011e0c: e1a00005 mov r0, r5 <== NOT EXECUTED 30011e10: e1a01004 mov r1, r4 <== NOT EXECUTED executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 30011e14: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 30011e18: ea000ba6 b 30014cb8 <_CORE_message_queue_Insert_message> <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 30011e1c: e3520000 cmp r2, #0 ; 0x0 30011e20: 1a000003 bne 30011e34 <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 30011e24: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 30011e28: e3a03004 mov r3, #4 ; 0x4 30011e2c: e58c3034 str r3, [ip, #52] executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 30011e30: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30011e34: e3a03001 mov r3, #1 ; 0x1 30011e38: e5853030 str r3, [r5, #48] _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 30011e3c: e58c0028 str r0, [ip, #40] return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 30011e40: e58c1020 str r1, [ip, #32] executing->Wait.return_argument_second.mutable_object = buffer; 30011e44: e58c702c str r7, [ip, #44] executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 30011e48: e58c5044 str r5, [ip, #68] executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 30011e4c: e129f006 msr CPSR_fc, r6 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30011e50: e59f2020 ldr r2, [pc, #32] ; 30011e78 <_CORE_message_queue_Seize+0x128> 30011e54: e1a00005 mov r0, r5 30011e58: e1a0100a mov r1, sl } 30011e5c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30011e60: eaffeb13 b 3000cab4 <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 30011e64: e2850068 add r0, r5, #104 ; 0x68 30011e68: e1a01004 mov r1, r4 } 30011e6c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 30011e70: eaffe40f b 3000aeb4 <_Chain_Append> 30011e74: 30025e64 .word 0x30025e64 30011e78: 3000cee0 .word 0x3000cee0 30011e7c <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30011e7c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30011e80: e590c04c ldr ip, [r0, #76] CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30011e84: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30011e88: e15c0002 cmp ip, r2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 30011e8c: e1a07002 mov r7, r2 30011e90: e1a0a001 mov sl, r1 30011e94: e1a09003 mov r9, r3 30011e98: e5dd8028 ldrb r8, [sp, #40] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 30011e9c: 33a00001 movcc r0, #1 ; 0x1 30011ea0: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 30011ea4: e5954048 ldr r4, [r5, #72] 30011ea8: e3540000 cmp r4, #0 ; 0x0 30011eac: 0a00001d beq 30011f28 <_CORE_message_queue_Submit+0xac> /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 30011eb0: e5953044 ldr r3, [r5, #68] 30011eb4: e1530004 cmp r3, r4 30011eb8: 8a00002a bhi 30011f68 <_CORE_message_queue_Submit+0xec> * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 30011ebc: e3580000 cmp r8, #0 ; 0x0 30011ec0: 03a00002 moveq r0, #2 ; 0x2 30011ec4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 30011ec8: e59f30dc ldr r3, [pc, #220] ; 30011fac <_CORE_message_queue_Submit+0x130> <== NOT EXECUTED 30011ecc: e5932000 ldr r2, [r3] <== NOT EXECUTED 30011ed0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 30011ed4: 1a000021 bne 30011f60 <_CORE_message_queue_Submit+0xe4> <== NOT EXECUTED * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 30011ed8: e59f30d0 ldr r3, [pc, #208] ; 30011fb0 <_CORE_message_queue_Submit+0x134> <== NOT EXECUTED 30011edc: e5932000 ldr r2, [r3] <== NOT EXECUTED _ISR_Disable( level ); 30011ee0: e10f1000 mrs r1, CPSR <== NOT EXECUTED 30011ee4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 30011ee8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 30011eec: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 30011ef0: e5829020 str r9, [r2, #32] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; 30011ef4: e5823024 str r3, [r2, #36] <== NOT EXECUTED 30011ef8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30011efc: e5853030 str r3, [r5, #48] <== NOT EXECUTED _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; 30011f00: e5827030 str r7, [r2, #48] <== NOT EXECUTED _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; 30011f04: e582a02c str sl, [r2, #44] <== NOT EXECUTED { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 30011f08: e5825044 str r5, [r2, #68] <== NOT EXECUTED executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); 30011f0c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 30011f10: e59f209c ldr r2, [pc, #156] ; 30011fb4 <_CORE_message_queue_Submit+0x138> <== NOT EXECUTED 30011f14: e1a00005 mov r0, r5 <== NOT EXECUTED 30011f18: e59d102c ldr r1, [sp, #44] <== NOT EXECUTED 30011f1c: ebffeae4 bl 3000cab4 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 30011f20: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED 30011f24: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 30011f28: ebffea82 bl 3000c938 <_Thread_queue_Dequeue> if ( the_thread ) { 30011f2c: e2506000 subs r6, r0, #0 ; 0x0 30011f30: 05954048 ldreq r4, [r5, #72] 30011f34: 0affffdd beq 30011eb0 <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011f38: e1a0100a mov r1, sl 30011f3c: e596002c ldr r0, [r6, #44] 30011f40: e1a02007 mov r2, r7 30011f44: eb001312 bl 30016b94 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011f48: e5963028 ldr r3, [r6, #40] the_thread->Wait.count = submit_type; 30011f4c: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011f50: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 30011f54: e59d3024 ldr r3, [sp, #36] 30011f58: e5863024 str r3, [r6, #36] 30011f5c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 30011f60: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 30011f64: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 30011f68: e2850068 add r0, r5, #104 ; 0x68 30011f6c: ebffe3db bl 3000aee0 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 30011f70: e2504000 subs r4, r0, #0 ; 0x0 30011f74: 0afffff9 beq 30011f60 <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011f78: e1a0100a mov r1, sl 30011f7c: e1a02007 mov r2, r7 30011f80: e2840010 add r0, r4, #16 ; 0x10 30011f84: eb001302 bl 30016b94 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 30011f88: e59d3024 ldr r3, [sp, #36] _CORE_message_queue_Insert_message( 30011f8c: e1a00005 mov r0, r5 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 30011f90: e5843008 str r3, [r4, #8] _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 30011f94: e584700c str r7, [r4, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 30011f98: e1a01004 mov r1, r4 30011f9c: e59d2024 ldr r2, [sp, #36] 30011fa0: eb000b44 bl 30014cb8 <_CORE_message_queue_Insert_message> 30011fa4: e3a00000 mov r0, #0 ; 0x0 30011fa8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30011fac: 30025e40 .word 0x30025e40 30011fb0: 30025e64 .word 0x30025e64 30011fb4: 3000cee0 .word 0x3000cee0 30005204 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 30005204: e92d40f0 push {r4, r5, r6, r7, lr} the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 30005208: e3520000 cmp r2, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 3000520c: e1a05000 mov r5, r0 initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 30005210: e3a06000 mov r6, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 30005214: e1a04002 mov r4, r2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 30005218: e280c040 add ip, r0, #64 ; 0x40 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 3000521c: e1a07001 mov r7, r1 _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 30005220: 1585605c strne r6, [r5, #92] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 30005224: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 30005228: e5854050 str r4, [r5, #80] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 3000522c: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 30005230: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 30005234: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 30005238: 15856054 strne r6, [r5, #84] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 3000523c: 1a00000b bne 30005270 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 30005240: e59f3070 ldr r3, [pc, #112] ; 300052b8 <_CORE_mutex_Initialize+0xb4> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 30005244: e3a02001 mov r2, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 30005248: e5931000 ldr r1, [r3] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 3000524c: e5852054 str r2, [r5, #84] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30005250: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 30005254: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30005258: e3520002 cmp r2, #2 ; 0x2 the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 3000525c: e5853060 str r3, [r5, #96] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 30005260: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30005264: 0a00000a beq 30005294 <_CORE_mutex_Initialize+0x90> 30005268: e3520003 cmp r2, #3 ; 0x3 3000526c: 0a000008 beq 30005294 <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 30005270: e5971008 ldr r1, [r7, #8] 30005274: e1a00005 mov r0, r5 30005278: e2511000 subs r1, r1, #0 ; 0x0 3000527c: 13a01001 movne r1, #1 ; 0x1 30005280: e3a02b01 mov r2, #1024 ; 0x400 30005284: e3a03005 mov r3, #5 ; 0x5 30005288: eb00075b bl 30006ffc <_Thread_queue_Initialize> 3000528c: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 30005290: e8bd80f0 pop {r4, r5, r6, r7, pc} the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 30005294: e595304c ldr r3, [r5, #76] 30005298: e5912014 ldr r2, [r1, #20] 3000529c: e1520003 cmp r2, r3 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 300052a0: 2591301c ldrcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 300052a4: 33a00006 movcc r0, #6 ; 0x6 _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; 300052a8: 22833001 addcs r3, r3, #1 ; 0x1 300052ac: 2581301c strcs r3, [r1, #28] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < 300052b0: 2affffee bcs 30005270 <_CORE_mutex_Initialize+0x6c> 300052b4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300052b8: 30016124 .word 0x30016124 30009e58 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009e58: e59f313c ldr r3, [pc, #316] ; 30009f9c <_CORE_mutex_Seize_interrupt_trylock+0x144> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009e5c: e3a02000 mov r2, #0 ; 0x0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009e60: e593c000 ldr ip, [r3] #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 30009e64: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 30009e68: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009e6c: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009e70: e5903050 ldr r3, [r0, #80] 30009e74: e1530002 cmp r3, r2 30009e78: 0a00000d beq 30009eb4 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; 30009e7c: e5802050 str r2, [r0, #80] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30009e80: e5901048 ldr r1, [r0, #72] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009e84: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; 30009e88: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009e8c: e3510002 cmp r1, #2 ; 0x2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009e90: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; 30009e94: e5803054 str r3, [r0, #84] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 30009e98: e580c05c str ip, [r0, #92] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009e9c: 0a000009 beq 30009ec8 <_CORE_mutex_Seize_interrupt_trylock+0x70> 30009ea0: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED 30009ea4: 0a000007 beq 30009ec8 <_CORE_mutex_Seize_interrupt_trylock+0x70> <== NOT EXECUTED executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 30009ea8: e129f004 msr CPSR_fc, r4 30009eac: e3a00000 mov r0, #0 ; 0x0 30009eb0: e8bd8010 pop {r4, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 30009eb4: e590305c ldr r3, [r0, #92] 30009eb8: e15c0003 cmp ip, r3 30009ebc: 0a000017 beq 30009f20 <_CORE_mutex_Seize_interrupt_trylock+0xc8> the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; _ISR_Enable( level ); 30009ec0: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 30009ec4: e8bd8010 pop {r4, pc} _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 30009ec8: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009ecc: e3510003 cmp r1, #3 ; 0x3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 30009ed0: e2833001 add r3, r3, #1 ; 0x1 30009ed4: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009ed8: 1afffff2 bne 30009ea8 <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 30009edc: e590204c ldr r2, [r0, #76] <== NOT EXECUTED current = executing->current_priority; 30009ee0: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED if ( current == ceiling ) { 30009ee4: e1520003 cmp r2, r3 <== NOT EXECUTED 30009ee8: 0a00001c beq 30009f60 <_CORE_mutex_Seize_interrupt_trylock+0x108> <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 30009eec: 3a00001e bcc 30009f6c <_CORE_mutex_Seize_interrupt_trylock+0x114> <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 30009ef0: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 30009ef4: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 30009ef8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 30009efc: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 30009f00: e5802054 str r2, [r0, #84] <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; the_mutex->lock = CORE_MUTEX_UNLOCKED; 30009f04: e5801050 str r1, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 30009f08: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 30009f0c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30009f10: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 30009f14: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 30009f18: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30009f1c: e8bd8010 pop {r4, pc} <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30009f20: e5903040 ldr r3, [r0, #64] 30009f24: e3530000 cmp r3, #0 ; 0x0 30009f28: 0a000006 beq 30009f48 <_CORE_mutex_Seize_interrupt_trylock+0xf0> 30009f2c: e3530001 cmp r3, #1 ; 0x1 30009f30: 1affffe2 bne 30009ec0 <_CORE_mutex_Seize_interrupt_trylock+0x68> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 30009f34: e3a03002 mov r3, #2 ; 0x2 30009f38: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); 30009f3c: e129f004 msr CPSR_fc, r4 30009f40: e3a00000 mov r0, #0 ; 0x0 30009f44: e8bd8010 pop {r4, pc} * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 30009f48: e5903054 ldr r3, [r0, #84] 30009f4c: e2833001 add r3, r3, #1 ; 0x1 30009f50: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 30009f54: e129f004 msr CPSR_fc, r4 30009f58: e3a00000 mov r0, #0 ; 0x0 30009f5c: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 30009f60: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 30009f64: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30009f68: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30009f6c: e59f202c ldr r2, [pc, #44] ; 30009fa0 <_CORE_mutex_Seize_interrupt_trylock+0x148> <== NOT EXECUTED 30009f70: e5923000 ldr r3, [r2] <== NOT EXECUTED 30009f74: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30009f78: e5823000 str r3, [r2] <== NOT EXECUTED return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); 30009f7c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED _Thread_Change_priority( 30009f80: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30009f84: e590104c ldr r1, [r0, #76] <== NOT EXECUTED 30009f88: e590005c ldr r0, [r0, #92] <== NOT EXECUTED 30009f8c: ebfff09a bl 300061fc <_Thread_Change_priority> <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 30009f90: ebfff209 bl 300067bc <_Thread_Enable_dispatch> <== NOT EXECUTED 30009f94: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30009f98: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30009f9c: 30016124 .word 0x30016124 30009fa0: 3001606c .word 0x3001606c 300053f4 <_CORE_mutex_Surrender>: * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 300053f4: e5d03044 ldrb r3, [r0, #68] CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 300053f8: e92d4010 push {r4, lr} * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 300053fc: e3530000 cmp r3, #0 ; 0x0 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 30005400: e1a04000 mov r4, r0 Thread_Control *the_thread; Thread_Control *holder; #ifdef __RTEMS_STRICT_ORDER_MUTEX__ Chain_Node *first_node; #endif holder = the_mutex->holder; 30005404: e590005c ldr r0, [r0, #92] * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30005408: 0a000004 beq 30005420 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 3000540c: e59f3138 ldr r3, [pc, #312] ; 3000554c <_CORE_mutex_Surrender+0x158> 30005410: e5932000 ldr r2, [r3] 30005414: e1500002 cmp r0, r2 30005418: 13a00003 movne r0, #3 ; 0x3 3000541c: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 30005420: e5943054 ldr r3, [r4, #84] 30005424: e3530000 cmp r3, #0 ; 0x0 30005428: 0a000020 beq 300054b0 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 3000542c: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 30005430: e3530000 cmp r3, #0 ; 0x0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 30005434: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 30005438: 1a00001e bne 300054b8 <_CORE_mutex_Surrender+0xc4> 3000543c: e5942048 ldr r2, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30005440: e3520002 cmp r2, #2 ; 0x2 30005444: 0a00002c beq 300054fc <_CORE_mutex_Surrender+0x108> 30005448: e3520003 cmp r2, #3 ; 0x3 3000544c: 0a00002a beq 300054fc <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 30005450: e3a03000 mov r3, #0 ; 0x0 /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30005454: e3520002 cmp r2, #2 ; 0x2 first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; the_mutex->holder_id = 0; 30005458: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 3000545c: e584305c str r3, [r4, #92] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30005460: 0a00001b beq 300054d4 <_CORE_mutex_Surrender+0xe0> 30005464: e3520003 cmp r2, #3 ; 0x3 30005468: 0a000019 beq 300054d4 <_CORE_mutex_Surrender+0xe0> /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 3000546c: e1a00004 mov r0, r4 30005470: eb0005b7 bl 30006b54 <_Thread_queue_Dequeue> 30005474: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30005478: 03a03001 moveq r3, #1 ; 0x1 3000547c: 05843050 streq r3, [r4, #80] 30005480: 01a00001 moveq r0, r1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 30005484: 08bd8010 popeq {r4, pc} the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30005488: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 3000548c: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 30005490: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 30005494: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30005498: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 3000549c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 300054a0: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 300054a4: 0a000023 beq 30005538 <_CORE_mutex_Surrender+0x144> 300054a8: e35c0003 cmp ip, #3 ; 0x3 300054ac: 0a000016 beq 3000550c <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 300054b0: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 300054b4: e8bd8010 pop {r4, pc} return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; if ( the_mutex->nest_count != 0 ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 300054b8: e5943040 ldr r3, [r4, #64] 300054bc: e3530000 cmp r3, #0 ; 0x0 300054c0: 0afffffa beq 300054b0 <_CORE_mutex_Surrender+0xbc> 300054c4: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 300054c8: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 300054cc: 1affffda bne 3000543c <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 300054d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { #ifdef __RTEMS_STRICT_ORDER_MUTEX__ if(the_mutex->queue.priority_before != holder->current_priority) _Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE); #endif if ( holder->resource_count == 0 && 300054d4: e590301c ldr r3, [r0, #28] 300054d8: e3530000 cmp r3, #0 ; 0x0 300054dc: 1affffe2 bne 3000546c <_CORE_mutex_Surrender+0x78> 300054e0: e5901018 ldr r1, [r0, #24] 300054e4: e5903014 ldr r3, [r0, #20] 300054e8: e1510003 cmp r1, r3 300054ec: 0affffde beq 3000546c <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 300054f0: e3a02001 mov r2, #1 ; 0x1 300054f4: eb000340 bl 300061fc <_Thread_Change_priority> 300054f8: eaffffdb b 3000546c <_CORE_mutex_Surrender+0x78> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 300054fc: e590301c ldr r3, [r0, #28] 30005500: e2433001 sub r3, r3, #1 ; 0x1 30005504: e580301c str r3, [r0, #28] 30005508: eaffffd0 b 30005450 <_CORE_mutex_Surrender+0x5c> case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 3000550c: e591301c ldr r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 30005510: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30005514: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30005518: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 3000551c: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 30005520: e1510002 cmp r1, r2 <== NOT EXECUTED 30005524: 2affffe1 bcs 300054b0 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 30005528: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 3000552c: eb000332 bl 300061fc <_Thread_Change_priority> <== NOT EXECUTED 30005530: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005534: e8bd8010 pop {r4, pc} <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30005538: e591301c ldr r3, [r1, #28] 3000553c: e3a00000 mov r0, #0 ; 0x0 30005540: e2833001 add r3, r3, #1 ; 0x1 30005544: e581301c str r3, [r1, #28] 30005548: e8bd8010 pop {r4, pc} 3000554c: 30016124 .word 0x30016124 30021384 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 30021384: e10f2000 mrs r2, CPSR <== NOT EXECUTED 30021388: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 3002138c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30021390: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30021394: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 30021398: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 3002139c: e5831004 str r1, [r3, #4] <== NOT EXECUTED Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 300213a0: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 300213a4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 300213a8: e12fff1e bx lr <== NOT EXECUTED 30009d38 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 30009d38: e59f3010 ldr r3, [pc, #16] ; 30009d50 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 30009d3c: e5932000 ldr r2, [r3] <== NOT EXECUTED 30009d40: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 30009d44: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 30009d48: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 30009d4c: e12fff1e bx lr <== NOT EXECUTED 30009d50: 30016128 .word 0x30016128 3000430c <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3000430c: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 30004310: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 30004314: e1a04000 mov r4, r0 rtems_option option_set; RTEMS_API_Control *api; api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; 30004318: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 3000431c: e10f6000 mrs r6, CPSR 30004320: e38630c0 orr r3, r6, #192 ; 0xc0 30004324: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 30004328: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 3000432c: e5941024 ldr r1, [r4, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 30004330: e0115000 ands r5, r1, r0 30004334: 0a000022 beq 300043c4 <_Event_Surrender+0xb8> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 30004338: e59f3108 ldr r3, [pc, #264] ; 30004448 <_Event_Surrender+0x13c> 3000433c: e5932000 ldr r2, [r3] 30004340: e3520000 cmp r2, #0 ; 0x0 30004344: 0a000003 beq 30004358 <_Event_Surrender+0x4c> 30004348: e59f30fc ldr r3, [pc, #252] ; 3000444c <_Event_Surrender+0x140> 3000434c: e5932000 ldr r2, [r3] 30004350: e1540002 cmp r4, r2 30004354: 0a000025 beq 300043f0 <_Event_Surrender+0xe4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 30004358: e5943010 ldr r3, [r4, #16] 3000435c: e3130c01 tst r3, #256 ; 0x100 30004360: 0a000015 beq 300043bc <_Event_Surrender+0xb0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 30004364: e1510005 cmp r1, r5 30004368: 0a000001 beq 30004374 <_Event_Surrender+0x68> 3000436c: e3170002 tst r7, #2 ; 0x2 30004370: 0a000011 beq 300043bc <_Event_Surrender+0xb0> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30004374: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004378: e5941028 ldr r1, [r4, #40] /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3000437c: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 30004380: e3a02000 mov r2, #0 ; 0x0 /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30004384: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 30004388: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3000438c: e5815000 str r5, [r1] _ISR_Flash( level ); 30004390: e10f3000 mrs r3, CPSR 30004394: e129f006 msr CPSR_fc, r6 30004398: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000439c: e5943050 ldr r3, [r4, #80] 300043a0: e3530002 cmp r3, #2 ; 0x2 300043a4: 0a000008 beq 300043cc <_Event_Surrender+0xc0> _ISR_Enable( level ); 300043a8: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 300043ac: e59f109c ldr r1, [pc, #156] ; 30004450 <_Event_Surrender+0x144> 300043b0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 300043b4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 300043b8: ea0007f9 b 300063a4 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 300043bc: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 300043c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 300043c4: e129f006 msr CPSR_fc, r6 300043c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 300043cc: e3a03003 mov r3, #3 ; 0x3 300043d0: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 300043d4: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 300043d8: e2840048 add r0, r4, #72 ; 0x48 300043dc: eb000de7 bl 30007b80 <_Watchdog_Remove> 300043e0: e59f1068 ldr r1, [pc, #104] ; 30004450 <_Event_Surrender+0x144> 300043e4: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 300043e8: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 300043ec: ea0007ec b 300063a4 <_Thread_Clear_state> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 300043f0: e59f805c ldr r8, [pc, #92] ; 30004454 <_Event_Surrender+0x148> 300043f4: e5983000 ldr r3, [r8] 300043f8: e3530001 cmp r3, #1 ; 0x1 300043fc: 0a000002 beq 3000440c <_Event_Surrender+0x100> 30004400: e5983000 ldr r3, [r8] 30004404: e3530002 cmp r3, #2 ; 0x2 30004408: 1affffd2 bne 30004358 <_Event_Surrender+0x4c> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 3000440c: e1510005 cmp r1, r5 30004410: 0a000001 beq 3000441c <_Event_Surrender+0x110> 30004414: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 30004418: 0a000008 beq 30004440 <_Event_Surrender+0x134> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 3000441c: e1e03005 mvn r3, r5 30004420: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30004424: e5941028 ldr r1, [r4, #40] if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 30004428: e58c3000 str r3, [ip] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3000442c: e3a02003 mov r2, #3 ; 0x3 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 30004430: e3a03000 mov r3, #0 ; 0x0 30004434: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30004438: e5882000 str r2, [r8] ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3000443c: e5815000 str r5, [r1] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 30004440: e129f006 msr CPSR_fc, r6 30004444: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30004448: 30016100 .word 0x30016100 3000444c: 30016124 .word 0x30016124 30004450: 1003fff8 .word 0x1003fff8 30004454: 300162c4 .word 0x300162c4 30004458 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 30004458: e52de004 push {lr} ; (str lr, [sp, #-4]!) 3000445c: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 30004460: e1a0100d mov r1, sp 30004464: eb0008dd bl 300067e0 <_Thread_Get> switch ( location ) { 30004468: e59d2000 ldr r2, [sp] 3000446c: e3520000 cmp r2, #0 ; 0x0 30004470: 1a000013 bne 300044c4 <_Event_Timeout+0x6c> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 30004474: e10f1000 mrs r1, CPSR 30004478: e38130c0 orr r3, r1, #192 ; 0xc0 3000447c: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 30004480: e5903024 ldr r3, [r0, #36] 30004484: e3530000 cmp r3, #0 ; 0x0 30004488: 0a00000f beq 300044cc <_Event_Timeout+0x74> _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 3000448c: e59f3068 ldr r3, [pc, #104] ; 300044fc <_Event_Timeout+0xa4> _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 30004490: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 30004494: e5932000 ldr r2, [r3] 30004498: e1500002 cmp r0, r2 3000449c: 0a000010 beq 300044e4 <_Event_Timeout+0x8c> (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 300044a0: e3a03006 mov r3, #6 ; 0x6 300044a4: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 300044a8: e129f001 msr CPSR_fc, r1 300044ac: e59f104c ldr r1, [pc, #76] ; 30004500 <_Event_Timeout+0xa8> 300044b0: eb0007bb bl 300063a4 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 300044b4: e59f2048 ldr r2, [pc, #72] ; 30004504 <_Event_Timeout+0xac> 300044b8: e5923000 ldr r3, [r2] 300044bc: e2433001 sub r3, r3, #1 ; 0x1 300044c0: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 300044c4: e28dd004 add sp, sp, #4 ; 0x4 300044c8: e8bd8000 pop {pc} 300044cc: e59f2030 ldr r2, [pc, #48] ; 30004504 <_Event_Timeout+0xac> <== NOT EXECUTED 300044d0: e5923000 ldr r3, [r2] <== NOT EXECUTED 300044d4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 300044d8: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 300044dc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 300044e0: eafffff7 b 300044c4 <_Event_Timeout+0x6c> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 300044e4: e59f201c ldr r2, [pc, #28] ; 30004508 <_Event_Timeout+0xb0> <== NOT EXECUTED 300044e8: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 300044ec: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 300044f0: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 300044f4: 95823000 strls r3, [r2] <== NOT EXECUTED 300044f8: eaffffe8 b 300044a0 <_Event_Timeout+0x48> <== NOT EXECUTED 300044fc: 30016124 .word 0x30016124 30004500: 1003fff8 .word 0x1003fff8 30004504: 3001606c .word 0x3001606c 30004508: 300162c4 .word 0x300162c4 30008540 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 30008540: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t search_count; Heap_Block *the_block; void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; 30008544: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 30008548: e1a07000 mov r7, r0 3000854c: e1a03001 mov r3, r1 30008550: e24dd010 sub sp, sp, #16 ; 0x10 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 30008554: e1a00001 mov r0, r1 void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 30008558: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 3000855c: e1a0b002 mov fp, r2 Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 30008560: e1a01009 mov r1, r9 30008564: e5972014 ldr r2, [r7, #20] void *user_ptr = NULL; uint32_t const page_size = the_heap->page_size; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET; 30008568: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 3000856c: eb000163 bl 30008b00 <_Heap_Calc_block_size> if(the_size == 0) 30008570: e3500000 cmp r0, #0 ; 0x0 30008574: e58d0008 str r0, [sp, #8] 30008578: 0a000064 beq 30008710 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000857c: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 30008580: e35b0000 cmp fp, #0 ; 0x0 30008584: 03a0b004 moveq fp, #4 ; 0x4 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 30008588: e1570005 cmp r7, r5 3000858c: 0a00005f beq 30008710 <_Heap_Allocate_aligned+0x1d0> 30008590: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30008594: e5953004 ldr r3, [r5, #4] uint32_t const block_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); if(block_size >= the_size) { /* the_block is large enough. */ 30008598: e59d1008 ldr r1, [sp, #8] 3000859c: e3c36001 bic r6, r3, #1 ; 0x1 300085a0: e1510006 cmp r1, r6 300085a4: 8a000023 bhi 30008638 <_Heap_Allocate_aligned+0xf8> return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; aligned_user_addr = block_end - end_to_user_offs; 300085a8: e59d3004 ldr r3, [sp, #4] /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 300085ac: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 300085b0: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 300085b4: e1a0100b mov r1, fp 300085b8: e1a00004 mov r0, r4 /* Calculate 'aligned_user_addr' that will become the user pointer we return. It should be at least 'end_to_user_offs' bytes less than the the 'block_end' and should be aligned on 'alignment' boundary. Calculations are from the 'block_end' as we are going to split free block so that the upper part of the block becomes used block. */ _H_uptr_t const block_end = _H_p2u(the_block) + block_size; 300085bc: e58d200c str r2, [sp, #12] 300085c0: eb003b77 bl 300173a4 <__umodsi3> 300085c4: e0608004 rsb r8, r0, r4 if(block_size >= the_size) { /* the_block is large enough. */ _H_uptr_t user_addr; _H_uptr_t aligned_user_addr; _H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block)); 300085c8: e1a00008 mov r0, r8 300085cc: e1a01009 mov r1, r9 300085d0: eb003b73 bl 300173a4 <__umodsi3> 300085d4: e2854008 add r4, r5, #8 ; 0x8 300085d8: e0602008 rsb r2, r0, r8 only at 'page_size' aligned addresses */ user_addr = aligned_user_addr; _Heap_Align_down_uptr(&user_addr, page_size); /* Make sure 'user_addr' calculated didn't run out of 'the_block'. */ if(user_addr >= user_area) { 300085dc: e1540002 cmp r4, r2 300085e0: 8a000014 bhi 30008638 <_Heap_Allocate_aligned+0xf8> /* The block seems to be acceptable. Check if the remainder of 'the_block' is less than 'min_block_size' so that 'the_block' won't actually be split at the address we assume. */ if(user_addr - user_area < the_heap->min_block_size) { 300085e4: e597c014 ldr ip, [r7, #20] 300085e8: e0643002 rsb r3, r4, r2 300085ec: e153000c cmp r3, ip 300085f0: 2a00001c bcs 30008668 <_Heap_Allocate_aligned+0x128> 'aligned_user_addr' to be outside of [0,page_size) range. If we do, we will need to store this distance somewhere to be able to resurrect the block address from the user pointer. (Having the distance within [0,page_size) range allows resurrection by aligning user pointer down to the nearest 'page_size' boundary.) */ if(aligned_user_addr - user_addr >= page_size) { 300085f4: e0643008 rsb r3, r4, r8 300085f8: e1590003 cmp r9, r3 300085fc: 81a02004 movhi r2, r4 30008600: 8a000018 bhi 30008668 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 30008604: e1a00004 mov r0, r4 30008608: e1a0100b mov r1, fp 3000860c: e58dc000 str ip, [sp] 30008610: eb003b63 bl 300173a4 <__umodsi3> *value = r ? v - r + a : v; 30008614: e3500000 cmp r0, #0 ; 0x0 30008618: 1084300b addne r3, r4, fp 3000861c: 10600003 rsbne r0, r0, r3 30008620: 01a03000 moveq r3, r0 30008624: 10643000 rsbne r3, r4, r0 30008628: 01a00004 moveq r0, r4 /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 3000862c: e1590003 cmp r9, r3 30008630: e59dc000 ldr ip, [sp] 30008634: 8a000009 bhi 30008660 <_Heap_Allocate_aligned+0x120> /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 30008638: e5955008 ldr r5, [r5, #8] 3000863c: e28aa001 add sl, sl, #1 ; 0x1 alignment = CPU_ALIGNMENT; /* Find large enough free block that satisfies the alignment requirements. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 30008640: e1570005 cmp r7, r5 30008644: 1affffd2 bne 30008594 <_Heap_Allocate_aligned+0x54> 30008648: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 3000864c: e5973044 ldr r3, [r7, #68] 30008650: e153000a cmp r3, sl stats->max_search = search_count; 30008654: 3587a044 strcc sl, [r7, #68] return user_ptr; } 30008658: e28dd010 add sp, sp, #16 ; 0x10 3000865c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* The user pointer will be too far from 'user_addr'. See if we can make 'aligned_user_addr' to be close enough to the 'user_addr'. */ aligned_user_addr = user_addr; _Heap_Align_up_uptr(&aligned_user_addr, alignment); if(aligned_user_addr - user_addr >= page_size) { 30008660: e1a02004 mov r2, r4 30008664: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 30008668: e3580000 cmp r8, #0 ; 0x0 3000866c: 0afffff1 beq 30008638 <_Heap_Allocate_aligned+0xf8> /* The block is indeed acceptable: calculate the size of the block to be allocated and perform allocation. */ uint32_t const alloc_size = block_end - user_addr + HEAP_BLOCK_USER_OFFSET; 30008670: e59d100c ldr r1, [sp, #12] 30008674: e2813008 add r3, r1, #8 ; 0x8 30008678: e0624003 rsb r4, r2, r3 Heap_Block *the_block, uint32_t alloc_size) { Heap_Statistics *const stats = &the_heap->stats; uint32_t const block_size = _Heap_Block_size(the_block); uint32_t const the_rest = block_size - alloc_size; 3000867c: e0642006 rsb r2, r4, r6 _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 30008680: e152000c cmp r2, ip /* Split the block so that lower part is still free, and upper part becomes used. */ the_block->size = the_rest | HEAP_PREV_USED; 30008684: 23823001 orrcs r3, r2, #1 ; 0x1 30008688: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 3000868c: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 30008690: 25854004 strcs r4, [r5, #4] _HAssert(_Heap_Is_aligned(block_size, the_heap->page_size)); _HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size)); _HAssert(alloc_size <= block_size); _HAssert(_Heap_Is_prev_used(the_block)); if(the_rest >= the_heap->min_block_size) { 30008694: 2a000007 bcs 300086b8 <_Heap_Allocate_aligned+0x178> /* Don't split the block as remainder is either zero or too small to be used as a separate free block. Change 'alloc_size' to the size of the block and remove the block from the list of free blocks. */ _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; 30008698: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 3000869c: e5951008 ldr r1, [r5, #8] Heap_Block *prev = block->prev; 300086a0: e595200c ldr r2, [r5, #12] 300086a4: e2433001 sub r3, r3, #1 ; 0x1 prev->next = next; next->prev = prev; 300086a8: e581200c str r2, [r1, #12] 300086ac: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 300086b0: e5821008 str r1, [r2, #8] 300086b4: e1a04006 mov r4, r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 300086b8: e0852004 add r2, r5, r4 } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 300086bc: e5923004 ldr r3, [r2, #4] stats->allocs += 1; check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 300086c0: e1a00008 mov r0, r8 _Heap_Block_remove(the_block); alloc_size = block_size; stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; 300086c4: e3833001 orr r3, r3, #1 ; 0x1 300086c8: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 300086cc: e5971030 ldr r1, [r7, #48] if(stats->min_free_size > stats->free_size) 300086d0: e5973034 ldr r3, [r7, #52] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 300086d4: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 300086d8: e1510003 cmp r1, r3 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 300086dc: e597304c ldr r3, [r7, #76] _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 300086e0: e5972040 ldr r2, [r7, #64] stats->free_blocks -= 1; } /* Mark the block as used (in the next block). */ _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; 300086e4: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 300086e8: 35871034 strcc r1, [r7, #52] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; stats->allocs += 1; 300086ec: e5971048 ldr r1, [r7, #72] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 300086f0: e2833001 add r3, r3, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 300086f4: e2822001 add r2, r2, #1 ; 0x1 _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 300086f8: e083300a add r3, r3, sl stats->allocs += 1; 300086fc: e2811001 add r1, r1, #1 ; 0x1 _Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED; /* Update statistics */ stats->free_size -= alloc_size; if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; stats->used_blocks += 1; 30008700: e5872040 str r2, [r7, #64] _HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment)); the_block = block_allocate(the_heap, the_block, alloc_size); stats->searches += search_count + 1; 30008704: e587304c str r3, [r7, #76] stats->allocs += 1; 30008708: e5871048 str r1, [r7, #72] 3000870c: eaffffce b 3000864c <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 30008710: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30008714: eaffffcf b 30008658 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED 3002b264 <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3002b264: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; 3002b268: e5902020 ldr r2, [r0, #32] Heap_Block *const end = the_heap->final; 3002b26c: e5906024 ldr r6, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 3002b270: e3a03000 mov r3, #0 ; 0x0 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 3002b274: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3002b278: e1a0c001 mov ip, r1 the_info->Free.number = 0; the_info->Free.total = 0; the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; 3002b27c: e5813010 str r3, [r1, #16] Heap_Block *const end = the_heap->final; _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 3002b280: e5813000 str r3, [r1] the_info->Free.total = 0; 3002b284: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 3002b288: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 3002b28c: e581300c str r3, [r1, #12] the_info->Used.total = 0; 3002b290: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { 3002b294: 0a00001f beq 3002b318 <_Heap_Get_information+0xb4> 3002b298: e5925004 ldr r5, [r2, #4] 3002b29c: ea00000b b 3002b2d0 <_Heap_Get_information+0x6c> uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 3002b2a0: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 3002b2a4: e59c2014 ldr r2, [ip, #20] if ( the_info->Used.largest < the_size ) 3002b2a8: e59c1010 ldr r1, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 3002b2ac: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 3002b2b0: e1510000 cmp r1, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 3002b2b4: e0822000 add r2, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 3002b2b8: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 3002b2bc: e58c2014 str r2, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 3002b2c0: 358c0010 strcc r0, [ip, #16] the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 3002b2c4: e1560004 cmp r6, r4 } else { the_info->Free.number++; the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 3002b2c8: e1a02004 mov r2, r4 the_info->Free.largest = 0; the_info->Used.number = 0; the_info->Used.total = 0; the_info->Used.largest = 0; while ( the_block != end ) { 3002b2cc: 0a000011 beq 3002b318 <_Heap_Get_information+0xb4> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3002b2d0: e3c50001 bic r0, r5, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 3002b2d4: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3002b2d8: e5945004 ldr r5, [r4, #4] uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 3002b2dc: e3150001 tst r5, #1 ; 0x1 3002b2e0: 1affffee bne 3002b2a0 <_Heap_Get_information+0x3c> the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 3002b2e4: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 3002b2e8: e99c0006 ldmib ip, {r1, r2} the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 3002b2ec: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 3002b2f0: e1510000 cmp r1, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; 3002b2f4: e0822000 add r2, r2, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 3002b2f8: 358c0004 strcc r0, [ip, #4] the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 3002b2fc: e58c3000 str r3, [ip] the_info->Free.total += the_size; 3002b300: e58c2008 str r2, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 3002b304: e5943000 ldr r3, [r4] 3002b308: e1530000 cmp r3, r0 3002b30c: 0affffec beq 3002b2c4 <_Heap_Get_information+0x60> 3002b310: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 3002b314: ea000003 b 3002b328 <_Heap_Get_information+0xc4> <== NOT EXECUTED } /* Handle the last dummy block. Don't consider this block to be "used" as client never allocated it. Make 'Used.total' contain this blocks' overhead though. */ the_info->Used.total += HEAP_OVERHEAD; 3002b318: e59c3014 ldr r3, [ip, #20] 3002b31c: e3a00000 mov r0, #0 ; 0x0 3002b320: e2833008 add r3, r3, #8 ; 0x8 3002b324: e58c3014 str r3, [ip, #20] return HEAP_GET_INFORMATION_SUCCESSFUL; } 3002b328: e8bd0070 pop {r4, r5, r6} 3002b32c: e12fff1e bx lr 30013edc <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013edc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30013ee0: e24dd00c sub sp, sp, #12 ; 0xc Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 30013ee4: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013ee8: e1a04001 mov r4, r1 30013eec: e1a09003 mov r9, r3 Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 30013ef0: e5901014 ldr r1, [r0, #20] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 30013ef4: e3a03000 mov r3, #0 ; 0x0 void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013ef8: e1a05000 mov r5, r0 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 30013efc: e590b010 ldr fp, [r0, #16] *old_mem_size = 0; 30013f00: e5893000 str r3, [r9] *avail_mem_size = 0; 30013f04: e58c3000 str r3, [ip] Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 30013f08: e58d1004 str r1, [sp, #4] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 30013f0c: e1a00004 mov r0, r4 30013f10: e5951010 ldr r1, [r5, #16] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013f14: e1a08002 mov r8, r2 30013f18: ebfff84a bl 30012048 <__umodsi3> 30013f1c: e2442008 sub r2, r4, #8 ; 0x8 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 30013f20: e595c020 ldr ip, [r5, #32] 30013f24: e5951024 ldr r1, [r5, #36] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 30013f28: e0606002 rsb r6, r0, r2 *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 30013f2c: e156000c cmp r6, ip 30013f30: 33a03000 movcc r3, #0 ; 0x0 30013f34: 23a03001 movcs r3, #1 ; 0x1 30013f38: e1560001 cmp r6, r1 30013f3c: 83a03000 movhi r3, #0 ; 0x0 30013f40: e3530000 cmp r3, #0 ; 0x0 30013f44: 0a00002d beq 30014000 <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013f48: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013f4c: e3c2a001 bic sl, r2, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013f50: e086700a add r7, r6, sl old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 30013f54: e15c0007 cmp ip, r7 30013f58: 83a03000 movhi r3, #0 ; 0x0 30013f5c: 93a03001 movls r3, #1 ; 0x1 30013f60: e1510007 cmp r1, r7 30013f64: 33a03000 movcc r3, #0 ; 0x0 30013f68: e3530000 cmp r3, #0 ; 0x0 30013f6c: 0a000023 beq 30014000 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 30013f70: e5973004 ldr r3, [r7, #4] 30013f74: e3130001 tst r3, #1 ; 0x1 30013f78: 0a000020 beq 30014000 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013f7c: e3c33001 bic r3, r3, #1 ; 0x1 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 30013f80: e1510007 cmp r1, r7 30013f84: e58d3000 str r3, [sp] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30013f88: e0873003 add r3, r7, r3 30013f8c: 15933004 ldrne r3, [r3, #4] 30013f90: 03a01001 moveq r1, #1 ; 0x1 30013f94: 12033001 andne r3, r3, #1 ; 0x1 30013f98: 158d3008 strne r3, [sp, #8] _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 30013f9c: e0643007 rsb r3, r4, r7 30013fa0: e2830004 add r0, r3, #4 ; 0x4 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 30013fa4: 058d1008 streq r1, [sp, #8] old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30013fa8: e1500008 cmp r0, r8 /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 30013fac: e5890000 str r0, [r9] _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013fb0: e2029001 and r9, r2, #1 ; 0x1 old_user_size = _Addresses_Subtract(next_block, starting_address) + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 30013fb4: 2a000014 bcs 3001400c <_Heap_Resize_block+0x130> /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 30013fb8: e59d2008 ldr r2, [sp, #8] 30013fbc: e3520000 cmp r2, #0 ; 0x0 30013fc0: 1a00000c bne 30013ff8 <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 30013fc4: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 30013fc8: e1a00004 mov r0, r4 30013fcc: e1a0100b mov r1, fp 30013fd0: ebfff81c bl 30012048 <__umodsi3> *value = r ? v - r + a : v; 30013fd4: e3500000 cmp r0, #0 ; 0x0 30013fd8: 1084300b addne r3, r4, fp 30013fdc: e59d2004 ldr r2, [sp, #4] 30013fe0: 10604003 rsbne r4, r0, r3 _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 30013fe4: e59d3000 ldr r3, [sp] 30013fe8: e1540002 cmp r4, r2 30013fec: 21a02004 movcs r2, r4 30013ff0: e1530002 cmp r3, r2 30013ff4: 2a000049 bcs 30014120 <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 30013ff8: e3a00001 mov r0, #1 ; 0x1 30013ffc: ea000000 b 30014004 <_Heap_Resize_block+0x128> 30014000: e3a00002 mov r0, #2 ; 0x2 } 30014004: e28dd00c add sp, sp, #12 ; 0xc 30014008: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 3001400c: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 30014010: e1a00004 mov r0, r4 30014014: e1a0100b mov r1, fp 30014018: ebfff80a bl 30012048 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 3001401c: e0544000 subs r4, r4, r0 30014020: 0a000020 beq 300140a8 <_Heap_Resize_block+0x1cc> can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; if (new_block_size < min_block_size) { 30014024: e59dc004 ldr ip, [sp, #4] /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 30014028: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 3001402c: e15c0000 cmp ip, r0 30014030: 9a000021 bls 300140bc <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 30014034: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30014038: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 3001403c: 10800003 addne r0, r0, r3 if (new_block_size < min_block_size) { uint32_t delta = min_block_size - new_block_size; _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30014040: 1a00001d bne 300140bc <_Heap_Resize_block+0x1e0> ++stats->resizes; 30014044: e5953054 ldr r3, [r5, #84] 30014048: e1a00004 mov r0, r4 3001404c: e2833001 add r3, r3, #1 ; 0x1 30014050: e5853054 str r3, [r5, #84] 30014054: eaffffea b 30014004 <_Heap_Resize_block+0x128> next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { 30014058: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 3001405c: e15c0004 cmp ip, r4 <== NOT EXECUTED 30014060: 8a000010 bhi 300140a8 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 30014064: e0861000 add r1, r6, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 30014068: e1803009 orr r3, r0, r9 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 3001406c: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 30014070: e5863004 str r3, [r6, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 30014074: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 30014078: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 3001407c: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 30014080: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30014084: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 30014088: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ _Heap_Free(the_heap, _Heap_User_area(next_block)); 3001408c: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ --stats->frees; /* Don't count next call in stats */ 30014090: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 30014094: e1a00005 mov r0, r5 <== NOT EXECUTED 30014098: ebffd80e bl 3000a0d8 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 3001409c: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 300140a0: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 300140a4: e5813000 str r3, [r1] <== NOT EXECUTED } } } ++stats->resizes; 300140a8: e5953054 ldr r3, [r5, #84] 300140ac: e3a00000 mov r0, #0 ; 0x0 300140b0: e2833001 add r3, r3, #1 ; 0x1 300140b4: e5853054 str r3, [r5, #84] 300140b8: eaffffd1 b 30014004 <_Heap_Resize_block+0x128> _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 300140bc: e59d1008 ldr r1, [sp, #8] 300140c0: e3510000 cmp r1, #0 ; 0x0 300140c4: 1affffe3 bne 30014058 <_Heap_Resize_block+0x17c> /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 300140c8: e59d3000 ldr r3, [sp] _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 300140cc: e59dc000 ldr ip, [sp] if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 300140d0: e0842003 add r2, r4, r3 300140d4: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 300140d8: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 300140dc: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 300140e0: e787200c str r2, [r7, ip] Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 300140e4: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 300140e8: e5810004 str r0, [r1, #4] next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 300140ec: e5953030 ldr r3, [r5, #48] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 300140f0: e597000c ldr r0, [r7, #12] 300140f4: e0833004 add r3, r3, r4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 300140f8: e597c008 ldr ip, [r7, #8] 300140fc: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 30014100: e59d3030 ldr r3, [sp, #48] 30014104: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 30014108: e581c008 str ip, [r1, #8] block->prev = prev; 3001410c: e581000c str r0, [r1, #12] 30014110: e5832000 str r2, [r3] next->prev = prev->next = block; 30014114: e5801008 str r1, [r0, #8] 30014118: e58c100c str r1, [ip, #12] 3001411c: eaffffe1 b 300140a8 <_Heap_Resize_block+0x1cc> _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 30014120: e1a01007 mov r1, r7 30014124: e1a00005 mov r0, r5 30014128: ebffc5d6 bl 30005888 <_Heap_Block_allocate> _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 3001412c: e080000a add r0, r0, sl 30014130: e1800009 orr r0, r0, r9 30014134: e5860004 str r0, [r6, #4] --stats->used_blocks; 30014138: e5953040 ldr r3, [r5, #64] 3001413c: e2433001 sub r3, r3, #1 ; 0x1 30014140: e5853040 str r3, [r5, #64] 30014144: eaffffd7 b 300140a8 <_Heap_Resize_block+0x1cc> 3000d9b0 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d9b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000d9b4: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; 3000d9b8: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d9bc: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000d9c0: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d9c4: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 3000d9c8: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; 3000d9cc: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d9d0: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000d9d4: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000d9d8: 13a08000 movne r8, #0 ; 0x0 3000d9dc: 0a000086 beq 3000dbfc <_Heap_Walk+0x24c> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); error = 1; } if (the_block->prev_size != the_heap->page_size) { 3000d9e0: e5962000 ldr r2, [r6] 3000d9e4: e5953010 ldr r3, [r5, #16] 3000d9e8: e1520003 cmp r2, r3 3000d9ec: 0a000003 beq 3000da00 <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 3000d9f0: e59f0238 ldr r0, [pc, #568] ; 3000dc30 <_Heap_Walk+0x280> <== NOT EXECUTED 3000d9f4: e1a0100b mov r1, fp <== NOT EXECUTED 3000d9f8: ebffdc18 bl 30004a60 <== NOT EXECUTED 3000d9fc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { 3000da00: e59d3000 ldr r3, [sp] 3000da04: e1560003 cmp r6, r3 3000da08: 0a000080 beq 3000dc10 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000da0c: e5960004 ldr r0, [r6, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 3000da10: e5951020 ldr r1, [r5, #32] 3000da14: e3c07001 bic r7, r0, #1 ; 0x1 3000da18: e5952024 ldr r2, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 3000da1c: e0864007 add r4, r6, r7 3000da20: e1540001 cmp r4, r1 3000da24: 33a03000 movcc r3, #0 ; 0x0 3000da28: 23a03001 movcs r3, #1 ; 0x1 3000da2c: e1540002 cmp r4, r2 3000da30: 83a03000 movhi r3, #0 ; 0x0 3000da34: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000da38: 1200a001 andne sl, r0, #1 ; 0x1 3000da3c: 11a09004 movne r9, r4 3000da40: 0a000075 beq 3000dc1c <_Heap_Walk+0x26c> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000da44: e5943004 ldr r3, [r4, #4] 3000da48: e3130001 tst r3, #1 ; 0x1 3000da4c: 1a00003f bne 3000db50 <_Heap_Walk+0x1a0> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { 3000da50: e5943000 ldr r3, [r4] 3000da54: e1530007 cmp r3, r7 3000da58: 0a000003 beq 3000da6c <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 3000da5c: e59f01d0 ldr r0, [pc, #464] ; 3000dc34 <_Heap_Walk+0x284> <== NOT EXECUTED 3000da60: e1a0100b mov r1, fp <== NOT EXECUTED 3000da64: ebffdbfd bl 30004a60 <== NOT EXECUTED 3000da68: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { 3000da6c: e35a0000 cmp sl, #0 ; 0x0 3000da70: 1a000005 bne 3000da8c <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); 3000da74: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3000da78: 1a00005c bne 3000dbf0 <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 3000da7c: e59f01b4 ldr r0, [pc, #436] ; 3000dc38 <_Heap_Walk+0x288> <== NOT EXECUTED 3000da80: e1a0100b mov r1, fp <== NOT EXECUTED 3000da84: ebffdbf5 bl 30004a60 <== NOT EXECUTED 3000da88: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000da8c: e5953008 ldr r3, [r5, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 3000da90: e1530006 cmp r3, r6 3000da94: 11550003 cmpne r5, r3 3000da98: 0a000003 beq 3000daac <_Heap_Walk+0xfc> block = block->next; 3000da9c: e5933008 ldr r3, [r3, #8] error = 1; } { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) 3000daa0: e1530006 cmp r3, r6 3000daa4: 11550003 cmpne r5, r3 3000daa8: 1afffffb bne 3000da9c <_Heap_Walk+0xec> block = block->next; if(block != the_block) { 3000daac: e1530006 cmp r3, r6 3000dab0: 0a000026 beq 3000db50 <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); 3000dab4: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED 3000dab8: 1a000049 bne 3000dbe4 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 3000dabc: e59f0178 ldr r0, [pc, #376] ; 3000dc3c <_Heap_Walk+0x28c> <== NOT EXECUTED 3000dac0: e1a0100b mov r1, fp <== NOT EXECUTED 3000dac4: ebffdbe5 bl 30004a60 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000dac8: e59f0170 ldr r0, [pc, #368] ; 3000dc40 <_Heap_Walk+0x290> <== NOT EXECUTED 3000dacc: ebffdbe3 bl 30004a60 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000dad0: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000dad4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000dad8: e1530007 cmp r3, r7 <== NOT EXECUTED 3000dadc: 8a000020 bhi 3000db64 <_Heap_Walk+0x1b4> <== NOT EXECUTED printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 3000dae0: e1a00007 mov r0, r7 3000dae4: e5951010 ldr r1, [r5, #16] 3000dae8: eb00262d bl 300173a4 <__umodsi3> 3000daec: e3500000 cmp r0, #0 ; 0x0 3000daf0: 1a000031 bne 3000dbbc <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 3000daf4: e3580000 cmp r8, #0 ; 0x0 3000daf8: 1a000032 bne 3000dbc8 <_Heap_Walk+0x218> if (the_block->prev_size != the_heap->page_size) { printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); error = 1; } while ( the_block != end ) { 3000dafc: e59d3000 ldr r3, [sp] 3000db00: e1530004 cmp r3, r4 3000db04: 0a000041 beq 3000dc10 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000db08: e5940004 ldr r0, [r4, #4] printk(" prev_size %d", the_block->prev_size); else printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { 3000db0c: e5951020 ldr r1, [r5, #32] 3000db10: e3c07001 bic r7, r0, #1 ; 0x1 3000db14: e5952024 ldr r2, [r5, #36] 3000db18: e0844007 add r4, r4, r7 3000db1c: e1540001 cmp r4, r1 3000db20: 33a03000 movcc r3, #0 ; 0x0 3000db24: 23a03001 movcs r3, #1 ; 0x1 3000db28: e1540002 cmp r4, r2 3000db2c: 83a03000 movhi r3, #0 ; 0x0 3000db30: e3530000 cmp r3, #0 ; 0x0 3000db34: 0a000037 beq 3000dc18 <_Heap_Walk+0x268> printk("PASS: %d !block %p is out of heap\n", source, next_block); error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000db38: e5943004 ldr r3, [r4, #4] */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000db3c: e1a06009 mov r6, r9 3000db40: e3130001 tst r3, #1 ; 0x1 3000db44: e200a001 and sl, r0, #1 ; 0x1 3000db48: e1a09004 mov r9, r4 3000db4c: 0affffbf beq 3000da50 <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); 3000db50: e3580000 cmp r8, #0 ; 0x0 3000db54: 1affffdb bne 3000dac8 <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { 3000db58: e5953014 ldr r3, [r5, #20] 3000db5c: e1530007 cmp r3, r7 3000db60: 9affffde bls 3000dae0 <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); 3000db64: e59f00d8 ldr r0, [pc, #216] ; 3000dc44 <_Heap_Walk+0x294> <== NOT EXECUTED 3000db68: e1a0100b mov r1, fp <== NOT EXECUTED 3000db6c: ebffdbbb bl 30004a60 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 3000db70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000db74: e59f00cc ldr r0, [pc, #204] ; 3000dc48 <_Heap_Walk+0x298> <== NOT EXECUTED 3000db78: e1a0100b mov r1, fp <== NOT EXECUTED 3000db7c: e1a02006 mov r2, r6 <== NOT EXECUTED 3000db80: ebffdbb6 bl 30004a60 <== NOT EXECUTED 3000db84: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000db88: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 3000db8c: e5950010 ldr r0, [r5, #16] 3000db90: e3c32001 bic r2, r3, #1 ; 0x1 3000db94: e1500002 cmp r0, r2 3000db98: 01a00008 moveq r0, r8 3000db9c: 0a000004 beq 3000dbb4 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000dba0: e1a03000 mov r3, r0 <== NOT EXECUTED 3000dba4: e1a0100b mov r1, fp <== NOT EXECUTED 3000dba8: e59f009c ldr r0, [pc, #156] ; 3000dc4c <_Heap_Walk+0x29c> <== NOT EXECUTED 3000dbac: ebffdbab bl 30004a60 <== NOT EXECUTED 3000dbb0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 3000dbb4: e28dd004 add sp, sp, #4 ; 0x4 3000dbb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} printk("PASS: %d !block size is too small\n", source); error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { printk("PASS: %d !block size is misaligned\n", source); 3000dbbc: e59f008c ldr r0, [pc, #140] ; 3000dc50 <_Heap_Walk+0x2a0> <== NOT EXECUTED 3000dbc0: e1a0100b mov r1, fp <== NOT EXECUTED 3000dbc4: ebffdba5 bl 30004a60 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", 3000dbc8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3000dbcc: e59f0074 ldr r0, [pc, #116] ; 3000dc48 <_Heap_Walk+0x298> <== NOT EXECUTED 3000dbd0: e1a0100b mov r1, fp <== NOT EXECUTED 3000dbd4: e1a02006 mov r2, r6 <== NOT EXECUTED 3000dbd8: ebffdba0 bl 30004a60 <== NOT EXECUTED 3000dbdc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED 3000dbe0: eaffffe8 b 3000db88 <_Heap_Walk+0x1d8> <== NOT EXECUTED { /* Check if 'the_block' is in the free block list */ Heap_Block* block = _Heap_First(the_heap); while(block != the_block && block != tail) block = block->next; if(block != the_block) { if (do_dump || error) printk("\n"); 3000dbe4: e59f0054 ldr r0, [pc, #84] ; 3000dc40 <_Heap_Walk+0x290> <== NOT EXECUTED 3000dbe8: ebffdb9c bl 30004a60 <== NOT EXECUTED 3000dbec: eaffffb2 b 3000dabc <_Heap_Walk+0x10c> <== NOT EXECUTED if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); error = 1; } if (!prev_used) { if (do_dump || error) printk("\n"); 3000dbf0: e59f0048 ldr r0, [pc, #72] ; 3000dc40 <_Heap_Walk+0x290> <== NOT EXECUTED 3000dbf4: ebffdb99 bl 30004a60 <== NOT EXECUTED 3000dbf8: eaffff9f b 3000da7c <_Heap_Walk+0xcc> <== NOT EXECUTED /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 3000dbfc: e59f0050 ldr r0, [pc, #80] ; 3000dc54 <_Heap_Walk+0x2a4> <== NOT EXECUTED 3000dc00: e1a0100b mov r1, fp <== NOT EXECUTED 3000dc04: ebffdb95 bl 30004a60 <== NOT EXECUTED 3000dc08: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED 3000dc0c: eaffff73 b 3000d9e0 <_Heap_Walk+0x30> <== NOT EXECUTED source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000dc10: e59d6000 ldr r6, [sp] 3000dc14: eaffffdb b 3000db88 <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3000dc18: e1a06009 mov r6, r9 <== NOT EXECUTED printk(" (prev_size) %d", the_block->prev_size); } if (!_Heap_Is_block_in(the_heap, next_block)) { if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 3000dc1c: e1a02004 mov r2, r4 <== NOT EXECUTED 3000dc20: e59f0030 ldr r0, [pc, #48] ; 3000dc58 <_Heap_Walk+0x2a8> <== NOT EXECUTED 3000dc24: e1a0100b mov r1, fp <== NOT EXECUTED 3000dc28: ebffdb8c bl 30004a60 <== NOT EXECUTED 3000dc2c: eaffffe5 b 3000dbc8 <_Heap_Walk+0x218> <== NOT EXECUTED 3000dc30: 30019fa4 .word 0x30019fa4 3000dc34: 30019ffc .word 0x30019ffc 3000dc38: 3001a028 .word 0x3001a028 3000dc3c: 3001a054 .word 0x3001a054 3000dc40: 30019584 .word 0x30019584 3000dc44: 3001a080 .word 0x3001a080 3000dc48: 3001a0c8 .word 0x3001a0c8 3000dc4c: 3001a104 .word 0x3001a104 3000dc50: 3001a0a4 .word 0x3001a0a4 3000dc54: 30019f6c .word 0x30019f6c 3000dc58: 30019fd8 .word 0x30019fd8 3000a2c8 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000a2c8: e2400001 sub r0, r0, #1 ; 0x1 3000a2cc: e3500003 cmp r0, #3 ; 0x3 3000a2d0: 979ff100 ldrls pc, [pc, r0, lsl #2] 3000a2d4: ea000003 b 3000a2e8 <_Objects_API_maximum_class+0x20> 3000a2d8: 3000a308 .word 0x3000a308 <== NOT EXECUTED 3000a2dc: 3000a300 .word 0x3000a300 <== NOT EXECUTED 3000a2e0: 3000a2f8 .word 0x3000a2f8 <== NOT EXECUTED 3000a2e4: 3000a2f0 .word 0x3000a2f0 <== NOT EXECUTED case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 3000a2e8: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 3000a2ec: e12fff1e bx lr case OBJECTS_INTERNAL_API: return OBJECTS_INTERNAL_CLASSES_LAST; case OBJECTS_CLASSIC_API: return OBJECTS_RTEMS_CLASSES_LAST; case OBJECTS_POSIX_API: return OBJECTS_POSIX_CLASSES_LAST; 3000a2f0: e3a00008 mov r0, #8 ; 0x8 3000a2f4: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 3000a2f8: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED 3000a2fc: e12fff1e bx lr <== NOT EXECUTED 3000a300: e3a0000a mov r0, #10 ; 0xa 3000a304: e12fff1e bx lr 3000a308: e3a00002 mov r0, #2 ; 0x2 3000a30c: e12fff1e bx lr 30005a58 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 30005a58: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 30005a5c: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005a60: e1d091b0 ldrh r9, [r0, #16] */ void _Objects_Extend_information( Objects_Information *information ) { 30005a64: e24dd014 sub sp, sp, #20 ; 0x14 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005a68: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 30005a6c: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005a70: 2a000071 bcs 30005c3c <_Objects_Extend_information+0x1e4> 30005a74: e3a04000 mov r4, #0 ; 0x0 30005a78: e5907014 ldr r7, [r0, #20] 30005a7c: e1a0800a mov r8, sl 30005a80: e1a06004 mov r6, r4 30005a84: e3a0b001 mov fp, #1 ; 0x1 30005a88: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005a8c: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 30005a90: e0879009 add r9, r7, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005a94: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 30005a98: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005a9c: 1a000080 bne 30005ca4 <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 30005aa0: e59d3004 ldr r3, [sp, #4] 30005aa4: e080000a add r0, r0, sl 30005aa8: e0800003 add r0, r0, r3 30005aac: e1a00100 lsl r0, r0, #2 30005ab0: eb00088c bl 30007ce8 <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005ab4: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005ab8: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 30005abc: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005ac0: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005ac4: e153000a cmp r3, sl 30005ac8: e0897002 add r7, r9, r2 30005acc: 8a000080 bhi 30005cd4 <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005ad0: e35a0000 cmp sl, #0 ; 0x0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30005ad4: 13a03000 movne r3, #0 ; 0x0 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 30005ad8: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005adc: 0a000003 beq 30005af0 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 30005ae0: e7872103 str r2, [r7, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 30005ae4: e2833001 add r3, r3, #1 ; 0x1 30005ae8: e153000a cmp r3, sl 30005aec: 3afffffb bcc 30005ae0 <_Objects_Extend_information+0x88> 30005af0: e1a04104 lsl r4, r4, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005af4: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 30005af8: e7890004 str r0, [r9, r4] for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005afc: e5953014 ldr r3, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005b00: e78c0004 str r0, [ip, r4] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005b04: e0881003 add r1, r8, r3 30005b08: e1580001 cmp r8, r1 30005b0c: 2a000006 bcs 30005b2c <_Objects_Extend_information+0xd4> 30005b10: e1a03108 lsl r3, r8, #2 30005b14: e0872003 add r2, r7, r3 30005b18: e1a03008 mov r3, r8 index++ ) { 30005b1c: e2833001 add r3, r3, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005b20: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 30005b24: e4820004 str r0, [r2], #4 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005b28: 3afffffb bcc 30005b1c <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 30005b2c: e10f0000 mrs r0, CPSR 30005b30: e38030c0 orr r3, r0, #192 ; 0xc0 30005b34: e129f003 msr CPSR_fc, r3 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 30005b38: e5953000 ldr r3, [r5] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 30005b3c: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 30005b40: e1d510b4 ldrh r1, [r5, #4] 30005b44: e1a03c03 lsl r3, r3, #24 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 30005b48: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 30005b4c: e3833801 orr r3, r3, #65536 ; 0x10000 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; 30005b50: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 30005b54: e1833d81 orr r3, r3, r1, lsl #27 30005b58: e1833002 orr r3, r3, r2 30005b5c: e585300c str r3, [r5, #12] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 30005b60: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30005b64: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30005b68: e585701c str r7, [r5, #28] information->maximum = maximum; 30005b6c: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005b70: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 30005b74: e129f000 msr CPSR_fc, r0 if ( old_tables ) 30005b78: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 30005b7c: 11a00003 movne r0, r3 30005b80: 1b000850 blne 30007cc8 <_Workspace_Free> 30005b84: e5957014 ldr r7, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 30005b88: e5d53012 ldrb r3, [r5, #18] 30005b8c: e3530000 cmp r3, #0 ; 0x0 30005b90: 0a000061 beq 30005d1c <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 30005b94: e5953018 ldr r3, [r5, #24] 30005b98: e5954034 ldr r4, [r5, #52] 30005b9c: e0000793 mul r0, r3, r7 30005ba0: eb00084c bl 30007cd8 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005ba4: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005ba8: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005bac: e7931106 ldr r1, [r3, r6, lsl #2] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 30005bb0: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 30005bb4: e3510000 cmp r1, #0 ; 0x0 30005bb8: 0a00001d beq 30005c34 <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005bbc: e28d7008 add r7, sp, #8 ; 0x8 30005bc0: e1a00007 mov r0, r7 30005bc4: e5952014 ldr r2, [r5, #20] 30005bc8: e5953018 ldr r3, [r5, #24] 30005bcc: eb00108a bl 30009dfc <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005bd0: e1a04008 mov r4, r8 30005bd4: e2856020 add r6, r5, #32 ; 0x20 30005bd8: ea000008 b 30005c00 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 30005bdc: e5953000 ldr r3, [r5] 30005be0: e1d520b4 ldrh r2, [r5, #4] 30005be4: e1a03c03 lsl r3, r3, #24 30005be8: e3833801 orr r3, r3, #65536 ; 0x10000 30005bec: e1833d82 orr r3, r3, r2, lsl #27 30005bf0: e1833004 orr r3, r3, r4 30005bf4: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005bf8: ebfffd75 bl 300051d4 <_Chain_Append> index++; 30005bfc: e2844001 add r4, r4, #1 ; 0x1 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 30005c00: e1a00007 mov r0, r7 30005c04: eb00106f bl 30009dc8 <_Chain_Get> 30005c08: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005c0c: e1a0100c mov r1, ip 30005c10: e1a00006 mov r0, r6 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 30005c14: 1afffff0 bne 30005bdc <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005c18: e5951030 ldr r1, [r5, #48] 30005c1c: e5952014 ldr r2, [r5, #20] information->inactive += information->allocation_size; 30005c20: e1d502bc ldrh r0, [r5, #44] _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005c24: e781200a str r2, [r1, sl] information->inactive += information->allocation_size; 30005c28: e5953014 ldr r3, [r5, #20] 30005c2c: e0833000 add r3, r3, r0 30005c30: e1c532bc strh r3, [r5, #44] } 30005c34: e28dd014 add sp, sp, #20 ; 0x14 30005c38: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 30005c3c: e5907014 ldr r7, [r0, #20] 30005c40: e1a00009 mov r0, r9 30005c44: e1a01007 mov r1, r7 30005c48: eb0030ba bl 30011f38 <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 30005c4c: e2504000 subs r4, r0, #0 ; 0x0 30005c50: 0a00003a beq 30005d40 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 30005c54: e5952034 ldr r2, [r5, #52] 30005c58: e5923000 ldr r3, [r2] 30005c5c: e3530000 cmp r3, #0 ; 0x0 30005c60: 11a0800a movne r8, sl 30005c64: 13a06000 movne r6, #0 ; 0x0 30005c68: 1a000003 bne 30005c7c <_Objects_Extend_information+0x224> 30005c6c: ea000033 b 30005d40 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 30005c70: e7923106 ldr r3, [r2, r6, lsl #2] 30005c74: e3530000 cmp r3, #0 ; 0x0 30005c78: 0a000003 beq 30005c8c <_Objects_Extend_information+0x234> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005c7c: e2866001 add r6, r6, #1 ; 0x1 30005c80: e1540006 cmp r4, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 30005c84: e0888007 add r8, r8, r7 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005c88: 8afffff8 bhi 30005c70 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 30005c8c: e1580009 cmp r8, r9 30005c90: 3affffbc bcc 30005b88 <_Objects_Extend_information+0x130> 30005c94: e284b001 add fp, r4, #1 ; 0x1 30005c98: e1a0308b lsl r3, fp, #1 30005c9c: e083000b add r0, r3, fp 30005ca0: eaffff79 b 30005a8c <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 30005ca4: e080000a add r0, r0, sl 30005ca8: e0800009 add r0, r0, r9 30005cac: e1a00100 lsl r0, r0, #2 30005cb0: eb000808 bl 30007cd8 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 30005cb4: e250c000 subs ip, r0, #0 ; 0x0 30005cb8: 0affffdd beq 30005c34 <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005cbc: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 30005cc0: e1a0210b lsl r2, fp, #2 30005cc4: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 30005cc8: e153000a cmp r3, sl 30005ccc: e0897002 add r7, r9, r2 30005cd0: 9affff7e bls 30005ad0 <_Objects_Extend_information+0x78> /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, 30005cd4: e1a04104 lsl r4, r4, #2 30005cd8: e1a0000c mov r0, ip 30005cdc: e5951034 ldr r1, [r5, #52] 30005ce0: e1a02004 mov r2, r4 30005ce4: e58dc000 str ip, [sp] 30005ce8: eb001731 bl 3000b9b4 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 30005cec: e5951030 ldr r1, [r5, #48] 30005cf0: e1a02004 mov r2, r4 30005cf4: e1a00009 mov r0, r9 30005cf8: eb00172d bl 3000b9b4 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 30005cfc: e1d521b0 ldrh r2, [r5, #16] 30005d00: e1a00007 mov r0, r7 30005d04: e08a2002 add r2, sl, r2 30005d08: e1a02102 lsl r2, r2, #2 30005d0c: e595101c ldr r1, [r5, #28] 30005d10: eb001727 bl 3000b9b4 30005d14: e59dc000 ldr ip, [sp] 30005d18: eaffff75 b 30005af4 <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 30005d1c: e5953018 ldr r3, [r5, #24] 30005d20: e5954034 ldr r4, [r5, #52] 30005d24: e0000793 mul r0, r3, r7 30005d28: eb0007ee bl 30007ce8 <_Workspace_Allocate_or_fatal_error> 30005d2c: e5953034 ldr r3, [r5, #52] 30005d30: e7840106 str r0, [r4, r6, lsl #2] 30005d34: e7931106 ldr r1, [r3, r6, lsl #2] 30005d38: e1a0a106 lsl sl, r6, #2 30005d3c: eaffff9e b 30005bbc <_Objects_Extend_information+0x164> if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 30005d40: e1a0800a mov r8, sl <== NOT EXECUTED 30005d44: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 30005d48: eaffffcf b 30005c8c <_Objects_Extend_information+0x234> <== NOT EXECUTED 30005e44 <_Objects_Get_isr_disable>: #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 30005e44: e1a01801 lsl r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 30005e48: e52d4004 push {r4} ; (str r4, [sp, #-4]!) #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 30005e4c: e1a01821 lsr r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 30005e50: e1a04003 mov r4, r3 index = id & 0x0000ffff; /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 30005e54: e10fc000 mrs ip, CPSR 30005e58: e38c30c0 orr r3, ip, #192 ; 0xc0 30005e5c: e129f003 msr CPSR_fc, r3 if ( information->maximum >= index ) { 30005e60: e1d031b0 ldrh r3, [r0, #16] 30005e64: e1510003 cmp r1, r3 30005e68: 8a000008 bhi 30005e90 <_Objects_Get_isr_disable+0x4c> if ( (the_object = information->local_table[ index ]) != NULL ) { 30005e6c: e590301c ldr r3, [r0, #28] 30005e70: e7930101 ldr r0, [r3, r1, lsl #2] 30005e74: e3500000 cmp r0, #0 ; 0x0 *location = OBJECTS_LOCAL; 30005e78: 13a03000 movne r3, #0 ; 0x0 30005e7c: 15823000 strne r3, [r2] *level_p = level; 30005e80: 1584c000 strne ip, [r4] /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { 30005e84: 0a000006 beq 30005ea4 <_Objects_Get_isr_disable+0x60> _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 30005e88: e8bd0010 pop {r4} 30005e8c: e12fff1e bx lr } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 30005e90: e129f00c msr CPSR_fc, ip *location = OBJECTS_ERROR; 30005e94: e3a03001 mov r3, #1 ; 0x1 30005e98: e5823000 str r3, [r2] 30005e9c: e3a00000 mov r0, #0 ; 0x0 30005ea0: eafffff8 b 30005e88 <_Objects_Get_isr_disable+0x44> if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 30005ea4: e129f00c msr CPSR_fc, ip <== NOT EXECUTED *location = OBJECTS_ERROR; 30005ea8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 30005eac: e5823000 str r3, [r2] <== NOT EXECUTED 30005eb0: eafffff4 b 30005e88 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED 30015110 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015110: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30015114: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 30015118: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 3001511c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015120: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) next_id = information->minimum_id; 30015124: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 30015128: e1a05000 mov r5, r0 <== NOT EXECUTED 3001512c: e1a06002 mov r6, r2 <== NOT EXECUTED 30015130: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 30015134: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30015138: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 3001513c: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 30015140: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 30015144: e15c0003 cmp ip, r3 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 30015148: e1a01004 mov r1, r4 <== NOT EXECUTED 3001514c: e1a00005 mov r0, r5 <== NOT EXECUTED 30015150: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 30015154: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 30015158: 3a000005 bcc 30015174 <_Objects_Get_next+0x64> <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 3001515c: ebffda99 bl 3000bbc8 <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 30015160: e5963000 ldr r3, [r6] <== NOT EXECUTED 30015164: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30015168: 1afffff2 bne 30015138 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 3001516c: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 30015170: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 30015174: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30015178: e3e02000 mvn r2, #0 ; 0x0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 3001517c: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 30015180: e5872000 str r2, [r7] <== NOT EXECUTED 30015184: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30015188: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30005ff4 <_Objects_Namespace_remove>: ) { /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30005ff4: e5d03038 ldrb r3, [r0, #56] void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 30005ff8: e92d4010 push {r4, lr} /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30005ffc: e3530000 cmp r3, #0 ; 0x0 void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 30006000: e1a04001 mov r4, r1 /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30006004: 0a000002 beq 30006014 <_Objects_Namespace_remove+0x20> 30006008: e591000c ldr r0, [r1, #12] <== NOT EXECUTED 3000600c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 30006010: 1b00072c blne 30007cc8 <_Workspace_Free> <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; 30006014: e3a03000 mov r3, #0 ; 0x0 the_object->name.name_u32 = 0; 30006018: e584300c str r3, [r4, #12] } 3000601c: e8bd8010 pop {r4, pc} 30007e3c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 30007e3c: e92d40f0 push {r4, r5, r6, r7, lr} 30007e40: e1a04000 mov r4, r0 30007e44: e1a07001 mov r7, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 30007e48: e1a00002 mov r0, r2 30007e4c: e1d413ba ldrh r1, [r4, #58] bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 30007e50: e1a05002 mov r5, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 30007e54: eb001c22 bl 3000eee4 if ( information->is_string ) { 30007e58: e5d43038 ldrb r3, [r4, #56] { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 30007e5c: e2804001 add r4, r0, #1 ; 0x1 if ( information->is_string ) { 30007e60: e3530000 cmp r3, #0 ; 0x0 30007e64: 1a000017 bne 30007ec8 <_Objects_Set_name+0x8c> strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 30007e68: e3540000 cmp r4, #0 ; 0x0 30007e6c: 059f00a4 ldreq r0, [pc, #164] ; 30007f18 <_Objects_Set_name+0xdc> 30007e70: 0a000011 beq 30007ebc <_Objects_Set_name+0x80> 30007e74: e3540001 cmp r4, #1 ; 0x1 30007e78: e5d53000 ldrb r3, [r5] 30007e7c: 059f0098 ldreq r0, [pc, #152] ; 30007f1c <_Objects_Set_name+0xe0> 30007e80: e1a02c03 lsl r2, r3, #24 30007e84: 01820000 orreq r0, r2, r0 30007e88: 0a00000b beq 30007ebc <_Objects_Set_name+0x80> 30007e8c: e5d53001 ldrb r3, [r5, #1] 30007e90: e3540002 cmp r4, #2 ; 0x2 30007e94: e1822803 orr r2, r2, r3, lsl #16 30007e98: 03820a02 orreq r0, r2, #8192 ; 0x2000 30007e9c: 03800020 orreq r0, r0, #32 ; 0x20 30007ea0: 0a000005 beq 30007ebc <_Objects_Set_name+0x80> 30007ea4: e5d53002 ldrb r3, [r5, #2] 30007ea8: e3540003 cmp r4, #3 ; 0x3 30007eac: e1820403 orr r0, r2, r3, lsl #8 30007eb0: 15d53003 ldrbne r3, [r5, #3] 30007eb4: 03800020 orreq r0, r0, #32 ; 0x20 30007eb8: 11800003 orrne r0, r0, r3 30007ebc: e587000c str r0, [r7, #12] 30007ec0: e3a00001 mov r0, #1 ; 0x1 ); } return TRUE; } 30007ec4: e8bd80f0 pop {r4, r5, r6, r7, pc} length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 30007ec8: e1a00004 mov r0, r4 <== NOT EXECUTED 30007ecc: eb00071c bl 30009b44 <_Workspace_Allocate> <== NOT EXECUTED if ( !d ) 30007ed0: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED 30007ed4: 01a00006 moveq r0, r6 <== NOT EXECUTED 30007ed8: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 30007edc: e597000c ldr r0, [r7, #12] <== NOT EXECUTED 30007ee0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30007ee4: 0a000002 beq 30007ef4 <_Objects_Set_name+0xb8> <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 30007ee8: eb000711 bl 30009b34 <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 30007eec: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30007ef0: e587300c str r3, [r7, #12] <== NOT EXECUTED } strncpy( d, name, length ); 30007ef4: e1a01005 mov r1, r5 <== NOT EXECUTED 30007ef8: e1a00006 mov r0, r6 <== NOT EXECUTED 30007efc: e1a02004 mov r2, r4 <== NOT EXECUTED 30007f00: eb001bb4 bl 3000edd8 <== NOT EXECUTED d[ length ] = '\0'; 30007f04: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30007f08: e7c63004 strb r3, [r6, r4] <== NOT EXECUTED the_object->name.name_p = d; 30007f0c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30007f10: e587600c str r6, [r7, #12] <== NOT EXECUTED 30007f14: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30007f18: 20202020 .word 0x20202020 30007f1c: 00202020 .word 0x00202020 30021ae4 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 30021ae4: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 30021ae8: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 30021aec: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 30021af0: 0a00000d beq 30021b2c <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 30021af4: e3510000 cmp r1, #0 ; 0x0 30021af8: 0a00000b beq 30021b2c <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 30021afc: e59f5030 ldr r5, [pc, #48] ; 30021b34 <_Protected_heap_Get_information+0x50> 30021b00: e5950000 ldr r0, [r5] 30021b04: ebff9b30 bl 300087cc <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 30021b08: e1a01004 mov r1, r4 30021b0c: e1a00006 mov r0, r6 30021b10: eb0025d3 bl 3002b264 <_Heap_Get_information> 30021b14: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 30021b18: e5950000 ldr r0, [r5] 30021b1c: ebff9b46 bl 3000883c <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 30021b20: e2740001 rsbs r0, r4, #1 ; 0x1 30021b24: 33a00000 movcc r0, #0 ; 0x0 30021b28: e8bd8070 pop {r4, r5, r6, pc} 30021b2c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 30021b30: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30021b34: 3005925c .word 0x3005925c 30005e14 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 30005e14: e92d4010 push {r4, lr} 30005e18: e24dd004 sub sp, sp, #4 ; 0x4 30005e1c: e1a01000 mov r1, r0 30005e20: e1a0200d mov r2, sp 30005e24: e59f0090 ldr r0, [pc, #144] ; 30005ebc <_Rate_monotonic_Timeout+0xa8> 30005e28: eb00075d bl 30007ba4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 30005e2c: e59d3000 ldr r3, [sp] 30005e30: e1a04000 mov r4, r0 30005e34: e3530000 cmp r3, #0 ; 0x0 30005e38: 1a00000c bne 30005e70 <_Rate_monotonic_Timeout+0x5c> case OBJECTS_LOCAL: the_thread = the_period->owner; 30005e3c: e5900050 ldr r0, [r0, #80] if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005e40: e5903010 ldr r3, [r0, #16] 30005e44: e3130901 tst r3, #16384 ; 0x4000 30005e48: 1a00000a bne 30005e78 <_Rate_monotonic_Timeout+0x64> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005e4c: e5943038 ldr r3, [r4, #56] 30005e50: e3530001 cmp r3, #1 ; 0x1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 30005e54: 13a03004 movne r3, #4 ; 0x4 30005e58: 15843038 strne r3, [r4, #56] _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005e5c: 0a00000c beq 30005e94 <_Rate_monotonic_Timeout+0x80> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005e60: e59f2058 ldr r2, [pc, #88] ; 30005ec0 <_Rate_monotonic_Timeout+0xac> 30005e64: e5923000 ldr r3, [r2] 30005e68: e2433001 sub r3, r3, #1 ; 0x1 30005e6c: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 30005e70: e28dd004 add sp, sp, #4 ; 0x4 30005e74: e8bd8010 pop {r4, pc} the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005e78: e5902020 ldr r2, [r0, #32] 30005e7c: e5943008 ldr r3, [r4, #8] 30005e80: e1520003 cmp r2, r3 30005e84: 1afffff0 bne 30005e4c <_Rate_monotonic_Timeout+0x38> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30005e88: e59f1034 ldr r1, [pc, #52] ; 30005ec4 <_Rate_monotonic_Timeout+0xb0> 30005e8c: eb000880 bl 30008094 <_Thread_Clear_state> 30005e90: ea000001 b 30005e9c <_Rate_monotonic_Timeout+0x88> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 30005e94: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30005e98: e5843038 str r3, [r4, #56] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 30005e9c: e1a00004 mov r0, r4 30005ea0: ebfffe37 bl 30005784 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005ea4: e594304c ldr r3, [r4, #76] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005ea8: e2841010 add r1, r4, #16 ; 0x10 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005eac: e584301c str r3, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005eb0: e59f0010 ldr r0, [pc, #16] ; 30005ec8 <_Rate_monotonic_Timeout+0xb4> 30005eb4: eb000ea7 bl 30009958 <_Watchdog_Insert> 30005eb8: eaffffe8 b 30005e60 <_Rate_monotonic_Timeout+0x4c> 30005ebc: 3001a808 .word 0x3001a808 30005ec0: 3001a92c .word 0x3001a92c 30005ec4: 1003fff8 .word 0x1003fff8 30005ec8: 3001aa04 .word 0x3001aa04 300055d0 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 300055d0: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 300055d4: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 300055d8: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 300055dc: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 300055e0: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 300055e4: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 300055e8: e10f6000 mrs r6, CPSR 300055ec: e38630c0 orr r3, r6, #192 ; 0xc0 300055f0: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 300055f4: e59f3038 ldr r3, [pc, #56] ; 30005634 <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 300055f8: e59f2038 ldr r2, [pc, #56] ; 30005638 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 300055fc: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005600: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30005604: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 30005608: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 3000560c: 0a000002 beq 3000561c <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30005610: e1a0e00f mov lr, pc <== NOT EXECUTED 30005614: e12fff11 bx r1 <== NOT EXECUTED 30005618: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 3000561c: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 30005620: e1a00005 mov r0, r5 30005624: e1a0100d mov r1, sp 30005628: eb000806 bl 30007648 <_Timespec_Add_to> } 3000562c: e28dd008 add sp, sp, #8 ; 0x8 30005630: e8bd8070 pop {r4, r5, r6, pc} 30005634: 30016218 .word 0x30016218 30005638: 300160f4 .word 0x300160f4 30009fa4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009fa4: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009fa8: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009fac: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30009fb0: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 30009fb4: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 30009fb8: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 30009fbc: e10f6000 mrs r6, CPSR 30009fc0: e38630c0 orr r3, r6, #192 ; 0xc0 30009fc4: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009fc8: e59f3038 ldr r3, [pc, #56] ; 3000a008 <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009fcc: e59f2038 ldr r2, [pc, #56] ; 3000a00c <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009fd0: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009fd4: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009fd8: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009fdc: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009fe0: 0a000002 beq 30009ff0 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30009fe4: e1a0e00f mov lr, pc <== NOT EXECUTED 30009fe8: e12fff11 bx r1 <== NOT EXECUTED 30009fec: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30009ff0: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 30009ff4: e1a00005 mov r0, r5 30009ff8: e1a0100d mov r1, sp 30009ffc: ebfff591 bl 30007648 <_Timespec_Add_to> } 3000a000: e28dd008 add sp, sp, #8 ; 0x8 3000a004: e8bd8070 pop {r4, r5, r6, pc} 3000a008: 30016218 .word 0x30016218 3000a00c: 300160e4 .word 0x300160e4 3000b04c <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b04c: e59f3110 ldr r3, [pc, #272] ; 3000b164 <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { 3000b050: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000b054: e5935000 ldr r5, [r3] /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 3000b058: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); 3000b05c: e3a03000 mov r3, #0 ; 0x0 3000b060: e10f3000 mrs r3, CPSR 3000b064: e3c330c0 bic r3, r3, #192 ; 0xc0 3000b068: e1833002 orr r3, r3, r2 3000b06c: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b070: e59f20f0 ldr r2, [pc, #240] ; 3000b168 <_Thread_Handler+0x11c> doneConstructors = 1; 3000b074: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000b078: e5d24000 ldrb r4, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 3000b07c: e1a00005 mov r0, r5 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; doneConstructors = 1; 3000b080: e5c23000 strb r3, [r2] * Take care that 'begin' extensions get to complete before * 'switch' extensions can run. This means must keep dispatch * disabled until all 'begin' extensions complete. */ _User_extensions_Thread_begin( executing ); 3000b084: ebfff1ca bl 300077b4 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 3000b088: ebffedcb bl 300067bc <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ 3000b08c: e3540000 cmp r4, #0 ; 0x0 3000b090: 0a000031 beq 3000b15c <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 3000b094: e59530a0 ldr r3, [r5, #160] 3000b098: e3530003 cmp r3, #3 ; 0x3 3000b09c: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000b0a0: ea000008 b 3000b0c8 <_Thread_Handler+0x7c> <== NOT EXECUTED 3000b0a4: 3000b134 .word 0x3000b134 <== NOT EXECUTED 3000b0a8: 3000b10c .word 0x3000b10c <== NOT EXECUTED 3000b0ac: 3000b0e0 .word 0x3000b0e0 <== NOT EXECUTED 3000b0b0: 3000b0b4 .word 0x3000b0b4 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 3000b0b4: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED 3000b0b8: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED 3000b0bc: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b0c0: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000b0c4: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 3000b0c8: e1a00005 mov r0, r5 <== NOT EXECUTED 3000b0cc: ebfff1c8 bl 300077f4 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 3000b0d0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000b0d4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000b0d8: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000b0dc: ebffea18 bl 30005944 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 3000b0e0: e59510a8 ldr r1, [r5, #168] <== NOT EXECUTED 3000b0e4: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000b0e8: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b0ec: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000b0f0: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 3000b0f4: e1a00005 mov r0, r5 <== NOT EXECUTED 3000b0f8: ebfff1bd bl 300077f4 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 3000b0fc: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000b100: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000b104: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000b108: ebffea0d bl 30005944 <_Internal_error_Occurred> <== NOT EXECUTED (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 3000b10c: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000b110: e1a0e00f mov lr, pc <== NOT EXECUTED 3000b114: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000b118: e5850028 str r0, [r5, #40] <== NOT EXECUTED * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 3000b11c: e1a00005 mov r0, r5 <== NOT EXECUTED 3000b120: ebfff1b3 bl 300077f4 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 3000b124: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 3000b128: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 3000b12c: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED 3000b130: ebffea03 bl 30005944 <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = 3000b134: e59500a8 ldr r0, [r5, #168] 3000b138: e1a0e00f mov lr, pc 3000b13c: e595f09c ldr pc, [r5, #156] 3000b140: e5850028 str r0, [r5, #40] * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 3000b144: e1a00005 mov r0, r5 3000b148: ebfff1a9 bl 300077f4 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000b14c: e3a00000 mov r0, #0 ; 0x0 3000b150: e3a01001 mov r1, #1 ; 0x1 3000b154: e3a02006 mov r2, #6 ; 0x6 3000b158: ebffe9f9 bl 30005944 <_Internal_error_Occurred> * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { _init (); 3000b15c: eb002497 bl 300143c0 <__start_set_sysctl_set> 3000b160: eaffffcb b 3000b094 <_Thread_Handler+0x48> 3000b164: 30016124 .word 0x30016124 3000b168: 30015ec8 .word 0x30015ec8 30006884 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 30006884: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 30006888: e2526000 subs r6, r2, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 3000688c: e1a04003 mov r4, r3 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 30006890: 13a03000 movne r3, #0 ; 0x0 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 30006894: e5dda02c ldrb sl, [sp, #44] 30006898: e1a09000 mov r9, r0 3000689c: e1a05001 mov r5, r1 300068a0: e59d8028 ldr r8, [sp, #40] 300068a4: e59db030 ldr fp, [sp, #48] stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 300068a8: 15c130c0 strbne r3, [r1, #192] 300068ac: 11a0c004 movne ip, r4 300068b0: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 300068b4: 0a000034 beq 3000698c <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 300068b8: e59f416c ldr r4, [pc, #364] ; 30006a2c <_Thread_Initialize+0x1a8> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300068bc: e3a06000 mov r6, #0 ; 0x0 300068c0: e5940000 ldr r0, [r4] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 300068c4: e58520c8 str r2, [r5, #200] 300068c8: e1500006 cmp r0, r6 the_stack->size = size; 300068cc: e585c0c4 str ip, [r5, #196] 300068d0: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 300068d4: e5856064 str r6, [r5, #100] the_watchdog->id = id; 300068d8: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 300068dc: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 300068e0: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 300068e4: 05850110 streq r0, [r5, #272] 300068e8: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 300068ec: 1a000033 bne 300069c0 <_Thread_Initialize+0x13c> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 300068f0: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 300068f4: e35b0002 cmp fp, #2 ; 0x2 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 300068f8: e58530b4 str r3, [r5, #180] switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 300068fc: 059f312c ldreq r3, [pc, #300] ; 30006a30 <_Thread_Initialize+0x1ac> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 30006900: e3a04000 mov r4, #0 ; 0x0 switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 30006904: 05932000 ldreq r2, [r3] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 30006908: e3a06001 mov r6, #1 ; 0x1 switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000690c: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006910: e59d3038 ldr r3, [sp, #56] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 30006914: e1a01008 mov r1, r8 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006918: e58530b8 str r3, [r5, #184] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); 3000691c: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 30006920: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 30006924: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 30006928: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 3000692c: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 30006930: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 30006934: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 30006938: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 3000693c: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 30006940: eb0001fc bl 30007138 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 30006944: e1d530b8 ldrh r3, [r5, #8] 30006948: e599201c ldr r2, [r9, #28] * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; the_thread->cpu_time_used.tv_nsec = 0; 3000694c: e5854088 str r4, [r5, #136] 30006950: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 30006954: e59d303c ldr r3, [sp, #60] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 30006958: e1a00005 mov r0, r5 3000695c: e585300c str r3, [r5, #12] /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 30006960: e5854084 str r4, [r5, #132] * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 30006964: eb0003c8 bl 3000788c <_User_extensions_Thread_create> if ( !extension_status ) { 30006968: e1500004 cmp r0, r4 3000696c: 1a000011 bne 300069b8 <_Thread_Initialize+0x134> if ( extensions_area ) 30006970: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 30006974: 11a00007 movne r0, r7 <== NOT EXECUTED 30006978: 1b0004d2 blne 30007cc8 <_Workspace_Free> <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 3000697c: e1a00005 mov r0, r5 <== NOT EXECUTED 30006980: eb0002aa bl 30007430 <_Thread_Stack_Free> <== NOT EXECUTED 30006984: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 30006988: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 3000698c: e1a00001 mov r0, r1 30006990: e1a01004 mov r1, r4 30006994: eb000285 bl 300073b0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 30006998: e1540000 cmp r4, r0 3000699c: 93a03000 movls r3, #0 ; 0x0 300069a0: 83a03001 movhi r3, #1 ; 0x1 300069a4: e3500000 cmp r0, #0 ; 0x0 300069a8: 03833001 orreq r3, r3, #1 ; 0x1 300069ac: e3530000 cmp r3, #0 ; 0x0 300069b0: e1a0c000 mov ip, r0 300069b4: 0a000014 beq 30006a0c <_Thread_Initialize+0x188> * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( !extension_status ) { 300069b8: e1a00006 mov r0, r6 300069bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 300069c0: e2800001 add r0, r0, #1 ; 0x1 300069c4: e1a00100 lsl r0, r0, #2 300069c8: eb0004c2 bl 30007cd8 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 300069cc: e2507000 subs r7, r0, #0 ; 0x0 300069d0: 0a000011 beq 30006a1c <_Thread_Initialize+0x198> * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300069d4: e5943000 ldr r3, [r4] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 300069d8: e5857110 str r7, [r5, #272] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300069dc: e3730001 cmn r3, #1 ; 0x1 300069e0: 0affffc2 beq 300068f0 <_Thread_Initialize+0x6c> 300069e4: e1a02006 mov r2, r6 300069e8: e1a01007 mov r1, r7 the_thread->extensions[i] = NULL; 300069ec: e1a00006 mov r0, r6 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300069f0: e5943000 ldr r3, [r4] the_thread->extensions[i] = NULL; 300069f4: e7810102 str r0, [r1, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 300069f8: e2833001 add r3, r3, #1 ; 0x1 300069fc: e2822001 add r2, r2, #1 ; 0x1 30006a00: e1530002 cmp r3, r2 30006a04: 8afffff9 bhi 300069f0 <_Thread_Initialize+0x16c> 30006a08: eaffffb8 b 300068f0 <_Thread_Initialize+0x6c> if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006a0c: e3a03001 mov r3, #1 ; 0x1 30006a10: e5c530c0 strb r3, [r5, #192] actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 30006a14: e59520cc ldr r2, [r5, #204] 30006a18: eaffffa6 b 300068b8 <_Thread_Initialize+0x34> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 30006a1c: e1a00005 mov r0, r5 <== NOT EXECUTED 30006a20: eb000282 bl 30007430 <_Thread_Stack_Free> <== NOT EXECUTED 30006a24: e1a00007 mov r0, r7 <== NOT EXECUTED 30006a28: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 30006a2c: 30016104 .word 0x30016104 30006a30: 30016024 .word 0x30016024 3000b584 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000b584: e92d4030 push {r4, r5, lr} the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 3000b588: e5d0c0ac ldrb ip, [r0, #172] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 3000b58c: e590e0b0 ldr lr, [r0, #176] the_thread->budget_callout = the_thread->Start.budget_callout; 3000b590: e59040b4 ldr r4, [r0, #180] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 3000b594: e3a03000 mov r3, #0 ; 0x0 the_thread->suspend_count = 0; 3000b598: e5803070 str r3, [r0, #112] the_thread->is_preemptible = the_thread->Start.is_preemptible; 3000b59c: e5c0c076 strb ip, [r0, #118] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 3000b5a0: e580e07c str lr, [r0, #124] the_thread->budget_callout = the_thread->Start.budget_callout; 3000b5a4: e5804080 str r4, [r0, #128] the_thread->Start.pointer_argument = pointer_argument; 3000b5a8: e58010a4 str r1, [r0, #164] the_thread->Start.numeric_argument = numeric_argument; 3000b5ac: e58020a8 str r2, [r0, #168] Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 3000b5b0: e580301c str r3, [r0, #28] void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 3000b5b4: e1a05000 mov r5, r0 the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 3000b5b8: ebfff1b7 bl 30007c9c <_Thread_queue_Extract_with_proxy> 3000b5bc: e3500000 cmp r0, #0 ; 0x0 3000b5c0: 1a000002 bne 3000b5d0 <_Thread_Reset+0x4c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 3000b5c4: e5953050 ldr r3, [r5, #80] 3000b5c8: e3530002 cmp r3, #2 ; 0x2 3000b5cc: 0a000007 beq 3000b5f0 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 3000b5d0: e59510bc ldr r1, [r5, #188] 3000b5d4: e5953014 ldr r3, [r5, #20] 3000b5d8: e1530001 cmp r3, r1 3000b5dc: 08bd8030 popeq {r4, r5, pc} the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 3000b5e0: e1a00005 mov r0, r5 if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; 3000b5e4: e5851018 str r1, [r5, #24] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } 3000b5e8: e8bd4030 pop {r4, r5, lr} (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 3000b5ec: eafff22d b 30007ea8 <_Thread_Set_priority> the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 3000b5f0: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED 3000b5f4: ebfff4d0 bl 3000893c <_Watchdog_Remove> <== NOT EXECUTED 3000b5f8: eafffff4 b 3000b5d0 <_Thread_Reset+0x4c> <== NOT EXECUTED 30007e34 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007e34: e5903010 ldr r3, [r0, #16] bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007e38: e92d4070 push {r4, r5, r6, lr} if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007e3c: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 30007e40: e1a04000 mov r4, r0 30007e44: e1a06001 mov r6, r1 30007e48: e1a05002 mov r5, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 30007e4c: 13a00000 movne r0, #0 ; 0x0 30007e50: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 30007e54: eb000089 bl 30008080 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 30007e58: e1a02005 mov r2, r5 30007e5c: e1a01006 mov r1, r6 30007e60: e1a00004 mov r0, r4 30007e64: eb000dc6 bl 3000b584 <_Thread_Reset> _Thread_Load_environment( the_thread ); 30007e68: e1a00004 mov r0, r4 30007e6c: eb000cdf bl 3000b1f0 <_Thread_Load_environment> _Thread_Ready( the_thread ); 30007e70: e1a00004 mov r0, r4 30007e74: eb000d7d bl 3000b470 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 30007e78: e1a00004 mov r0, r4 30007e7c: eb000209 bl 300086a8 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 30007e80: e59f301c ldr r3, [pc, #28] ; 30007ea4 <_Thread_Restart+0x70> 30007e84: e5932000 ldr r2, [r3] 30007e88: e1540002 cmp r4, r2 30007e8c: 13a00001 movne r0, #1 ; 0x1 30007e90: 18bd8070 popne {r4, r5, r6, pc} #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) _Context_Restore_fp( &_Thread_Executing->fp_context ); #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 30007e94: e28400d0 add r0, r4, #208 ; 0xd0 30007e98: eb00032f bl 30008b5c <_CPU_Context_restore> 30007e9c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 30007ea0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30007ea4: 30019664 .word 0x30019664 30008c3c <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 30008c3c: e92d0030 push {r4, r5} 30008c40: e20110ff and r1, r1, #255 ; 0xff 30008c44: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 30008c48: e10f5000 mrs r5, CPSR 30008c4c: e38530c0 orr r3, r5, #192 ; 0xc0 30008c50: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 30008c54: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 30008c58: 13a03000 movne r3, #0 ; 0x0 30008c5c: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 30008c60: 1a000006 bne 30008c80 <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008c64: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 30008c68: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 30008c6c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008c70: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 30008c74: 0a000001 beq 30008c80 <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 30008c78: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30008c7c: ea000003 b 30008c90 <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 30008c80: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 30008c84: e3130002 tst r3, #2 ; 0x2 30008c88: 1a000002 bne 30008c98 <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 30008c8c: e129f005 msr CPSR_fc, r5 } 30008c90: e8bd0030 pop {r4, r5} 30008c94: e12fff1e bx lr 30008c98: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 30008c9c: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 30008ca0: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 30008ca4: 1afffff8 bne 30008c8c <_Thread_Resume+0x50> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 30008ca8: e5940090 ldr r0, [r4, #144] 30008cac: e1d429b6 ldrh r2, [r4, #150] 30008cb0: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 30008cb4: e594108c ldr r1, [r4, #140] 30008cb8: e1833002 orr r3, r3, r2 _Priority_Major_bit_map |= the_priority_map->ready_major; 30008cbc: e59fc080 ldr ip, [pc, #128] ; 30008d44 <_Thread_Resume+0x108> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 30008cc0: e1c030b0 strh r3, [r0] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 30008cc4: e2812004 add r2, r1, #4 ; 0x4 30008cc8: e5842000 str r2, [r4] _Priority_Major_bit_map |= the_priority_map->ready_major; 30008ccc: e1dc30b0 ldrh r3, [ip] 30008cd0: e1d429b4 ldrh r2, [r4, #148] old_last_node = the_chain->last; 30008cd4: e5910008 ldr r0, [r1, #8] 30008cd8: e1833002 orr r3, r3, r2 the_chain->last = the_node; 30008cdc: e5814008 str r4, [r1, #8] 30008ce0: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 30008ce4: e5840004 str r0, [r4, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 30008ce8: e5804000 str r4, [r0] _ISR_Flash( level ); 30008cec: e10f3000 mrs r3, CPSR 30008cf0: e129f005 msr CPSR_fc, r5 30008cf4: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 30008cf8: e59f1048 ldr r1, [pc, #72] ; 30008d48 <_Thread_Resume+0x10c> 30008cfc: e5940014 ldr r0, [r4, #20] 30008d00: e5913000 ldr r3, [r1] 30008d04: e5932014 ldr r2, [r3, #20] 30008d08: e1500002 cmp r0, r2 30008d0c: 2affffde bcs 30008c8c <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008d10: e59f3034 ldr r3, [pc, #52] ; 30008d4c <_Thread_Resume+0x110> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 30008d14: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 30008d18: e5932000 ldr r2, [r3] 30008d1c: e5d21076 ldrb r1, [r2, #118] 30008d20: e3510000 cmp r1, #0 ; 0x0 30008d24: 0a000003 beq 30008d38 <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 30008d28: e59f3020 ldr r3, [pc, #32] ; 30008d50 <_Thread_Resume+0x114> 30008d2c: e3a02001 mov r2, #1 ; 0x1 30008d30: e5c32000 strb r2, [r3] 30008d34: eaffffd4 b 30008c8c <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 30008d38: e3500000 cmp r0, #0 ; 0x0 30008d3c: 1affffd2 bne 30008c8c <_Thread_Resume+0x50> 30008d40: eafffff8 b 30008d28 <_Thread_Resume+0xec> <== NOT EXECUTED 30008d44: 30022458 .word 0x30022458 30008d48: 30022430 .word 0x30022430 30008d4c: 30022464 .word 0x30022464 30008d50: 30022474 .word 0x30022474 300073b0 <_Thread_Stack_Allocate>: * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 300073b0: e59f3070 ldr r3, [pc, #112] ; 30007428 <_Thread_Stack_Allocate+0x78> size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 300073b4: e59f2070 ldr r2, [pc, #112] ; 3000742c <_Thread_Stack_Allocate+0x7c> * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 300073b8: e593c000 ldr ip, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 300073bc: e5923000 ldr r3, [r2] * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 300073c0: e59c2020 ldr r2, [ip, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 300073c4: e92d4030 push {r4, r5, lr} 300073c8: e1510003 cmp r1, r3 300073cc: 21a04001 movcs r4, r1 300073d0: 31a04003 movcc r4, r3 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 300073d4: e3520000 cmp r2, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 300073d8: e1a05000 mov r5, r0 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 300073dc: 0a000008 beq 30007404 <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 300073e0: e1a00004 mov r0, r4 <== NOT EXECUTED 300073e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300073e8: e12fff12 bx r2 <== NOT EXECUTED 300073ec: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 300073f0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 300073f4: 11a00004 movne r0, r4 <== NOT EXECUTED 300073f8: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 300073fc: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 30007400: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 30007404: e2844004 add r4, r4, #4 ; 0x4 * get and keep the stack adjust factor, the stack alignment, and * the context initialization sequence in sync. */ the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); 30007408: e1a00004 mov r0, r4 3000740c: eb000231 bl 30007cd8 <_Workspace_Allocate> 30007410: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 30007414: e3530000 cmp r3, #0 ; 0x0 30007418: 11a00004 movne r0, r4 3000741c: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 30007420: e58530cc str r3, [r5, #204] return the_stack_size; } 30007424: e8bd8030 pop {r4, r5, pc} 30007428: 300160fc .word 0x300160fc 3000742c: 300152b4 .word 0x300152b4 30007430 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30007430: e5d030c0 ldrb r3, [r0, #192] */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 30007434: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30007438: e3530000 cmp r3, #0 ; 0x0 3000743c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _Configuration_Table->stack_free_hook ) 30007440: e59f3028 ldr r3, [pc, #40] ; 30007470 <_Thread_Stack_Free+0x40> 30007444: e5932000 ldr r2, [r3] 30007448: e5923024 ldr r3, [r2, #36] 3000744c: e3530000 cmp r3, #0 ; 0x0 30007450: 0a000003 beq 30007464 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 30007454: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 30007458: e1a0e00f mov lr, pc <== NOT EXECUTED 3000745c: e12fff13 bx r3 <== NOT EXECUTED 30007460: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 30007464: e59000c8 ldr r0, [r0, #200] } 30007468: e49de004 pop {lr} ; (ldr lr, [sp], #4) if ( _Configuration_Table->stack_free_hook ) (*_Configuration_Table->stack_free_hook)( the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 3000746c: ea000215 b 30007cc8 <_Workspace_Free> 30007470: 300160fc .word 0x300160fc 3000750c <_Thread_Tickle_timeslice>: void _Thread_Tickle_timeslice( void ) { Thread_Control *executing; executing = _Thread_Executing; 3000750c: e59f3084 ldr r3, [pc, #132] ; 30007598 <_Thread_Tickle_timeslice+0x8c> * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 30007510: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; 30007514: e5934000 ldr r4, [r3] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 30007518: e5d42076 ldrb r2, [r4, #118] 3000751c: e3520000 cmp r2, #0 ; 0x0 30007520: 08bd8010 popeq {r4, pc} return; if ( !_States_Is_ready( executing->current_state ) ) 30007524: e5943010 ldr r3, [r4, #16] 30007528: e3530000 cmp r3, #0 ; 0x0 3000752c: 18bd8010 popne {r4, pc} /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 30007530: e594307c ldr r3, [r4, #124] 30007534: e3530001 cmp r3, #1 ; 0x1 30007538: 38bd8010 popcc {r4, pc} 3000753c: e3530002 cmp r3, #2 ; 0x2 30007540: 9a00000a bls 30007570 <_Thread_Tickle_timeslice+0x64> 30007544: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 30007548: 18bd8010 popne {r4, pc} <== NOT EXECUTED executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 3000754c: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 30007550: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30007554: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30007558: e5843078 str r3, [r4, #120] <== NOT EXECUTED 3000755c: 18bd8010 popne {r4, pc} <== NOT EXECUTED (*executing->budget_callout)( executing ); 30007560: e1a00004 mov r0, r4 <== NOT EXECUTED 30007564: e1a0e00f mov lr, pc <== NOT EXECUTED 30007568: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED 3000756c: e8bd8010 pop {r4, pc} <== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_NONE: break; case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: if ( (int)(--executing->cpu_time_budget) <= 0 ) { 30007570: e5943078 ldr r3, [r4, #120] 30007574: e2433001 sub r3, r3, #1 ; 0x1 30007578: e3530000 cmp r3, #0 ; 0x0 3000757c: e5843078 str r3, [r4, #120] 30007580: c8bd8010 popgt {r4, pc} _Thread_Reset_timeslice(); 30007584: eb000c64 bl 3000a71c <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 30007588: e59f300c ldr r3, [pc, #12] ; 3000759c <_Thread_Tickle_timeslice+0x90> 3000758c: e5932000 ldr r2, [r3] 30007590: e5842078 str r2, [r4, #120] 30007594: e8bd8010 pop {r4, pc} 30007598: 30016124 .word 0x30016124 3000759c: 30016024 .word 0x30016024 30006d7c <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006d7c: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30006d80: 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; 30006d84: e5914014 ldr r4, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006d88: e1a07001 mov r7, r1 30006d8c: e1a08000 mov r8, r0 30006d90: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30006d94: e2810038 add r0, r1, #56 ; 0x38 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30006d98: e3a01000 mov r1, #0 ; 0x0 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 ) ) 30006d9c: e3140020 tst r4, #32 ; 0x20 30006da0: e587103c str r1, [r7, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 30006da4: e1a01324 lsr r1, r4, #6 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 30006da8: e1a0a002 mov sl, r2 the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006dac: 11a02201 lslne r2, r1, #4 30006db0: 10423101 subne r3, r2, r1, lsl #2 30006db4: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 30006db8: e5870040 str r0, [r7, #64] _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 30006dbc: e5986038 ldr r6, [r8, #56] 30006dc0: 159f91d4 ldrne r9, [pc, #468] ; 30006f9c <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 30006dc4: 12820008 addne r0, r2, #8 ; 0x8 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 ) ) 30006dc8: 1a000028 bne 30006e70 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30006dcc: e1a03081 lsl r3, r1, #1 30006dd0: e0833001 add r3, r3, r1 30006dd4: e2833001 add r3, r3, #1 ; 0x1 30006dd8: e1a02201 lsl r2, r1, #4 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30006ddc: e0422101 sub r2, r2, r1, lsl #2 30006de0: e1a03103 lsl r3, r3, #2 30006de4: e0880003 add r0, r8, r3 30006de8: e0882002 add r2, r8, r2 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 30006dec: e10f5000 mrs r5, CPSR 30006df0: e38530c0 orr r3, r5, #192 ; 0xc0 30006df4: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 30006df8: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 30006dfc: e1510000 cmp r1, r0 30006e00: 1a00000f bne 30006e44 <_Thread_queue_Enqueue_priority+0xc8> 30006e04: ea000061 b 30006f90 <_Thread_queue_Enqueue_priority+0x214> search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 30006e08: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 30006e0c: e1510000 cmp r1, r0 30006e10: 0a00000e beq 30006e50 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 30006e14: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 30006e18: e154000c cmp r4, ip 30006e1c: 9a00000b bls 30006e50 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 30006e20: e10f3000 mrs r3, CPSR 30006e24: e129f005 msr CPSR_fc, r5 30006e28: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 30006e2c: e5913010 ldr r3, [r1, #16] 30006e30: e1160003 tst r6, r3 30006e34: 0a000049 beq 30006f60 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 30006e38: e5911000 ldr r1, [r1] 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 ) ) { 30006e3c: e1510000 cmp r1, r0 30006e40: 0a000002 beq 30006e50 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 30006e44: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 30006e48: e154000c cmp r4, ip 30006e4c: 8affffed bhi 30006e08 <_Thread_queue_Enqueue_priority+0x8c> 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 ) ) { 30006e50: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 30006e54: e5980030 ldr r0, [r8, #48] 30006e58: e3500001 cmp r0, #1 ; 0x1 30006e5c: 0a000034 beq 30006f34 <_Thread_queue_Enqueue_priority+0x1b8> * 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; 30006e60: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 30006e64: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 30006e68: e12fff1e bx lr if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 30006e6c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30006e70: e5d93000 ldrb r3, [r9] 30006e74: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 30006e78: e10f5000 mrs r5, CPSR 30006e7c: e38530c0 orr r3, r5, #192 ; 0xc0 30006e80: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 30006e84: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30006e88: e1520001 cmp r2, r1 30006e8c: 0a000018 beq 30006ef4 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 30006e90: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006e94: e154000c cmp r4, ip 30006e98: 2a000015 bcs 30006ef4 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30006e9c: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 30006ea0: e1520001 cmp r2, r1 30006ea4: 1a00000f bne 30006ee8 <_Thread_queue_Enqueue_priority+0x16c> 30006ea8: ea000011 b 30006ef4 <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 30006eac: e10f3000 mrs r3, CPSR 30006eb0: e129f005 msr CPSR_fc, r5 30006eb4: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 30006eb8: e5913010 ldr r3, [r1, #16] 30006ebc: e1160003 tst r6, r3 30006ec0: 0affffe9 beq 30006e6c <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 30006ec4: e5911004 ldr r1, [r1, #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 ) ) { 30006ec8: e1510002 cmp r1, r2 30006ecc: 0a000008 beq 30006ef4 <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 30006ed0: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006ed4: e154000c cmp r4, ip 30006ed8: 2a000005 bcs 30006ef4 <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30006edc: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 30006ee0: e1510002 cmp r1, r2 <== NOT EXECUTED 30006ee4: 0a000002 beq 30006ef4 <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 30006ee8: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 30006eec: e154000c cmp r4, ip 30006ef0: 3affffed bcc 30006eac <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006ef4: e5980030 ldr r0, [r8, #48] 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 ) ) { 30006ef8: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006efc: e3500001 cmp r0, #1 ; 0x1 30006f00: 1affffd6 bne 30006e60 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006f04: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006f08: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006f0c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 30006f10: 0a000014 beq 30006f68 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 30006f14: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 30006f18: e5871004 str r1, [r7, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 30006f1c: e5873000 str r3, [r7] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006f20: e5878044 str r8, [r7, #68] 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; 30006f24: e5817000 str r7, [r1] next_node->previous = the_node; 30006f28: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006f2c: e129f005 msr CPSR_fc, r5 30006f30: eaffffcb b 30006e64 <_Thread_queue_Enqueue_priority+0xe8> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006f34: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006f38: e154000c cmp r4, ip if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 30006f3c: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 30006f40: 0a000008 beq 30006f68 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 30006f44: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006f48: e887000a stm r7, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006f4c: e5878044 str r8, [r7, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 30006f50: e5837000 str r7, [r3] search_node->previous = the_node; 30006f54: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006f58: e129f005 msr CPSR_fc, r5 30006f5c: eaffffc0 b 30006e64 <_Thread_queue_Enqueue_priority+0xe8> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 30006f60: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30006f64: eaffffa0 b 30006dec <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 30006f68: e281303c add r3, r1, #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; 30006f6c: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 30006f70: e5873000 str r3, [r7] the_node->previous = previous_node; 30006f74: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 30006f78: e5878044 str r8, [r7, #68] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 30006f7c: e5827000 str r7, [r2] search_node->previous = the_node; 30006f80: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006f84: e129f006 msr CPSR_fc, r6 30006f88: e3a00001 mov r0, #1 ; 0x1 30006f8c: eaffffb4 b 30006e64 <_Thread_queue_Enqueue_priority+0xe8> 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 ) ) { 30006f90: e1a06005 mov r6, r5 30006f94: e3e0c000 mvn ip, #0 ; 0x0 30006f98: eaffffad b 30006e54 <_Thread_queue_Enqueue_priority+0xd8> 30006f9c: 300152b8 .word 0x300152b8 3000b16c <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 3000b16c: e92d4010 push {r4, lr} 3000b170: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); 3000b174: e10f0000 mrs r0, CPSR 3000b178: e38030c0 orr r3, r0, #192 ; 0xc0 3000b17c: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000b180: e59f3064 ldr r3, [pc, #100] ; 3000b1ec <_Thread_queue_Extract_fifo+0x80> 3000b184: e5912010 ldr r2, [r1, #16] 3000b188: e0023003 and r3, r2, r3 3000b18c: e3530000 cmp r3, #0 ; 0x0 3000b190: 0a00000d beq 3000b1cc <_Thread_queue_Extract_fifo+0x60> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b194: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 3000b198: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000b19c: e5911000 ldr r1, [r1] 3000b1a0: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 3000b1a4: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; 3000b1a8: e5821000 str r1, [r2] 3000b1ac: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000b1b0: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b1b4: 0a000006 beq 3000b1d4 <_Thread_queue_Extract_fifo+0x68> _ISR_Enable( level ); 3000b1b8: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000b1bc: e59f102c ldr r1, [pc, #44] ; 3000b1f0 <_Thread_queue_Extract_fifo+0x84> 3000b1c0: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b1c4: e8bd4010 pop {r4, lr} 3000b1c8: eaffec75 b 300063a4 <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 3000b1cc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b1d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 3000b1d4: e3a03003 mov r3, #3 ; 0x3 3000b1d8: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000b1dc: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); 3000b1e0: e2840048 add r0, r4, #72 ; 0x48 3000b1e4: ebfff265 bl 30007b80 <_Watchdog_Remove> 3000b1e8: eafffff3 b 3000b1bc <_Thread_queue_Extract_fifo+0x50> 3000b1ec: 0003bee0 .word 0x0003bee0 3000b1f0: 1003fff8 .word 0x1003fff8 3000a4e0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 3000a4e0: e92d4070 push {r4, r5, r6, lr} 3000a4e4: e1a04001 mov r4, r1 3000a4e8: e20260ff and r6, r2, #255 ; 0xff Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 3000a4ec: e10fc000 mrs ip, CPSR 3000a4f0: e38c30c0 orr r3, ip, #192 ; 0xc0 3000a4f4: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000a4f8: e59f30b4 ldr r3, [pc, #180] ; 3000a5b4 <_Thread_queue_Extract_priority_helper+0xd4> 3000a4fc: e5912010 ldr r2, [r1, #16] 3000a500: e0023003 and r3, r2, r3 3000a504: e3530000 cmp r3, #0 ; 0x0 3000a508: 0a000021 beq 3000a594 <_Thread_queue_Extract_priority_helper+0xb4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000a50c: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a510: e284303c add r3, r4, #60 ; 0x3c 3000a514: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 3000a518: e894000c ldm r4, {r2, r3} new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 3000a51c: 05823004 streq r3, [r2, #4] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 3000a520: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000a524: 0a00000e beq 3000a564 <_Thread_queue_Extract_priority_helper+0x84> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 3000a528: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 3000a52c: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 3000a530: e5821004 str r1, [r2, #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; 3000a534: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 3000a538: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000a53c: e5942038 ldr r2, [r4, #56] 3000a540: e5943040 ldr r3, [r4, #64] 3000a544: e1520003 cmp r2, r3 3000a548: 0a000005 beq 3000a564 <_Thread_queue_Extract_priority_helper+0x84> new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000a54c: e281203c add r2, r1, #60 ; 0x3c 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 = 3000a550: e2813038 add r3, r1, #56 ; 0x38 3000a554: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 3000a558: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 3000a55c: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000a560: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 3000a564: e3560000 cmp r6, #0 ; 0x0 3000a568: 1a000007 bne 3000a58c <_Thread_queue_Extract_priority_helper+0xac> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000a56c: e5943050 ldr r3, [r4, #80] 3000a570: e3530002 cmp r3, #2 ; 0x2 3000a574: 0a000008 beq 3000a59c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); 3000a578: e129f00c msr CPSR_fc, ip 3000a57c: e59f1034 ldr r1, [pc, #52] ; 3000a5b8 <_Thread_queue_Extract_priority_helper+0xd8> 3000a580: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000a584: e8bd4070 pop {r4, r5, r6, lr} 3000a588: eaffef85 b 300063a4 <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 3000a58c: e129f00c msr CPSR_fc, ip 3000a590: e8bd8070 pop {r4, r5, r6, pc} Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 3000a594: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 3000a598: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3000a59c: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED 3000a5a0: e5843050 str r3, [r4, #80] <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000a5a4: e129f00c msr CPSR_fc, ip <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 3000a5a8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 3000a5ac: ebfff573 bl 30007b80 <_Watchdog_Remove> <== NOT EXECUTED 3000a5b0: eafffff1 b 3000a57c <_Thread_queue_Extract_priority_helper+0x9c> <== NOT EXECUTED 3000a5b4: 0003bee0 .word 0x0003bee0 3000a5b8: 1003fff8 .word 0x1003fff8 30012ae4 <_Timer_Server_process_insertions>: * onto one of the Timer Server chains. * * @note It is only to be called from the Timer Server task. */ static void _Timer_Server_process_insertions(void) { 30012ae4: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 30012ae8: e59f005c ldr r0, [pc, #92] ; 30012b4c <_Timer_Server_process_insertions+0x68> 30012aec: eb00027f bl 300134f0 <_Chain_Get> if ( the_timer == NULL ) 30012af0: e3500000 cmp r0, #0 ; 0x0 30012af4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 30012af8: e5903038 ldr r3, [r0, #56] 30012afc: e3530001 cmp r3, #1 ; 0x1 30012b00: 0a00000c beq 30012b38 <_Timer_Server_process_insertions+0x54> _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 30012b04: e3530003 cmp r3, #3 ; 0x3 30012b08: 0a000005 beq 30012b24 <_Timer_Server_process_insertions+0x40> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b0c: ebfffff4 bl 30012ae4 <_Timer_Server_process_insertions> <== NOT EXECUTED static void _Timer_Server_process_insertions(void) { Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 30012b10: e59f0034 ldr r0, [pc, #52] ; 30012b4c <_Timer_Server_process_insertions+0x68> 30012b14: eb000275 bl 300134f0 <_Chain_Get> if ( the_timer == NULL ) 30012b18: e3500000 cmp r0, #0 ; 0x0 30012b1c: 1afffff5 bne 30012af8 <_Timer_Server_process_insertions+0x14> 30012b20: e49df004 pop {pc} ; (ldr pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker ); 30012b24: e2801010 add r1, r0, #16 ; 0x10 30012b28: e59f0020 ldr r0, [pc, #32] ; 30012b50 <_Timer_Server_process_insertions+0x6c> 30012b2c: eb001123 bl 30016fc0 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b30: ebffffeb bl 30012ae4 <_Timer_Server_process_insertions> 30012b34: eafffff5 b 30012b10 <_Timer_Server_process_insertions+0x2c> the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); if ( the_timer == NULL ) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 30012b38: e2801010 add r1, r0, #16 ; 0x10 30012b3c: e59f0010 ldr r0, [pc, #16] ; 30012b54 <_Timer_Server_process_insertions+0x70> 30012b40: eb00111e bl 30016fc0 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 30012b44: ebffffe6 bl 30012ae4 <_Timer_Server_process_insertions> 30012b48: eafffff0 b 30012b10 <_Timer_Server_process_insertions+0x2c> 30012b4c: 300312cc .word 0x300312cc 30012b50: 300312c0 .word 0x300312c0 30012b54: 300312ac .word 0x300312ac 30012a60 <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 30012a60: e59f3040 ldr r3, [pc, #64] ; 30012aa8 <_Timespec_From_ticks+0x48> <== NOT EXECUTED 30012a64: e5932000 ldr r2, [r3] <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 30012a68: e59f303c ldr r3, [pc, #60] ; 30012aac <_Timespec_From_ticks+0x4c> <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 30012a6c: e00c0092 mul ip, r2, r0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 30012a70: e0802c93 umull r2, r0, r3, ip <== NOT EXECUTED 30012a74: e1a00920 lsr r0, r0, #18 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 30012a78: e1a03400 lsl r3, r0, #8 <== NOT EXECUTED 30012a7c: e0433180 sub r3, r3, r0, lsl #3 <== NOT EXECUTED 30012a80: e1a02303 lsl r2, r3, #6 <== NOT EXECUTED 30012a84: e0632002 rsb r2, r3, r2 <== NOT EXECUTED 30012a88: e0822000 add r2, r2, r0 <== NOT EXECUTED 30012a8c: e04cc302 sub ip, ip, r2, lsl #6 <== NOT EXECUTED 30012a90: e1a0338c lsl r3, ip, #7 <== NOT EXECUTED 30012a94: e043310c sub r3, r3, ip, lsl #2 <== NOT EXECUTED 30012a98: e083300c add r3, r3, ip <== NOT EXECUTED 30012a9c: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED 30012aa0: e8810009 stm r1, {r0, r3} <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 30012aa4: e12fff1e bx lr <== NOT EXECUTED 30012aa8: 30025f50 .word 0x30025f50 30012aac: 431bde83 .word 0x431bde83 30012ab0 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 30012ab0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30012ab4: 0a00000a beq 30012ae4 <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 30012ab8: e5903000 ldr r3, [r0] <== NOT EXECUTED 30012abc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30012ac0: ba000007 blt 30012ae4 <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 30012ac4: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 30012ac8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30012acc: ba000004 blt 30012ae4 <_Timespec_Is_valid+0x34> <== NOT EXECUTED 30012ad0: e59f3014 ldr r3, [pc, #20] ; 30012aec <_Timespec_Is_valid+0x3c> <== NOT EXECUTED 30012ad4: e1500003 cmp r0, r3 <== NOT EXECUTED 30012ad8: 83a00000 movhi r0, #0 ; 0x0 <== NOT EXECUTED 30012adc: 93a00001 movls r0, #1 ; 0x1 <== NOT EXECUTED 30012ae0: e12fff1e bx lr <== NOT EXECUTED 30012ae4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 30012ae8: e12fff1e bx lr <== NOT EXECUTED 30012aec: 3b9ac9ff .word 0x3b9ac9ff 30012af0 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 30012af0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 30012af4: e5907000 ldr r7, [r0] <== NOT EXECUTED 30012af8: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 30012afc: 15906004 ldrne r6, [r0, #4] <== NOT EXECUTED 30012b00: 1a000003 bne 30012b14 <_Timespec_To_ticks+0x24> <== NOT EXECUTED 30012b04: e5906004 ldr r6, [r0, #4] <== NOT EXECUTED 30012b08: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 30012b0c: 01a00006 moveq r0, r6 <== NOT EXECUTED 30012b10: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 30012b14: e59f3030 ldr r3, [pc, #48] ; 30012b4c <_Timespec_To_ticks+0x5c> <== NOT EXECUTED 30012b18: e59f0030 ldr r0, [pc, #48] ; 30012b50 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 30012b1c: e5934000 ldr r4, [r3] <== NOT EXECUTED 30012b20: e1a01004 mov r1, r4 <== NOT EXECUTED 30012b24: ebffb78f bl 30000968 <__aeabi_uidiv> <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 30012b28: e59f3024 ldr r3, [pc, #36] ; 30012b54 <_Timespec_To_ticks+0x64> <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 30012b2c: e0050097 mul r5, r7, r0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 30012b30: e0802693 umull r2, r0, r3, r6 <== NOT EXECUTED 30012b34: e1a01004 mov r1, r4 <== NOT EXECUTED 30012b38: e1a00320 lsr r0, r0, #6 <== NOT EXECUTED 30012b3c: ebffb789 bl 30000968 <__aeabi_uidiv> <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 30012b40: e0900005 adds r0, r0, r5 <== NOT EXECUTED 30012b44: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED return ticks; return 1; } 30012b48: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30012b4c: 30025f50 .word 0x30025f50 30012b50: 000f4240 .word 0x000f4240 30012b54: 10624dd3 .word 0x10624dd3 3000d5f0 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 3000d5f0: e92d4010 push {r4, lr} 3000d5f4: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 3000d5f8: eb001192 bl 30011c48 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 3000d5fc: e5943024 ldr r3, [r4, #36] 3000d600: e3530000 cmp r3, #0 ; 0x0 3000d604: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 3000d608: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 3000d60c: e8bd4010 pop {r4, lr} <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) _Chain_Extract( &the_extension->Switch.Node ); 3000d610: ea00118c b 30011c48 <_Chain_Extract> <== NOT EXECUTED 3000983c <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 3000983c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30009840: e1a07000 mov r7, r0 30009844: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 30009848: e10fc000 mrs ip, CPSR 3000984c: e38c30c0 orr r3, ip, #192 ; 0xc0 30009850: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30009854: e1a06000 mov r6, r0 30009858: e4960004 ldr r0, [r6], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 3000985c: e1500006 cmp r0, r6 30009860: 0a000019 beq 300098cc <_Watchdog_Adjust+0x90> switch ( direction ) { 30009864: e3510000 cmp r1, #0 ; 0x0 30009868: 1a000019 bne 300098d4 <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000986c: e3520000 cmp r2, #0 ; 0x0 30009870: 0a000015 beq 300098cc <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 30009874: e5905010 ldr r5, [r0, #16] RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 30009878: e1a01000 mov r1, r0 3000987c: e1520005 cmp r2, r5 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 30009880: 23a08001 movcs r8, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 30009884: 2a000005 bcs 300098a0 <_Watchdog_Adjust+0x64> 30009888: ea000017 b 300098ec <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 3000988c: e0544005 subs r4, r4, r5 30009890: 0a00000d beq 300098cc <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 30009894: e5915010 ldr r5, [r1, #16] 30009898: e1550004 cmp r5, r4 3000989c: 8a000012 bhi 300098ec <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 300098a0: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 300098a4: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 300098a8: e1a00007 mov r0, r7 300098ac: eb0000ab bl 30009b60 <_Watchdog_Tickle> _ISR_Disable( level ); 300098b0: e10fc000 mrs ip, CPSR 300098b4: e38c30c0 orr r3, ip, #192 ; 0xc0 300098b8: e129f003 msr CPSR_fc, r3 300098bc: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 300098c0: e1560003 cmp r6, r3 300098c4: e1a01003 mov r1, r3 300098c8: 1affffef bne 3000988c <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 300098cc: e129f00c msr CPSR_fc, ip } 300098d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 300098d4: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 300098d8: 05903010 ldreq r3, [r0, #16] 300098dc: 00833002 addeq r3, r3, r2 300098e0: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 300098e4: e129f00c msr CPSR_fc, ip } 300098e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 300098ec: e0643005 rsb r3, r4, r5 300098f0: e5813010 str r3, [r1, #16] 300098f4: eafffff4 b 300098cc <_Watchdog_Adjust+0x90> 30016f08 <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 30016f08: e2513000 subs r3, r1, #0 ; 0x0 Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { 30016f0c: e92d01f0 push {r4, r5, r6, r7, r8} 30016f10: e1a01002 mov r1, r2 Watchdog_Interval units = units_arg; ISR_Level level; Chain_Node *node; if ( !units ) { 30016f14: 0a000027 beq 30016fb8 <_Watchdog_Adjust_to_chain+0xb0> return; } _ISR_Disable( level ); 30016f18: e10f7000 mrs r7, CPSR 30016f1c: e38720c0 orr r2, r7, #192 ; 0xc0 30016f20: e129f002 msr CPSR_fc, r2 30016f24: e1a02000 mov r2, r0 30016f28: e492c004 ldr ip, [r2], #4 if ( !_Chain_Is_empty( header ) ) { 30016f2c: e15c0002 cmp ip, r2 30016f30: 0a00001f beq 30016fb4 <_Watchdog_Adjust_to_chain+0xac> 30016f34: e59c4010 ldr r4, [ip, #16] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30016f38: e1a05003 mov r5, r3 30016f3c: e2816004 add r6, r1, #4 ; 0x4 if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 30016f40: e3a08000 mov r8, #0 ; 0x0 } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { 30016f44: e1540005 cmp r4, r5 30016f48: 8a000017 bhi 30016fac <_Watchdog_Adjust_to_chain+0xa4> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 0; 30016f4c: e58c8010 str r8, [ip, #16] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30016f50: e152000c cmp r2, ip { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30016f54: 159c3000 ldrne r3, [ip] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30016f58: 03a0c000 moveq ip, #0 ; 0x0 Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 30016f5c: 15803000 strne r3, [r0] new_first->previous = _Chain_Head(the_chain); 30016f60: 15830004 strne r0, [r3, #4] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 30016f64: e58c6000 str r6, [ip] old_last_node = the_chain->last; 30016f68: e5913008 ldr r3, [r1, #8] the_chain->last = the_node; 30016f6c: e581c008 str ip, [r1, #8] old_last_node->next = the_node; the_node->previous = old_last_node; 30016f70: e58c3004 str r3, [ip, #4] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 30016f74: e583c000 str ip, [r3] do { node = _Chain_Get_unprotected( header ); _Chain_Append_unprotected( to_fire, node ); _ISR_Flash( level ); 30016f78: e10f3000 mrs r3, CPSR 30016f7c: e129f007 msr CPSR_fc, r7 30016f80: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30016f84: e590c000 ldr ip, [r0] } while ( !_Chain_Is_empty( header ) && _Watchdog_First( header )->delta_interval == 0 ); 30016f88: e152000c cmp r2, ip 30016f8c: 0a000008 beq 30016fb4 <_Watchdog_Adjust_to_chain+0xac> 30016f90: e59c3010 ldr r3, [ip, #16] 30016f94: e3530000 cmp r3, #0 ; 0x0 30016f98: 0affffec beq 30016f50 <_Watchdog_Adjust_to_chain+0x48> return; } _ISR_Disable( level ); if ( !_Chain_Is_empty( header ) ) { while ( units ) { 30016f9c: e0555004 subs r5, r5, r4 30016fa0: 0a000003 beq 30016fb4 <_Watchdog_Adjust_to_chain+0xac> 30016fa4: e1a04003 mov r4, r3 <== NOT EXECUTED 30016fa8: eaffffe5 b 30016f44 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; 30016fac: e0653004 rsb r3, r5, r4 30016fb0: e58c3010 str r3, [ip, #16] break; } } } _ISR_Enable( level ); 30016fb4: e129f007 msr CPSR_fc, r7 } 30016fb8: e8bd01f0 pop {r4, r5, r6, r7, r8} 30016fbc: e12fff1e bx lr 300079c4 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 300079c4: e59f3144 ldr r3, [pc, #324] ; 30007b10 <_Watchdog_Insert+0x14c> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 300079c8: e92d01f0 push {r4, r5, r6, r7, r8} 300079cc: e1a04001 mov r4, r1 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 300079d0: e5935000 ldr r5, [r3] _ISR_Disable( level ); 300079d4: e10f6000 mrs r6, CPSR 300079d8: e38630c0 orr r3, r6, #192 ; 0xc0 300079dc: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 300079e0: e5913008 ldr r3, [r1, #8] 300079e4: e3530000 cmp r3, #0 ; 0x0 300079e8: 1a000041 bne 30007af4 <_Watchdog_Insert+0x130> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 300079ec: e59f8120 ldr r8, [pc, #288] ; 30007b14 <_Watchdog_Insert+0x150> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 300079f0: e3a03001 mov r3, #1 ; 0x1 _Watchdog_Sync_count++; 300079f4: e5982000 ldr r2, [r8] 300079f8: e59f7118 ldr r7, [pc, #280] ; 30007b18 <_Watchdog_Insert+0x154> 300079fc: e2822001 add r2, r2, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 30007a00: e5813008 str r3, [r1, #8] _Watchdog_Sync_count++; 30007a04: e5882000 str r2, [r8] restart: delta_interval = the_watchdog->initial; 30007a08: e594c00c ldr ip, [r4, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 30007a0c: e5902000 ldr r2, [r0] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007a10: e35c0000 cmp ip, #0 ; 0x0 30007a14: 0a000023 beq 30007aa8 <_Watchdog_Insert+0xe4> 30007a18: e5923000 ldr r3, [r2] 30007a1c: e3530000 cmp r3, #0 ; 0x0 30007a20: 0a000020 beq 30007aa8 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 30007a24: e5921010 ldr r1, [r2, #16] 30007a28: e15c0001 cmp ip, r1 30007a2c: 3a000032 bcc 30007afc <_Watchdog_Insert+0x138> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 30007a30: e10f3000 mrs r3, CPSR 30007a34: e129f006 msr CPSR_fc, r6 30007a38: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007a3c: e5943008 ldr r3, [r4, #8] 30007a40: e3530001 cmp r3, #1 ; 0x1 30007a44: 1a000023 bne 30007ad8 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007a48: e5973000 ldr r3, [r7] 30007a4c: e1550003 cmp r5, r3 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 30007a50: 2061c00c rsbcs ip, r1, ip if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007a54: 2a000010 bcs 30007a9c <_Watchdog_Insert+0xd8> 30007a58: ea00002a b 30007b08 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007a5c: e5923000 ldr r3, [r2] 30007a60: e3530000 cmp r3, #0 ; 0x0 30007a64: 0a00000f beq 30007aa8 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 30007a68: e5921010 ldr r1, [r2, #16] 30007a6c: e151000c cmp r1, ip 30007a70: 8a000021 bhi 30007afc <_Watchdog_Insert+0x138> * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 30007a74: e10f3000 mrs r3, CPSR 30007a78: e129f006 msr CPSR_fc, r6 30007a7c: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007a80: e5943008 ldr r3, [r4, #8] if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 30007a84: e061c00c rsb ip, r1, ip * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007a88: e3530001 cmp r3, #1 ; 0x1 30007a8c: 1a000011 bne 30007ad8 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007a90: e5973000 ldr r3, [r7] 30007a94: e1550003 cmp r5, r3 30007a98: 3a00001a bcc 30007b08 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 30007a9c: e35c0000 cmp ip, #0 ; 0x0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 30007aa0: e5922000 ldr r2, [r2] 30007aa4: 1affffec bne 30007a5c <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 30007aa8: e5921004 ldr r1, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 30007aac: e59f3068 ldr r3, [pc, #104] ; 30007b1c <_Watchdog_Insert+0x158> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30007ab0: e5910000 ldr r0, [r1] 30007ab4: e5932000 ldr r2, [r3] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 30007ab8: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 30007abc: e5814000 str r4, [r1] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30007ac0: e5841004 str r1, [r4, #4] 30007ac4: e5842014 str r2, [r4, #20] 30007ac8: e5843008 str r3, [r4, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 30007acc: e584c010 str ip, [r4, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 30007ad0: e5804004 str r4, [r0, #4] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 30007ad4: e5840000 str r0, [r4] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 30007ad8: e5875000 str r5, [r7] _Watchdog_Sync_count--; 30007adc: e5983000 ldr r3, [r8] 30007ae0: e2433001 sub r3, r3, #1 ; 0x1 30007ae4: e5883000 str r3, [r8] _ISR_Enable( level ); 30007ae8: e129f006 msr CPSR_fc, r6 } 30007aec: e8bd01f0 pop {r4, r5, r6, r7, r8} 30007af0: e12fff1e bx lr * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 30007af4: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 30007af8: eafffffb b 30007aec <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 30007afc: e06c3001 rsb r3, ip, r1 30007b00: e5823010 str r3, [r2, #16] 30007b04: eaffffe7 b 30007aa8 <_Watchdog_Insert+0xe4> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 30007b08: e5875000 str r5, [r7] 30007b0c: eaffffbd b 30007a08 <_Watchdog_Insert+0x44> 30007b10: 30016100 .word 0x30016100 30007b14: 300161c0 .word 0x300161c0 30007b18: 30016120 .word 0x30016120 30007b1c: 300161c4 .word 0x300161c4 30007d10 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007d10: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007d14: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007d18: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007d1c: 0a000010 beq 30007d64 <_Workspace_Handler_initialization+0x54> 30007d20: e214c003 ands ip, r4, #3 ; 0x3 30007d24: 1a00000e bne 30007d64 <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 30007d28: e59f3054 ldr r3, [pc, #84] ; 30007d84 <_Workspace_Handler_initialization+0x74> 30007d2c: e5932000 ldr r2, [r3] 30007d30: e5d21028 ldrb r1, [r2, #40] 30007d34: e3510000 cmp r1, #0 ; 0x0 30007d38: 1a00000d bne 30007d74 <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 30007d3c: e1a01004 mov r1, r4 30007d40: e1a02005 mov r2, r5 30007d44: e59f003c ldr r0, [pc, #60] ; 30007d88 <_Workspace_Handler_initialization+0x78> 30007d48: e3a03004 mov r3, #4 ; 0x4 30007d4c: ebfff671 bl 30005718 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 30007d50: e3500000 cmp r0, #0 ; 0x0 30007d54: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 30007d58: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 30007d5c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 30007d60: ebfff6f7 bl 30005944 <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 30007d64: e3a00000 mov r0, #0 ; 0x0 30007d68: e3a01001 mov r1, #1 ; 0x1 30007d6c: e3a02002 mov r2, #2 ; 0x2 30007d70: ebfff6f3 bl 30005944 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 30007d74: e1a0100c mov r1, ip <== NOT EXECUTED 30007d78: e1a02005 mov r2, r5 <== NOT EXECUTED 30007d7c: eb000f4b bl 3000bab0 <== NOT EXECUTED 30007d80: eaffffed b 30007d3c <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED 30007d84: 300160fc .word 0x300160fc 30007d88: 3001608c .word 0x3001608c 30003eb4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 30003eb4: e92d4010 push {r4, lr} if ( !time_buffer ) 30003eb8: e2514000 subs r4, r1, #0 ; 0x0 30003ebc: 03a00009 moveq r0, #9 ; 0x9 30003ec0: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 30003ec4: e3500004 cmp r0, #4 ; 0x4 30003ec8: 979ff100 ldrls pc, [pc, r0, lsl #2] 30003ecc: ea000004 b 30003ee4 30003ed0: 30003eec .word 0x30003eec <== NOT EXECUTED 30003ed4: 30003ef8 .word 0x30003ef8 <== NOT EXECUTED 30003ed8: 30003f04 .word 0x30003f04 <== NOT EXECUTED 30003edc: 30003f14 .word 0x30003f14 <== NOT EXECUTED 30003ee0: 30003f24 .word 0x30003f24 <== NOT EXECUTED 30003ee4: e3a0000a mov r0, #10 ; 0xa 30003ee8: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003eec: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003ef0: e8bd4010 pop {r4, lr} if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003ef4: ea000027 b 30003f98 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003ef8: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003efc: e8bd4010 pop {r4, lr} switch ( option ) { case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003f00: ea00000a b 30003f30 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 30003f04: eb00001f bl 30003f88 30003f08: e5840000 str r0, [r4] 30003f0c: e3a00000 mov r0, #0 ; 0x0 30003f10: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 30003f14: eb000013 bl 30003f68 30003f18: e5840000 str r0, [r4] 30003f1c: e3a00000 mov r0, #0 ; 0x0 30003f20: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003f24: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003f28: e8bd4010 pop {r4, lr} *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003f2c: ea00004d b 30004068 3000627c : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 3000627c: e251c000 subs ip, r1, #0 ; 0x0 rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 30006280: e92d00f0 push {r4, r5, r6, r7} 30006284: e1a06000 mov r6, r0 30006288: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 3000628c: 0a00003e beq 3000638c return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 30006290: e3520000 cmp r2, #0 ; 0x0 30006294: 0a00003c beq 3000638c return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 30006298: e59c3000 ldr r3, [ip] 3000629c: e3530000 cmp r3, #0 ; 0x0 300062a0: 0a000036 beq 30006380 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 300062a4: e3a03000 mov r3, #0 ; 0x0 /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 300062a8: e59f20e4 ldr r2, [pc, #228] ; 30006394 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) return RTEMS_INVALID_ADDRESS; *registered_major = 0; 300062ac: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 300062b0: e5922000 ldr r2, [r2] 300062b4: e1520006 cmp r2, r6 300062b8: 93a0000a movls r0, #10 ; 0xa 300062bc: 9a00002b bls 30006370 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 300062c0: e3560000 cmp r6, #0 ; 0x0 300062c4: 1a00001d bne 30006340 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 300062c8: e2526001 subs r6, r2, #1 ; 0x1 300062cc: 0a000029 beq 30006378 300062d0: e1a03282 lsl r3, r2, #5 300062d4: e0433182 sub r3, r3, r2, lsl #3 300062d8: e59f20b8 ldr r2, [pc, #184] ; 30006398 300062dc: e2433018 sub r3, r3, #24 ; 0x18 300062e0: e5921000 ldr r1, [r2] 300062e4: e0811003 add r1, r1, r3 300062e8: ea000002 b 300062f8 300062ec: e2566001 subs r6, r6, #1 ; 0x1 300062f0: e2411018 sub r1, r1, #24 ; 0x18 300062f4: 0a00001f beq 30006378 if ( !_IO_Driver_address_table[major].initialization_entry && 300062f8: e5913000 ldr r3, [r1] * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 300062fc: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 30006300: e3530000 cmp r3, #0 ; 0x0 30006304: 1afffff8 bne 300062ec 30006308: e5913004 ldr r3, [r1, #4] 3000630c: e3530000 cmp r3, #0 ; 0x0 30006310: 1afffff5 bne 300062ec if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 30006314: e1a04005 mov r4, r5 30006318: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000631c: e8a4000f stmia r4!, {r0, r1, r2, r3} 30006320: e89c0003 ldm ip, {r0, r1} 30006324: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006328: e3a01000 mov r1, #0 ; 0x0 3000632c: e1a00006 mov r0, r6 30006330: e1a02001 mov r2, r1 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 30006334: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 30006338: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 3000633c: eaffff58 b 300060a4 if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 30006340: e59f2050 ldr r2, [pc, #80] ; 30006398 30006344: e1a03286 lsl r3, r6, #5 30006348: e5921000 ldr r1, [r2] 3000634c: e0433186 sub r3, r3, r6, lsl #3 30006350: e7912003 ldr r2, [r1, r3] 30006354: e0815003 add r5, r1, r3 30006358: e3520000 cmp r2, #0 ; 0x0 3000635c: 1a000002 bne 3000636c 30006360: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 30006364: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30006368: 0affffe9 beq 30006314 <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 3000636c: e3a0000c mov r0, #12 ; 0xc } 30006370: e8bd00f0 pop {r4, r5, r6, r7} 30006374: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 30006378: e3a00005 mov r0, #5 ; 0x5 3000637c: eafffffb b 30006370 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 30006380: e59c3004 ldr r3, [ip, #4] 30006384: e3530000 cmp r3, #0 ; 0x0 30006388: 1affffc5 bne 300062a4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 3000638c: e3a00009 mov r0, #9 ; 0x9 30006390: eafffff6 b 30006370 30006394: 3001a100 .word 0x3001a100 30006398: 3001a104 .word 0x3001a104 30005964 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 30005964: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30005968: e1a06000 mov r6, r0 3000596c: e24dd004 sub sp, sp, #4 ; 0x4 30005970: e1a07001 mov r7, r1 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 30005974: e59f0180 ldr r0, [pc, #384] ; 30005afc 30005978: e1a01006 mov r1, r6 3000597c: e1a0200d mov r2, sp 30005980: eb000887 bl 30007ba4 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 30005984: e59d3000 ldr r3, [sp] 30005988: e1a05000 mov r5, r0 3000598c: e3530000 cmp r3, #0 ; 0x0 30005990: 0a000003 beq 300059a4 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 30005994: e3a04004 mov r4, #4 ; 0x4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30005998: e1a00004 mov r0, r4 3000599c: e28dd004 add sp, sp, #4 ; 0x4 300059a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 300059a4: e59f4154 ldr r4, [pc, #340] ; 30005b00 300059a8: e5902050 ldr r2, [r0, #80] 300059ac: e5943000 ldr r3, [r4] 300059b0: e1520003 cmp r2, r3 300059b4: 0a000002 beq 300059c4 _Thread_Enable_dispatch(); 300059b8: eb000abb bl 300084ac <_Thread_Enable_dispatch> 300059bc: e3a04017 mov r4, #23 ; 0x17 300059c0: eafffff4 b 30005998 return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 300059c4: e3570000 cmp r7, #0 ; 0x0 300059c8: 0a000031 beq 30005a94 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 300059cc: e10f8000 mrs r8, CPSR 300059d0: e38830c0 orr r3, r8, #192 ; 0xc0 300059d4: e129f003 msr CPSR_fc, r3 switch ( the_period->state ) { 300059d8: e5903038 ldr r3, [r0, #56] 300059dc: e3530002 cmp r3, #2 ; 0x2 300059e0: 0a000014 beq 30005a38 300059e4: e3530004 cmp r3, #4 ; 0x4 300059e8: 0a000033 beq 30005abc 300059ec: e3530000 cmp r3, #0 ; 0x0 300059f0: 1affffe7 bne 30005994 case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level ); 300059f4: e129f008 msr CPSR_fc, r8 /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 300059f8: ebffff61 bl 30005784 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 300059fc: e59f2100 ldr r2, [pc, #256] ; 30005b04 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005a00: e3a04000 mov r4, #0 ; 0x0 the_period->state = RATE_MONOTONIC_ACTIVE; 30005a04: e3a03002 mov r3, #2 ; 0x2 30005a08: e5853038 str r3, [r5, #56] the_watchdog->routine = routine; 30005a0c: e585202c str r2, [r5, #44] the_watchdog->id = id; 30005a10: e5856030 str r6, [r5, #48] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005a14: e585701c str r7, [r5, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005a18: e2851010 add r1, r5, #16 ; 0x10 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30005a1c: e5854018 str r4, [r5, #24] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 30005a20: e5854034 str r4, [r5, #52] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 30005a24: e585704c str r7, [r5, #76] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005a28: e59f00d8 ldr r0, [pc, #216] ; 30005b08 30005a2c: eb000fc9 bl 30009958 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005a30: eb000a9d bl 300084ac <_Thread_Enable_dispatch> 30005a34: eaffffd7 b 30005998 case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 30005a38: ebffff71 bl 30005804 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 30005a3c: e3a03001 mov r3, #1 ; 0x1 30005a40: e5853038 str r3, [r5, #56] the_period->next_length = length; 30005a44: e585704c str r7, [r5, #76] _ISR_Enable( level ); 30005a48: e129f008 msr CPSR_fc, r8 _Thread_Executing->Wait.id = the_period->Object.id; 30005a4c: e5943000 ldr r3, [r4] 30005a50: e5952008 ldr r2, [r5, #8] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005a54: e1a00003 mov r0, r3 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 30005a58: e5832020 str r2, [r3, #32] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005a5c: e3a01901 mov r1, #16384 ; 0x4000 30005a60: eb000d26 bl 30008f00 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 30005a64: e10f1000 mrs r1, CPSR 30005a68: e38130c0 orr r3, r1, #192 ; 0xc0 30005a6c: e129f003 msr CPSR_fc, r3 local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 30005a70: e3a03002 mov r3, #2 ; 0x2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 30005a74: e5952038 ldr r2, [r5, #56] the_period->state = RATE_MONOTONIC_ACTIVE; 30005a78: e5853038 str r3, [r5, #56] _ISR_Enable( level ); 30005a7c: e129f001 msr CPSR_fc, r1 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) 30005a80: e3520003 cmp r2, #3 ; 0x3 30005a84: 0a000018 beq 30005aec _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 30005a88: eb000a87 bl 300084ac <_Thread_Enable_dispatch> 30005a8c: e3a04000 mov r4, #0 ; 0x0 30005a90: eaffffc0 b 30005998 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 30005a94: e5900038 ldr r0, [r0, #56] 30005a98: e3500000 cmp r0, #0 ; 0x0 30005a9c: 03a0400b moveq r4, #11 ; 0xb 30005aa0: 0affffe2 beq 30005a30 30005aa4: e2403003 sub r3, r0, #3 ; 0x3 30005aa8: e3530001 cmp r3, #1 ; 0x1 30005aac: 93a04006 movls r4, #6 ; 0x6 30005ab0: 83a04000 movhi r4, #0 ; 0x0 ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005ab4: eb000a7c bl 300084ac <_Thread_Enable_dispatch> 30005ab8: eaffffb6 b 30005998 case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 30005abc: ebffff50 bl 30005804 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 30005ac0: e129f008 msr CPSR_fc, r8 the_period->state = RATE_MONOTONIC_ACTIVE; 30005ac4: e3a03002 mov r3, #2 ; 0x2 30005ac8: e5853038 str r3, [r5, #56] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005acc: e585701c str r7, [r5, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005ad0: e2851010 add r1, r5, #16 ; 0x10 the_period->next_length = length; 30005ad4: e585704c str r7, [r5, #76] 30005ad8: e59f0028 ldr r0, [pc, #40] ; 30005b08 30005adc: eb000f9d bl 30009958 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 30005ae0: e3a04006 mov r4, #6 ; 0x6 30005ae4: eb000a70 bl 300084ac <_Thread_Enable_dispatch> 30005ae8: eaffffaa b 30005998 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 30005aec: e5940000 ldr r0, [r4] <== NOT EXECUTED 30005af0: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED 30005af4: eb000966 bl 30008094 <_Thread_Clear_state> <== NOT EXECUTED 30005af8: eaffffe2 b 30005a88 <== NOT EXECUTED 30005afc: 3001a808 .word 0x3001a808 30005b00: 3001a9e4 .word 0x3001a9e4 30005b04: 30005e14 .word 0x30005e14 30005b08: 3001aa04 .word 0x3001aa04 30011000 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 30011000: e92d41f0 push {r4, r5, r6, r7, r8, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 30011004: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 30011008: e1a04000 mov r4, r0 3001100c: e24dd008 sub sp, sp, #8 ; 0x8 30011010: e1a06002 mov r6, r2 Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) 30011014: 03a04009 moveq r4, #9 ; 0x9 30011018: 0a000020 beq 300110a0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 3001101c: e59f80a0 ldr r8, [pc, #160] ; 300110c4 30011020: e5980000 ldr r0, [r8] 30011024: eb0008fe bl 30013424 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 30011028: e1a01004 mov r1, r4 3001102c: e59f0094 ldr r0, [pc, #148] ; 300110c8 30011030: e1a0200d mov r2, sp 30011034: eb000fc4 bl 30014f4c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 30011038: e59d4000 ldr r4, [sp] 3001103c: e1a05000 mov r5, r0 30011040: e3540000 cmp r4, #0 ; 0x0 30011044: 1a000018 bne 300110ac case OBJECTS_LOCAL: heap_status = _Heap_Extend( 30011048: e1a01007 mov r1, r7 3001104c: e1a02006 mov r2, r6 30011050: e2800068 add r0, r0, #104 ; 0x68 30011054: e28d3004 add r3, sp, #4 ; 0x4 30011058: eb000c0f bl 3001409c <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 3001105c: e3500001 cmp r0, #1 ; 0x1 30011060: 03a04009 moveq r4, #9 ; 0x9 30011064: 0a00000b beq 30011098 30011068: 2a000007 bcs 3001108c case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3001106c: e59d1004 ldr r1, [sp, #4] 30011070: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 30011074: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 30011078: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 3001107c: e0833001 add r3, r3, r1 30011080: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 30011084: e5852054 str r2, [r5, #84] 30011088: ea000002 b 30011098 starting_address, length, &amount_extended ); switch ( heap_status ) { 3001108c: e3500002 cmp r0, #2 ; 0x2 30011090: 0a000009 beq 300110bc case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 30011094: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011098: e5980000 ldr r0, [r8] 3001109c: eb0008fc bl 30013494 <_API_Mutex_Unlock> return return_status; } 300110a0: e1a00004 mov r0, r4 300110a4: e28dd008 add sp, sp, #8 ; 0x8 300110a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 300110ac: e3540001 cmp r4, #1 ; 0x1 300110b0: 03a04004 moveq r4, #4 ; 0x4 300110b4: 1afffff6 bne 30011094 300110b8: eafffff6 b 30011098 switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 300110bc: e3a04018 mov r4, #24 ; 0x18 300110c0: eafffff4 b 30011098 300110c4: 300313fc .word 0x300313fc 300110c8: 300311ec .word 0x300311ec 300113e8 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 300113e8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 300113ec: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 300113f0: e24dd010 sub sp, sp, #16 ; 0x10 300113f4: e1a04000 mov r4, r0 300113f8: e1a05001 mov r5, r1 300113fc: e1a06002 mov r6, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) 30011400: 0a000028 beq 300114a8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 30011404: e59f70b4 ldr r7, [pc, #180] ; 300114c0 30011408: e5970000 ldr r0, [r7] 3001140c: eb000804 bl 30013424 <_API_Mutex_Lock> 30011410: e1a01004 mov r1, r4 30011414: e59f00a8 ldr r0, [pc, #168] ; 300114c4 30011418: e28d2008 add r2, sp, #8 ; 0x8 3001141c: eb000eca bl 30014f4c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 30011420: e59d3008 ldr r3, [sp, #8] 30011424: e1a08000 mov r8, r0 30011428: e3530000 cmp r3, #0 ; 0x0 3001142c: 0a000007 beq 30011450 30011430: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011434: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 30011438: 03a04004 moveq r4, #4 ; 0x4 3001143c: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 30011440: eb000813 bl 30013494 <_API_Mutex_Unlock> return return_status; } 30011444: e1a00004 mov r0, r4 30011448: e28dd010 add sp, sp, #16 ; 0x10 3001144c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 30011450: e1a01005 mov r1, r5 30011454: e28d3004 add r3, sp, #4 ; 0x4 30011458: e28dc00c add ip, sp, #12 ; 0xc 3001145c: e1a02006 mov r2, r6 30011460: e2800068 add r0, r0, #104 ; 0x68 30011464: e58dc000 str ip, [sp] 30011468: eb000c95 bl 300146c4 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3001146c: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 30011470: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 30011474: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 30011478: 1a000005 bne 30011494 3001147c: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 30011480: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 30011484: 1a000009 bne 300114b0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 30011488: e5970000 ldr r0, [r7] <== NOT EXECUTED 3001148c: eb000800 bl 30013494 <_API_Mutex_Unlock> <== NOT EXECUTED 30011490: eaffffeb b 30011444 <== NOT EXECUTED 30011494: e5970000 ldr r0, [r7] 30011498: eb0007fd bl 30013494 <_API_Mutex_Unlock> return 3001149c: e3550001 cmp r5, #1 ; 0x1 300114a0: 03a0400d moveq r4, #13 ; 0xd 300114a4: 0affffe6 beq 30011444 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 300114a8: e3a04009 mov r4, #9 ; 0x9 300114ac: eaffffe4 b 30011444 *old_size = (uint32_t) osize; _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) _Region_Process_queue( the_region ); /* unlocks allocator */ 300114b0: e1a00008 mov r0, r8 <== NOT EXECUTED 300114b4: eb001eee bl 30019074 <_Region_Process_queue> <== NOT EXECUTED 300114b8: e1a04005 mov r4, r5 <== NOT EXECUTED 300114bc: eaffffe0 b 30011444 <== NOT EXECUTED 300114c0: 300313fc .word 0x300313fc 300114c4: 300311ec .word 0x300311ec 3000450c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 3000450c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 30004510: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 30004514: e24dd018 sub sp, sp, #24 ; 0x18 30004518: e1a06001 mov r6, r1 3000451c: e1a04002 mov r4, r2 30004520: e1a08003 mov r8, r3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 30004524: 02800003 addeq r0, r0, #3 ; 0x3 30004528: 0a000037 beq 3000460c return RTEMS_INVALID_NAME; if ( !id ) 3000452c: e59d3038 ldr r3, [sp, #56] 30004530: e3530000 cmp r3, #0 ; 0x0 30004534: 03a00009 moveq r0, #9 ; 0x9 30004538: 0a000033 beq 3000460c return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 3000453c: e21230c0 ands r3, r2, #192 ; 0xc0 30004540: 02025030 andeq r5, r2, #48 ; 0x30 30004544: 1a000032 bne 30004614 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 30004548: e3550000 cmp r5, #0 ; 0x0 3000454c: 0a000002 beq 3000455c 30004550: e3560001 cmp r6, #1 ; 0x1 30004554: 83a0000a movhi r0, #10 ; 0xa 30004558: 8a00002b bhi 3000460c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000455c: e59f218c ldr r2, [pc, #396] ; 300046f0 30004560: e5923000 ldr r3, [r2] 30004564: e2833001 add r3, r3, #1 ; 0x1 30004568: e5823000 str r3, [r2] * This function allocates a semaphore control block from * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 3000456c: e59f9180 ldr r9, [pc, #384] ; 300046f4 30004570: e1a00009 mov r0, r9 30004574: eb00050c bl 300059ac <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 30004578: e2507000 subs r7, r0, #0 ; 0x0 3000457c: 0a000048 beq 300046a4 * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 30004580: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 30004584: e5874010 str r4, [r7, #16] * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 30004588: 0a00002e beq 30004648 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 3000458c: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 30004590: 13a03002 movne r3, #2 ; 0x2 30004594: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 30004598: 1a000007 bne 300045bc the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 3000459c: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 300045a0: 13a03003 movne r3, #3 ; 0x3 300045a4: 158d3008 strne r3, [sp, #8] if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 300045a8: 1a000003 bne 300045bc the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 300045ac: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 300045b0: 13a03001 movne r3, #1 ; 0x1 300045b4: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 300045b8: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 300045bc: e3550010 cmp r5, #16 ; 0x10 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 300045c0: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 300045c4: 13a02000 movne r2, #0 ; 0x0 case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 300045c8: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 300045cc: 15cd2004 strbne r2, [sp, #4] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 300045d0: 0a000036 beq 300046b0 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 300045d4: e3560001 cmp r6, #1 ; 0x1 300045d8: 13a02000 movne r2, #0 ; 0x0 300045dc: 03a02001 moveq r2, #1 ; 0x1 300045e0: e2870014 add r0, r7, #20 ; 0x14 300045e4: e1a0100d mov r1, sp } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 300045e8: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 300045ec: eb000304 bl 30005204 <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 300045f0: e3500006 cmp r0, #6 ; 0x6 300045f4: 1a000020 bne 3000467c */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 300045f8: e59f00f4 ldr r0, [pc, #244] ; 300046f4 <== NOT EXECUTED 300045fc: e1a01007 mov r1, r7 <== NOT EXECUTED 30004600: eb0005d1 bl 30005d4c <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 30004604: eb00086c bl 300067bc <_Thread_Enable_dispatch> <== NOT EXECUTED 30004608: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 3000460c: e28dd018 add sp, sp, #24 ; 0x18 30004610: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 30004614: e2025030 and r5, r2, #48 ; 0x30 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004618: e3550010 cmp r5, #16 ; 0x10 3000461c: 0a000003 beq 30004630 30004620: e3550020 cmp r5, #32 ; 0x20 30004624: 0a000001 beq 30004630 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 30004628: e3a0000b mov r0, #11 ; 0xb 3000462c: eafffff6 b 3000460c #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004630: e3140004 tst r4, #4 ; 0x4 30004634: 0afffffb beq 30004628 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 30004638: e35300c0 cmp r3, #192 ; 0xc0 3000463c: 1affffc1 bne 30004548 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 30004640: e3a0000b mov r0, #11 ; 0xb 30004644: eafffff0 b 3000460c _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 30004648: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 3000464c: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 30004650: e3a0c000 mov ip, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 30004654: 158d3014 strne r3, [sp, #20] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 30004658: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 3000465c: e3e03000 mvn r3, #0 ; 0x0 */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 30004660: e2870014 add r0, r7, #20 ; 0x14 30004664: e28d1010 add r1, sp, #16 ; 0x10 } } else { if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; else the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 30004668: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 3000466c: e58d3010 str r3, [sp, #16] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 30004670: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 30004674: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 30004678: eb0003b5 bl 30005554 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000467c: e5971008 ldr r1, [r7, #8] 30004680: e599201c ldr r2, [r9, #28] 30004684: e1a03801 lsl r3, r1, #16 30004688: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 3000468c: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 30004690: e587a00c str sl, [r7, #12] 30004694: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 30004698: eb000847 bl 300067bc <_Thread_Enable_dispatch> 3000469c: e3a00000 mov r0, #0 ; 0x0 300046a0: eaffffd9 b 3000460c _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 300046a4: eb000844 bl 300067bc <_Thread_Enable_dispatch> 300046a8: e3a00005 mov r0, #5 ; 0x5 300046ac: eaffffd6 b 3000460c if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 300046b0: e59d2008 ldr r2, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300046b4: e3a03000 mov r3, #0 ; 0x0 300046b8: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 300046bc: e3520003 cmp r2, #3 ; 0x3 300046c0: 979ff102 ldrls pc, [pc, r2, lsl #2] 300046c4: eaffffc2 b 300045d4 <== NOT EXECUTED 300046c8: 300046e4 .word 0x300046e4 <== NOT EXECUTED 300046cc: 300046e4 .word 0x300046e4 <== NOT EXECUTED 300046d0: 300046d8 .word 0x300046d8 <== NOT EXECUTED 300046d4: 300046d8 .word 0x300046d8 <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 300046d8: e3a03001 mov r3, #1 ; 0x1 300046dc: e5cd3004 strb r3, [sp, #4] 300046e0: eaffffbb b 300045d4 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 300046e4: e3a03000 mov r3, #0 ; 0x0 300046e8: e5cd3004 strb r3, [sp, #4] 300046ec: eaffffb8 b 300045d4 300046f0: 3001606c .word 0x3001606c 300046f4: 30015f9c .word 0x30015f9c 30020b84 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 30020b84: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30020b88: e24dd004 sub sp, sp, #4 ; 0x4 30020b8c: e1a01000 mov r1, r0 30020b90: e1a0200d mov r2, sp 30020b94: e59f004c ldr r0, [pc, #76] ; 30020be8 30020b98: ebffa2de bl 30009718 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 30020b9c: e59d1000 ldr r1, [sp] 30020ba0: e3510000 cmp r1, #0 ; 0x0 30020ba4: 13a00004 movne r0, #4 ; 0x4 30020ba8: 1a000008 bne 30020bd0 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 30020bac: e5903010 ldr r3, [r0, #16] 30020bb0: e2133030 ands r3, r3, #48 ; 0x30 30020bb4: 1a000007 bne 30020bd8 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 30020bb8: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 30020bbc: e1a01003 mov r1, r3 <== NOT EXECUTED 30020bc0: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 30020bc4: ebffa014 bl 30008c1c <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 30020bc8: ebffa52d bl 3000a084 <_Thread_Enable_dispatch> 30020bcc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30020bd0: e28dd004 add sp, sp, #4 ; 0x4 30020bd4: e8bd8000 pop {pc} the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 30020bd8: e2800014 add r0, r0, #20 ; 0x14 30020bdc: e3a02001 mov r2, #1 ; 0x1 30020be0: ebff9f39 bl 300088cc <_CORE_mutex_Flush> 30020be4: eafffff7 b 30020bc8 30020be8: 300590dc .word 0x300590dc 30013bf4 : */ void rtems_shutdown_executive( uint32_t result ) { 30013bf4: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013bf8: e59f2028 ldr r2, [pc, #40] ; 30013c28 */ void rtems_shutdown_executive( uint32_t result ) { 30013bfc: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30013c00: e5923000 ldr r3, [r2] 30013c04: e3530004 cmp r3, #4 ; 0x4 30013c08: 0a000004 beq 30013c20 30013c0c: e3a03004 mov r3, #4 ; 0x4 Context_Control *context_p = &context_area; if ( _System_state_Is_up(_System_state_Get ()) ) context_p = &_Thread_Executing->Registers; _Context_Switch( context_p, &_Thread_BSP_context ); 30013c10: e1a0000d mov r0, sp 30013c14: e59f1010 ldr r1, [pc, #16] ; 30013c2c 30013c18: e5823000 str r3, [r2] 30013c1c: ebffd05a bl 30007d8c <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 30013c20: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 30013c24: e8bd8000 pop {pc} <== NOT EXECUTED 30013c28: 30016214 .word 0x30016214 30013c2c: 3001603c .word 0x3001603c 300123fc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300123fc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 30012400: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012404: e1a06000 mov r6, r0 30012408: e24dd004 sub sp, sp, #4 ; 0x4 3001240c: e1a05002 mov r5, r2 30012410: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 30012414: 03a0000a moveq r0, #10 ; 0xa 30012418: 0a000020 beq 300124a0 return RTEMS_INVALID_NUMBER; if ( !routine ) 3001241c: e3520000 cmp r2, #0 ; 0x0 30012420: 03a00009 moveq r0, #9 ; 0x9 30012424: 0a00001d beq 300124a0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 30012428: e59f0088 ldr r0, [pc, #136] ; 300124b8 3001242c: e1a01006 mov r1, r6 30012430: e1a0200d mov r2, sp 30012434: eb000ad5 bl 30014f90 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30012438: e59d3000 ldr r3, [sp] 3001243c: e1a04000 mov r4, r0 30012440: e3530000 cmp r3, #0 ; 0x0 30012444: 13a00004 movne r0, #4 ; 0x4 30012448: 1a000014 bne 300124a0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 3001244c: e284a010 add sl, r4, #16 ; 0x10 30012450: e1a0000a mov r0, sl 30012454: eb001348 bl 3001717c <_Watchdog_Remove> _ISR_Disable( level ); 30012458: e10f2000 mrs r2, CPSR 3001245c: e38230c0 orr r3, r2, #192 ; 0xc0 30012460: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 30012464: e5943018 ldr r3, [r4, #24] 30012468: e3530000 cmp r3, #0 ; 0x0 3001246c: 1a00000d bne 300124a8 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30012470: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 30012474: e584502c str r5, [r4, #44] the_watchdog->id = id; 30012478: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 3001247c: e5847034 str r7, [r4, #52] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 30012480: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 30012484: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30012488: e59f002c ldr r0, [pc, #44] ; 300124bc 3001248c: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30012490: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30012494: eb0012c9 bl 30016fc0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 30012498: eb000cfe bl 30015898 <_Thread_Enable_dispatch> 3001249c: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 300124a0: e28dd004 add sp, sp, #4 ; 0x4 300124a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 300124a8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 300124ac: eb000cf9 bl 30015898 <_Thread_Enable_dispatch> <== NOT EXECUTED 300124b0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300124b4: eafffff9 b 300124a0 <== NOT EXECUTED 300124b8: 300315f0 .word 0x300315f0 300124bc: 30031424 .word 0x30031424 30012900 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 30012900: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30012904: e3500000 cmp r0, #0 ; 0x0 30012908: e24dd010 sub sp, sp, #16 ; 0x10 3001290c: e1a07001 mov r7, r1 30012910: e1a06002 mov r6, r2 30012914: 1a000002 bne 30012924 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 30012918: e3a00013 mov r0, #19 ; 0x13 } return status; } 3001291c: e28dd010 add sp, sp, #16 ; 0x10 30012920: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30012924: e59f3144 ldr r3, [pc, #324] ; 30012a70 30012928: e5d32000 ldrb r2, [r3] 3001292c: e1500002 cmp r0, r2 30012930: 8a00004a bhi 30012a60 30012934: e1a08000 mov r8, r0 <== NOT EXECUTED 30012938: e59f3134 ldr r3, [pc, #308] ; 30012a74 3001293c: e5932000 ldr r2, [r3] 30012940: e2822001 add r2, r2, #1 ; 0x1 30012944: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 30012948: e59fa128 ldr sl, [pc, #296] ; 30012a78 initialized = true; 3001294c: e3a03001 mov r3, #1 ; 0x1 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 30012950: e5da5000 ldrb r5, [sl] initialized = true; 30012954: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 30012958: eb000bce bl 30015898 <_Thread_Enable_dispatch> if ( tmpInitialized ) 3001295c: e3550000 cmp r5, #0 ; 0x0 30012960: 13a0000e movne r0, #14 ; 0xe 30012964: 1affffec bne 3001291c */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012968: e59f410c ldr r4, [pc, #268] ; 30012a7c * other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 3001296c: e386e902 orr lr, r6, #32768 ; 0x8000 30012970: e284c004 add ip, r4, #4 ; 0x4 30012974: e584c000 str ip, [r4] 30012978: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 3001297c: e5844008 str r4, [r4, #8] 30012980: e1a01008 mov r1, r8 30012984: e58de000 str lr, [sp] 30012988: e58dc004 str ip, [sp, #4] 3001298c: e1a02007 mov r2, r7 30012990: e59f00e8 ldr r0, [pc, #232] ; 30012a80 30012994: e3a03c01 mov r3, #256 ; 0x100 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30012998: e5845004 str r5, [r4, #4] 3001299c: ebfffc60 bl 30011b24 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 300129a0: e3500000 cmp r0, #0 ; 0x0 initialized = false; 300129a4: 15ca5000 strbne r5, [sl] /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 300129a8: 1affffdb bne 3001291c * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 300129ac: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 300129b0: e59fc0cc ldr ip, [pc, #204] ; 30012a84 300129b4: e1a03802 lsl r3, r2, #16 300129b8: e58d2008 str r2, [sp, #8] 300129bc: e1dc21b0 ldrh r2, [ip, #16] 300129c0: e1a01823 lsr r1, r3, #16 300129c4: e1520001 cmp r2, r1 300129c8: 259c301c ldrcs r3, [ip, #28] 300129cc: 31a09000 movcc r9, r0 300129d0: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 300129d4: e59f30ac ldr r3, [pc, #172] ; 30012a88 /* * Initialize the pointer to the timer reset method so applications * that do not use the Timer Server do not have to pull it in. */ _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; 300129d8: e59fe0ac ldr lr, [pc, #172] ; 30012a8c 300129dc: e5893064 str r3, [r9, #100] 300129e0: e59f30a8 ldr r3, [pc, #168] ; 30012a90 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 300129e4: e59f40a8 ldr r4, [pc, #168] ; 30012a94 the_watchdog->id = id; 300129e8: e59f50a8 ldr r5, [pc, #168] ; 30012a98 300129ec: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300129f0: e59f60a4 ldr r6, [pc, #164] ; 30012a9c 300129f4: e583e000 str lr, [r3] * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 300129f8: e59fc0a0 ldr ip, [pc, #160] ; 30012aa0 the_watchdog->routine = routine; 300129fc: e59f3084 ldr r3, [pc, #132] ; 30012a88 the_chain->permanent_null = NULL; 30012a00: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 30012a04: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012a08: e2847004 add r7, r4, #4 ; 0x4 30012a0c: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 30012a10: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 30012a14: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30012a18: e589b050 str fp, [r9, #80] 30012a1c: e59f1080 ldr r1, [pc, #128] ; 30012aa4 30012a20: e1a0200b mov r2, fp * to a TCB pointer from here out. * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 30012a24: e58c9000 str r9, [ip] 30012a28: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30012a2c: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30012a30: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 30012a34: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 30012a38: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 30012a3c: e586b024 str fp, [r6, #36] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 30012a40: e584b004 str fp, [r4, #4] 30012a44: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30012a48: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 30012a4c: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 30012a50: ebfffd8e bl 30012090 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 30012a54: e3500000 cmp r0, #0 ; 0x0 * but there is actually no way (in normal circumstances) that the * start can fail. The id and starting address are known to be * be good. If this service fails, something is weirdly wrong on the * target such as a stray write in an ISR or incorrect memory layout. */ initialized = false; 30012a58: 15cab000 strbne fp, [sl] 30012a5c: eaffffae b 3001291c * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 30012a60: e3700001 cmn r0, #1 ; 0x1 30012a64: 03a08000 moveq r8, #0 ; 0x0 30012a68: 0affffb2 beq 30012938 30012a6c: eaffffa9 b 30012918 30012a70: 3002c208 .word 0x3002c208 30012a74: 3003134c .word 0x3003134c 30012a78: 3002ce18 .word 0x3002ce18 30012a7c: 300312cc .word 0x300312cc 30012a80: 54494d45 .word 0x54494d45 30012a84: 3003126c .word 0x3003126c 30012a88: 30015704 .word 0x30015704 30012a8c: 30012aa8 .word 0x30012aa8 30012a90: 30031630 .word 0x30031630 30012a94: 300312ac .word 0x300312ac 30012a98: 300312c0 .word 0x300312c0 30012a9c: 300312d8 .word 0x300312d8 30012aa0: 30031634 .word 0x30031634 30012aa4: 30012b58 .word 0x30012b58 30012648 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 30012648: e92d4030 push {r4, r5, lr} 3001264c: e24dd004 sub sp, sp, #4 ; 0x4 30012650: e1a01000 mov r1, r0 30012654: e1a0200d mov r2, sp 30012658: e59f00a8 ldr r0, [pc, #168] ; 30012708 3001265c: eb000a4b bl 30014f90 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30012660: e59d3000 ldr r3, [sp] 30012664: e1a04000 mov r4, r0 30012668: e3530000 cmp r3, #0 ; 0x0 3001266c: 13a00004 movne r0, #4 ; 0x4 30012670: 1a00000a bne 300126a0 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 30012674: e5943038 ldr r3, [r4, #56] 30012678: e3530004 cmp r3, #4 ; 0x4 3001267c: 979ff103 ldrls pc, [pc, r3, lsl #2] 30012680: ea000011 b 300126cc <== NOT EXECUTED 30012684: 300126e4 .word 0x300126e4 <== NOT EXECUTED 30012688: 300126a8 .word 0x300126a8 <== NOT EXECUTED 3001268c: 300126d8 .word 0x300126d8 <== NOT EXECUTED 30012690: 300126d8 .word 0x300126d8 <== NOT EXECUTED 30012694: 300126d8 .word 0x300126d8 <== NOT EXECUTED _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { _Thread_Enable_dispatch(); 30012698: eb000c7e bl 30015898 <_Thread_Enable_dispatch> <== NOT EXECUTED 3001269c: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 300126a0: e28dd004 add sp, sp, #4 ; 0x4 300126a4: e8bd8030 pop {r4, r5, pc} case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 300126a8: e59f505c ldr r5, [pc, #92] ; 3001270c 300126ac: e5953000 ldr r3, [r5] 300126b0: e3530000 cmp r3, #0 ; 0x0 300126b4: 0afffff7 beq 30012698 _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 300126b8: e2840010 add r0, r4, #16 ; 0x10 300126bc: eb0012ae bl 3001717c <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 300126c0: e1a00004 mov r0, r4 300126c4: e1a0e00f mov lr, pc 300126c8: e595f000 ldr pc, [r5] case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 300126cc: eb000c71 bl 30015898 <_Thread_Enable_dispatch> 300126d0: e3a00000 mov r0, #0 ; 0x0 300126d4: eafffff1 b 300126a0 (*_Timer_Server_schedule_operation)( the_timer ); break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 300126d8: eb000c6e bl 30015898 <_Thread_Enable_dispatch> 300126dc: e3a0000b mov r0, #11 ; 0xb 300126e0: eaffffee b 300126a0 switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 300126e4: e2844010 add r4, r4, #16 ; 0x10 300126e8: e1a00004 mov r0, r4 300126ec: eb0012a2 bl 3001717c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 300126f0: e59f0018 ldr r0, [pc, #24] ; 30012710 300126f4: e1a01004 mov r1, r4 300126f8: eb001230 bl 30016fc0 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 300126fc: eb000c65 bl 30015898 <_Thread_Enable_dispatch> 30012700: e3a00000 mov r0, #0 ; 0x0 30012704: eaffffe5 b 300126a0 30012708: 300315f0 .word 0x300315f0 3001270c: 30031630 .word 0x30031630 30012710: 30031424 .word 0x30031424 30012714 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012714: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30012718: e1a07000 mov r7, r0 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 3001271c: e59f00cc ldr r0, [pc, #204] ; 300127f0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012720: e24dd004 sub sp, sp, #4 ; 0x4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30012724: e590c000 ldr ip, [r0] Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012728: e1a06001 mov r6, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 3001272c: e35c0000 cmp ip, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30012730: e1a05002 mov r5, r2 30012734: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30012738: 03a0000e moveq r0, #14 ; 0xe 3001273c: 0a000005 beq 30012758 return RTEMS_INCORRECT_STATE; if ( !routine ) 30012740: e3520000 cmp r2, #0 ; 0x0 30012744: 03a00009 moveq r0, #9 ; 0x9 30012748: 0a000002 beq 30012758 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 3001274c: e3510000 cmp r1, #0 ; 0x0 30012750: 03a0000a moveq r0, #10 ; 0xa 30012754: 1a000001 bne 30012760 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30012758: e28dd004 add sp, sp, #4 ; 0x4 3001275c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30012760: e59f008c ldr r0, [pc, #140] ; 300127f4 30012764: e1a01007 mov r1, r7 30012768: e1a0200d mov r2, sp 3001276c: eb000a07 bl 30014f90 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30012770: e59d3000 ldr r3, [sp] 30012774: e1a04000 mov r4, r0 30012778: e3530000 cmp r3, #0 ; 0x0 3001277c: 13a00004 movne r0, #4 ; 0x4 30012780: 1afffff4 bne 30012758 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30012784: e2840010 add r0, r4, #16 ; 0x10 30012788: eb00127b bl 3001717c <_Watchdog_Remove> _ISR_Disable( level ); 3001278c: e10f1000 mrs r1, CPSR 30012790: e38130c0 orr r3, r1, #192 ; 0xc0 30012794: e129f003 msr CPSR_fc, r3 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 30012798: e5942018 ldr r2, [r4, #24] 3001279c: e3520000 cmp r2, #0 ; 0x0 300127a0: 1a00000e bne 300127e0 /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 300127a4: e3a03001 mov r3, #1 ; 0x1 300127a8: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300127ac: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 300127b0: e584502c str r5, [r4, #44] the_watchdog->id = id; 300127b4: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 300127b8: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 300127bc: e584601c str r6, [r4, #28] _ISR_Enable( level ); 300127c0: e129f001 msr CPSR_fc, r1 /* * _Timer_Server_schedule_operation != NULL because we checked that * _Timer_Server was != NULL above. Both are set at the same time. */ (*_Timer_Server_schedule_operation)( the_timer ); 300127c4: e59f302c ldr r3, [pc, #44] ; 300127f8 300127c8: e1a00004 mov r0, r4 300127cc: e1a0e00f mov lr, pc 300127d0: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 300127d4: eb000c2f bl 30015898 <_Thread_Enable_dispatch> 300127d8: e3a00000 mov r0, #0 ; 0x0 300127dc: eaffffdd b 30012758 * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 300127e0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 300127e4: eb000c2b bl 30015898 <_Thread_Enable_dispatch> <== NOT EXECUTED 300127e8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300127ec: eaffffd9 b 30012758 <== NOT EXECUTED 300127f0: 30031634 .word 0x30031634 300127f4: 300315f0 .word 0x300315f0 300127f8: 30031630 .word 0x30031630