00013634 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 13634: e590304c ldr r3, [r0, #76] 13638: 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 ) { 1363c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 13640: e1a07000 mov r7, r0 13644: e1a06002 mov r6, r2 13648: e1a08001 mov r8, r1 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 1364c: 33a00001 movcc r0, #1 ; 0x1 13650: 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 ) { 13654: e5973048 ldr r3, [r7, #72] 13658: 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))) { 1365c: 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 ) { 13660: 0a000009 beq 1368c <_CORE_message_queue_Broadcast+0x58> *count = 0; 13664: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED 13668: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1366c: e5823000 str r3, [r2] <== NOT EXECUTED 13670: e1a00003 mov r0, r3 <== NOT EXECUTED 13674: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 13678: e594002c ldr r0, [r4, #44] 1367c: eb001e03 bl 1ae90 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 13680: e5943028 ldr r3, [r4, #40] 13684: e5836000 str r6, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 13688: e2855001 add r5, r5, #1 ; 0x1 * 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))) { 1368c: e1a00007 mov r0, r7 13690: eb00099d bl 15d0c <_Thread_queue_Dequeue> 13694: e2504000 subs r4, r0, #0 ; 0x0 13698: e1a01008 mov r1, r8 1369c: e1a02006 mov r2, r6 136a0: 1afffff4 bne 13678 <_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; 136a4: e59d301c ldr r3, [sp, #28] 136a8: e1a00004 mov r0, r4 136ac: e5835000 str r5, [r3] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 136b0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00014d94 <_CORE_message_queue_Insert_message>: ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 14d94: 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 ) { 14d98: e92d4030 push {r4, r5, lr} ISR_Level level; bool notify = false; the_message->priority = submit_type; 14d9c: 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 ) { 14da0: e1a05001 mov r5, r1 14da4: e1a04000 mov r4, r0 ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 14da8: 0a000037 beq 14e8c <_CORE_message_queue_Insert_message+0xf8> 14dac: e3720106 cmn r2, #-2147483647 ; 0x80000001 14db0: 0a000023 beq 14e44 <_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; 14db4: 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; 14db8: e2800054 add r0, r0, #84 ; 0x54 <== NOT EXECUTED while ( !_Chain_Is_tail( the_header, the_node ) ) { 14dbc: e1500001 cmp r0, r1 <== NOT EXECUTED 14dc0: 1a00001b bne 14e34 <_CORE_message_queue_Insert_message+0xa0> <== NOT EXECUTED 14dc4: e1a01000 mov r1, r0 <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 14dc8: e10fc000 mrs ip, CPSR <== NOT EXECUTED 14dcc: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 14dd0: 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 ); 14dd4: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 14dd8: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 14ddc: e5930000 ldr r0, [r3] <== NOT EXECUTED 14de0: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED after_node->next = the_node; 14de4: e5835000 str r5, [r3] <== NOT EXECUTED 14de8: e5842048 str r2, [r4, #72] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 14dec: e5853004 str r3, [r5, #4] <== NOT EXECUTED 14df0: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED 14df4: 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; 14df8: 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; 14dfc: e5850000 str r0, [r5] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 14e00: 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 ) 14e04: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 14e08: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED 14e0c: e5943060 ldr r3, [r4, #96] 14e10: e3530000 cmp r3, #0 ; 0x0 14e14: 08bd8030 popeq {r4, r5, pc} (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 14e18: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 14e1c: e1a0e00f mov lr, pc <== NOT EXECUTED 14e20: e12fff13 bx r3 <== NOT EXECUTED 14e24: 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; 14e28: 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 ) ) { 14e2c: e1500001 cmp r0, r1 <== NOT EXECUTED 14e30: 0affffe3 beq 14dc4 <_CORE_message_queue_Insert_message+0x30> <== NOT EXECUTED this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 14e34: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 14e38: e1520003 cmp r2, r3 <== NOT EXECUTED 14e3c: aafffff9 bge 14e28 <_CORE_message_queue_Insert_message+0x94> <== NOT EXECUTED 14e40: eaffffe0 b 14dc8 <_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 ); 14e44: e10f0000 mrs r0, CPSR 14e48: e38030c0 orr r3, r0, #192 ; 0xc0 14e4c: e129f003 msr CPSR_fc, r3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 14e50: e2843054 add r3, r4, #84 ; 0x54 14e54: e5813000 str r3, [r1] if ( the_message_queue->number_of_pending_messages++ == 0 ) 14e58: e5942048 ldr r2, [r4, #72] old_last_node = the_chain->last; 14e5c: e5941058 ldr r1, [r4, #88] 14e60: e2823001 add r3, r2, #1 ; 0x1 the_chain->last = the_node; 14e64: e5845058 str r5, [r4, #88] 14e68: e5843048 str r3, [r4, #72] 14e6c: e2722001 rsbs r2, r2, #1 ; 0x1 14e70: 33a02000 movcc r2, #0 ; 0x0 old_last_node->next = the_node; the_node->previous = old_last_node; 14e74: 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; 14e78: e5815000 str r5, [r1] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 14e7c: 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 ) 14e80: e3520000 cmp r2, #0 ; 0x0 14e84: 1affffe0 bne 14e0c <_CORE_message_queue_Insert_message+0x78> 14e88: 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 ); 14e8c: e10fc000 mrs ip, CPSR 14e90: e38c30c0 orr r3, ip, #192 ; 0xc0 14e94: e129f003 msr CPSR_fc, r3 if ( the_message_queue->number_of_pending_messages++ == 0 ) 14e98: e5901048 ldr r1, [r0, #72] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 14e9c: e5900050 ldr r0, [r0, #80] 14ea0: e2812001 add r2, r1, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 14ea4: e2843050 add r3, r4, #80 ; 0x50 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 14ea8: e5853004 str r3, [r5, #4] 14eac: e5842048 str r2, [r4, #72] before_node = after_node->next; after_node->next = the_node; 14eb0: e5845050 str r5, [r4, #80] the_node->next = before_node; before_node->previous = the_node; 14eb4: e5805004 str r5, [r0, #4] 14eb8: e2712001 rsbs r2, r1, #1 ; 0x1 14ebc: 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; 14ec0: e5850000 str r0, [r5] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 14ec4: 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 ) 14ec8: e3520000 cmp r2, #0 ; 0x0 14ecc: 1affffce bne 14e0c <_CORE_message_queue_Insert_message+0x78> 14ed0: e8bd8030 pop {r4, r5, pc} 00011e1c <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11e1c: 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; 11e20: e59f8118 ldr r8, [pc, #280] ; 11f40 <_CORE_message_queue_Seize+0x124> 11e24: e598c000 ldr ip, [r8] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11e28: e1a05000 mov r5, r0 11e2c: 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; 11e30: e3a03000 mov r3, #0 ; 0x0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 11e34: e1a07002 mov r7, r2 11e38: e59da020 ldr sl, [sp, #32] 11e3c: 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; 11e40: e58c3034 str r3, [ip, #52] _ISR_Disable( level ); 11e44: e10f6000 mrs r6, CPSR 11e48: e38630c0 orr r3, r6, #192 ; 0xc0 11e4c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 11e50: e5954050 ldr r4, [r5, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 11e54: e2853054 add r3, r5, #84 ; 0x54 11e58: e1540003 cmp r4, r3 11e5c: 0a000021 beq 11ee8 <_CORE_message_queue_Seize+0xcc> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 11e60: e5941000 ldr r1, [r4] the_chain->first = new_first; 11e64: e1a03005 mov r3, r5 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 11e68: e5952048 ldr r2, [r5, #72] 11e6c: e5a31050 str r1, [r3, #80]! 11e70: e2422001 sub r2, r2, #1 ; 0x1 new_first->previous = _Chain_Head(the_chain); 11e74: e5813004 str r3, [r1, #4] 11e78: e5852048 str r2, [r5, #72] _ISR_Enable( level ); 11e7c: e129f006 msr CPSR_fc, r6 *size_p = the_message->Contents.size; 11e80: e594300c ldr r3, [r4, #12] _Thread_Executing->Wait.count = the_message->priority; 11e84: e5981000 ldr r1, [r8] 11e88: 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; 11e8c: e5803000 str r3, [r0] _Thread_Executing->Wait.count = the_message->priority; 11e90: e5812024 str r2, [r1, #36] _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 11e94: e2846010 add r6, r4, #16 ; 0x10 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11e98: e5902000 ldr r2, [r0] 11e9c: e1a01006 mov r1, r6 11ea0: e1a00007 mov r0, r7 11ea4: eb001373 bl 16c78 * * 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 ); 11ea8: e1a00005 mov r0, r5 11eac: ebffeacd bl c9e8 <_Thread_queue_Dequeue> if ( !the_thread ) { 11eb0: e2501000 subs r1, r0, #0 ; 0x0 11eb4: 0a00001d beq 11f30 <_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; 11eb8: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 11ebc: 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; 11ec0: e5843008 str r3, [r4, #8] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 11ec4: e584200c str r2, [r4, #12] <== NOT EXECUTED 11ec8: e1a00006 mov r0, r6 <== NOT EXECUTED 11ecc: e591102c ldr r1, [r1, #44] <== NOT EXECUTED 11ed0: eb001368 bl 16c78 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 11ed4: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED 11ed8: e1a00005 mov r0, r5 <== NOT EXECUTED 11edc: 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 ); } 11ee0: 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( 11ee4: ea000baa b 14d94 <_CORE_message_queue_Insert_message> <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 11ee8: e3520000 cmp r2, #0 ; 0x0 11eec: 1a000003 bne 11f00 <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 11ef0: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 11ef4: e3a03004 mov r3, #4 ; 0x4 11ef8: 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 ); } 11efc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 11f00: e3a03001 mov r3, #1 ; 0x1 11f04: 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; 11f08: 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; 11f0c: e58c1020 str r1, [ip, #32] executing->Wait.return_argument_second.mutable_object = buffer; 11f10: 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; 11f14: 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 ); 11f18: e129f006 msr CPSR_fc, r6 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 11f1c: e59f2020 ldr r2, [pc, #32] ; 11f44 <_CORE_message_queue_Seize+0x128> 11f20: e1a00005 mov r0, r5 11f24: e1a0100a mov r1, sl } 11f28: 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 ); 11f2c: eaffeb0f b cb70 <_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 ); 11f30: e2850068 add r0, r5, #104 ; 0x68 11f34: e1a01004 mov r1, r4 } 11f38: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 11f3c: eaffe3ff b af40 <_Chain_Append> 11f40: 00025e84 .word 0x00025e84 11f44: 0000cfa4 .word 0x0000cfa4 00011f48 <_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 ) { 11f48: 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 ) { 11f4c: e590c04c ldr ip, [r0, #76] 11f50: 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 ) { 11f54: e1a04000 mov r4, r0 11f58: e1a07002 mov r7, r2 11f5c: e1a0a001 mov sl, r1 11f60: e1a09003 mov r9, r3 11f64: 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 ) { 11f68: 33a00001 movcc r0, #1 ; 0x1 11f6c: 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 ) { 11f70: e5945048 ldr r5, [r4, #72] 11f74: e3550000 cmp r5, #0 ; 0x0 11f78: 0a00001d beq 11ff4 <_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 < 11f7c: e5943044 ldr r3, [r4, #68] 11f80: e1530005 cmp r3, r5 11f84: 8a00002a bhi 12034 <_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 ) { 11f88: e3580000 cmp r8, #0 ; 0x0 11f8c: 03a00002 moveq r0, #2 ; 0x2 11f90: 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() ) { 11f94: e59f30dc ldr r3, [pc, #220] ; 12078 <_CORE_message_queue_Submit+0x130> <== NOT EXECUTED 11f98: e5932000 ldr r2, [r3] <== NOT EXECUTED 11f9c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED 11fa0: 1a000021 bne 1202c <_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; 11fa4: e59f30d0 ldr r3, [pc, #208] ; 1207c <_CORE_message_queue_Submit+0x134> <== NOT EXECUTED 11fa8: e5932000 ldr r2, [r3] <== NOT EXECUTED _ISR_Disable( level ); 11fac: e10f1000 mrs r1, CPSR <== NOT EXECUTED 11fb0: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 11fb4: 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; 11fb8: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED 11fbc: e5823024 str r3, [r2, #36] <== NOT EXECUTED 11fc0: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 11fc4: e5843030 str r3, [r4, #48] <== 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; 11fc8: e5829020 str r9, [r2, #32] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 11fcc: e582a02c str sl, [r2, #44] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 11fd0: e5827030 str r7, [r2, #48] <== 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; 11fd4: e5824044 str r4, [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 ); 11fd8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 11fdc: e59f209c ldr r2, [pc, #156] ; 12080 <_CORE_message_queue_Submit+0x138> <== NOT EXECUTED 11fe0: e1a00004 mov r0, r4 <== NOT EXECUTED 11fe4: e59d102c ldr r1, [sp, #44] <== NOT EXECUTED 11fe8: ebffeae0 bl cb70 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 11fec: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED 11ff0: 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 ); 11ff4: ebffea7b bl c9e8 <_Thread_queue_Dequeue> if ( the_thread ) { 11ff8: e2506000 subs r6, r0, #0 ; 0x0 11ffc: 05945048 ldreq r5, [r4, #72] 12000: 0affffdd beq 11f7c <_CORE_message_queue_Submit+0x34> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 12004: e1a0100a mov r1, sl 12008: e596002c ldr r0, [r6, #44] 1200c: e1a02007 mov r2, r7 12010: eb001318 bl 16c78 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 12014: e5963028 ldr r3, [r6, #40] 12018: e5837000 str r7, [r3] the_thread->Wait.count = submit_type; 1201c: e59d3024 ldr r3, [sp, #36] 12020: e1a00005 mov r0, r5 12024: e5863024 str r3, [r6, #36] 12028: 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; 1202c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 12030: 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 *) 12034: e2840068 add r0, r4, #104 ; 0x68 12038: ebffe3cb bl af6c <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 1203c: e2505000 subs r5, r0, #0 ; 0x0 12040: 0afffff9 beq 1202c <_CORE_message_queue_Submit+0xe4> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 12044: e1a0100a mov r1, sl 12048: e1a02007 mov r2, r7 1204c: e2850010 add r0, r5, #16 ; 0x10 12050: eb001308 bl 16c78 buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; the_message->priority = submit_type; 12054: e59d3024 ldr r3, [sp, #36] 12058: e5853008 str r3, [r5, #8] _CORE_message_queue_Insert_message( 1205c: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 12060: e585700c str r7, [r5, #12] the_message->priority = submit_type; _CORE_message_queue_Insert_message( 12064: e1a01005 mov r1, r5 12068: e59d2024 ldr r2, [sp, #36] 1206c: eb000b48 bl 14d94 <_CORE_message_queue_Insert_message> 12070: e3a00000 mov r0, #0 ; 0x0 12074: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 12078: 00025e60 .word 0x00025e60 1207c: 00025e84 .word 0x00025e84 12080: 0000cfa4 .word 0x0000cfa4 0000524c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 524c: e92d40f0 push {r4, r5, r6, r7, lr} 5250: e1a05000 mov r5, r0 5254: e1a04002 mov r4, r2 5258: e1a07001 mov r7, r1 /* 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; 525c: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; 5260: e3a06000 mov r6, #0 ; 0x0 if ( initial_lock == CORE_MUTEX_LOCKED ) { 5264: e3540000 cmp r4, #0 ; 0x0 /* 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; 5268: e285c040 add ip, r5, #64 ; 0x40 526c: e88c000f stm ip, {r0, r1, r2, r3} the_mutex->lock = initial_lock; 5270: e5854050 str r4, [r5, #80] the_mutex->blocked_count = 0; 5274: e5856058 str r6, [r5, #88] _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; 5278: 15856060 strne r6, [r5, #96] #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; 527c: 15856054 strne r6, [r5, #84] the_mutex->holder = NULL; 5280: 1585605c strne r6, [r5, #92] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 5284: 1a00000b bne 52b8 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 5288: e59f2070 ldr r2, [pc, #112] ; 5300 <_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; 528c: e3a03001 mov r3, #1 ; 0x1 the_mutex->holder = _Thread_Executing; 5290: e5921000 ldr r1, [r2] 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; 5294: e5853054 str r3, [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; 5298: e5952048 ldr r2, [r5, #72] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 529c: e5913008 ldr r3, [r1, #8] if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 52a0: 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; 52a4: 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; 52a8: e585105c str r1, [r5, #92] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 52ac: 0a00000a beq 52dc <_CORE_mutex_Initialize+0x90> 52b0: e3520003 cmp r2, #3 ; 0x3 52b4: 0a000008 beq 52dc <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 52b8: e5971008 ldr r1, [r7, #8] 52bc: e1a00005 mov r0, r5 52c0: e2511000 subs r1, r1, #0 ; 0x0 52c4: 13a01001 movne r1, #1 ; 0x1 52c8: e3a02b01 mov r2, #1024 ; 0x400 52cc: e3a03005 mov r3, #5 ; 0x5 52d0: eb000768 bl 7078 <_Thread_queue_Initialize> 52d4: e3a00000 mov r0, #0 ; 0x0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 52d8: 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 < 52dc: e595304c ldr r3, [r5, #76] 52e0: e5912014 ldr r2, [r1, #20] 52e4: 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++; 52e8: 2591301c ldrcs r3, [r1, #28] 52ec: 22833001 addcs r3, r3, #1 ; 0x1 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 < 52f0: 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++; 52f4: 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 < 52f8: 2affffee bcs 52b8 <_CORE_mutex_Initialize+0x6c> 52fc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 5300: 00016104 .word 0x00016104 00009edc <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 9edc: e59f313c ldr r3, [pc, #316] ; a020 <_CORE_mutex_Seize_interrupt_trylock+0x144> 9ee0: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9ee4: e3a02000 mov r2, #0 ; 0x0 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9ee8: e92d4010 push {r4, lr} CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 9eec: e5914000 ldr r4, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9ef0: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9ef4: e5903050 ldr r3, [r0, #80] 9ef8: e1530002 cmp r3, r2 9efc: 0a00000d beq 9f38 <_CORE_mutex_Seize_interrupt_trylock+0x5c> the_mutex->lock = CORE_MUTEX_LOCKED; 9f00: 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; 9f04: 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; 9f08: e59c2008 ldr r2, [ip, #8] the_mutex->nest_count = 1; 9f0c: e3a03001 mov r3, #1 ; 0x1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9f10: 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; 9f14: e5802060 str r2, [r0, #96] the_mutex->nest_count = 1; 9f18: 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; 9f1c: 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 ) || 9f20: 0a000009 beq 9f4c <_CORE_mutex_Seize_interrupt_trylock+0x70> 9f24: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED 9f28: 0a000007 beq 9f4c <_CORE_mutex_Seize_interrupt_trylock+0x70> <== NOT EXECUTED executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 9f2c: e129f004 msr CPSR_fc, r4 9f30: e3a00000 mov r0, #0 ; 0x0 9f34: 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 ) ) { 9f38: e590305c ldr r3, [r0, #92] 9f3c: e15c0003 cmp ip, r3 9f40: 0a000017 beq 9fa4 <_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 ); 9f44: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9f48: 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++; 9f4c: e59c301c ldr r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9f50: 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++; 9f54: e2833001 add r3, r3, #1 ; 0x1 9f58: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9f5c: 1afffff2 bne 9f2c <_CORE_mutex_Seize_interrupt_trylock+0x50> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9f60: e590204c ldr r2, [r0, #76] <== NOT EXECUTED current = executing->current_priority; 9f64: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED if ( current == ceiling ) { 9f68: e1520003 cmp r2, r3 <== NOT EXECUTED 9f6c: 0a00001c beq 9fe4 <_CORE_mutex_Seize_interrupt_trylock+0x108> <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 9f70: 3a00001e bcc 9ff0 <_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; 9f74: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9f78: 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; 9f7c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9f80: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 9f84: 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; 9f88: e5801050 str r1, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 9f8c: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 9f90: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 9f94: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 9f98: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 9f9c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 9fa0: 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 ) { 9fa4: e5903040 ldr r3, [r0, #64] 9fa8: e3530000 cmp r3, #0 ; 0x0 9fac: 0a000006 beq 9fcc <_CORE_mutex_Seize_interrupt_trylock+0xf0> 9fb0: e3530001 cmp r3, #1 ; 0x1 9fb4: 1affffe2 bne 9f44 <_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; 9fb8: e3a03002 mov r3, #2 ; 0x2 9fbc: e58c3034 str r3, [ip, #52] _ISR_Enable( level ); 9fc0: e129f004 msr CPSR_fc, r4 9fc4: e3a00000 mov r0, #0 ; 0x0 9fc8: 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++; 9fcc: e5903054 ldr r3, [r0, #84] 9fd0: e2833001 add r3, r3, #1 ; 0x1 9fd4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 9fd8: e129f004 msr CPSR_fc, r4 9fdc: e3a00000 mov r0, #0 ; 0x0 9fe0: e8bd8010 pop {r4, pc} Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 9fe4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED 9fe8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 9fec: e8bd8010 pop {r4, pc} <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9ff0: e59f202c ldr r2, [pc, #44] ; a024 <_CORE_mutex_Seize_interrupt_trylock+0x148> <== NOT EXECUTED 9ff4: e5923000 ldr r3, [r2] <== NOT EXECUTED 9ff8: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 9ffc: e5823000 str r3, [r2] <== NOT EXECUTED return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( level ); a000: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED _Thread_Change_priority( a004: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED a008: e590104c ldr r1, [r0, #76] <== NOT EXECUTED a00c: e590005c ldr r0, [r0, #92] <== NOT EXECUTED a010: ebfff092 bl 6260 <_Thread_Change_priority> <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); a014: ebfff203 bl 6828 <_Thread_Enable_dispatch> <== NOT EXECUTED a018: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED a01c: e8bd8010 pop {r4, pc} <== NOT EXECUTED a020: 00016104 .word 0x00016104 a024: 0001604c .word 0x0001604c 0000543c <_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 ) { 543c: e5d03044 ldrb r3, [r0, #68] 5440: 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 ) { 5444: e92d4010 push {r4, lr} 5448: 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; 544c: 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 ) { 5450: 0a000004 beq 5468 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 5454: e59f3138 ldr r3, [pc, #312] ; 5594 <_CORE_mutex_Surrender+0x158> 5458: e5932000 ldr r2, [r3] 545c: e1500002 cmp r0, r2 5460: 13a00003 movne r0, #3 ; 0x3 5464: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 5468: e5943054 ldr r3, [r4, #84] 546c: e3530000 cmp r3, #0 ; 0x0 5470: 0a000020 beq 54f8 <_CORE_mutex_Surrender+0xbc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 5474: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 5478: 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--; 547c: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 5480: 1a00001e bne 5500 <_CORE_mutex_Surrender+0xc4> 5484: 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 ) || 5488: e3520002 cmp r2, #2 ; 0x2 548c: 0a00002c beq 5544 <_CORE_mutex_Surrender+0x108> 5490: e3520003 cmp r2, #3 ; 0x3 5494: 0a00002a beq 5544 <_CORE_mutex_Surrender+0x108> } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 5498: 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 ) || 549c: 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; 54a0: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 54a4: 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 ) || 54a8: 0a00001b beq 551c <_CORE_mutex_Surrender+0xe0> 54ac: e3520003 cmp r2, #3 ; 0x3 54b0: 0a000019 beq 551c <_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 ) ) ) { 54b4: e1a00004 mov r0, r4 54b8: eb0005c0 bl 6bc0 <_Thread_queue_Dequeue> 54bc: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 54c0: 03a03001 moveq r3, #1 ; 0x1 54c4: 05843050 streq r3, [r4, #80] 54c8: 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 ) ) ) { 54cc: 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 ) { 54d0: e594c048 ldr ip, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 54d4: e5912008 ldr r2, [r1, #8] the_mutex->nest_count = 1; 54d8: e3a03001 mov r3, #1 ; 0x1 switch ( the_mutex->Attributes.discipline ) { 54dc: e35c0002 cmp ip, #2 ; 0x2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 54e0: e5842060 str r2, [r4, #96] the_mutex->nest_count = 1; 54e4: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 54e8: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 54ec: 0a000023 beq 5580 <_CORE_mutex_Surrender+0x144> 54f0: e35c0003 cmp ip, #3 ; 0x3 54f4: 0a000016 beq 5554 <_CORE_mutex_Surrender+0x118> } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 54f8: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 54fc: 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 ) { 5500: e5943040 ldr r3, [r4, #64] 5504: e3530000 cmp r3, #0 ; 0x0 5508: 0afffffa beq 54f8 <_CORE_mutex_Surrender+0xbc> 550c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 5510: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 5514: 1affffda bne 5484 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED 5518: 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 && 551c: e590301c ldr r3, [r0, #28] 5520: e3530000 cmp r3, #0 ; 0x0 5524: 1affffe2 bne 54b4 <_CORE_mutex_Surrender+0x78> 5528: e5901018 ldr r1, [r0, #24] 552c: e5903014 ldr r3, [r0, #20] 5530: e1510003 cmp r1, r3 5534: 0affffde beq 54b4 <_CORE_mutex_Surrender+0x78> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 5538: e3a02001 mov r2, #1 ; 0x1 553c: eb000347 bl 6260 <_Thread_Change_priority> 5540: eaffffdb b 54b4 <_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--; 5544: e590301c ldr r3, [r0, #28] 5548: e2433001 sub r3, r3, #1 ; 0x1 554c: e580301c str r3, [r0, #28] 5550: eaffffd0 b 5498 <_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++; 5554: e591301c ldr r3, [r1, #28] <== NOT EXECUTED 5558: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 555c: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 5560: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED 5564: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 5568: e1510002 cmp r1, r2 <== NOT EXECUTED 556c: 2affffe1 bcs 54f8 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 5570: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 5574: eb000339 bl 6260 <_Thread_Change_priority> <== NOT EXECUTED 5578: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 557c: 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++; 5580: e591301c ldr r3, [r1, #28] 5584: e2833001 add r3, r3, #1 ; 0x1 5588: e581301c str r3, [r1, #28] 558c: e3a00000 mov r0, #0 ; 0x0 5590: e8bd8010 pop {r4, pc} 5594: 00016104 .word 0x00016104 0002148c <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 2148c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 21490: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 21494: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 21498: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 2149c: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 214a0: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 214a4: 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; 214a8: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 214ac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 214b0: e12fff1e bx lr <== NOT EXECUTED 00009dbc <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 9dbc: e59f3010 ldr r3, [pc, #16] ; 9dd4 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 9dc0: e5932000 ldr r2, [r3] <== NOT EXECUTED 9dc4: e1100002 tst r0, r2 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 9dc8: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 9dcc: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 9dd0: e12fff1e bx lr <== NOT EXECUTED 9dd4: 00016108 .word 0x00016108 000041bc <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41bc: e59fc108 ldr ip, [pc, #264] ; 42cc <_Event_Seize+0x110> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 41c4: e59c5000 ldr r5, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 41c8: e3a04000 mov r4, #0 ; 0x0 41cc: e5854034 str r4, [r5, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 41d0: e1a08002 mov r8, r2 41d4: e1a07003 mov r7, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 41d8: e5954104 ldr r4, [r5, #260] _ISR_Disable( level ); 41dc: e10f6000 mrs r6, CPSR 41e0: e38630c0 orr r3, r6, #192 ; 0xc0 41e4: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 41e8: e5942000 ldr r2, [r4] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 41ec: e010c002 ands ip, r0, r2 41f0: 0a000003 beq 4204 <_Event_Seize+0x48> 41f4: e150000c cmp r0, ip 41f8: 0a00001f beq 427c <_Event_Seize+0xc0> 41fc: e3110002 tst r1, #2 ; 0x2 4200: 1a00001d bne 427c <_Event_Seize+0xc0> _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 4204: e3110001 tst r1, #1 ; 0x1 4208: 1a000016 bne 4268 <_Event_Seize+0xac> executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 420c: e59f40bc ldr r4, [pc, #188] ; 42d0 <_Event_Seize+0x114> 4210: e3a03001 mov r3, #1 ; 0x1 4214: e5843000 str r3, [r4] executing->Wait.option = (uint32_t) option_set; 4218: e5851030 str r1, [r5, #48] executing->Wait.count = (uint32_t) event_in; 421c: e5850024 str r0, [r5, #36] executing->Wait.return_argument = event_out; 4220: e5857028 str r7, [r5, #40] _ISR_Enable( level ); 4224: e129f006 msr CPSR_fc, r6 if ( ticks ) { 4228: e3580000 cmp r8, #0 ; 0x0 422c: 1a00001a bne 429c <_Event_Seize+0xe0> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 4230: e1a00005 mov r0, r5 4234: e3a01c01 mov r1, #256 ; 0x100 4238: eb000bfe bl 7238 <_Thread_Set_state> _ISR_Disable( level ); 423c: e10f2000 mrs r2, CPSR 4240: e38230c0 orr r3, r2, #192 ; 0xc0 4244: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 4248: e5940000 ldr r0, [r4] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 424c: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4250: e3500001 cmp r0, #1 ; 0x1 _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4254: e5843000 str r3, [r4] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 4258: 0a00000d beq 4294 <_Event_Seize+0xd8> * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 425c: e1a01005 mov r1, r5 <== NOT EXECUTED } 4260: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED * An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); 4264: ea0007e9 b 6210 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 4268: e129f006 msr CPSR_fc, r6 executing->Wait.return_code = RTEMS_UNSATISFIED; 426c: e3a0300d mov r3, #13 ; 0xd 4270: e5853034 str r3, [r5, #52] *event_out = seized_events; 4274: e587c000 str ip, [r7] 4278: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} pending_events = api->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 427c: e1e0300c mvn r3, ip 4280: e0033002 and r3, r3, r2 4284: e5843000 str r3, [r4] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 4288: e129f006 msr CPSR_fc, r6 *event_out = seized_events; 428c: e587c000 str ip, [r7] 4290: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} _ISR_Disable( level ); sync_state = _Event_Sync_state; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { _ISR_Enable( level ); 4294: e129f002 msr CPSR_fc, r2 4298: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} executing->Wait.return_argument = event_out; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( 429c: e5953008 ldr r3, [r5, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 42a0: e59f202c ldr r2, [pc, #44] ; 42d4 <_Event_Seize+0x118> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42a4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 42a8: e585106c str r1, [r5, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 42ac: e5851050 str r1, [r5, #80] the_watchdog->routine = routine; 42b0: e5852064 str r2, [r5, #100] the_watchdog->id = id; 42b4: e5853068 str r3, [r5, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 42b8: e5858054 str r8, [r5, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 42bc: e59f0014 ldr r0, [pc, #20] ; 42d8 <_Event_Seize+0x11c> 42c0: e2851048 add r1, r5, #72 ; 0x48 42c4: eb000ddd bl 7a40 <_Watchdog_Insert> 42c8: eaffffd8 b 4230 <_Event_Seize+0x74> 42cc: 00016104 .word 0x00016104 42d0: 000162a4 .word 0x000162a4 42d4: 8c .byte 0x8c 42d5: 44 .byte 0x44 42d6: 0000 .short 0x0000 42d8: 00016124 .word 0x00016124 00004334 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 4334: 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 ]; 4338: e590c104 ldr ip, [r0, #260] */ void _Event_Surrender( Thread_Control *the_thread ) { 433c: 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; 4340: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 4344: e10f6000 mrs r6, CPSR 4348: e38630c0 orr r3, r6, #192 ; 0xc0 434c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 4350: e59c0000 ldr r0, [ip] event_condition = (rtems_event_set) the_thread->Wait.count; 4354: 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 ) ) { 4358: e0115000 ands r5, r1, r0 435c: 0a000024 beq 43f4 <_Event_Surrender+0xc0> /* * 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() && 4360: e59f3118 ldr r3, [pc, #280] ; 4480 <_Event_Surrender+0x14c> 4364: e5932000 ldr r2, [r3] 4368: e3520000 cmp r2, #0 ; 0x0 436c: 0a000003 beq 4380 <_Event_Surrender+0x4c> 4370: e59f310c ldr r3, [pc, #268] ; 4484 <_Event_Surrender+0x150> 4374: e5932000 ldr r2, [r3] 4378: e1540002 cmp r4, r2 437c: 0a000029 beq 4428 <_Event_Surrender+0xf4> } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4380: e5943010 ldr r3, [r4, #16] 4384: e3130c01 tst r3, #256 ; 0x100 4388: 0a000017 beq 43ec <_Event_Surrender+0xb8> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 438c: e1510005 cmp r1, r5 4390: 0a000001 beq 439c <_Event_Surrender+0x68> 4394: e3170002 tst r7, #2 ; 0x2 4398: 0a000013 beq 43ec <_Event_Surrender+0xb8> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 439c: e1e03005 mvn r3, r5 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43a0: 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 ); 43a4: e0033000 and r3, r3, r0 the_thread->Wait.count = 0; 43a8: 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 ); 43ac: e58c3000 str r3, [ip] the_thread->Wait.count = 0; 43b0: e5842024 str r2, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 43b4: e5815000 str r5, [r1] _ISR_Flash( level ); 43b8: e10f3000 mrs r3, CPSR 43bc: e129f006 msr CPSR_fc, r6 43c0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 43c4: e5943050 ldr r3, [r4, #80] 43c8: e3530002 cmp r3, #2 ; 0x2 43cc: 0a00000a beq 43fc <_Event_Surrender+0xc8> _ISR_Enable( level ); 43d0: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 43d4: e3a01201 mov r1, #268435456 ; 0x10000000 43d8: e2811bff add r1, r1, #261120 ; 0x3fc00 43dc: e1a00004 mov r0, r4 43e0: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 43e4: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 43e8: ea000807 b 640c <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 43ec: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 43f0: 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 ); 43f4: e129f006 msr CPSR_fc, r6 43f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 43fc: e3a03003 mov r3, #3 ; 0x3 4400: 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 ); 4404: e129f006 msr CPSR_fc, r6 (void) _Watchdog_Remove( &the_thread->Timer ); 4408: e2840048 add r0, r4, #72 ; 0x48 440c: eb000dfa bl 7bfc <_Watchdog_Remove> 4410: e3a01201 mov r1, #268435456 ; 0x10000000 4414: e2811bff add r1, r1, #261120 ; 0x3fc00 4418: e1a00004 mov r0, r4 441c: e2811ffe add r1, r1, #1016 ; 0x3f8 } return; } } _ISR_Enable( level ); } 4420: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} 4424: ea0007f8 b 640c <_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() && 4428: e59f8058 ldr r8, [pc, #88] ; 4488 <_Event_Surrender+0x154> <== NOT EXECUTED 442c: e5983000 ldr r3, [r8] <== NOT EXECUTED 4430: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 4434: 0a000002 beq 4444 <_Event_Surrender+0x110> <== NOT EXECUTED 4438: e5983000 ldr r3, [r8] <== NOT EXECUTED 443c: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 4440: 1affffce bne 4380 <_Event_Surrender+0x4c> <== NOT EXECUTED _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) ) { 4444: e1510005 cmp r1, r5 <== NOT EXECUTED 4448: 0a000001 beq 4454 <_Event_Surrender+0x120> <== NOT EXECUTED 444c: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 4450: 0a000008 beq 4478 <_Event_Surrender+0x144> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 4454: e1e03005 mvn r3, r5 <== NOT EXECUTED 4458: e0033000 and r3, r3, r0 <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 445c: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED 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 ); 4460: e58c3000 str r3, [ip] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4464: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _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; 4468: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 446c: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 4470: e5882000 str r2, [r8] <== NOT EXECUTED ((_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; 4474: e5815000 str r5, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 4478: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 447c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 4480: 000160e0 .word 0x000160e0 4484: 00016104 .word 0x00016104 4488: 000162a4 .word 0x000162a4 0000448c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 448c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4490: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 4494: e1a0100d mov r1, sp 4498: eb0008eb bl 684c <_Thread_Get> switch ( location ) { 449c: e59d1000 ldr r1, [sp] 44a0: e3510000 cmp r1, #0 ; 0x0 44a4: 1a000015 bne 4500 <_Event_Timeout+0x74> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 44a8: e10fc000 mrs ip, CPSR 44ac: e38c30c0 orr r3, ip, #192 ; 0xc0 44b0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 44b4: e5903024 ldr r3, [r0, #36] 44b8: e3530000 cmp r3, #0 ; 0x0 44bc: 0a000011 beq 4508 <_Event_Timeout+0x7c> _ISR_Enable( level ); return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 44c0: e59f3070 ldr r3, [pc, #112] ; 4538 <_Event_Timeout+0xac> 44c4: e5932000 ldr r2, [r3] 44c8: e1500002 cmp r0, r2 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 44cc: e5801024 str r1, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 44d0: 0a000012 beq 4520 <_Event_Timeout+0x94> (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 44d4: e3a03006 mov r3, #6 ; 0x6 44d8: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 44dc: e129f00c msr CPSR_fc, ip 44e0: e3a01201 mov r1, #268435456 ; 0x10000000 44e4: e2811bff add r1, r1, #261120 ; 0x3fc00 44e8: e2811ffe add r1, r1, #1016 ; 0x3f8 44ec: eb0007c6 bl 640c <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 44f0: e59f2044 ldr r2, [pc, #68] ; 453c <_Event_Timeout+0xb0> 44f4: e5923000 ldr r3, [r2] 44f8: e2433001 sub r3, r3, #1 ; 0x1 44fc: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4500: e28dd004 add sp, sp, #4 ; 0x4 4504: e8bd8000 pop {pc} 4508: e59f202c ldr r2, [pc, #44] ; 453c <_Event_Timeout+0xb0> <== NOT EXECUTED 450c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4510: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4514: e5823000 str r3, [r2] <== NOT EXECUTED _ISR_Disable( level ); if ( !the_thread->Wait.count ) { /* verify thread is waiting */ _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4518: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 451c: eafffff7 b 4500 <_Event_Timeout+0x74> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { Thread_blocking_operation_States sync = _Event_Sync_state; 4520: e59f2018 ldr r2, [pc, #24] ; 4540 <_Event_Timeout+0xb4> <== NOT EXECUTED 4524: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 4528: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 452c: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4530: 95823000 strls r3, [r2] <== NOT EXECUTED 4534: eaffffe6 b 44d4 <_Event_Timeout+0x48> <== NOT EXECUTED 4538: 00016104 .word 0x00016104 453c: 0001604c .word 0x0001604c 4540: 000162a4 .word 0x000162a4 00008598 <_Heap_Allocate_aligned>: void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 8598: 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; 859c: e5909010 ldr r9, [r0, #16] void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 85a0: e1a07000 mov r7, r0 85a4: e1a03001 mov r3, r1 85a8: 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); 85ac: 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; 85b0: e2433004 sub r3, r3, #4 ; 0x4 void *_Heap_Allocate_aligned( Heap_Control *the_heap, size_t size, uint32_t alignment ) { 85b4: 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); 85b8: e1a01009 mov r1, r9 85bc: 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; 85c0: e58d3004 str r3, [sp, #4] uint32_t const the_size = _Heap_Calc_block_size(size, page_size, the_heap->min_block_size); 85c4: eb000163 bl 8b58 <_Heap_Calc_block_size> if(the_size == 0) 85c8: e3500000 cmp r0, #0 ; 0x0 85cc: e58d0008 str r0, [sp, #8] 85d0: 0a000064 beq 8768 <_Heap_Allocate_aligned+0x1d0> */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 85d4: e5975008 ldr r5, [r7, #8] return NULL; if(alignment == 0) 85d8: e35b0000 cmp fp, #0 ; 0x0 85dc: 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; 85e0: e1570005 cmp r7, r5 85e4: 0a00005f beq 8768 <_Heap_Allocate_aligned+0x1d0> 85e8: e3a0a000 mov sl, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 85ec: 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. */ 85f0: e59d1008 ldr r1, [sp, #8] 85f4: e3c36001 bic r6, r3, #1 ; 0x1 85f8: e1510006 cmp r1, r6 85fc: 8a000023 bhi 8690 <_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; 8600: 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; 8604: e0852006 add r2, r5, r6 aligned_user_addr = block_end - end_to_user_offs; 8608: e0634002 rsb r4, r3, r2 _H_uptr_t *value, uint32_t alignment ) { _H_uptr_t v = *value; *value = v - (v % alignment); 860c: e1a0100b mov r1, fp 8610: 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; 8614: e58d200c str r2, [sp, #12] 8618: eb003b8e bl 17458 <__umodsi3> 861c: 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)); 8620: e1a00008 mov r0, r8 8624: e1a01009 mov r1, r9 8628: eb003b8a bl 17458 <__umodsi3> 862c: e2854008 add r4, r5, #8 ; 0x8 8630: 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) { 8634: e1540002 cmp r4, r2 8638: 8a000014 bhi 8690 <_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) { 863c: e597c014 ldr ip, [r7, #20] 8640: e0643002 rsb r3, r4, r2 8644: e153000c cmp r3, ip 8648: 2a00001c bcs 86c0 <_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) { 864c: e0643008 rsb r3, r4, r8 8650: e1590003 cmp r9, r3 8654: 81a02004 movhi r2, r4 8658: 8a000018 bhi 86c0 <_Heap_Allocate_aligned+0x128> uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 865c: e1a00004 mov r0, r4 8660: e1a0100b mov r1, fp 8664: e58dc000 str ip, [sp] 8668: eb003b7a bl 17458 <__umodsi3> *value = r ? v - r + a : v; 866c: e3500000 cmp r0, #0 ; 0x0 8670: 1084300b addne r3, r4, fp 8674: 10600003 rsbne r0, r0, r3 8678: 01a03000 moveq r3, r0 867c: 10643000 rsbne r3, r4, r0 8680: 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) { 8684: e1590003 cmp r9, r3 8688: e59dc000 ldr ip, [sp] 868c: 8a000009 bhi 86b8 <_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) 8690: e5955008 ldr r5, [r5, #8] 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; 8694: e1570005 cmp r7, r5 the_block = the_block->next, ++search_count) 8698: 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; 869c: 1affffd2 bne 85ec <_Heap_Allocate_aligned+0x54> 86a0: e3a00000 mov r0, #0 ; 0x0 } } } } if(stats->max_search < search_count) 86a4: e5973044 ldr r3, [r7, #68] 86a8: e153000a cmp r3, sl stats->max_search = search_count; 86ac: 3587a044 strcc sl, [r7, #68] return user_ptr; } 86b0: e28dd010 add sp, sp, #16 ; 0x10 86b4: 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) { 86b8: e1a02004 mov r2, r4 86bc: e1a08000 mov r8, r0 aligned_user_addr = 0; } } } if(aligned_user_addr) { 86c0: e3580000 cmp r8, #0 ; 0x0 86c4: 0afffff1 beq 8690 <_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; 86c8: e59d100c ldr r1, [sp, #12] 86cc: e2813008 add r3, r1, #8 ; 0x8 86d0: 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; 86d4: 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) { 86d8: 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; 86dc: 23823001 orrcs r3, r2, #1 ; 0x1 86e0: 25853004 strcs r3, [r5, #4] the_block = _Heap_Block_at(the_block, the_rest); the_block->prev_size = the_rest; 86e4: 27a52002 strcs r2, [r5, r2]! the_block->size = alloc_size; 86e8: 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) { 86ec: 2a000007 bcs 8710 <_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; 86f0: e5973038 ldr r3, [r7, #56] Heap_Block *the_block ) { Heap_Block *block = the_block; Heap_Block *next = block->next; 86f4: e2851008 add r1, r5, #8 ; 0x8 86f8: e8910006 ldm r1, {r1, r2} 86fc: e2433001 sub r3, r3, #1 ; 0x1 Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 8700: e581200c str r2, [r1, #12] 8704: e5873038 str r3, [r7, #56] { Heap_Block *block = the_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 8708: e5821008 str r1, [r2, #8] 870c: 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 ); 8710: 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; 8714: e5923004 ldr r3, [r2, #4] 8718: e3833001 orr r3, r3, #1 ; 0x1 871c: e5823004 str r3, [r2, #4] /* Update statistics */ stats->free_size -= alloc_size; 8720: e2871030 add r1, r7, #48 ; 0x30 8724: e891000a ldm r1, {r1, r3} 8728: e0641001 rsb r1, r4, r1 if(stats->min_free_size > stats->free_size) 872c: 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; 8730: 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; 8734: 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; 8738: e5871030 str r1, [r7, #48] if(stats->min_free_size > stats->free_size) stats->min_free_size = stats->free_size; 873c: 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; 8740: 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; 8744: 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; 8748: 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; 874c: e083300a add r3, r3, sl stats->allocs += 1; 8750: 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; 8754: 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; 8758: e587304c str r3, [r7, #76] stats->allocs += 1; 875c: e5871048 str r1, [r7, #72] check_result(the_heap, the_block, user_addr, aligned_user_addr, size); user_ptr = (void*)aligned_user_addr; 8760: e1a00008 mov r0, r8 8764: eaffffce b 86a4 <_Heap_Allocate_aligned+0x10c> } } } if(stats->max_search < search_count) stats->max_search = search_count; 8768: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 876c: eaffffcf b 86b0 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED 0002b3ac <_Heap_Get_information>: Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2b3ac: e92d0070 push {r4, r5, r6} Heap_Block *the_block = the_heap->start; 2b3b0: e2802020 add r2, r0, #32 ; 0x20 2b3b4: e8920044 ldm r2, {r2, r6} 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; 2b3b8: 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 ) { 2b3bc: e1520006 cmp r2, r6 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 2b3c0: 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; 2b3c4: 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; 2b3c8: e5813000 str r3, [r1] the_info->Free.total = 0; 2b3cc: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 2b3d0: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 2b3d4: e581300c str r3, [r1, #12] the_info->Used.total = 0; 2b3d8: e5813014 str r3, [r1, #20] the_info->Used.largest = 0; while ( the_block != end ) { 2b3dc: 0a000020 beq 2b464 <_Heap_Get_information+0xb8> 2b3e0: e5925004 ldr r5, [r2, #4] 2b3e4: ea00000b b 2b418 <_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++; 2b3e8: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 2b3ec: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 2b3f0: e59c2010 ldr r2, [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++; 2b3f4: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 2b3f8: e1520000 cmp r2, 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; 2b3fc: e0811000 add r1, r1, 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++; 2b400: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 2b404: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 2b408: 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 ) { 2b40c: 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 ) 2b410: 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 ) { 2b414: 0a000012 beq 2b464 <_Heap_Get_information+0xb8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 2b418: 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 ); 2b41c: e0824000 add r4, r2, r0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 2b420: 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) ) { 2b424: e3150001 tst r5, #1 ; 0x1 2b428: 1affffee bne 2b3e8 <_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++; 2b42c: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 2b430: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 2b434: e59c2004 ldr r2, [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++; 2b438: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 2b43c: e1520000 cmp r2, 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; 2b440: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 2b444: 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++; 2b448: e58c3000 str r3, [ip] the_info->Free.total += the_size; 2b44c: e58c1008 str r1, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 2b450: e5943000 ldr r3, [r4] 2b454: e1530000 cmp r3, r0 2b458: 0affffeb beq 2b40c <_Heap_Get_information+0x60> 2b45c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 2b460: ea000003 b 2b474 <_Heap_Get_information+0xc8> <== 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; 2b464: e59c3014 ldr r3, [ip, #20] 2b468: e2833008 add r3, r3, #8 ; 0x8 2b46c: e58c3014 str r3, [ip, #20] 2b470: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 2b474: e8bd0070 pop {r4, r5, r6} 2b478: e12fff1e bx lr 00013f20 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13f20: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13f24: 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; 13f28: e59dc030 ldr ip, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13f2c: e1a05000 mov r5, r0 13f30: e1a09003 mov r9, r3 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; *old_mem_size = 0; 13f34: e3a03000 mov r3, #0 ; 0x0 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; 13f38: e5900014 ldr r0, [r0, #20] uint32_t const page_size = the_heap->page_size; 13f3c: e595b010 ldr fp, [r5, #16] *old_mem_size = 0; 13f40: e5893000 str r3, [r9] *avail_mem_size = 0; 13f44: 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; 13f48: e58d0004 str r0, [sp, #4] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13f4c: e1a04001 mov r4, r1 /* 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); 13f50: e1a00001 mov r0, r1 13f54: e5951010 ldr r1, [r5, #16] 13f58: e1a08002 mov r8, r2 13f5c: ebfff862 bl 120ec <__umodsi3> 13f60: 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 ); 13f64: e595c020 ldr ip, [r5, #32] 13f68: 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); 13f6c: 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)) 13f70: e156000c cmp r6, ip 13f74: 33a03000 movcc r3, #0 ; 0x0 13f78: 23a03001 movcs r3, #1 ; 0x1 13f7c: e1560001 cmp r6, r1 13f80: 83a03000 movhi r3, #0 ; 0x0 13f84: e3530000 cmp r3, #0 ; 0x0 13f88: 0a00002d beq 14044 <_Heap_Resize_block+0x124> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13f8c: e5962004 ldr r2, [r6, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13f90: 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 ); 13f94: 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) || 13f98: e15c0007 cmp ip, r7 13f9c: 83a03000 movhi r3, #0 ; 0x0 13fa0: 93a03001 movls r3, #1 ; 0x1 13fa4: e1510007 cmp r1, r7 13fa8: 33a03000 movcc r3, #0 ; 0x0 13fac: e3530000 cmp r3, #0 ; 0x0 13fb0: 0a000023 beq 14044 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 13fb4: e5973004 ldr r3, [r7, #4] 13fb8: e3130001 tst r3, #1 ; 0x1 13fbc: 0a000020 beq 14044 <_Heap_Resize_block+0x124> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13fc0: 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) || 13fc4: e1510007 cmp r1, r7 13fc8: 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 ); 13fcc: e0873003 add r3, r7, r3 13fd0: 15933004 ldrne r3, [r3, #4] 13fd4: 12033001 andne r3, r3, #1 ; 0x1 13fd8: 03a00001 moveq r0, #1 ; 0x1 13fdc: 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) 13fe0: e0643007 rsb r3, r4, r7 !_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) || 13fe4: 058d0008 streq r0, [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) 13fe8: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 13fec: 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; 13ff0: 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; 13ff4: 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) { 13ff8: 2a000014 bcs 14050 <_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 */ 13ffc: e59d1008 ldr r1, [sp, #8] 14000: e3510000 cmp r1, #0 ; 0x0 14004: 1a00000c bne 1403c <_Heap_Resize_block+0x11c> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 14008: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 1400c: e1a00004 mov r0, r4 14010: e1a0100b mov r1, fp 14014: ebfff834 bl 120ec <__umodsi3> *value = r ? v - r + a : v; 14018: e3500000 cmp r0, #0 ; 0x0 1401c: 1084300b addne r3, r4, fp 14020: e59d2004 ldr r2, [sp, #4] 14024: 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) 14028: e59d3000 ldr r3, [sp] 1402c: e1540002 cmp r4, r2 14030: 21a02004 movcs r2, r4 14034: e1530002 cmp r3, r2 14038: 2a000049 bcs 14164 <_Heap_Resize_block+0x244> } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 1403c: e3a00001 mov r0, #1 ; 0x1 14040: ea000000 b 14048 <_Heap_Resize_block+0x128> 14044: e3a00002 mov r0, #2 ; 0x2 } 14048: e28dd00c add sp, sp, #12 ; 0xc 1404c: 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; 14050: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 14054: e1a00004 mov r0, r4 14058: e1a0100b mov r1, fp 1405c: ebfff822 bl 120ec <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 14060: e0544000 subs r4, r4, r0 14064: 0a000020 beq 140ec <_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) { 14068: 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; 1406c: e064000a rsb r0, r4, sl if (new_block_size < min_block_size) { 14070: e15c0000 cmp ip, r0 14074: 9a000021 bls 14100 <_Heap_Resize_block+0x1e0> uint32_t delta = min_block_size - new_block_size; 14078: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 1407c: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 14080: 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) { 14084: 1a00001d bne 14100 <_Heap_Resize_block+0x1e0> ++stats->resizes; 14088: e5953054 ldr r3, [r5, #84] 1408c: e2833001 add r3, r3, #1 ; 0x1 14090: e5853054 str r3, [r5, #84] 14094: e1a00004 mov r0, r4 14098: eaffffea b 14048 <_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) { 1409c: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 140a0: e15c0004 cmp ip, r4 <== NOT EXECUTED 140a4: 8a000010 bhi 140ec <_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 ); 140a8: 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; 140ac: 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; 140b0: 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; 140b4: 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; 140b8: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 140bc: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 140c0: 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 */ 140c4: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 140c8: 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 */ 140cc: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 140d0: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 140d4: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 140d8: e1a00005 mov r0, r5 <== NOT EXECUTED 140dc: ebffd81e bl a15c <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 140e0: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 140e4: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 140e8: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 140ec: e5953054 ldr r3, [r5, #84] 140f0: e2833001 add r3, r3, #1 ; 0x1 140f4: e5853054 str r3, [r5, #84] 140f8: e3a00000 mov r0, #0 ; 0x0 140fc: eaffffd1 b 14048 <_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) { 14100: e59d1008 ldr r1, [sp, #8] 14104: e3510000 cmp r1, #0 ; 0x0 14108: 1affffe3 bne 1409c <_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; 1410c: 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; 14110: 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; 14114: e0842003 add r2, r4, r3 14118: e0861000 add r1, r6, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 1411c: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 14120: e3820001 orr r0, r2, #1 ; 0x1 next_next_block->prev_size = new_next_block_size; 14124: 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; 14128: e5863004 str r3, [r6, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; 1412c: 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; 14130: e5953030 ldr r3, [r5, #48] 14134: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 14138: e597000c ldr r0, [r7, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 1413c: e597c008 ldr ip, [r7, #8] 14140: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 14144: e59d3030 ldr r3, [sp, #48] 14148: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 1414c: e581c008 str ip, [r1, #8] block->prev = prev; 14150: e581000c str r0, [r1, #12] 14154: e5832000 str r2, [r3] next->prev = prev->next = block; 14158: e5801008 str r1, [r0, #8] 1415c: e58c100c str r1, [ip, #12] 14160: eaffffe1 b 140ec <_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 = 14164: e1a01007 mov r1, r7 14168: e1a00005 mov r0, r5 1416c: ebffc5d8 bl 58d4 <_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; 14170: e080000a add r0, r0, sl 14174: e1800009 orr r0, r0, r9 14178: e5860004 str r0, [r6, #4] --stats->used_blocks; 1417c: e5953040 ldr r3, [r5, #64] 14180: e2433001 sub r3, r3, #1 ; 0x1 14184: e5853040 str r3, [r5, #64] 14188: eaffffd7 b 140ec <_Heap_Resize_block+0x1cc> 0000da44 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { da44: 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; da48: e5903024 ldr r3, [r0, #36] Heap_Control *the_heap, int source, bool do_dump ) { Heap_Block *the_block = the_heap->start; da4c: e5906020 ldr r6, [r0, #32] bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { da50: e24dd004 sub sp, sp, #4 ; 0x4 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; da54: e58d3000 str r3, [sp] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { da58: e5963004 ldr r3, [r6, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) da5c: e251b000 subs fp, r1, #0 ; 0x0 source = the_heap->stats.instance; da60: b590b028 ldrlt fp, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { da64: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { da68: e1a05000 mov r5, r0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { da6c: 13a08000 movne r8, #0 ; 0x0 da70: 0a000086 beq dc90 <_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) { da74: e5962000 ldr r2, [r6] da78: e5953010 ldr r3, [r5, #16] da7c: e1520003 cmp r2, r3 da80: 0a000003 beq da94 <_Heap_Walk+0x50> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); da84: e59f0238 ldr r0, [pc, #568] ; dcc4 <_Heap_Walk+0x280> <== NOT EXECUTED da88: e1a0100b mov r1, fp <== NOT EXECUTED da8c: ebffdbfb bl 4a80 <== NOT EXECUTED da90: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } while ( the_block != end ) { da94: e59d3000 ldr r3, [sp] da98: e1560003 cmp r6, r3 da9c: 0a000080 beq dca4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); daa0: 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)) { daa4: e5951020 ldr r1, [r5, #32] daa8: e3c07001 bic r7, r0, #1 ; 0x1 daac: 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 ); dab0: e0864007 add r4, r6, r7 dab4: e1540001 cmp r4, r1 dab8: 33a03000 movcc r3, #0 ; 0x0 dabc: 23a03001 movcs r3, #1 ; 0x1 dac0: e1540002 cmp r4, r2 dac4: 83a03000 movhi r3, #0 ; 0x0 dac8: e3530000 cmp r3, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); dacc: 1200a001 andne sl, r0, #1 ; 0x1 dad0: 11a09004 movne r9, r4 dad4: 0a000075 beq dcb0 <_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)) { dad8: e5943004 ldr r3, [r4, #4] dadc: e3130001 tst r3, #1 ; 0x1 dae0: 1a00003f bne dbe4 <_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) { dae4: e5943000 ldr r3, [r4] dae8: e1530007 cmp r3, r7 daec: 0a000003 beq db00 <_Heap_Walk+0xbc> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); daf0: e59f01d0 ldr r0, [pc, #464] ; dcc8 <_Heap_Walk+0x284> <== NOT EXECUTED daf4: e1a0100b mov r1, fp <== NOT EXECUTED daf8: ebffdbe0 bl 4a80 <== NOT EXECUTED dafc: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { db00: e35a0000 cmp sl, #0 ; 0x0 db04: 1a000005 bne db20 <_Heap_Walk+0xdc> if (do_dump || error) printk("\n"); db08: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED db0c: 1a00005c bne dc84 <_Heap_Walk+0x240> <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); db10: e59f01b4 ldr r0, [pc, #436] ; dccc <_Heap_Walk+0x288> <== NOT EXECUTED db14: e1a0100b mov r1, fp <== NOT EXECUTED db18: ebffdbd8 bl 4a80 <== NOT EXECUTED db1c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; db20: 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) db24: e1530006 cmp r3, r6 db28: 11550003 cmpne r5, r3 db2c: 0a000003 beq db40 <_Heap_Walk+0xfc> block = block->next; db30: 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) db34: e1530006 cmp r3, r6 db38: 11550003 cmpne r5, r3 db3c: 1afffffb bne db30 <_Heap_Walk+0xec> block = block->next; if(block != the_block) { db40: e1530006 cmp r3, r6 db44: 0a000026 beq dbe4 <_Heap_Walk+0x1a0> if (do_dump || error) printk("\n"); db48: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED db4c: 1a000049 bne dc78 <_Heap_Walk+0x234> <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); db50: e59f0178 ldr r0, [pc, #376] ; dcd0 <_Heap_Walk+0x28c> <== NOT EXECUTED db54: e1a0100b mov r1, fp <== NOT EXECUTED db58: ebffdbc8 bl 4a80 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); db5c: e59f0170 ldr r0, [pc, #368] ; dcd4 <_Heap_Walk+0x290> <== NOT EXECUTED db60: ebffdbc6 bl 4a80 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { db64: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED db68: e1530007 cmp r3, r7 <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); db6c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { db70: 8a000020 bhi dbf8 <_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)) { db74: e1a00007 mov r0, r7 db78: e5951010 ldr r1, [r5, #16] db7c: eb002635 bl 17458 <__umodsi3> db80: e3500000 cmp r0, #0 ; 0x0 db84: 1a000031 bne dc50 <_Heap_Walk+0x20c> printk("PASS: %d !block size is misaligned\n", source); error = 1; } if (++passes > (do_dump ? 10 : 0) && error) db88: e3580000 cmp r8, #0 ; 0x0 db8c: 1a000032 bne dc5c <_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 ) { db90: e59d3000 ldr r3, [sp] db94: e1530004 cmp r3, r4 db98: 0a000041 beq dca4 <_Heap_Walk+0x260> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); db9c: 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)) { dba0: e5951020 ldr r1, [r5, #32] dba4: e3c07001 bic r7, r0, #1 ; 0x1 dba8: e5952024 ldr r2, [r5, #36] dbac: e0844007 add r4, r4, r7 dbb0: e1540001 cmp r4, r1 dbb4: 33a03000 movcc r3, #0 ; 0x0 dbb8: 23a03001 movcs r3, #1 ; 0x1 dbbc: e1540002 cmp r4, r2 dbc0: 83a03000 movhi r3, #0 ; 0x0 dbc4: e3530000 cmp r3, #0 ; 0x0 dbc8: 0a000037 beq dcac <_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)) { dbcc: e5943004 ldr r3, [r4, #4] dbd0: e3130001 tst r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); dbd4: e1a06009 mov r6, r9 dbd8: e200a001 and sl, r0, #1 ; 0x1 dbdc: e1a09004 mov r9, r4 dbe0: 0affffbf beq dae4 <_Heap_Walk+0xa0> error = 1; } } } if (do_dump || error) printk("\n"); dbe4: e3580000 cmp r8, #0 ; 0x0 dbe8: 1affffdb bne db5c <_Heap_Walk+0x118> if (the_size < the_heap->min_block_size) { dbec: e5953014 ldr r3, [r5, #20] dbf0: e1530007 cmp r3, r7 dbf4: 9affffde bls db74 <_Heap_Walk+0x130> printk("PASS: %d !block size is too small\n", source); dbf8: e59f00d8 ldr r0, [pc, #216] ; dcd8 <_Heap_Walk+0x294> <== NOT EXECUTED dbfc: e1a0100b mov r1, fp <== NOT EXECUTED dc00: ebffdb9e bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", dc04: e59d3000 ldr r3, [sp] <== NOT EXECUTED dc08: e59f00cc ldr r0, [pc, #204] ; dcdc <_Heap_Walk+0x298> <== NOT EXECUTED dc0c: e1a0100b mov r1, fp <== NOT EXECUTED dc10: e1a02006 mov r2, r6 <== NOT EXECUTED dc14: ebffdb99 bl 4a80 <== NOT EXECUTED dc18: 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); dc1c: e5963004 ldr r3, [r6, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { dc20: e5950010 ldr r0, [r5, #16] dc24: e3c32001 bic r2, r3, #1 ; 0x1 dc28: e1500002 cmp r0, r2 dc2c: 01a00008 moveq r0, r8 dc30: 0a000004 beq dc48 <_Heap_Walk+0x204> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, dc34: e1a03000 mov r3, r0 <== NOT EXECUTED dc38: e1a0100b mov r1, fp <== NOT EXECUTED dc3c: e59f009c ldr r0, [pc, #156] ; dce0 <_Heap_Walk+0x29c> <== NOT EXECUTED dc40: ebffdb8e bl 4a80 <== NOT EXECUTED dc44: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } dc48: e28dd004 add sp, sp, #4 ; 0x4 dc4c: 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); dc50: e59f008c ldr r0, [pc, #140] ; dce4 <_Heap_Walk+0x2a0> <== NOT EXECUTED dc54: e1a0100b mov r1, fp <== NOT EXECUTED dc58: ebffdb88 bl 4a80 <== NOT EXECUTED the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", dc5c: e59d3000 ldr r3, [sp] <== NOT EXECUTED dc60: e59f0074 ldr r0, [pc, #116] ; dcdc <_Heap_Walk+0x298> <== NOT EXECUTED dc64: e1a0100b mov r1, fp <== NOT EXECUTED dc68: e1a02006 mov r2, r6 <== NOT EXECUTED dc6c: ebffdb83 bl 4a80 <== NOT EXECUTED dc70: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED dc74: eaffffe8 b dc1c <_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"); dc78: e59f0054 ldr r0, [pc, #84] ; dcd4 <_Heap_Walk+0x290> <== NOT EXECUTED dc7c: ebffdb7f bl 4a80 <== NOT EXECUTED dc80: eaffffb2 b db50 <_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"); dc84: e59f0048 ldr r0, [pc, #72] ; dcd4 <_Heap_Walk+0x290> <== NOT EXECUTED dc88: ebffdb7c bl 4a80 <== NOT EXECUTED dc8c: eaffff9f b db10 <_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); dc90: e59f0050 ldr r0, [pc, #80] ; dce8 <_Heap_Walk+0x2a4> <== NOT EXECUTED dc94: e1a0100b mov r1, fp <== NOT EXECUTED dc98: ebffdb78 bl 4a80 <== NOT EXECUTED dc9c: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED dca0: eaffff73 b da74 <_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, dca4: e59d6000 ldr r6, [sp] dca8: eaffffdb b dc1c <_Heap_Walk+0x1d8> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); dcac: 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); dcb0: e1a02004 mov r2, r4 <== NOT EXECUTED dcb4: e59f0030 ldr r0, [pc, #48] ; dcec <_Heap_Walk+0x2a8> <== NOT EXECUTED dcb8: e1a0100b mov r1, fp <== NOT EXECUTED dcbc: ebffdb6f bl 4a80 <== NOT EXECUTED dcc0: eaffffe5 b dc5c <_Heap_Walk+0x218> <== NOT EXECUTED dcc4: 0001ab08 .word 0x0001ab08 dcc8: 0001ab60 .word 0x0001ab60 dccc: 0001ab8c .word 0x0001ab8c dcd0: 0001abb8 .word 0x0001abb8 dcd4: 0001a11c .word 0x0001a11c dcd8: 0001abe4 .word 0x0001abe4 dcdc: 0001ac2c .word 0x0001ac2c dce0: 0001ac68 .word 0x0001ac68 dce4: 0001ac08 .word 0x0001ac08 dce8: 0001aad0 .word 0x0001aad0 dcec: 0001ab3c .word 0x0001ab3c 0000a34c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a34c: e2400001 sub r0, r0, #1 ; 0x1 a350: e3500003 cmp r0, #3 ; 0x3 a354: 979ff100 ldrls pc, [pc, r0, lsl #2] a358: ea000003 b a36c <_Objects_API_maximum_class+0x20> a35c: 0000a38c .word 0x0000a38c <== NOT EXECUTED a360: 0000a384 .word 0x0000a384 <== NOT EXECUTED a364: 0000a37c .word 0x0000a37c <== NOT EXECUTED a368: 0000a374 .word 0x0000a374 <== 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; a36c: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } a370: 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; a374: e3a00008 mov r0, #8 ; 0x8 a378: e12fff1e bx lr int _Objects_API_maximum_class( uint32_t api ) { switch (api) { a37c: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED a380: e12fff1e bx lr <== NOT EXECUTED a384: e3a0000a mov r0, #10 ; 0xa a388: e12fff1e bx lr a38c: e3a00002 mov r0, #2 ; 0x2 a390: e12fff1e bx lr 00005ab8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5ab8: 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; 5abc: e1d0a0b8 ldrh sl, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5ac0: e1d091b0 ldrh r9, [r0, #16] 5ac4: e159000a cmp r9, sl */ void _Objects_Extend_information( Objects_Information *information ) { 5ac8: e24dd014 sub sp, sp, #20 ; 0x14 5acc: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5ad0: 2a000071 bcs 5c9c <_Objects_Extend_information+0x1e4> 5ad4: e3a07000 mov r7, #0 ; 0x0 5ad8: e5904014 ldr r4, [r0, #20] 5adc: e1a0800a mov r8, sl 5ae0: e1a06007 mov r6, r7 5ae4: e3a0b001 mov fp, #1 ; 0x1 5ae8: e3a00003 mov r0, #3 ; 0x3 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5aec: e5d53012 ldrb r3, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5af0: e0849009 add r9, r4, r9 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5af4: e3530000 cmp r3, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 5af8: e58d9004 str r9, [sp, #4] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 5afc: 1a000080 bne 5d04 <_Objects_Extend_information+0x24c> if ( !object_blocks ) return; } else { object_blocks = (void**) 5b00: e59d3004 ldr r3, [sp, #4] 5b04: e080000a add r0, r0, sl 5b08: e0800003 add r0, r0, r3 5b0c: e1a00100 lsl r0, r0, #2 5b10: eb000893 bl 7d64 <_Workspace_Allocate_or_fatal_error> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5b14: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5b18: e1a0210b lsl r2, fp, #2 if ( !object_blocks ) return; } else { object_blocks = (void**) 5b1c: e1a0c000 mov ip, r0 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5b20: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5b24: e153000a cmp r3, sl 5b28: e0894002 add r4, r9, r2 5b2c: 8a000080 bhi 5d34 <_Objects_Extend_information+0x27c> else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b30: 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, 5b34: 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; 5b38: 11a02003 movne r2, r3 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b3c: 0a000003 beq 5b50 <_Objects_Extend_information+0x98> local_table[ index ] = NULL; 5b40: e7842103 str r2, [r4, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5b44: e2833001 add r3, r3, #1 ; 0x1 5b48: e153000a cmp r3, sl 5b4c: 3afffffb bcc 5b40 <_Objects_Extend_information+0x88> 5b50: e1a07107 lsl r7, r7, #2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b54: e3a00000 mov r0, #0 ; 0x0 inactive_per_block[block_count] = 0; 5b58: e7890007 str r0, [r9, r7] for ( index=index_base ; index < ( information->allocation_size + index_base ); 5b5c: e5953014 ldr r3, [r5, #20] 5b60: e0881003 add r1, r8, r3 5b64: e1580001 cmp r8, r1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5b68: e78c0007 str r0, [ip, r7] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5b6c: 2a000006 bcs 5b8c <_Objects_Extend_information+0xd4> 5b70: e1a03108 lsl r3, r8, #2 5b74: e0842003 add r2, r4, r3 5b78: e1a03008 mov r3, r8 index++ ) { 5b7c: 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 ); 5b80: e1530001 cmp r3, r1 index++ ) { local_table[ index ] = NULL; 5b84: 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 ); 5b88: 3afffffb bcc 5b7c <_Objects_Extend_information+0xc4> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 5b8c: e10f0000 mrs r0, CPSR 5b90: e38030c0 orr r3, r0, #192 ; 0xc0 5b94: 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( 5b98: 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; 5b9c: e59de004 ldr lr, [sp, #4] information->maximum_id = _Objects_Build_id( 5ba0: e1d510b4 ldrh r1, [r5, #4] 5ba4: 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; 5ba8: e1a0280e lsl r2, lr, #16 information->maximum_id = _Objects_Build_id( 5bac: 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; 5bb0: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 5bb4: e1833d81 orr r3, r3, r1, lsl #27 5bb8: e1833002 orr r3, r3, r2 5bbc: 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; 5bc0: e5859030 str r9, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 5bc4: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 5bc8: e585401c str r4, [r5, #28] information->maximum = maximum; 5bcc: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5bd0: e585c034 str ip, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 5bd4: e129f000 msr CPSR_fc, r0 if ( old_tables ) 5bd8: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 5bdc: 11a00003 movne r0, r3 5be0: 1b000857 blne 7d44 <_Workspace_Free> 5be4: e5954014 ldr r4, [r5, #20] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 5be8: e5d53012 ldrb r3, [r5, #18] 5bec: e3530000 cmp r3, #0 ; 0x0 5bf0: 0a000061 beq 5d7c <_Objects_Extend_information+0x2c4> information->object_blocks[ block ] = 5bf4: e5953018 ldr r3, [r5, #24] 5bf8: e0000493 mul r0, r3, r4 5bfc: e5954034 ldr r4, [r5, #52] 5c00: eb000853 bl 7d54 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c04: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5c08: e7840106 str r0, [r4, r6, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c0c: e7931106 ldr r1, [r3, r6, lsl #2] 5c10: e3510000 cmp r1, #0 ; 0x0 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5c14: e1a0a106 lsl sl, r6, #2 _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5c18: 0a00001d beq 5c94 <_Objects_Extend_information+0x1dc> /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5c1c: e28d7008 add r7, sp, #8 ; 0x8 5c20: e1a00007 mov r0, r7 5c24: e2852014 add r2, r5, #20 ; 0x14 5c28: e892000c ldm r2, {r2, r3} 5c2c: eb001093 bl 9e80 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c30: e1a04008 mov r4, r8 5c34: e2856020 add r6, r5, #32 ; 0x20 5c38: ea000008 b 5c60 <_Objects_Extend_information+0x1a8> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 5c3c: e5953000 ldr r3, [r5] 5c40: e1d520b4 ldrh r2, [r5, #4] 5c44: e1a03c03 lsl r3, r3, #24 5c48: e3833801 orr r3, r3, #65536 ; 0x10000 5c4c: e1833d82 orr r3, r3, r2, lsl #27 5c50: e1833004 orr r3, r3, r4 5c54: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c58: ebfffd6f bl 521c <_Chain_Append> index++; 5c5c: 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 ) { 5c60: e1a00007 mov r0, r7 5c64: eb001078 bl 9e4c <_Chain_Get> 5c68: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5c6c: e1a0100c mov r1, ip 5c70: 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 ) { 5c74: 1afffff0 bne 5c3c <_Objects_Extend_information+0x184> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 5c78: e5953014 ldr r3, [r5, #20] 5c7c: e5952030 ldr r2, [r5, #48] 5c80: e782300a str r3, [r2, sl] information->inactive += information->allocation_size; 5c84: e1d512bc ldrh r1, [r5, #44] 5c88: e5953014 ldr r3, [r5, #20] 5c8c: e0833001 add r3, r3, r1 5c90: e1c532bc strh r3, [r5, #44] } 5c94: e28dd014 add sp, sp, #20 ; 0x14 5c98: 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; 5c9c: e5904014 ldr r4, [r0, #20] 5ca0: e1a00009 mov r0, r9 5ca4: e1a01004 mov r1, r4 5ca8: eb0030cb bl 11fdc <__aeabi_uidiv> for ( ; block < block_count; block++ ) { 5cac: e2507000 subs r7, r0, #0 ; 0x0 5cb0: 0a00003a beq 5da0 <_Objects_Extend_information+0x2e8> if ( information->object_blocks[ block ] == NULL ) 5cb4: e5952034 ldr r2, [r5, #52] 5cb8: e5923000 ldr r3, [r2] 5cbc: e3530000 cmp r3, #0 ; 0x0 5cc0: 11a0800a movne r8, sl 5cc4: 13a06000 movne r6, #0 ; 0x0 5cc8: 1a000003 bne 5cdc <_Objects_Extend_information+0x224> 5ccc: ea000033 b 5da0 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED 5cd0: e7923106 ldr r3, [r2, r6, lsl #2] 5cd4: e3530000 cmp r3, #0 ; 0x0 5cd8: 0a000003 beq 5cec <_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++ ) { 5cdc: e2866001 add r6, r6, #1 ; 0x1 5ce0: e1570006 cmp r7, r6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 5ce4: e0888004 add r8, r8, r4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 5ce8: 8afffff8 bhi 5cd0 <_Objects_Extend_information+0x218> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 5cec: e1580009 cmp r8, r9 5cf0: 3affffbc bcc 5be8 <_Objects_Extend_information+0x130> 5cf4: e287b001 add fp, r7, #1 ; 0x1 5cf8: e1a0308b lsl r3, fp, #1 5cfc: e083000b add r0, r3, fp 5d00: eaffff79 b 5aec <_Objects_Extend_information+0x34> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { object_blocks = (void**) 5d04: e080000a add r0, r0, sl 5d08: e0800009 add r0, r0, r9 5d0c: e1a00100 lsl r0, r0, #2 5d10: eb00080f bl 7d54 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 5d14: e250c000 subs ip, r0, #0 ; 0x0 5d18: 0affffdd beq 5c94 <_Objects_Extend_information+0x1dc> * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5d1c: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5d20: e1a0210b lsl r2, fp, #2 5d24: e08c9002 add r9, ip, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5d28: e153000a cmp r3, sl 5d2c: e0894002 add r4, r9, r2 5d30: 9affff7e bls 5b30 <_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, 5d34: e1a07107 lsl r7, r7, #2 5d38: e1a0000c mov r0, ip 5d3c: e5951034 ldr r1, [r5, #52] 5d40: e1a02007 mov r2, r7 5d44: e58dc000 str ip, [sp] 5d48: eb001742 bl ba58 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5d4c: e5951030 ldr r1, [r5, #48] 5d50: e1a02007 mov r2, r7 5d54: e1a00009 mov r0, r9 5d58: eb00173e bl ba58 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5d5c: e1d521b0 ldrh r2, [r5, #16] 5d60: e08a2002 add r2, sl, r2 5d64: e1a02102 lsl r2, r2, #2 5d68: e1a00004 mov r0, r4 5d6c: e595101c ldr r1, [r5, #28] 5d70: eb001738 bl ba58 5d74: e59dc000 ldr ip, [sp] 5d78: eaffff75 b 5b54 <_Objects_Extend_information+0x9c> if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 5d7c: e5953018 ldr r3, [r5, #24] 5d80: e0000493 mul r0, r3, r4 5d84: e5954034 ldr r4, [r5, #52] 5d88: eb0007f5 bl 7d64 <_Workspace_Allocate_or_fatal_error> 5d8c: e5953034 ldr r3, [r5, #52] 5d90: e7840106 str r0, [r4, r6, lsl #2] 5d94: e1a0a106 lsl sl, r6, #2 5d98: e7931106 ldr r1, [r3, r6, lsl #2] 5d9c: eaffff9e b 5c1c <_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++ ) { 5da0: e1a0800a mov r8, sl <== NOT EXECUTED 5da4: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED 5da8: eaffffcf b 5cec <_Objects_Extend_information+0x234> <== NOT EXECUTED 00005ea4 <_Objects_Get_isr_disable>: #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 5ea4: e1a01801 lsl r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 5ea8: 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; 5eac: e1a01821 lsr r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 5eb0: e1a04003 mov r4, r3 index = id & 0x0000ffff; /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 5eb4: e10fc000 mrs ip, CPSR 5eb8: e38c30c0 orr r3, ip, #192 ; 0xc0 5ebc: e129f003 msr CPSR_fc, r3 if ( information->maximum >= index ) { 5ec0: e1d031b0 ldrh r3, [r0, #16] 5ec4: e1510003 cmp r1, r3 5ec8: 8a000008 bhi 5ef0 <_Objects_Get_isr_disable+0x4c> if ( (the_object = information->local_table[ index ]) != NULL ) { 5ecc: e590301c ldr r3, [r0, #28] 5ed0: e7930101 ldr r0, [r3, r1, lsl #2] 5ed4: e3500000 cmp r0, #0 ; 0x0 *location = OBJECTS_LOCAL; 5ed8: 13a03000 movne r3, #0 ; 0x0 5edc: 15823000 strne r3, [r2] *level_p = level; 5ee0: 1584c000 strne ip, [r4] /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { 5ee4: 0a000006 beq 5f04 <_Objects_Get_isr_disable+0x60> _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 5ee8: e8bd0010 pop {r4} 5eec: e12fff1e bx lr } _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); 5ef0: e129f00c msr CPSR_fc, ip *location = OBJECTS_ERROR; 5ef4: e3a03001 mov r3, #1 ; 0x1 5ef8: e5823000 str r3, [r2] 5efc: e3a00000 mov r0, #0 ; 0x0 5f00: eafffff8 b 5ee8 <_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 ); 5f04: e129f00c msr CPSR_fc, ip <== NOT EXECUTED *location = OBJECTS_ERROR; 5f08: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 5f0c: e5823000 str r3, [r2] <== NOT EXECUTED 5f10: eafffff4 b 5ee8 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED 000151ec <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 151ec: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 151f0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 151f4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 151f8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 151fc: 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; 15200: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 15204: e1a05000 mov r5, r0 <== NOT EXECUTED 15208: e1a06002 mov r6, r2 <== NOT EXECUTED 1520c: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 15210: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 15214: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 15218: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 1521c: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 15220: e15c0003 cmp ip, r3 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15224: e1a01004 mov r1, r4 <== NOT EXECUTED 15228: e1a00005 mov r0, r5 <== NOT EXECUTED 1522c: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 15230: 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) 15234: 3a000005 bcc 15250 <_Objects_Get_next+0x64> <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 15238: ebffda8b bl bc6c <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 1523c: e5963000 ldr r3, [r6] <== NOT EXECUTED 15240: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 15244: 1afffff2 bne 15214 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 15248: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 1524c: 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; 15250: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 15254: 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; 15258: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 1525c: e5872000 str r2, [r7] <== NOT EXECUTED 15260: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 15264: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00006054 <_Objects_Namespace_remove>: ) { /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 6054: e5d03038 ldrb r3, [r0, #56] 6058: e3530000 cmp r3, #0 ; 0x0 void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 605c: e92d4010 push {r4, lr} 6060: e1a04001 mov r4, r1 /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 6064: 0a000002 beq 6074 <_Objects_Namespace_remove+0x20> 6068: e591000c ldr r0, [r1, #12] <== NOT EXECUTED 606c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 6070: 1b000733 blne 7d44 <_Workspace_Free> <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; 6074: e3a03000 mov r3, #0 ; 0x0 the_object->name.name_u32 = 0; 6078: e584300c str r3, [r4, #12] } 607c: e8bd8010 pop {r4, pc} 00007e9c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 7e9c: e92d40f0 push {r4, r5, r6, r7, lr} 7ea0: e1a04000 mov r4, r0 7ea4: e1a07001 mov r7, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7ea8: e1a00002 mov r0, r2 7eac: e1d413ba ldrh r1, [r4, #58] bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 7eb0: e1a05002 mov r5, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7eb4: eb001c34 bl ef8c if ( information->is_string ) { 7eb8: e5d43038 ldrb r3, [r4, #56] 7ebc: e3530000 cmp r3, #0 ; 0x0 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7ec0: e2804001 add r4, r0, #1 ; 0x1 if ( information->is_string ) { 7ec4: 1a00001a bne 7f34 <_Objects_Set_name+0x98> strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 7ec8: e3540000 cmp r4, #0 ; 0x0 7ecc: 03a00a02 moveq r0, #8192 ; 0x2000 7ed0: 02800020 addeq r0, r0, #32 ; 0x20 7ed4: 01800800 orreq r0, r0, r0, lsl #16 7ed8: 0a000012 beq 7f28 <_Objects_Set_name+0x8c> 7edc: e5d53000 ldrb r3, [r5] 7ee0: e3540001 cmp r4, #1 ; 0x1 7ee4: e1a02c03 lsl r2, r3, #24 7ee8: 03820602 orreq r0, r2, #2097152 ; 0x200000 7eec: 03800a02 orreq r0, r0, #8192 ; 0x2000 7ef0: 03800020 orreq r0, r0, #32 ; 0x20 7ef4: 0a00000b beq 7f28 <_Objects_Set_name+0x8c> 7ef8: e5d53001 ldrb r3, [r5, #1] 7efc: e3540002 cmp r4, #2 ; 0x2 7f00: e1822803 orr r2, r2, r3, lsl #16 7f04: 03820a02 orreq r0, r2, #8192 ; 0x2000 7f08: 03800020 orreq r0, r0, #32 ; 0x20 7f0c: 0a000005 beq 7f28 <_Objects_Set_name+0x8c> 7f10: e5d53002 ldrb r3, [r5, #2] 7f14: e3540003 cmp r4, #3 ; 0x3 7f18: e1820403 orr r0, r2, r3, lsl #8 7f1c: 15d53003 ldrbne r3, [r5, #3] 7f20: 03800020 orreq r0, r0, #32 ; 0x20 7f24: 11800003 orrne r0, r0, r3 7f28: e587000c str r0, [r7, #12] 7f2c: e3a00001 mov r0, #1 ; 0x1 ); } return TRUE; } 7f30: e8bd80f0 pop {r4, r5, r6, r7, pc} length = strnlen( name, information->name_length ) + 1; if ( information->is_string ) { char *d; d = _Workspace_Allocate( length ); 7f34: e1a00004 mov r0, r4 <== NOT EXECUTED 7f38: eb000721 bl 9bc4 <_Workspace_Allocate> <== NOT EXECUTED if ( !d ) 7f3c: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED 7f40: 01a00006 moveq r0, r6 <== NOT EXECUTED 7f44: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 7f48: e597000c ldr r0, [r7, #12] <== NOT EXECUTED 7f4c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 7f50: 0a000002 beq 7f60 <_Objects_Set_name+0xc4> <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 7f54: eb000716 bl 9bb4 <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 7f58: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7f5c: e587300c str r3, [r7, #12] <== NOT EXECUTED } strncpy( d, name, length ); 7f60: e1a01005 mov r1, r5 <== NOT EXECUTED 7f64: e1a00006 mov r0, r6 <== NOT EXECUTED 7f68: e1a02004 mov r2, r4 <== NOT EXECUTED 7f6c: eb001bc3 bl ee80 <== NOT EXECUTED d[ length ] = '\0'; 7f70: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7f74: e7c63004 strb r3, [r6, r4] <== NOT EXECUTED the_object->name.name_p = d; 7f78: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 7f7c: e587600c str r6, [r7, #12] <== NOT EXECUTED 7f80: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00021bec <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 21bec: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 21bf0: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 21bf4: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 21bf8: 0a00000d beq 21c34 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 21bfc: e3510000 cmp r1, #0 ; 0x0 21c00: 0a00000b beq 21c34 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 21c04: e59f5030 ldr r5, [pc, #48] ; 21c3c <_Protected_heap_Get_information+0x50> 21c08: e5950000 ldr r0, [r5] 21c0c: ebff9afd bl 8808 <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 21c10: e1a01004 mov r1, r4 21c14: e1a00006 mov r0, r6 21c18: eb0025e3 bl 2b3ac <_Heap_Get_information> 21c1c: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 21c20: e5950000 ldr r0, [r5] 21c24: ebff9b13 bl 8878 <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 21c28: e2740001 rsbs r0, r4, #1 ; 0x1 21c2c: 33a00000 movcc r0, #0 ; 0x0 21c30: e8bd8070 pop {r4, r5, r6, pc} 21c34: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 21c38: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 21c3c: 0005935c .word 0x0005935c 00005618 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 5618: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 561c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 5620: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 5624: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 5628: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 562c: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 5630: e10f6000 mrs r6, CPSR 5634: e38630c0 orr r3, r6, #192 ; 0xc0 5638: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 563c: e59f3038 ldr r3, [pc, #56] ; 567c <_TOD_Get+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 5640: e59f2038 ldr r2, [pc, #56] ; 5680 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 5644: 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; 5648: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 564c: 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; 5650: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 5654: 0a000002 beq 5664 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 5658: e1a0e00f mov lr, pc <== NOT EXECUTED 565c: e12fff11 bx r1 <== NOT EXECUTED 5660: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 5664: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 5668: e1a00005 mov r0, r5 566c: e1a0100d mov r1, sp 5670: eb000813 bl 76c4 <_Timespec_Add_to> } 5674: e28dd008 add sp, sp, #8 ; 0x8 5678: e8bd8070 pop {r4, r5, r6, pc} 567c: 000161f8 .word 0x000161f8 5680: 000160d4 .word 0x000160d4 0000a028 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { a028: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a02c: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { a030: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; a034: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { a038: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; a03c: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); a040: e10f6000 mrs r6, CPSR a044: e38630c0 orr r3, r6, #192 ; 0xc0 a048: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) a04c: e59f3038 ldr r3, [pc, #56] ; a08c <_TOD_Get_uptime+0x64> offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a050: e59f2038 ldr r2, [pc, #56] ; a090 <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) a054: e5931000 ldr r1, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a058: e8920018 ldm r2, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a05c: e3510000 cmp r1, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; a060: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) a064: 0a000002 beq a074 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); a068: e1a0e00f mov lr, pc <== NOT EXECUTED a06c: e12fff11 bx r1 <== NOT EXECUTED a070: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); a074: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); a078: e1a00005 mov r0, r5 a07c: e1a0100d mov r1, sp a080: ebfff58f bl 76c4 <_Timespec_Add_to> } a084: e28dd008 add sp, sp, #8 ; 0x8 a088: e8bd8070 pop {r4, r5, r6, pc} a08c: 000161f8 .word 0x000161f8 a090: 000160c4 .word 0x000160c4 0000b0e8 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b0e8: e59f3110 ldr r3, [pc, #272] ; b200 <_Thread_Handler+0x118> * * Output parameters: NONE */ void _Thread_Handler( void ) { b0ec: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; b0f0: 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; b0f4: e59520b8 ldr r2, [r5, #184] _ISR_Set_level(level); b0f8: e3a03000 mov r3, #0 ; 0x0 b0fc: e10f3000 mrs r3, CPSR b100: e3c330c0 bic r3, r3, #192 ; 0xc0 b104: e1833002 orr r3, r3, r2 b108: e121f003 msr CPSR_c, r3 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b10c: e59f20f0 ldr r2, [pc, #240] ; b204 <_Thread_Handler+0x11c> doneConstructors = 1; b110: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; b114: 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 ); b118: 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; b11c: 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 ); b120: ebfff1c2 bl 7830 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); b124: ebffedbf bl 6828 <_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) */ b128: e3540000 cmp r4, #0 ; 0x0 b12c: 0a000031 beq b1f8 <_Thread_Handler+0x110> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { b130: e59530a0 ldr r3, [r5, #160] b134: e3530003 cmp r3, #3 ; 0x3 b138: 979ff103 ldrls pc, [pc, r3, lsl #2] b13c: ea000008 b b164 <_Thread_Handler+0x7c> <== NOT EXECUTED b140: 0000b1d0 .word 0x0000b1d0 <== NOT EXECUTED b144: 0000b1a8 .word 0x0000b1a8 <== NOT EXECUTED b148: 0000b17c .word 0x0000b17c <== NOT EXECUTED b14c: 0000b150 .word 0x0000b150 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = b150: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED b154: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED b158: e1a0e00f mov lr, pc <== NOT EXECUTED b15c: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b160: 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 ); b164: e1a00005 mov r0, r5 <== NOT EXECUTED b168: ebfff1c0 bl 7870 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b16c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b170: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b174: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b178: ebffea04 bl 5990 <_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 = b17c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED b180: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED b184: e1a0e00f mov lr, pc <== NOT EXECUTED b188: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b18c: 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 ); b190: e1a00005 mov r0, r5 <== NOT EXECUTED b194: ebfff1b5 bl 7870 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b198: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b19c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b1a0: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b1a4: ebffe9f9 bl 5990 <_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 = b1a8: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED b1ac: e1a0e00f mov lr, pc <== NOT EXECUTED b1b0: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED b1b4: 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 ); b1b8: e1a00005 mov r0, r5 <== NOT EXECUTED b1bc: ebfff1ab bl 7870 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( b1c0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED b1c4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED b1c8: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED b1cc: ebffe9ef bl 5990 <_Internal_error_Occurred> <== NOT EXECUTED __main (); #endif switch ( executing->Start.prototype ) { case THREAD_START_NUMERIC: executing->Wait.return_argument = b1d0: e59500a8 ldr r0, [r5, #168] b1d4: e1a0e00f mov lr, pc b1d8: e595f09c ldr pc, [r5, #156] b1dc: 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 ); b1e0: e1a00005 mov r0, r5 b1e4: ebfff1a1 bl 7870 <_User_extensions_Thread_exitted> _Internal_error_Occurred( b1e8: e3a00000 mov r0, #0 ; 0x0 b1ec: e3a01001 mov r1, #1 ; 0x1 b1f0: e3a02006 mov r2, #6 ; 0x6 b1f4: ebffe9e5 bl 5990 <_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 (); b1f8: ebffd3c8 bl 120 <_init> b1fc: eaffffcb b b130 <_Thread_Handler+0x48> b200: 00016104 .word 0x00016104 b204: 00015e98 .word 0x00015e98 000068f4 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 68f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 68f8: 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 ) { 68fc: 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; 6900: 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 ) { 6904: e5dda02c ldrb sl, [sp, #44] 6908: e1a09000 mov r9, r0 690c: e1a05001 mov r5, r1 6910: e59d8028 ldr r8, [sp, #40] 6914: 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; 6918: 15c130c0 strbne r3, [r1, #192] 691c: 11a0c004 movne ip, r4 6920: 11a02006 movne r2, r6 /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 6924: 0a000034 beq 69fc <_Thread_Initialize+0x108> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 6928: e59f416c ldr r4, [pc, #364] ; 6a9c <_Thread_Initialize+0x1a8> 692c: e5940000 ldr r0, [r4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 6930: e3a06000 mov r6, #0 ; 0x0 6934: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 6938: e58520c8 str r2, [r5, #200] the_stack->size = size; 693c: e585c0c4 str ip, [r5, #196] 6940: e5856050 str r6, [r5, #80] the_watchdog->routine = routine; 6944: e5856064 str r6, [r5, #100] the_watchdog->id = id; 6948: e5856068 str r6, [r5, #104] the_watchdog->user_data = user_data; 694c: e585606c str r6, [r5, #108] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 6950: e5856100 str r6, [r5, #256] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6954: 05850110 streq r0, [r5, #272] 6958: 01a07000 moveq r7, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 695c: 1a000033 bne 6a30 <_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; 6960: e59d3034 ldr r3, [sp, #52] switch ( budget_algorithm ) { 6964: 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; 6968: 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; 696c: 059f312c ldreq r3, [pc, #300] ; 6aa0 <_Thread_Initialize+0x1ac> 6970: 05932000 ldreq r2, [r3] 6974: 05852078 streq r2, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6978: e59d3038 ldr r3, [sp, #56] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 697c: e3a04000 mov r4, #0 ; 0x0 break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6980: e3a06001 mov r6, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 6984: 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 ); 6988: e1a01008 mov r1, r8 698c: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 6990: e5c5a0ac strb sl, [r5, #172] the_thread->Start.budget_algorithm = budget_algorithm; 6994: e585b0b0 str fp, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 6998: e5856010 str r6, [r5, #16] the_thread->Wait.queue = NULL; 699c: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 69a0: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 69a4: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 69a8: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 69ac: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 69b0: eb000200 bl 71b8 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 69b4: e1d530b8 ldrh r3, [r5, #8] 69b8: 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; 69bc: e5854088 str r4, [r5, #136] 69c0: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 69c4: 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 ); 69c8: e1a00005 mov r0, r5 69cc: 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; 69d0: 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 ); 69d4: eb0003cb bl 7908 <_User_extensions_Thread_create> if ( !extension_status ) { 69d8: e1500004 cmp r0, r4 69dc: 1a000011 bne 6a28 <_Thread_Initialize+0x134> if ( extensions_area ) 69e0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 69e4: 11a00007 movne r0, r7 <== NOT EXECUTED 69e8: 1b0004d5 blne 7d44 <_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 ); 69ec: e1a00005 mov r0, r5 <== NOT EXECUTED 69f0: eb0002ad bl 74ac <_Thread_Stack_Free> <== NOT EXECUTED 69f4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 69f8: 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 ); 69fc: e1a00001 mov r0, r1 6a00: e1a01004 mov r1, r4 6a04: eb000288 bl 742c <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 6a08: e1540000 cmp r4, r0 6a0c: 93a03000 movls r3, #0 ; 0x0 6a10: 83a03001 movhi r3, #1 ; 0x1 6a14: e3500000 cmp r0, #0 ; 0x0 6a18: 03833001 orreq r3, r3, #1 ; 0x1 6a1c: e3530000 cmp r3, #0 ; 0x0 6a20: e1a0c000 mov ip, r0 6a24: 0a000014 beq 6a7c <_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 ) { 6a28: e1a00006 mov r0, r6 6a2c: 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( 6a30: e2800001 add r0, r0, #1 ; 0x1 6a34: e1a00100 lsl r0, r0, #2 6a38: eb0004c5 bl 7d54 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 6a3c: e2507000 subs r7, r0, #0 ; 0x0 6a40: 0a000011 beq 6a8c <_Thread_Initialize+0x198> * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a44: e5943000 ldr r3, [r4] 6a48: e3730001 cmn r3, #1 ; 0x1 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6a4c: e5857110 str r7, [r5, #272] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a50: 0affffc2 beq 6960 <_Thread_Initialize+0x6c> 6a54: e1a02006 mov r2, r6 6a58: e1a01007 mov r1, r7 the_thread->extensions[i] = NULL; 6a5c: e1a00006 mov r0, r6 * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a60: e5943000 ldr r3, [r4] the_thread->extensions[i] = NULL; 6a64: e7810102 str r0, [r1, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6a68: e2833001 add r3, r3, #1 ; 0x1 6a6c: e2822001 add r2, r2, #1 ; 0x1 6a70: e1530002 cmp r3, r2 6a74: 8afffff9 bhi 6a60 <_Thread_Initialize+0x16c> 6a78: eaffffb8 b 6960 <_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; 6a7c: e3a03001 mov r3, #1 ; 0x1 6a80: 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; 6a84: e59520cc ldr r2, [r5, #204] 6a88: eaffffa6 b 6928 <_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 ); 6a8c: e1a00005 mov r0, r5 <== NOT EXECUTED 6a90: eb000285 bl 74ac <_Thread_Stack_Free> <== NOT EXECUTED 6a94: e1a00007 mov r0, r7 <== NOT EXECUTED 6a98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 6a9c: 000160e4 .word 0x000160e4 6aa0: 00016004 .word 0x00016004 00007eb4 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 7eb4: e5903010 ldr r3, [r0, #16] 7eb8: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 7ebc: e92d4070 push {r4, r5, r6, lr} 7ec0: e1a04000 mov r4, r0 7ec4: e1a05001 mov r5, r1 7ec8: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 7ecc: 13a00000 movne r0, #0 ; 0x0 7ed0: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 7ed4: eb000089 bl 8100 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 7ed8: e1a02006 mov r2, r6 7edc: e1a01005 mov r1, r5 7ee0: e1a00004 mov r0, r4 7ee4: eb000dcc bl b61c <_Thread_Reset> _Thread_Load_environment( the_thread ); 7ee8: e1a00004 mov r0, r4 7eec: eb000ce0 bl b274 <_Thread_Load_environment> _Thread_Ready( the_thread ); 7ef0: e1a00004 mov r0, r4 7ef4: eb000d83 bl b508 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 7ef8: e1a00004 mov r0, r4 7efc: eb000208 bl 8724 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 7f00: e59f301c ldr r3, [pc, #28] ; 7f24 <_Thread_Restart+0x70> 7f04: e5932000 ldr r2, [r3] 7f08: e1540002 cmp r4, r2 7f0c: 13a00001 movne r0, #1 ; 0x1 7f10: 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 ); 7f14: e28400d0 add r0, r4, #208 ; 0xd0 7f18: eb00032e bl 8bd8 <_CPU_Context_restore> 7f1c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 7f20: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7f24: 00019624 .word 0x00019624 00008cb8 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 8cb8: e92d0030 push {r4, r5} 8cbc: e20110ff and r1, r1, #255 ; 0xff 8cc0: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8cc4: e10f5000 mrs r5, CPSR 8cc8: e38530c0 orr r3, r5, #192 ; 0xc0 8ccc: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 8cd0: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; 8cd4: 13a03000 movne r3, #0 ; 0x0 8cd8: 15803070 strne r3, [r0, #112] ISR_Level level; States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) 8cdc: 1a000006 bne 8cfc <_Thread_Resume+0x44> the_thread->suspend_count = 0; else the_thread->suspend_count--; 8ce0: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED 8ce4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8ce8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; else the_thread->suspend_count--; 8cec: e5803070 str r3, [r0, #112] <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 8cf0: 0a000001 beq 8cfc <_Thread_Resume+0x44> <== NOT EXECUTED _ISR_Enable( level ); 8cf4: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 8cf8: ea000003 b 8d0c <_Thread_Resume+0x54> <== NOT EXECUTED return; } current_state = the_thread->current_state; 8cfc: e5943010 ldr r3, [r4, #16] if ( current_state & STATES_SUSPENDED ) { 8d00: e3130002 tst r3, #2 ; 0x2 8d04: 1a000002 bne 8d14 <_Thread_Resume+0x5c> _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 8d08: e129f005 msr CPSR_fc, r5 } 8d0c: e8bd0030 pop {r4, r5} 8d10: e12fff1e bx lr 8d14: 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 ) ) { 8d18: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 8d1c: e5843010 str r3, [r4, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8d20: 1afffff8 bne 8d08 <_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; 8d24: e5940090 ldr r0, [r4, #144] 8d28: e1d429b6 ldrh r2, [r4, #150] 8d2c: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 8d30: e594108c ldr r1, [r4, #140] 8d34: e1833002 orr r3, r3, r2 8d38: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 8d3c: e59fc07c ldr ip, [pc, #124] ; 8dc0 <_Thread_Resume+0x108> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 8d40: e2813004 add r3, r1, #4 ; 0x4 8d44: e5843000 str r3, [r4] 8d48: e1dc20b0 ldrh r2, [ip] 8d4c: e1d439b4 ldrh r3, [r4, #148] old_last_node = the_chain->last; 8d50: e5910008 ldr r0, [r1, #8] 8d54: e1822003 orr r2, r2, r3 the_chain->last = the_node; 8d58: e5814008 str r4, [r1, #8] 8d5c: e1cc20b0 strh r2, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 8d60: 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; 8d64: e5804000 str r4, [r0] _ISR_Flash( level ); 8d68: e10f3000 mrs r3, CPSR 8d6c: e129f005 msr CPSR_fc, r5 8d70: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 8d74: e59fc048 ldr ip, [pc, #72] ; 8dc4 <_Thread_Resume+0x10c> 8d78: e59c3000 ldr r3, [ip] 8d7c: e5940014 ldr r0, [r4, #20] 8d80: e5932014 ldr r2, [r3, #20] 8d84: e1500002 cmp r0, r2 8d88: 2affffde bcs 8d08 <_Thread_Resume+0x50> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8d8c: e59f3034 ldr r3, [pc, #52] ; 8dc8 <_Thread_Resume+0x110> 8d90: e5932000 ldr r2, [r3] 8d94: e5d21076 ldrb r1, [r2, #118] 8d98: e3510000 cmp r1, #0 ; 0x0 _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; 8d9c: e58c4000 str r4, [ip] if ( _Thread_Executing->is_preemptible || 8da0: 0a000003 beq 8db4 <_Thread_Resume+0xfc> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 8da4: e59f3020 ldr r3, [pc, #32] ; 8dcc <_Thread_Resume+0x114> 8da8: e3a02001 mov r2, #1 ; 0x1 8dac: e5c32000 strb r2, [r3] 8db0: eaffffd4 b 8d08 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 8db4: e3500000 cmp r0, #0 ; 0x0 8db8: 1affffd2 bne 8d08 <_Thread_Resume+0x50> 8dbc: eafffff8 b 8da4 <_Thread_Resume+0xec> <== NOT EXECUTED 8dc0: 00022438 .word 0x00022438 8dc4: 00022410 .word 0x00022410 8dc8: 00022444 .word 0x00022444 8dcc: 00022454 .word 0x00022454 0000742c <_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 ) { 742c: e59f3070 ldr r3, [pc, #112] ; 74a4 <_Thread_Stack_Allocate+0x78> 7430: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 7434: e59f306c ldr r3, [pc, #108] ; 74a8 <_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 ) { 7438: e592c020 ldr ip, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 743c: e5932000 ldr r2, [r3] 7440: e92d4030 push {r4, r5, lr} 7444: e1510002 cmp r1, r2 7448: 21a04001 movcs r4, r1 744c: 31a04002 movcc r4, 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 ) { 7450: e35c0000 cmp ip, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 7454: 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 ) { 7458: 0a000008 beq 7480 <_Thread_Stack_Allocate+0x54> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 745c: e1a00004 mov r0, r4 <== NOT EXECUTED 7460: e1a0e00f mov lr, pc <== NOT EXECUTED 7464: e12fff1c bx ip <== NOT EXECUTED 7468: e1a03000 mov r3, r0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 746c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 7470: 11a00004 movne r0, r4 <== NOT EXECUTED 7474: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 7478: e58530cc str r3, [r5, #204] <== NOT EXECUTED return the_stack_size; } 747c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 7480: 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 ); 7484: e1a00004 mov r0, r4 7488: eb000231 bl 7d54 <_Workspace_Allocate> 748c: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 7490: e3530000 cmp r3, #0 ; 0x0 7494: 11a00004 movne r0, r4 7498: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 749c: e58530cc str r3, [r5, #204] return the_stack_size; } 74a0: e8bd8030 pop {r4, r5, pc} 74a4: 000160dc .word 0x000160dc 74a8: 000144ec .word 0x000144ec 000074ac <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 74ac: e5d030c0 ldrb r3, [r0, #192] 74b0: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 74b4: 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 ) 74b8: 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 ) 74bc: e59f3028 ldr r3, [pc, #40] ; 74ec <_Thread_Stack_Free+0x40> 74c0: e5932000 ldr r2, [r3] 74c4: e5923024 ldr r3, [r2, #36] 74c8: e3530000 cmp r3, #0 ; 0x0 74cc: 0a000003 beq 74e0 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 74d0: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 74d4: e1a0e00f mov lr, pc <== NOT EXECUTED 74d8: e12fff13 bx r3 <== NOT EXECUTED 74dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 74e0: e59000c8 ldr r0, [r0, #200] } 74e4: 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 ); 74e8: ea000215 b 7d44 <_Workspace_Free> 74ec: 000160dc .word 0x000160dc 00007588 <_Thread_Tickle_timeslice>: void _Thread_Tickle_timeslice( void ) { Thread_Control *executing; executing = _Thread_Executing; 7588: e59f3084 ldr r3, [pc, #132] ; 7614 <_Thread_Tickle_timeslice+0x8c> * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 758c: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; 7590: e5934000 ldr r4, [r3] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 7594: e5d42076 ldrb r2, [r4, #118] 7598: e3520000 cmp r2, #0 ; 0x0 759c: 08bd8010 popeq {r4, pc} return; if ( !_States_Is_ready( executing->current_state ) ) 75a0: e5943010 ldr r3, [r4, #16] 75a4: e3530000 cmp r3, #0 ; 0x0 75a8: 18bd8010 popne {r4, pc} /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 75ac: e594307c ldr r3, [r4, #124] 75b0: e3530001 cmp r3, #1 ; 0x1 75b4: 38bd8010 popcc {r4, pc} 75b8: e3530002 cmp r3, #2 ; 0x2 75bc: 9a00000a bls 75ec <_Thread_Tickle_timeslice+0x64> 75c0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 75c4: 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 ) 75c8: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 75cc: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 75d0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 75d4: e5843078 str r3, [r4, #120] <== NOT EXECUTED 75d8: 18bd8010 popne {r4, pc} <== NOT EXECUTED (*executing->budget_callout)( executing ); 75dc: e1a00004 mov r0, r4 <== NOT EXECUTED 75e0: e1a0e00f mov lr, pc <== NOT EXECUTED 75e4: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED 75e8: 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 ) { 75ec: e5943078 ldr r3, [r4, #120] 75f0: e2433001 sub r3, r3, #1 ; 0x1 75f4: e3530000 cmp r3, #0 ; 0x0 75f8: e5843078 str r3, [r4, #120] 75fc: c8bd8010 popgt {r4, pc} _Thread_Reset_timeslice(); 7600: eb000c6b bl a7b4 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 7604: e59f300c ldr r3, [pc, #12] ; 7618 <_Thread_Tickle_timeslice+0x90> 7608: e5932000 ldr r2, [r3] 760c: e5842078 str r2, [r4, #120] 7610: e8bd8010 pop {r4, pc} 7614: 00016104 .word 0x00016104 7618: 00016004 .word 0x00016004 00006210 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6210: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 6214: e92d4010 push {r4, lr} <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6218: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 621c: e1a04001 mov r4, r1 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 6220: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED 6224: e5841044 str r1, [r4, #68] <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 6228: 0a000006 beq 6248 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 622c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 6230: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED 6234: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED 6238: e1a00004 mov r0, r4 <== NOT EXECUTED 623c: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 6240: e8bd4010 pop {r4, lr} <== NOT EXECUTED 6244: ea000070 b 640c <_Thread_Clear_state> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 6248: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 624c: e5843050 str r3, [r4, #80] <== NOT EXECUTED * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 6250: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 6254: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 6258: eb000667 bl 7bfc <_Watchdog_Remove> <== NOT EXECUTED 625c: eafffff3 b 6230 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED 00006df4 <_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 ) { 6df4: 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); 6df8: 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; 6dfc: 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 ) { 6e00: e1a07001 mov r7, r1 6e04: e1a08000 mov r8, r0 6e08: e5813038 str r3, [r1, #56] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 6e0c: 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; 6e10: 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 ) ) 6e14: e3140020 tst r4, #32 ; 0x20 6e18: 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); 6e1c: 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 ) { 6e20: 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; 6e24: 11a02201 lslne r2, r1, #4 6e28: 10423101 subne r3, r2, r1, lsl #2 6e2c: 10882003 addne r2, r8, r3 the_chain->last = _Chain_Head(the_chain); 6e30: 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; 6e34: e5986038 ldr r6, [r8, #56] 6e38: 159f91d4 ldrne r9, [pc, #468] ; 7014 <_Thread_queue_Enqueue_priority+0x220> restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 6e3c: 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 ) ) 6e40: 1a000028 bne 6ee8 <_Thread_queue_Enqueue_priority+0xf4> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6e44: e1a03081 lsl r3, r1, #1 6e48: e0833001 add r3, r3, r1 6e4c: e2833001 add r3, r3, #1 ; 0x1 6e50: 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; 6e54: e0422101 sub r2, r2, r1, lsl #2 6e58: e1a03103 lsl r3, r3, #2 6e5c: e0880003 add r0, r8, r3 6e60: 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 ); 6e64: e10f5000 mrs r5, CPSR 6e68: e38530c0 orr r3, r5, #192 ; 0xc0 6e6c: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 6e70: e5921000 ldr r1, [r2] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 6e74: e1510000 cmp r1, r0 6e78: 1a00000f bne 6ebc <_Thread_queue_Enqueue_priority+0xc8> 6e7c: ea000061 b 7008 <_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; 6e80: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 6e84: e1510000 cmp r1, r0 6e88: 0a00000e beq 6ec8 <_Thread_queue_Enqueue_priority+0xd4> break; search_priority = search_thread->current_priority; 6e8c: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6e90: e154000c cmp r4, ip 6e94: 9a00000b bls 6ec8 <_Thread_queue_Enqueue_priority+0xd4> break; #endif _ISR_Flash( level ); 6e98: e10f3000 mrs r3, CPSR 6e9c: e129f005 msr CPSR_fc, r5 6ea0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6ea4: e5913010 ldr r3, [r1, #16] 6ea8: e1160003 tst r6, r3 6eac: 0a000049 beq 6fd8 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Enable( level ); goto restart_forward_search; } search_thread = 6eb0: 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 ) ) { 6eb4: e1510000 cmp r1, r0 6eb8: 0a000002 beq 6ec8 <_Thread_queue_Enqueue_priority+0xd4> search_priority = search_thread->current_priority; 6ebc: e591c014 ldr ip, [r1, #20] if ( priority <= search_priority ) 6ec0: e154000c cmp r4, ip 6ec4: 8affffed bhi 6e80 <_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 ) ) { 6ec8: e1a06005 mov r6, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6ecc: e5980030 ldr r0, [r8, #48] 6ed0: e3500001 cmp r0, #1 ; 0x1 6ed4: 0a000034 beq 6fac <_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; 6ed8: e58a6000 str r6, [sl] <== NOT EXECUTED return the_thread_queue->sync_state; } 6edc: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} 6ee0: 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 ); 6ee4: 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; 6ee8: e5d93000 ldrb r3, [r9] 6eec: e283c001 add ip, r3, #1 ; 0x1 _ISR_Disable( level ); 6ef0: e10f5000 mrs r5, CPSR 6ef4: e38530c0 orr r3, r5, #192 ; 0xc0 6ef8: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 6efc: e5901000 ldr r1, [r0] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6f00: e1520001 cmp r2, r1 6f04: 0a000018 beq 6f6c <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6f08: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f0c: e154000c cmp r4, ip 6f10: 2a000015 bcs 6f6c <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6f14: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6f18: e1520001 cmp r2, r1 6f1c: 1a00000f bne 6f60 <_Thread_queue_Enqueue_priority+0x16c> 6f20: ea000011 b 6f6c <_Thread_queue_Enqueue_priority+0x178> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 6f24: e10f3000 mrs r3, CPSR 6f28: e129f005 msr CPSR_fc, r5 6f2c: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 6f30: e5913010 ldr r3, [r1, #16] 6f34: e1160003 tst r6, r3 6f38: 0affffe9 beq 6ee4 <_Thread_queue_Enqueue_priority+0xf0> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6f3c: 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 ) ) { 6f40: e1510002 cmp r1, r2 6f44: 0a000008 beq 6f6c <_Thread_queue_Enqueue_priority+0x178> search_priority = search_thread->current_priority; 6f48: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f4c: e154000c cmp r4, ip 6f50: 2a000005 bcs 6f6c <_Thread_queue_Enqueue_priority+0x178> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 6f54: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 6f58: e1510002 cmp r1, r2 <== NOT EXECUTED 6f5c: 0a000002 beq 6f6c <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED break; search_priority = search_thread->current_priority; 6f60: e591c014 ldr ip, [r1, #20] if ( priority >= search_priority ) 6f64: e154000c cmp r4, ip 6f68: 3affffed bcc 6f24 <_Thread_queue_Enqueue_priority+0x130> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6f6c: e5980030 ldr r0, [r8, #48] 6f70: e3500001 cmp r0, #1 ; 0x1 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 ) ) { 6f74: e1a06005 mov r6, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6f78: 1affffd6 bne 6ed8 <_Thread_queue_Enqueue_priority+0xe4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6f7c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6f80: 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; 6f84: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 6f88: 0a000014 beq 6fe0 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6f8c: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6f90: 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; 6f94: 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; 6f98: 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; 6f9c: e5817000 str r7, [r1] next_node->previous = the_node; 6fa0: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6fa4: e129f005 msr CPSR_fc, r5 6fa8: eaffffcb b 6edc <_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; 6fac: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6fb0: 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; 6fb4: e5883030 str r3, [r8, #48] if ( priority == search_priority ) 6fb8: 0a000008 beq 6fe0 <_Thread_queue_Enqueue_priority+0x1ec> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 6fbc: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6fc0: 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; 6fc4: 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; 6fc8: e5837000 str r7, [r3] search_node->previous = the_node; 6fcc: e5817004 str r7, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6fd0: e129f005 msr CPSR_fc, r5 6fd4: eaffffc0 b 6edc <_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 ); 6fd8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6fdc: eaffffa0 b 6e64 <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED 6fe0: 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; 6fe4: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6fe8: e5873000 str r3, [r7] the_node->previous = previous_node; 6fec: e5872004 str r2, [r7, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6ff0: 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; 6ff4: e5827000 str r7, [r2] search_node->previous = the_node; 6ff8: e5837004 str r7, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6ffc: e129f006 msr CPSR_fc, r6 7000: e3a00001 mov r0, #1 ; 0x1 7004: eaffffb4 b 6edc <_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 ) ) { 7008: e1a06005 mov r6, r5 700c: e3e0c000 mvn ip, #0 ; 0x0 7010: eaffffad b 6ecc <_Thread_queue_Enqueue_priority+0xd8> 7014: 000144f0 .word 0x000144f0 0000b208 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { b208: e92d4010 push {r4, lr} b20c: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); b210: e10f0000 mrs r0, CPSR b214: e38030c0 orr r3, r0, #192 ; 0xc0 b218: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { b21c: e5913010 ldr r3, [r1, #16] b220: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 b224: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 b228: e3c33c41 bic r3, r3, #16640 ; 0x4100 b22c: e3c3301f bic r3, r3, #31 ; 0x1f b230: e3530000 cmp r3, #0 ; 0x0 b234: 0a00000f beq b278 <_Thread_queue_Extract_fifo+0x70> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b238: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; b23c: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; b240: e5911000 ldr r1, [r1] b244: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; b248: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; b24c: e5821000 str r1, [r2] b250: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; b254: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { b258: 0a000008 beq b280 <_Thread_queue_Extract_fifo+0x78> _ISR_Enable( level ); b25c: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); b260: e3a01201 mov r1, #268435456 ; 0x10000000 b264: e2811bff add r1, r1, #261120 ; 0x3fc00 b268: e1a00004 mov r0, r4 b26c: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } b270: e8bd4010 pop {r4, lr} b274: eaffec64 b 640c <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); b278: 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 } b27c: e8bd8010 pop {r4, pc} <== NOT EXECUTED b280: e3a03003 mov r3, #3 ; 0x3 b284: e5843050 str r3, [r4, #80] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); b288: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); b28c: e2840048 add r0, r4, #72 ; 0x48 b290: ebfff259 bl 7bfc <_Watchdog_Remove> b294: eafffff1 b b260 <_Thread_queue_Extract_fifo+0x58> 0000a570 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { a570: e92d4070 push {r4, r5, r6, lr} a574: e1a04001 mov r4, r1 a578: 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 ); a57c: e10fc000 mrs ip, CPSR a580: e38c30c0 orr r3, ip, #192 ; 0xc0 a584: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a588: e5913010 ldr r3, [r1, #16] a58c: e3c334ff bic r3, r3, #-16777216 ; 0xff000000 a590: e3c3373f bic r3, r3, #16515072 ; 0xfc0000 a594: e3c33c41 bic r3, r3, #16640 ; 0x4100 a598: e3c3301f bic r3, r3, #31 ; 0x1f a59c: e3530000 cmp r3, #0 ; 0x0 a5a0: 0a000023 beq a634 <_Thread_queue_Extract_priority_helper+0xc4> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a5a4: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a5a8: e284303c add r3, r4, #60 ; 0x3c a5ac: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a5b0: 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; a5b4: 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; a5b8: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a5bc: 0a00000e beq a5fc <_Thread_queue_Extract_priority_helper+0x8c> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; a5c0: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; a5c4: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; a5c8: 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; a5cc: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a5d0: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a5d4: e5942038 ldr r2, [r4, #56] a5d8: e5943040 ldr r3, [r4, #64] a5dc: e1520003 cmp r2, r3 a5e0: 0a000005 beq a5fc <_Thread_queue_Extract_priority_helper+0x8c> 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 ); a5e4: 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 = a5e8: e2813038 add r3, r1, #56 ; 0x38 a5ec: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a5f0: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; a5f4: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a5f8: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a5fc: e3560000 cmp r6, #0 ; 0x0 a600: 1a000009 bne a62c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a604: e5943050 ldr r3, [r4, #80] a608: e3530002 cmp r3, #2 ; 0x2 a60c: 0a00000a beq a63c <_Thread_queue_Extract_priority_helper+0xcc> _ISR_Enable( level ); a610: e129f00c msr CPSR_fc, ip a614: e3a01201 mov r1, #268435456 ; 0x10000000 a618: e2811bff add r1, r1, #261120 ; 0x3fc00 a61c: e1a00004 mov r0, r4 a620: e2811ffe add r1, r1, #1016 ; 0x3f8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a624: e8bd4070 pop {r4, r5, r6, lr} a628: eaffef77 b 640c <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); a62c: e129f00c msr CPSR_fc, ip a630: 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 ); a634: e129f00c msr CPSR_fc, ip <== NOT EXECUTED a638: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED a63c: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED a640: 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 ); a644: e129f00c msr CPSR_fc, ip <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); a648: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a64c: ebfff56a bl 7bfc <_Watchdog_Remove> <== NOT EXECUTED a650: eaffffef b a614 <_Thread_queue_Extract_priority_helper+0xa4> <== NOT EXECUTED 0000a654 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { a654: e1a01000 mov r1, r0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; a658: e5900044 ldr r0, [r0, #68] * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && a65c: e590c030 ldr ip, [r0, #48] a660: e35c0000 cmp ip, #0 ; 0x0 a664: 0a000003 beq a678 <_Thread_queue_Process_timeout+0x24> a668: e59f302c ldr r3, [pc, #44] ; a69c <_Thread_queue_Process_timeout+0x48> <== NOT EXECUTED a66c: e5932000 ldr r2, [r3] <== NOT EXECUTED a670: e1510002 cmp r1, r2 <== NOT EXECUTED a674: 0a000002 beq a684 <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a678: e590303c ldr r3, [r0, #60] a67c: e5813034 str r3, [r1, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a680: eaffffb4 b a558 <_Thread_queue_Extract> * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { a684: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a688: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a68c: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a690: 15813034 strne r3, [r1, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a694: 15802030 strne r2, [r0, #48] <== NOT EXECUTED a698: e12fff1e bx lr <== NOT EXECUTED a69c: 00016104 .word 0x00016104 00012bfc <_Timer_Server_body>: * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12bfc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c00: e59f01cc ldr r0, [pc, #460] ; 12dd4 <_Timer_Server_body+0x1d8> 12c04: e59f81cc ldr r8, [pc, #460] ; 12dd8 <_Timer_Server_body+0x1dc> 12c08: e5902000 ldr r2, [r0] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c0c: e59f01c8 ldr r0, [pc, #456] ; 12ddc <_Timer_Server_body+0x1e0> 12c10: e5983000 ldr r3, [r8] * @param[in] ignored is the the task argument that is ignored */ Thread _Timer_Server_body( uint32_t ignored ) { 12c14: e24dd00c sub sp, sp, #12 ; 0xc /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c18: e59f91c0 ldr r9, [pc, #448] ; 12de0 <_Timer_Server_body+0x1e4> _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c1c: e59fb1c0 ldr fp, [pc, #448] ; 12de4 <_Timer_Server_body+0x1e8> 12c20: e5901000 ldr r1, [r0] 12c24: e2833001 add r3, r3, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c28: e28d5004 add r5, sp, #4 ; 0x4 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 12c2c: e3a04000 mov r4, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 12c30: e1a0600d mov r6, sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 12c34: e5892000 str r2, [r9] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 12c38: e58b1000 str r1, [fp] 12c3c: e5883000 str r3, [r8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12c40: e58d5000 str r5, [sp] the_chain->permanent_null = NULL; 12c44: e98d2010 stmib sp, {r4, sp} /* * Insert the timers that were inserted before we got to run. * This should be done with dispatching disabled. */ _Thread_Disable_dispatch(); _Timer_Server_process_insertions(); 12c48: ebffffce bl 12b88 <_Timer_Server_process_insertions> _Thread_Enable_dispatch(); 12c4c: eb000b48 bl 15974 <_Thread_Enable_dispatch> 12c50: e59fa190 ldr sl, [pc, #400] ; 12de8 <_Timer_Server_body+0x1ec> if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12c54: e1a07004 mov r7, r4 12c58: e5983000 ldr r3, [r8] 12c5c: e2833001 add r3, r3, #1 ; 0x1 12c60: e5883000 str r3, [r8] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 12c64: e3a01008 mov r1, #8 ; 0x8 12c68: e59a0000 ldr r0, [sl] 12c6c: eb000e27 bl 16510 <_Thread_Set_state> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12c70: e59f2174 ldr r2, [pc, #372] ; 12dec <_Timer_Server_body+0x1f0> _Timer_Server_reset_ticks_timer(); 12c74: e59f0174 ldr r0, [pc, #372] ; 12df0 <_Timer_Server_body+0x1f4> 12c78: e5923000 ldr r3, [r2] 12c7c: e1530000 cmp r3, r0 12c80: 0a000006 beq 12ca0 <_Timer_Server_body+0xa4> 12c84: e59f215c ldr r2, [pc, #348] ; 12de8 <_Timer_Server_body+0x1ec> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c88: e5933010 ldr r3, [r3, #16] 12c8c: e5921000 ldr r1, [r2] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c90: e59f015c ldr r0, [pc, #348] ; 12df4 <_Timer_Server_body+0x1f8> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12c94: e5813054 str r3, [r1, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12c98: e2811048 add r1, r1, #72 ; 0x48 12c9c: eb0010ff bl 170a0 <_Watchdog_Insert> 12ca0: e59f0150 ldr r0, [pc, #336] ; 12df8 <_Timer_Server_body+0x1fc> _Timer_Server_reset_seconds_timer(); 12ca4: e59f2150 ldr r2, [pc, #336] ; 12dfc <_Timer_Server_body+0x200> 12ca8: e5903000 ldr r3, [r0] 12cac: e1530002 cmp r3, r2 12cb0: 0a000004 beq 12cc8 <_Timer_Server_body+0xcc> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cb4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cb8: e59f1140 ldr r1, [pc, #320] ; 12e00 <_Timer_Server_body+0x204> <== NOT EXECUTED 12cbc: e59f0140 ldr r0, [pc, #320] ; 12e04 <_Timer_Server_body+0x208> <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12cc0: e581300c str r3, [r1, #12] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 12cc4: eb0010f5 bl 170a0 <_Watchdog_Insert> <== NOT EXECUTED _Thread_Enable_dispatch(); 12cc8: eb000b29 bl 15974 <_Thread_Enable_dispatch> 12ccc: e5983000 ldr r3, [r8] 12cd0: e2833001 add r3, r3, #1 ; 0x1 12cd4: e5883000 str r3, [r8] /* * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 12cd8: e59a0000 ldr r0, [sl] 12cdc: e2800048 add r0, r0, #72 ; 0x48 12ce0: eb00115d bl 1725c <_Watchdog_Remove> _Timer_Server_stop_seconds_timer(); 12ce4: e59f0114 ldr r0, [pc, #276] ; 12e00 <_Timer_Server_body+0x204> 12ce8: eb00115b bl 1725c <_Watchdog_Remove> ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cec: e59f30e0 ldr r3, [pc, #224] ; 12dd4 <_Timer_Server_body+0x1d8> if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf0: e5991000 ldr r1, [r9] ) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 12cf4: e593c000 ldr ip, [r3] if ( snapshot >= _Timer_Server_ticks_last_time ) 12cf8: e15c0001 cmp ip, r1 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12cfc: 31e03001 mvncc r3, r1 Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; 12d00: 2061100c rsbcs r1, r1, ip else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 12d04: 3083100c addcc r1, r3, ip _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d08: e59f00dc ldr r0, [pc, #220] ; 12dec <_Timer_Server_body+0x1f0> 12d0c: e1a0200d mov r2, sp if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 12d10: e589c000 str ip, [r9] _Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire ); 12d14: eb0010b3 bl 16fe8 <_Watchdog_Adjust_to_chain> /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d18: e59f00bc ldr r0, [pc, #188] ; 12ddc <_Timer_Server_body+0x1e0> if ( snapshot > _Timer_Server_seconds_last_time ) { 12d1c: e59b2000 ldr r2, [fp] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the _Timer_Seconds_chain to indicate this. */ snapshot = _TOD_Seconds_since_epoch; 12d20: e5904000 ldr r4, [r0] if ( snapshot > _Timer_Server_seconds_last_time ) { 12d24: e1540002 cmp r4, r2 12d28: 8a00001f bhi 12dac <_Timer_Server_body+0x1b0> * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); } else if ( snapshot < _Timer_Server_seconds_last_time ) { 12d2c: 3a000023 bcc 12dc0 <_Timer_Server_body+0x1c4> * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); } _Timer_Server_seconds_last_time = snapshot; 12d30: e58b4000 str r4, [fp] _Timer_Server_process_seconds_chain( &to_fire ); /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12d34: ebffff93 bl 12b88 <_Timer_Server_process_insertions> /* * Enable dispatching to process the set that are ready "to fire." */ _Thread_Enable_dispatch(); 12d38: eb000b0d bl 15974 <_Thread_Enable_dispatch> */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d3c: e10f1000 mrs r1, CPSR 12d40: e38130c0 orr r3, r1, #192 ; 0xc0 12d44: e129f003 msr CPSR_fc, r3 12d48: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d4c: e1550002 cmp r5, r2 12d50: 0a000013 beq 12da4 <_Timer_Server_body+0x1a8> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d54: e5923000 ldr r3, [r2] the_chain->first = new_first; 12d58: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); 12d5c: e5836004 str r6, [r3, #4] 12d60: ea000002 b 12d70 <_Timer_Server_body+0x174> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 12d64: e5933000 ldr r3, [r3] <== NOT EXECUTED the_chain->first = new_first; 12d68: e58d3000 str r3, [sp] <== NOT EXECUTED new_first->previous = _Chain_Head(the_chain); 12d6c: e5836004 str r6, [r3, #4] <== NOT EXECUTED if ( watch == NULL ) { _ISR_Enable( level ); break; } watch->state = WATCHDOG_INACTIVE; 12d70: e5827008 str r7, [r2, #8] _ISR_Enable( level ); 12d74: e129f001 msr CPSR_fc, r1 (*watch->routine)( watch->id, watch->user_data ); 12d78: e2820020 add r0, r2, #32 ; 0x20 12d7c: e8900003 ldm r0, {r0, r1} 12d80: e1a0e00f mov lr, pc 12d84: e592f01c ldr pc, [r2, #28] */ while (1) { Watchdog_Control *watch; ISR_Level level; _ISR_Disable( level ); 12d88: e10f1000 mrs r1, CPSR 12d8c: e38130c0 orr r3, r1, #192 ; 0xc0 12d90: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 12d94: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 12d98: e1550003 cmp r5, r3 watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire ); 12d9c: e1a02003 mov r2, r3 12da0: 1affffef bne 12d64 <_Timer_Server_body+0x168> if ( watch == NULL ) { _ISR_Enable( level ); 12da4: e129f001 msr CPSR_fc, r1 12da8: eaffffaa b 12c58 <_Timer_Server_body+0x5c> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ ticks = snapshot - _Timer_Server_seconds_last_time; _Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire ); 12dac: e0621004 rsb r1, r2, r4 12db0: e59f0040 ldr r0, [pc, #64] ; 12df8 <_Timer_Server_body+0x1fc> 12db4: e1a0200d mov r2, sp 12db8: eb00108a bl 16fe8 <_Watchdog_Adjust_to_chain> 12dbc: eaffffdb b 12d30 <_Timer_Server_body+0x134> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ ticks = _Timer_Server_seconds_last_time - snapshot; _Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks ); 12dc0: e0642002 rsb r2, r4, r2 <== NOT EXECUTED 12dc4: e59f002c ldr r0, [pc, #44] ; 12df8 <_Timer_Server_body+0x1fc> <== NOT EXECUTED 12dc8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 12dcc: eb001056 bl 16f2c <_Watchdog_Adjust> <== NOT EXECUTED 12dd0: eaffffd6 b 12d30 <_Timer_Server_body+0x134> <== NOT EXECUTED 12dd4: 000314e4 .word 0x000314e4 12dd8: 0003138c .word 0x0003138c 12ddc: 00031414 .word 0x00031414 12de0: 000312e4 .word 0x000312e4 12de4: 000312e0 .word 0x000312e0 12de8: 00031674 .word 0x00031674 12dec: 000312d4 .word 0x000312d4 12df0: 000312d8 .word 0x000312d8 12df4: 00031464 .word 0x00031464 12df8: 000312e8 .word 0x000312e8 12dfc: 000312ec .word 0x000312ec 12e00: 00031300 .word 0x00031300 12e04: 00031458 .word 0x00031458 00012b88 <_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) { 12b88: e52de004 push {lr} ; (str lr, [sp, #-4]!) Timer_Control *the_timer; while ( 1 ) { the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted ); 12b8c: e59f005c ldr r0, [pc, #92] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12b90: eb000283 bl 135a4 <_Chain_Get> if ( the_timer == NULL ) 12b94: e3500000 cmp r0, #0 ; 0x0 12b98: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) break; if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 12b9c: e5903038 ldr r3, [r0, #56] 12ba0: e3530001 cmp r3, #1 ; 0x1 12ba4: 0a00000c beq 12bdc <_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 ) { 12ba8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 12bac: 0a000005 beq 12bc8 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bb0: ebfffff4 bl 12b88 <_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 ); 12bb4: e59f0034 ldr r0, [pc, #52] ; 12bf0 <_Timer_Server_process_insertions+0x68> 12bb8: eb000279 bl 135a4 <_Chain_Get> if ( the_timer == NULL ) 12bbc: e3500000 cmp r0, #0 ; 0x0 12bc0: 1afffff5 bne 12b9c <_Timer_Server_process_insertions+0x14> 12bc4: 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 ); 12bc8: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED 12bcc: e59f0020 ldr r0, [pc, #32] ; 12bf4 <_Timer_Server_process_insertions+0x6c> <== NOT EXECUTED 12bd0: eb001132 bl 170a0 <_Watchdog_Insert> <== NOT EXECUTED } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12bd4: ebffffeb bl 12b88 <_Timer_Server_process_insertions> <== NOT EXECUTED 12bd8: eafffff5 b 12bb4 <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED 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 ); 12bdc: e2801010 add r1, r0, #16 ; 0x10 12be0: e59f0010 ldr r0, [pc, #16] ; 12bf8 <_Timer_Server_process_insertions+0x70> 12be4: eb00112d bl 170a0 <_Watchdog_Insert> } /* * Insert the timers that have been requested to be inserted. */ _Timer_Server_process_insertions(); 12be8: ebffffe6 bl 12b88 <_Timer_Server_process_insertions> 12bec: eafffff0 b 12bb4 <_Timer_Server_process_insertions+0x2c> 12bf0: 000312f4 .word 0x000312f4 12bf4: 000312e8 .word 0x000312e8 12bf8: 000312d4 .word 0x000312d4 00022138 <_Timespec_Divide_by_integer>: void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 22138: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; t *= TOD_NANOSECONDS_PER_SECOND; 2213c: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 22140: e5907000 ldr r7, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22144: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED 22148: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 2214c: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 22150: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED 22154: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED t += time->tv_nsec; 22158: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED 2215c: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22160: e0950003 adds r0, r5, r3 <== NOT EXECUTED 22164: e1a07001 mov r7, r1 <== NOT EXECUTED 22168: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 2216c: e1a0a002 mov sl, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22170: e0a61004 adc r1, r6, r4 <== NOT EXECUTED 22174: e1a02007 mov r2, r7 <== NOT EXECUTED 22178: e1a03008 mov r3, r8 <== NOT EXECUTED 2217c: eb006d93 bl 3d7d0 <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22180: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 22184: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED 22188: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 2218c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 22190: e1a04000 mov r4, r0 <== NOT EXECUTED 22194: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 22198: eb006d8c bl 3d7d0 <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 2219c: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED 221a0: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 221a4: e58a0000 str r0, [sl] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 221a8: e1a01005 mov r1, r5 <== NOT EXECUTED 221ac: e1a00004 mov r0, r4 <== NOT EXECUTED 221b0: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED 221b4: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 221b8: eb006ecc bl 3dcf0 <__umoddi3> <== NOT EXECUTED 221bc: e58a0004 str r0, [sl, #4] <== NOT EXECUTED } 221c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00012b3c <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 12b3c: e59f3040 ldr r3, [pc, #64] ; 12b84 <_Timespec_From_ticks+0x48> <== NOT EXECUTED 12b40: e5932000 ldr r2, [r3] <== NOT EXECUTED 12b44: e00c0092 mul ip, r2, r0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 12b48: e59f3038 ldr r3, [pc, #56] ; 12b88 <_Timespec_From_ticks+0x4c> <== NOT EXECUTED 12b4c: e0802c93 umull r2, r0, r3, ip <== NOT EXECUTED 12b50: e1a00920 lsr r0, r0, #18 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 12b54: e1a03400 lsl r3, r0, #8 <== NOT EXECUTED 12b58: e0433180 sub r3, r3, r0, lsl #3 <== NOT EXECUTED 12b5c: e1a02303 lsl r2, r3, #6 <== NOT EXECUTED 12b60: e0632002 rsb r2, r3, r2 <== NOT EXECUTED 12b64: e0822000 add r2, r2, r0 <== NOT EXECUTED 12b68: e04cc302 sub ip, ip, r2, lsl #6 <== NOT EXECUTED 12b6c: e1a0338c lsl r3, ip, #7 <== NOT EXECUTED 12b70: e043310c sub r3, r3, ip, lsl #2 <== NOT EXECUTED 12b74: e083300c add r3, r3, ip <== NOT EXECUTED 12b78: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED 12b7c: e8810009 stm r1, {r0, r3} <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 12b80: e12fff1e bx lr <== NOT EXECUTED 12b84: 00025f70 .word 0x00025f70 12b88: 431bde83 .word 0x431bde83 00012b8c <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 12b8c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 12b90: 0a00000c beq 12bc8 <_Timespec_Is_valid+0x3c> <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 12b94: e5903000 ldr r3, [r0] <== NOT EXECUTED 12b98: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12b9c: ba000009 blt 12bc8 <_Timespec_Is_valid+0x3c> <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 12ba0: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 12ba4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 12ba8: ba000006 blt 12bc8 <_Timespec_Is_valid+0x3c> <== NOT EXECUTED 12bac: e3e03331 mvn r3, #-1006632960 ; 0xc4000000 <== NOT EXECUTED 12bb0: e2433865 sub r3, r3, #6619136 ; 0x650000 <== NOT EXECUTED 12bb4: e2433c36 sub r3, r3, #13824 ; 0x3600 <== NOT EXECUTED 12bb8: e1500003 cmp r0, r3 <== NOT EXECUTED 12bbc: 83a00000 movhi r0, #0 ; 0x0 <== NOT EXECUTED 12bc0: 93a00001 movls r0, #1 ; 0x1 <== NOT EXECUTED 12bc4: e12fff1e bx lr <== NOT EXECUTED 12bc8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 12bcc: e12fff1e bx lr <== NOT EXECUTED 00012bd0 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 12bd0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 12bd4: e5906000 ldr r6, [r0] <== NOT EXECUTED 12bd8: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 12bdc: 15904004 ldrne r4, [r0, #4] <== NOT EXECUTED 12be0: 1a000003 bne 12bf4 <_Timespec_To_ticks+0x24> <== NOT EXECUTED 12be4: e5904004 ldr r4, [r0, #4] <== NOT EXECUTED 12be8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 12bec: 01a00004 moveq r0, r4 <== NOT EXECUTED 12bf0: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 12bf4: e59f3034 ldr r3, [pc, #52] ; 12c30 <_Timespec_To_ticks+0x60> <== NOT EXECUTED 12bf8: e5935000 ldr r5, [r3] <== NOT EXECUTED 12bfc: e3a0093d mov r0, #999424 ; 0xf4000 <== NOT EXECUTED 12c00: e1a01005 mov r1, r5 <== NOT EXECUTED 12c04: e2800d09 add r0, r0, #576 ; 0x240 <== NOT EXECUTED 12c08: ebffb75b bl 97c <__aeabi_uidiv> <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 12c0c: e59f3020 ldr r3, [pc, #32] ; 12c34 <_Timespec_To_ticks+0x64> <== NOT EXECUTED 12c10: e0821493 umull r1, r2, r3, r4 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 12c14: e0040096 mul r4, r6, r0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 12c18: e1a01005 mov r1, r5 <== NOT EXECUTED 12c1c: e1a00322 lsr r0, r2, #6 <== NOT EXECUTED 12c20: ebffb755 bl 97c <__aeabi_uidiv> <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 12c24: e0900004 adds r0, r0, r4 <== NOT EXECUTED 12c28: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED return ticks; return 1; } 12c2c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 12c30: 00025f70 .word 0x00025f70 12c34: 10624dd3 .word 0x10624dd3 0000d6b0 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { d6b0: e92d4010 push {r4, lr} d6b4: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); d6b8: eb001195 bl 11d14 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) d6bc: e5943024 ldr r3, [r4, #36] d6c0: e3530000 cmp r3, #0 ; 0x0 d6c4: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); d6c8: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } d6cc: 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 ); d6d0: ea00118f b 11d14 <_Chain_Extract> <== NOT EXECUTED 000098ac <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 98ac: e92d41f0 push {r4, r5, r6, r7, r8, lr} 98b0: e1a07000 mov r7, r0 98b4: e1a04002 mov r4, r2 ISR_Level level; _ISR_Disable( level ); 98b8: e10fc000 mrs ip, CPSR 98bc: e38c30c0 orr r3, ip, #192 ; 0xc0 98c0: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 98c4: e1a06000 mov r6, r0 98c8: 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 ) ) { 98cc: e1500006 cmp r0, r6 98d0: 0a000019 beq 993c <_Watchdog_Adjust+0x90> switch ( direction ) { 98d4: e3510000 cmp r1, #0 ; 0x0 98d8: 1a000019 bne 9944 <_Watchdog_Adjust+0x98> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 98dc: e3520000 cmp r2, #0 ; 0x0 98e0: 0a000015 beq 993c <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 98e4: e5905010 ldr r5, [r0, #16] 98e8: e1520005 cmp r2, r5 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) header->first ); 98ec: e1a01000 mov r1, r0 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 98f0: 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 ) { 98f4: 2a000005 bcs 9910 <_Watchdog_Adjust+0x64> 98f8: ea000017 b 995c <_Watchdog_Adjust+0xb0> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 98fc: e0544005 subs r4, r4, r5 9900: 0a00000d beq 993c <_Watchdog_Adjust+0x90> if ( units < _Watchdog_First( header )->delta_interval ) { 9904: e5915010 ldr r5, [r1, #16] 9908: e1550004 cmp r5, r4 990c: 8a000012 bhi 995c <_Watchdog_Adjust+0xb0> _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 9910: e5818010 str r8, [r1, #16] _ISR_Enable( level ); 9914: e129f00c msr CPSR_fc, ip _Watchdog_Tickle( header ); 9918: e1a00007 mov r0, r7 991c: eb0000ab bl 9bd0 <_Watchdog_Tickle> _ISR_Disable( level ); 9920: e10fc000 mrs ip, CPSR 9924: e38c30c0 orr r3, ip, #192 ; 0xc0 9928: e129f003 msr CPSR_fc, r3 992c: e5973000 ldr r3, [r7] if ( _Chain_Is_empty( header ) ) 9930: e1560003 cmp r6, r3 9934: e1a01003 mov r1, r3 9938: 1affffef bne 98fc <_Watchdog_Adjust+0x50> } break; } } _ISR_Enable( level ); 993c: e129f00c msr CPSR_fc, ip } 9940: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 9944: e3510001 cmp r1, #1 ; 0x1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 9948: 05903010 ldreq r3, [r0, #16] 994c: 00833002 addeq r3, r3, r2 9950: 05803010 streq r3, [r0, #16] } break; } } _ISR_Enable( level ); 9954: e129f00c msr CPSR_fc, ip } 9958: 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; 995c: e0643005 rsb r3, r4, r5 9960: e5813010 str r3, [r1, #16] 9964: eafffff4 b 993c <_Watchdog_Adjust+0x90> 00007a40 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7a40: e59f3144 ldr r3, [pc, #324] ; 7b8c <_Watchdog_Insert+0x14c> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 7a44: e92d01f0 push {r4, r5, r6, r7, r8} 7a48: e1a04001 mov r4, r1 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 7a4c: e5935000 ldr r5, [r3] _ISR_Disable( level ); 7a50: e10f6000 mrs r6, CPSR 7a54: e38630c0 orr r3, r6, #192 ; 0xc0 7a58: 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 ) { 7a5c: e5913008 ldr r3, [r1, #8] 7a60: e3530000 cmp r3, #0 ; 0x0 7a64: 1a000041 bne 7b70 <_Watchdog_Insert+0x130> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7a68: e59f8120 ldr r8, [pc, #288] ; 7b90 <_Watchdog_Insert+0x150> 7a6c: e5983000 ldr r3, [r8] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7a70: e3a02001 mov r2, #1 ; 0x1 _Watchdog_Sync_count++; 7a74: e2833001 add r3, r3, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7a78: e5812008 str r2, [r1, #8] _Watchdog_Sync_count++; 7a7c: e5883000 str r3, [r8] 7a80: e59f710c ldr r7, [pc, #268] ; 7b94 <_Watchdog_Insert+0x154> restart: delta_interval = the_watchdog->initial; 7a84: e594c00c ldr ip, [r4, #12] */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7a88: e35c0000 cmp ip, #0 ; 0x0 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 7a8c: e5902000 ldr r2, [r0] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7a90: 0a000023 beq 7b24 <_Watchdog_Insert+0xe4> 7a94: e5923000 ldr r3, [r2] 7a98: e3530000 cmp r3, #0 ; 0x0 7a9c: 0a000020 beq 7b24 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7aa0: e5921010 ldr r1, [r2, #16] 7aa4: e15c0001 cmp ip, r1 7aa8: 3a000032 bcc 7b78 <_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 ); 7aac: e10f3000 mrs r3, CPSR 7ab0: e129f006 msr CPSR_fc, r6 7ab4: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7ab8: e5943008 ldr r3, [r4, #8] 7abc: e3530001 cmp r3, #1 ; 0x1 7ac0: 1a000023 bne 7b54 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7ac4: e5973000 ldr r3, [r7] 7ac8: e1550003 cmp r5, r3 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7acc: 2061c00c rsbcs ip, r1, ip if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7ad0: 2a000010 bcs 7b18 <_Watchdog_Insert+0xd8> 7ad4: ea00002a b 7b84 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7ad8: e5923000 ldr r3, [r2] 7adc: e3530000 cmp r3, #0 ; 0x0 7ae0: 0a00000f beq 7b24 <_Watchdog_Insert+0xe4> break; if ( delta_interval < after->delta_interval ) { 7ae4: e5921010 ldr r1, [r2, #16] 7ae8: e151000c cmp r1, ip 7aec: 8a000021 bhi 7b78 <_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 ); 7af0: e10f3000 mrs r3, CPSR 7af4: e129f006 msr CPSR_fc, r6 7af8: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7afc: e5943008 ldr r3, [r4, #8] 7b00: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7b04: e061c00c rsb ip, r1, ip * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7b08: 1a000011 bne 7b54 <_Watchdog_Insert+0x114> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 7b0c: e5973000 ldr r3, [r7] 7b10: e1550003 cmp r5, r3 7b14: 3a00001a bcc 7b84 <_Watchdog_Insert+0x144> */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7b18: e35c0000 cmp ip, #0 ; 0x0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 7b1c: e5922000 ldr r2, [r2] 7b20: 1affffec bne 7ad8 <_Watchdog_Insert+0x98> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7b24: e5921004 ldr r1, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7b28: e59f3068 ldr r3, [pc, #104] ; 7b98 <_Watchdog_Insert+0x158> ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7b2c: e5910000 ldr r0, [r1] 7b30: e5932000 ldr r2, [r3] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7b34: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 7b38: e5814000 str r4, [r1] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 7b3c: e5841004 str r1, [r4, #4] 7b40: e5842014 str r2, [r4, #20] 7b44: e5843008 str r3, [r4, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 7b48: 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; 7b4c: 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; 7b50: 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; 7b54: e5875000 str r5, [r7] _Watchdog_Sync_count--; 7b58: e5983000 ldr r3, [r8] 7b5c: e2433001 sub r3, r3, #1 ; 0x1 7b60: e5883000 str r3, [r8] _ISR_Enable( level ); 7b64: e129f006 msr CPSR_fc, r6 } 7b68: e8bd01f0 pop {r4, r5, r6, r7, r8} 7b6c: 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 ); 7b70: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 7b74: eafffffb b 7b68 <_Watchdog_Insert+0x128> <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 7b78: e06c3001 rsb r3, ip, r1 7b7c: e5823010 str r3, [r2, #16] 7b80: eaffffe7 b 7b24 <_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; 7b84: e5875000 str r5, [r7] 7b88: eaffffbd b 7a84 <_Watchdog_Insert+0x44> 7b8c: 000160e0 .word 0x000160e0 7b90: 000161a0 .word 0x000161a0 7b94: 00016100 .word 0x00016100 7b98: 000161a4 .word 0x000161a4 00007d8c <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7d8c: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7d90: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 7d94: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 7d98: 0a000010 beq 7de0 <_Workspace_Handler_initialization+0x54> 7d9c: e214c003 ands ip, r4, #3 ; 0x3 7da0: 1a00000e bne 7de0 <_Workspace_Handler_initialization+0x54> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 7da4: e59f3054 ldr r3, [pc, #84] ; 7e00 <_Workspace_Handler_initialization+0x74> 7da8: e5932000 ldr r2, [r3] 7dac: e5d21028 ldrb r1, [r2, #40] 7db0: e3510000 cmp r1, #0 ; 0x0 7db4: 1a00000d bne 7df0 <_Workspace_Handler_initialization+0x64> memset( starting_address, 0, size ); memory_available = _Heap_Initialize( 7db8: e1a01004 mov r1, r4 7dbc: e1a02005 mov r2, r5 7dc0: e59f003c ldr r0, [pc, #60] ; 7e04 <_Workspace_Handler_initialization+0x78> 7dc4: e3a03004 mov r3, #4 ; 0x4 7dc8: ebfff665 bl 5764 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 7dcc: e3500000 cmp r0, #0 ; 0x0 7dd0: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 7dd4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 7dd8: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 7ddc: ebfff6eb bl 5990 <_Internal_error_Occurred> <== NOT EXECUTED ) { uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 7de0: e3a00000 mov r0, #0 ; 0x0 7de4: e3a01001 mov r1, #1 ; 0x1 7de8: e3a02002 mov r2, #2 ; 0x2 7dec: ebfff6e7 bl 5990 <_Internal_error_Occurred> TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) memset( starting_address, 0, size ); 7df0: e1a0100c mov r1, ip <== NOT EXECUTED 7df4: e1a02005 mov r2, r5 <== NOT EXECUTED 7df8: eb000f55 bl bb54 <== NOT EXECUTED 7dfc: eaffffed b 7db8 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED 7e00: 000160dc .word 0x000160dc 7e04: 0001606c .word 0x0001606c 00003ee4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3ee4: e92d4010 push {r4, lr} if ( !time_buffer ) 3ee8: e2514000 subs r4, r1, #0 ; 0x0 3eec: 03a00009 moveq r0, #9 ; 0x9 3ef0: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ef4: e3500004 cmp r0, #4 ; 0x4 3ef8: 979ff100 ldrls pc, [pc, r0, lsl #2] 3efc: ea000004 b 3f14 3f00: 00003f1c .word 0x00003f1c <== NOT EXECUTED 3f04: 00003f28 .word 0x00003f28 <== NOT EXECUTED 3f08: 00003f34 .word 0x00003f34 <== NOT EXECUTED 3f0c: 00003f44 .word 0x00003f44 <== NOT EXECUTED 3f10: 00003f54 .word 0x00003f54 <== NOT EXECUTED 3f14: e3a0000a mov r0, #10 ; 0xa 3f18: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3f1c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f20: 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 ); 3f24: ea000027 b 3fc8 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3f28: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f2c: 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); 3f30: ea00000a b 3f60 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3f34: eb00001f bl 3fb8 3f38: e5840000 str r0, [r4] 3f3c: e3a00000 mov r0, #0 ; 0x0 3f40: 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(); 3f44: eb000013 bl 3f98 3f48: e5840000 str r0, [r4] 3f4c: e3a00000 mov r0, #0 ; 0x0 3f50: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3f54: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3f58: 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 ); 3f5c: ea00004c b 4094 000062b4 : { /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62b4: 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 ) { 62b8: e92d00f0 push {r4, r5, r6, r7} 62bc: e1a06000 mov r6, r0 62c0: e1a07002 mov r7, r2 /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 62c4: 0a00003e beq 63c4 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 62c8: e3520000 cmp r2, #0 ; 0x0 62cc: 0a00003c beq 63c4 return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 62d0: e59c3000 ldr r3, [ip] 62d4: e3530000 cmp r3, #0 ; 0x0 62d8: 0a000036 beq 63b8 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 62dc: e3a03000 mov r3, #0 ; 0x0 62e0: e5873000 str r3, [r7] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 62e4: e59f20e0 ldr r2, [pc, #224] ; 63cc 62e8: e5922000 ldr r2, [r2] 62ec: e1520006 cmp r2, r6 62f0: 93a0000a movls r0, #10 ; 0xa 62f4: 9a00002b bls 63a8 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 62f8: e3560000 cmp r6, #0 ; 0x0 62fc: 1a00001d bne 6378 bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6300: e2526001 subs r6, r2, #1 ; 0x1 6304: 0a000029 beq 63b0 6308: e1a03282 lsl r3, r2, #5 630c: e0433182 sub r3, r3, r2, lsl #3 6310: e59f20b8 ldr r2, [pc, #184] ; 63d0 6314: e5921000 ldr r1, [r2] 6318: e2433018 sub r3, r3, #24 ; 0x18 631c: e0811003 add r1, r1, r3 6320: ea000002 b 6330 6324: e2566001 subs r6, r6, #1 ; 0x1 6328: e2411018 sub r1, r1, #24 ; 0x18 632c: 0a00001f beq 63b0 if ( !_IO_Driver_address_table[major].initialization_entry && 6330: e5913000 ldr r3, [r1] 6334: e3530000 cmp r3, #0 ; 0x0 * in use. */ if ( major == 0 ) { bool found = false; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 6338: e1a05001 mov r5, r1 if ( !_IO_Driver_address_table[major].initialization_entry && 633c: 1afffff8 bne 6324 6340: e5913004 ldr r3, [r1, #4] 6344: e3530000 cmp r3, #0 ; 0x0 6348: 1afffff5 bne 6324 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; 634c: e8bc000f ldm ip!, {r0, r1, r2, r3} 6350: e1a04005 mov r4, r5 6354: e8a4000f stmia r4!, {r0, r1, r2, r3} 6358: e89c0003 ldm ip, {r0, r1} 635c: e8840003 stm r4, {r0, r1} *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 6360: e3a01000 mov r1, #0 ; 0x0 6364: e1a00006 mov r0, r6 6368: 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; 636c: e5876000 str r6, [r7] return rtems_io_initialize( major, 0, NULL ); } 6370: e8bd00f0 pop {r4, r5, r6, r7} _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 6374: eaffff58 b 60dc if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 6378: e59f2050 ldr r2, [pc, #80] ; 63d0 637c: e1a03286 lsl r3, r6, #5 6380: e5921000 ldr r1, [r2] 6384: e0433186 sub r3, r3, r6, lsl #3 6388: e7912003 ldr r2, [r1, r3] 638c: e3520000 cmp r2, #0 ; 0x0 6390: e0815003 add r5, r1, r3 6394: 1a000002 bne 63a4 6398: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 639c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 63a0: 0affffe9 beq 634c <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63a4: e3a0000c mov r0, #12 ; 0xc } 63a8: e8bd00f0 pop {r4, r5, r6, r7} 63ac: e12fff1e bx lr _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63b0: e3a00005 mov r0, #5 ; 0x5 63b4: eafffffb b 63a8 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 63b8: e59c3004 ldr r3, [ip, #4] 63bc: e3530000 cmp r3, #0 ; 0x0 63c0: 1affffc5 bne 62dc _IO_Driver_address_table[major] = *driver_table; *registered_major = major; return rtems_io_initialize( major, 0, NULL ); 63c4: e3a00009 mov r0, #9 ; 0x9 63c8: eafffff6 b 63a8 63cc: 0001a0c0 .word 0x0001a0c0 63d0: 0001a0c4 .word 0x0001a0c4 0002adf4 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2adf4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2adf8: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 2adfc: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2ae00: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 2ae04: 0a000007 beq 2ae28 <== NOT EXECUTED 2ae08: e1a01000 mov r1, r0 <== NOT EXECUTED 2ae0c: e1a0200d mov r2, sp <== NOT EXECUTED 2ae10: e59f004c ldr r0, [pc, #76] ; 2ae64 <== NOT EXECUTED 2ae14: ebff7a53 bl 9768 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2ae18: e59d6000 ldr r6, [sp] <== NOT EXECUTED 2ae1c: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED 2ae20: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 2ae24: 0a000001 beq 2ae30 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2ae28: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 2ae2c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: *statistics = the_period->Statistics; 2ae30: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 2ae34: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae38: e1a04005 mov r4, r5 <== NOT EXECUTED 2ae3c: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae40: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae44: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae48: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae4c: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED 2ae50: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 2ae54: e8840003 stm r4, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 2ae58: ebff7ca0 bl a0e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 2ae5c: e1a00006 mov r0, r6 <== NOT EXECUTED 2ae60: eafffff0 b 2ae28 <== NOT EXECUTED 2ae64: 000597b0 .word 0x000597b0 0002ae68 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ae68: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ae6c: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 2ae70: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 2ae74: 03a00009 moveq r0, #9 ; 0x9 2ae78: 0a000016 beq 2aed8 2ae7c: e1a01000 mov r1, r0 2ae80: e28d2008 add r2, sp, #8 ; 0x8 2ae84: e59f0084 ldr r0, [pc, #132] ; 2af10 2ae88: ebff7a36 bl 9768 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 2ae8c: e59d3008 ldr r3, [sp, #8] 2ae90: e3530000 cmp r3, #0 ; 0x0 2ae94: e1a06000 mov r6, r0 2ae98: 13a00004 movne r0, #4 ; 0x4 2ae9c: 1a00000d bne 2aed8 case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2aea0: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 2aea4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 2aea8: 01a02003 moveq r2, r3 <== NOT EXECUTED 2aeac: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 2aeb0: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2aeb4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 2aeb8: e885000c stm r5, {r2, r3} <== NOT EXECUTED status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 2aebc: 1a000007 bne 2aee0 <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 2aec0: e5853014 str r3, [r5, #20] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 2aec4: e5853008 str r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 2aec8: e585300c str r3, [r5, #12] <== NOT EXECUTED #else status->since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 2aecc: e5853010 str r3, [r5, #16] <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 2aed0: ebff7c82 bl a0e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 2aed4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2aed8: e28dd00c add sp, sp, #12 ; 0xc 2aedc: e8bd8070 pop {r4, r5, r6, pc} * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2aee0: e1a0000d mov r0, sp <== NOT EXECUTED 2aee4: ebffd9dc bl 2165c <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 2aee8: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 2aeec: e1a0100d mov r1, sp <== NOT EXECUTED 2aef0: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 2aef4: ebff803b bl afe8 <_Timespec_Subtract> <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2aef8: e1a0100d mov r1, sp <== NOT EXECUTED 2aefc: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 2af00: e59f000c ldr r0, [pc, #12] ; 2af14 <== NOT EXECUTED * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 2af04: e1a0400d mov r4, sp <== NOT EXECUTED status->since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 2af08: ebff8036 bl afe8 <_Timespec_Subtract> <== NOT EXECUTED 2af0c: eaffffef b 2aed0 <== NOT EXECUTED 2af10: 000597b0 .word 0x000597b0 2af14: 0005936c .word 0x0005936c 00020b1c : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 20b1c: e59f1004 ldr r1, [pc, #4] ; 20b28 <== NOT EXECUTED 20b20: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 20b24: eaffff71 b 208f0 <== NOT EXECUTED 20b28: 00005590 .word 0x00005590 000208f0 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 208f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 208f4: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 208f8: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 208fc: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 20900: 0a000042 beq 20a10 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 20904: e59f11e4 ldr r1, [pc, #484] ; 20af0 <== NOT EXECUTED 20908: e1a0e00f mov lr, pc <== NOT EXECUTED 2090c: e12fff16 bx r6 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 20910: e59f11dc ldr r1, [pc, #476] ; 20af4 <== NOT EXECUTED 20914: e1a00007 mov r0, r7 <== NOT EXECUTED 20918: e1a0e00f mov lr, pc <== NOT EXECUTED 2091c: e12fff16 bx r6 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 20920: e59f11d0 ldr r1, [pc, #464] ; 20af8 <== NOT EXECUTED 20924: e1a00007 mov r0, r7 <== NOT EXECUTED 20928: e1a0e00f mov lr, pc <== NOT EXECUTED 2092c: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 20930: e59f81c4 ldr r8, [pc, #452] ; 20afc <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 20934: e59f11c4 ldr r1, [pc, #452] ; 20b00 <== NOT EXECUTED 20938: e1a00007 mov r0, r7 <== NOT EXECUTED 2093c: e1a0e00f mov lr, pc <== NOT EXECUTED 20940: e12fff16 bx r6 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 20944: e1a00007 mov r0, r7 <== NOT EXECUTED 20948: e59f11b4 ldr r1, [pc, #436] ; 20b04 <== NOT EXECUTED 2094c: e1a0e00f mov lr, pc <== NOT EXECUTED 20950: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 20954: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 20958: e598300c ldr r3, [r8, #12] <== NOT EXECUTED 2095c: e1550003 cmp r5, r3 <== NOT EXECUTED 20960: 8a00002a bhi 20a10 <== NOT EXECUTED _Timespec_Divide_by_integer( &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 20964: e59fa19c ldr sl, [pc, #412] ; 20b08 <== NOT EXECUTED 20968: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 2096c: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED 20970: ea000003 b 20984 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 20974: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 20978: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 2097c: e1530005 cmp r3, r5 <== NOT EXECUTED 20980: 3a000022 bcc 20a10 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 20984: e1a00005 mov r0, r5 <== NOT EXECUTED 20988: e1a01009 mov r1, r9 <== NOT EXECUTED 2098c: eb002918 bl 2adf4 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 20990: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 20994: 1afffff6 bne 20974 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 20998: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 2099c: e1a00005 mov r0, r5 <== NOT EXECUTED 209a0: eb002930 bl 2ae68 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 209a4: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 209a8: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 209ac: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { 209b0: 1a00004a bne 20ae0 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 209b4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 209b8: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED 209bc: e58d3000 str r3, [sp] <== NOT EXECUTED 209c0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED 209c4: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 209c8: e1a02005 mov r2, r5 <== NOT EXECUTED 209cc: e59f1138 ldr r1, [pc, #312] ; 20b0c <== NOT EXECUTED 209d0: e1a00007 mov r0, r7 <== NOT EXECUTED 209d4: e1a0e00f mov lr, pc <== NOT EXECUTED 209d8: e12fff16 bx r6 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 209dc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 209e0: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 209e4: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED 209e8: e1a0200b mov r2, fp <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 209ec: 1a000009 bne 20a18 <== NOT EXECUTED (*print)( context, "\n" ); 209f0: e1a00007 mov r0, r7 <== NOT EXECUTED 209f4: e59f1114 ldr r1, [pc, #276] ; 20b10 <== NOT EXECUTED 209f8: e1a0e00f mov lr, pc <== NOT EXECUTED 209fc: e12fff16 bx r6 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 20a00: e598300c ldr r3, [r8, #12] <== NOT EXECUTED id++ ) { 20a04: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 20a08: e1530005 cmp r3, r5 <== NOT EXECUTED 20a0c: 2affffdc bcs 20984 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 20a10: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 20a14: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 20a18: eb0005c6 bl 22138 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 20a1c: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED 20a20: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 20a24: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 20a28: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED 20a2c: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 20a30: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 20a34: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 20a38: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 20a3c: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED 20a40: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 20a44: e58d2000 str r2, [sp] <== NOT EXECUTED 20a48: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 20a4c: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 20a50: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 20a54: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 20a58: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 20a5c: e58d000c str r0, [sp, #12] <== NOT EXECUTED 20a60: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 20a64: e59f10a8 ldr r1, [pc, #168] ; 20b14 <== NOT EXECUTED 20a68: e1a00007 mov r0, r7 <== NOT EXECUTED 20a6c: e1a0e00f mov lr, pc <== NOT EXECUTED 20a70: e12fff16 bx r6 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 20a74: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED 20a78: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 20a7c: e1a0200b mov r2, fp <== NOT EXECUTED 20a80: eb0005ac bl 22138 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 20a84: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED 20a88: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED 20a8c: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 20a90: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED 20a94: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED 20a98: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED 20a9c: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED 20aa0: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED 20aa4: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED 20aa8: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED 20aac: e58d2000 str r2, [sp] <== NOT EXECUTED 20ab0: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED 20ab4: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED 20ab8: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED 20abc: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED 20ac0: e58d000c str r0, [sp, #12] <== NOT EXECUTED 20ac4: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED 20ac8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 20acc: e1a00007 mov r0, r7 <== NOT EXECUTED 20ad0: e59f1040 ldr r1, [pc, #64] ; 20b18 <== NOT EXECUTED 20ad4: e1a0e00f mov lr, pc <== NOT EXECUTED 20ad8: e12fff16 bx r6 <== NOT EXECUTED 20adc: eaffffa4 b 20974 <== NOT EXECUTED #endif name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 20ae0: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED 20ae4: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED 20ae8: ebff9c4d bl 7c24 <== NOT EXECUTED 20aec: eaffffb0 b 209b4 <== NOT EXECUTED 20af0: 00044084 .word 0x00044084 20af4: 000440a4 .word 0x000440a4 20af8: 000440c8 .word 0x000440c8 20afc: 000597b0 .word 0x000597b0 20b00: 000440ec .word 0x000440ec 20b04: 00044138 .word 0x00044138 20b08: 10624dd3 .word 0x10624dd3 20b0c: 00044184 .word 0x00044184 20b10: 00045574 .word 0x00045574 20b14: 0004419c .word 0x0004419c 20b18: 000441bc .word 0x000441bc 00020b2c : 20b2c: e59f3040 ldr r3, [pc, #64] ; 20b74 <== NOT EXECUTED 20b30: e5932000 ldr r2, [r3] <== NOT EXECUTED 20b34: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 20b38: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 20b3c: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 20b40: e59f5030 ldr r5, [pc, #48] ; 20b78 <== NOT EXECUTED 20b44: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 20b48: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 20b4c: e1540003 cmp r4, r3 <== NOT EXECUTED 20b50: 8a000005 bhi 20b6c <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 20b54: e1a00004 mov r0, r4 <== NOT EXECUTED 20b58: eb000007 bl 20b7c <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 20b5c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED id++ ) { 20b60: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 20b64: e1530004 cmp r3, r4 <== NOT EXECUTED 20b68: 2afffff9 bcs 20b54 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 20b6c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 20b70: eaffa55a b a0e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 20b74: 000592ac .word 0x000592ac 20b78: 000597b0 .word 0x000597b0 00020b7c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 20b7c: e92d4010 push {r4, lr} <== NOT EXECUTED 20b80: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 20b84: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 20b88: e1a0200d mov r2, sp <== NOT EXECUTED 20b8c: e59f005c ldr r0, [pc, #92] ; 20bf0 <== NOT EXECUTED 20b90: ebffa2f4 bl 9768 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 20b94: e59d4000 ldr r4, [sp] <== NOT EXECUTED 20b98: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 20b9c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 20ba0: 1a000010 bne 20be8 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 20ba4: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 20ba8: e5803078 str r3, [r0, #120] <== NOT EXECUTED 20bac: e5804054 str r4, [r0, #84] <== NOT EXECUTED 20bb0: e5804058 str r4, [r0, #88] <== NOT EXECUTED 20bb4: e5804064 str r4, [r0, #100] <== NOT EXECUTED 20bb8: e5804068 str r4, [r0, #104] <== NOT EXECUTED 20bbc: e580406c str r4, [r0, #108] <== NOT EXECUTED 20bc0: e5804070 str r4, [r0, #112] <== NOT EXECUTED 20bc4: e580407c str r4, [r0, #124] <== NOT EXECUTED 20bc8: e5804080 str r4, [r0, #128] <== NOT EXECUTED 20bcc: e5804084 str r4, [r0, #132] <== NOT EXECUTED 20bd0: e5804088 str r4, [r0, #136] <== NOT EXECUTED 20bd4: e580305c str r3, [r0, #92] <== NOT EXECUTED 20bd8: e5803060 str r3, [r0, #96] <== NOT EXECUTED 20bdc: e5803074 str r3, [r0, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 20be0: ebffa53e bl a0e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 20be4: e1a00004 mov r0, r4 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20be8: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 20bec: e8bd8010 pop {r4, pc} <== NOT EXECUTED 20bf0: 000597b0 .word 0x000597b0 000110a4 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110a4: 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 ) 110a8: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 110ac: e1a04000 mov r4, r0 110b0: e24dd008 sub sp, sp, #8 ; 0x8 110b4: 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 ) 110b8: 03a04009 moveq r4, #9 ; 0x9 110bc: 0a000020 beq 11144 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 110c0: e59f80a0 ldr r8, [pc, #160] ; 11168 110c4: e5980000 ldr r0, [r8] 110c8: eb000902 bl 134d8 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 110cc: e1a01004 mov r1, r4 110d0: e59f0094 ldr r0, [pc, #148] ; 1116c 110d4: e1a0200d mov r2, sp 110d8: eb000fcf bl 1501c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 110dc: e59d4000 ldr r4, [sp] 110e0: e3540000 cmp r4, #0 ; 0x0 110e4: e1a05000 mov r5, r0 110e8: 1a000018 bne 11150 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 110ec: e1a01007 mov r1, r7 110f0: e1a02006 mov r2, r6 110f4: e2800068 add r0, r0, #104 ; 0x68 110f8: e28d3004 add r3, sp, #4 ; 0x4 110fc: eb000c14 bl 14154 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 11100: e3500001 cmp r0, #1 ; 0x1 11104: 03a04009 moveq r4, #9 ; 0x9 11108: 0a00000b beq 1113c 1110c: 2a000007 bcs 11130 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11110: e59d1004 ldr r1, [sp, #4] 11114: e5952054 ldr r2, [r5, #84] the_region->maximum_segment_size += amount_extended; 11118: e595305c ldr r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 1111c: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 11120: e0833001 add r3, r3, r1 11124: e585305c str r3, [r5, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 11128: e5852054 str r2, [r5, #84] 1112c: ea000002 b 1113c starting_address, length, &amount_extended ); switch ( heap_status ) { 11130: e3500002 cmp r0, #2 ; 0x2 11134: 0a000009 beq 11160 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11138: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 1113c: e5980000 ldr r0, [r8] 11140: eb000900 bl 13548 <_API_Mutex_Unlock> return return_status; } 11144: e1a00004 mov r0, r4 11148: e28dd008 add sp, sp, #8 ; 0x8 1114c: 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 ) { 11150: e3540001 cmp r4, #1 ; 0x1 11154: 03a04004 moveq r4, #4 ; 0x4 11158: 1afffff6 bne 11138 1115c: eafffff6 b 1113c switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; break; 11160: e3a04018 mov r4, #24 ; 0x18 11164: eafffff4 b 1113c 11168: 0003143c .word 0x0003143c 1116c: 00031214 .word 0x00031214 000111f4 : rtems_status_code rtems_region_get_information( Objects_Id id, Heap_Information_block *the_info ) { 111f4: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 111f8: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_region_get_information( Objects_Id id, Heap_Information_block *the_info ) { 111fc: e1a04000 mov r4, r0 11200: e24dd004 sub sp, sp, #4 ; 0x4 Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; register Region_Control *the_region; if ( !the_info ) 11204: 03a04009 moveq r4, #9 ; 0x9 11208: 0a00000f beq 1124c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 1120c: e59f6060 ldr r6, [pc, #96] ; 11274 11210: e5960000 ldr r0, [r6] 11214: eb0008af bl 134d8 <_API_Mutex_Lock> 11218: e1a01004 mov r1, r4 1121c: e59f0054 ldr r0, [pc, #84] ; 11278 11220: e1a0200d mov r2, sp 11224: eb000f7c bl 1501c <_Objects_Get_no_protection> 11228: e1a03000 mov r3, r0 the_region = _Region_Get( id, &location ); switch ( location ) { 1122c: e59d0000 ldr r0, [sp] 11230: e3500000 cmp r0, #0 ; 0x0 11234: 0a000007 beq 11258 11238: e3500001 cmp r0, #1 ; 0x1 1123c: 03a04004 moveq r4, #4 ; 0x4 11240: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 11244: e5960000 ldr r0, [r6] 11248: eb0008be bl 13548 <_API_Mutex_Unlock> return return_status; } 1124c: e1a00004 mov r0, r4 11250: e28dd004 add sp, sp, #4 ; 0x4 11254: e8bd8070 pop {r4, r5, r6, pc} the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _Heap_Get_information( &the_region->Memory, the_info ) != 11258: e2830068 add r0, r3, #104 ; 0x68 1125c: e1a01005 mov r1, r5 11260: eb000c87 bl 14484 <_Heap_Get_information> 11264: e3500000 cmp r0, #0 ; 0x0 11268: 13a04009 movne r4, #9 ; 0x9 1126c: 03a04000 moveq r4, #0 ; 0x0 11270: eafffff3 b 11244 11274: 0003143c .word 0x0003143c <== NOT EXECUTED 11278: 1214 .short 0x1214 <== NOT EXECUTED 1127a: 03 .byte 0x03 <== NOT EXECUTED ... 0001148c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 1148c: 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 ) 11490: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 11494: e24dd010 sub sp, sp, #16 ; 0x10 11498: e1a04000 mov r4, r0 1149c: e1a05001 mov r5, r1 114a0: 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 ) 114a4: 0a000028 beq 1154c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 114a8: e59f70b4 ldr r7, [pc, #180] ; 11564 114ac: e5970000 ldr r0, [r7] 114b0: eb000808 bl 134d8 <_API_Mutex_Lock> 114b4: e1a01004 mov r1, r4 114b8: e59f00a8 ldr r0, [pc, #168] ; 11568 114bc: e28d2008 add r2, sp, #8 ; 0x8 114c0: eb000ed5 bl 1501c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 114c4: e59d3008 ldr r3, [sp, #8] 114c8: e3530000 cmp r3, #0 ; 0x0 114cc: e1a08000 mov r8, r0 114d0: 0a000007 beq 114f4 114d4: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114d8: e5970000 ldr r0, [r7] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 114dc: 03a04004 moveq r4, #4 ; 0x4 114e0: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 114e4: eb000817 bl 13548 <_API_Mutex_Unlock> return return_status; } 114e8: e1a00004 mov r0, r4 114ec: e28dd010 add sp, sp, #16 ; 0x10 114f0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 114f4: e1a01005 mov r1, r5 114f8: e28d3004 add r3, sp, #4 ; 0x4 114fc: e28dc00c add ip, sp, #12 ; 0xc 11500: e1a02006 mov r2, r6 11504: e2800068 add r0, r0, #104 ; 0x68 11508: e58dc000 str ip, [sp] 1150c: eb000c9b bl 14780 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11510: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 11514: e2505000 subs r5, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 11518: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 1151c: 1a000005 bne 11538 11520: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED 11524: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 11528: 1a000009 bne 11554 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); 1152c: e5970000 ldr r0, [r7] <== NOT EXECUTED 11530: eb000804 bl 13548 <_API_Mutex_Unlock> <== NOT EXECUTED 11534: eaffffeb b 114e8 <== NOT EXECUTED 11538: e5970000 ldr r0, [r7] 1153c: eb000801 bl 13548 <_API_Mutex_Unlock> return 11540: e3550001 cmp r5, #1 ; 0x1 11544: 03a0400d moveq r4, #13 ; 0xd 11548: 0affffe6 beq 114e8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 1154c: e3a04009 mov r4, #9 ; 0x9 11550: eaffffe4 b 114e8 *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 */ 11554: e1a00008 mov r0, r8 <== NOT EXECUTED 11558: eb001efe bl 19158 <_Region_Process_queue> <== NOT EXECUTED 1155c: e1a04005 mov r4, r5 <== NOT EXECUTED 11560: eaffffe0 b 114e8 <== NOT EXECUTED 11564: 0003143c .word 0x0003143c 11568: 00031214 .word 0x00031214 00004544 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 4544: 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 ) ) 4548: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 454c: e24dd018 sub sp, sp, #24 ; 0x18 4550: e1a06001 mov r6, r1 4554: e1a04002 mov r4, r2 4558: 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 ) ) 455c: 02800003 addeq r0, r0, #3 ; 0x3 4560: 0a000037 beq 4644 return RTEMS_INVALID_NAME; if ( !id ) 4564: e59d3038 ldr r3, [sp, #56] 4568: e3530000 cmp r3, #0 ; 0x0 456c: 03a00009 moveq r0, #9 ; 0x9 4570: 0a000033 beq 4644 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 4574: e21230c0 ands r3, r2, #192 ; 0xc0 4578: 02025030 andeq r5, r2, #48 ; 0x30 457c: 1a000032 bne 464c 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 ) ) 4580: e3550000 cmp r5, #0 ; 0x0 4584: 0a000002 beq 4594 4588: e3560001 cmp r6, #1 ; 0x1 458c: 83a0000a movhi r0, #10 ; 0xa 4590: 8a00002b bhi 4644 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4594: e59f218c ldr r2, [pc, #396] ; 4728 4598: e5923000 ldr r3, [r2] 459c: e2833001 add r3, r3, #1 ; 0x1 45a0: 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 ); 45a4: e59f9180 ldr r9, [pc, #384] ; 472c 45a8: e1a00009 mov r0, r9 45ac: eb000511 bl 59f8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 45b0: e2507000 subs r7, r0, #0 ; 0x0 45b4: 0a000048 beq 46dc * 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 ) ) { 45b8: e3550000 cmp r5, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 45bc: 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 ) ) { 45c0: 0a00002e beq 4680 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45c4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 45c8: 13a03002 movne r3, #2 ; 0x2 45cc: 158d3008 strne r3, [sp, #8] */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 45d0: 1a000007 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 45d4: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 45d8: 13a03003 movne r3, #3 ; 0x3 45dc: 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 ) ) 45e0: 1a000003 bne 45f4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 45e4: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 45e8: 13a03001 movne r3, #1 ; 0x1 45ec: 158d3008 strne r3, [sp, #8] else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 45f0: 058d3008 streq r3, [sp, #8] if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 45f4: 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; 45f8: 13a03002 movne r3, #2 ; 0x2 the_mutex_attributes.only_owner_release = FALSE; 45fc: 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; 4600: 158d3000 strne r3, [sp] the_mutex_attributes.only_owner_release = FALSE; 4604: 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 ) ) { 4608: 0a000036 beq 46e8 the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 460c: e3560001 cmp r6, #1 ; 0x1 4610: 13a02000 movne r2, #0 ; 0x0 4614: 03a02001 moveq r2, #1 ; 0x1 4618: e2870014 add r0, r7, #20 ; 0x14 461c: 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; 4620: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 4624: eb000308 bl 524c <_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 ) { 4628: e3500006 cmp r0, #6 ; 0x6 462c: 1a000020 bne 46b4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 4630: e59f00f4 ldr r0, [pc, #244] ; 472c <== NOT EXECUTED 4634: e1a01007 mov r1, r7 <== NOT EXECUTED 4638: eb0005db bl 5dac <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 463c: eb000879 bl 6828 <_Thread_Enable_dispatch> <== NOT EXECUTED 4640: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4644: e28dd018 add sp, sp, #24 ; 0x18 4648: 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); 464c: 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 ) || 4650: e3550010 cmp r5, #16 ; 0x10 4654: 0a000003 beq 4668 4658: e3550020 cmp r5, #32 ; 0x20 465c: 0a000001 beq 4668 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4660: e3a0000b mov r0, #11 ; 0xb 4664: eafffff6 b 4644 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 4668: e3140004 tst r4, #4 ; 0x4 466c: 0afffffb beq 4660 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4670: e35300c0 cmp r3, #192 ; 0xc0 4674: 1affffc1 bne 4580 name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4678: e3a0000b mov r0, #11 ; 0xb 467c: eafffff0 b 4644 _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4680: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4684: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4688: 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; 468c: 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( 4690: e1a02006 mov r2, r6 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4694: 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( 4698: e2870014 add r0, r7, #20 ; 0x14 469c: 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; 46a0: 058d5014 streq r5, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 46a4: 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; 46a8: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 46ac: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 46b0: eb0003b9 bl 559c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46b4: e5971008 ldr r1, [r7, #8] 46b8: e599201c ldr r2, [r9, #28] 46bc: e1a03801 lsl r3, r1, #16 46c0: e7827723 str r7, [r2, r3, lsr #14] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 46c4: e59d3038 ldr r3, [sp, #56] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 46c8: e587a00c str sl, [r7, #12] 46cc: e5831000 str r1, [r3] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 46d0: eb000854 bl 6828 <_Thread_Enable_dispatch> 46d4: e3a00000 mov r0, #0 ; 0x0 46d8: eaffffd9 b 4644 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); 46dc: eb000851 bl 6828 <_Thread_Enable_dispatch> 46e0: e3a00005 mov r0, #5 ; 0x5 46e4: eaffffd6 b 4644 if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 46e8: 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; 46ec: e3a03000 mov r3, #0 ; 0x0 46f0: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 46f4: e3520003 cmp r2, #3 ; 0x3 46f8: 979ff102 ldrls pc, [pc, r2, lsl #2] 46fc: eaffffc2 b 460c <== NOT EXECUTED 4700: 0000471c .word 0x0000471c <== NOT EXECUTED 4704: 0000471c .word 0x0000471c <== NOT EXECUTED 4708: 00004710 .word 0x00004710 <== NOT EXECUTED 470c: 00004710 .word 0x00004710 <== 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; 4710: e3a03001 mov r3, #1 ; 0x1 4714: e5cd3004 strb r3, [sp, #4] 4718: eaffffbb b 460c 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; 471c: e3a03000 mov r3, #0 ; 0x0 4720: e5cd3004 strb r3, [sp, #4] 4724: eaffffb8 b 460c 4728: 0001604c .word 0x0001604c 472c: 00015f74 .word 0x00015f74 00020c88 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 20c88: e52de004 push {lr} ; (str lr, [sp, #-4]!) 20c8c: e24dd004 sub sp, sp, #4 ; 0x4 20c90: e1a01000 mov r1, r0 20c94: e1a0200d mov r2, sp 20c98: e59f004c ldr r0, [pc, #76] ; 20cec 20c9c: ebffa2b1 bl 9768 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 20ca0: e59d1000 ldr r1, [sp] 20ca4: e3510000 cmp r1, #0 ; 0x0 20ca8: 13a00004 movne r0, #4 ; 0x4 20cac: 1a000008 bne 20cd4 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 20cb0: e5903010 ldr r3, [r0, #16] 20cb4: e2133030 ands r3, r3, #48 ; 0x30 20cb8: 1a000007 bne 20cdc &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 20cbc: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED 20cc0: e1a01003 mov r1, r3 <== NOT EXECUTED 20cc4: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 20cc8: ebff9fe2 bl 8c58 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 20ccc: ebffa503 bl a0e0 <_Thread_Enable_dispatch> 20cd0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 20cd4: e28dd004 add sp, sp, #4 ; 0x4 20cd8: 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( 20cdc: e2800014 add r0, r0, #20 ; 0x14 20ce0: e3a02001 mov r2, #1 ; 0x1 20ce4: ebff9f07 bl 8908 <_CORE_mutex_Flush> 20ce8: eafffff7 b 20ccc 20cec: 000591c8 .word 0x000591c8 00013c3c : */ void rtems_shutdown_executive( uint32_t result ) { 13c3c: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13c40: e59f2028 ldr r2, [pc, #40] ; 13c70 13c44: e5923000 ldr r3, [r2] 13c48: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 13c4c: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 13c50: 0a000004 beq 13c68 13c54: 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 ); 13c58: e1a0000d mov r0, sp 13c5c: e59f1010 ldr r1, [pc, #16] ; 13c74 13c60: e5823000 str r3, [r2] 13c64: ebffd067 bl 7e08 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 13c68: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 13c6c: e8bd8000 pop {pc} <== NOT EXECUTED 13c70: 000161f4 .word 0x000161f4 13c74: 0001601c .word 0x0001601c 000124a0 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 124a0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 124a4: e2518000 subs r8, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 124a8: e1a06000 mov r6, r0 124ac: e24dd004 sub sp, sp, #4 ; 0x4 124b0: e1a05002 mov r5, r2 124b4: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 124b8: 03a0000a moveq r0, #10 ; 0xa 124bc: 0a000020 beq 12544 return RTEMS_INVALID_NUMBER; if ( !routine ) 124c0: e3520000 cmp r2, #0 ; 0x0 124c4: 03a00009 moveq r0, #9 ; 0x9 124c8: 0a00001d beq 12544 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 124cc: e59f0088 ldr r0, [pc, #136] ; 1255c 124d0: e1a01006 mov r1, r6 124d4: e1a0200d mov r2, sp 124d8: eb000ae0 bl 15060 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 124dc: e59d3000 ldr r3, [sp] 124e0: e3530000 cmp r3, #0 ; 0x0 124e4: e1a04000 mov r4, r0 124e8: 13a00004 movne r0, #4 ; 0x4 124ec: 1a000014 bne 12544 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 124f0: e284a010 add sl, r4, #16 ; 0x10 124f4: e1a0000a mov r0, sl 124f8: eb001357 bl 1725c <_Watchdog_Remove> _ISR_Disable( level ); 124fc: e10f2000 mrs r2, CPSR 12500: e38230c0 orr r3, r2, #192 ; 0xc0 12504: 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 ) { 12508: e5943018 ldr r3, [r4, #24] 1250c: e3530000 cmp r3, #0 ; 0x0 12510: 1a00000d bne 1254c Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12514: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 12518: e584502c str r5, [r4, #44] the_watchdog->id = id; 1251c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 12520: 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; 12524: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 12528: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 1252c: e59f002c ldr r0, [pc, #44] ; 12560 12530: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 12534: e584801c str r8, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 12538: eb0012d8 bl 170a0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 1253c: eb000d0c bl 15974 <_Thread_Enable_dispatch> 12540: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12544: e28dd004 add sp, sp, #4 ; 0x4 12548: 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 ); 1254c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _Thread_Enable_dispatch(); 12550: eb000d07 bl 15974 <_Thread_Enable_dispatch> <== NOT EXECUTED 12554: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12558: eafffff9 b 12544 <== NOT EXECUTED 1255c: 00031630 .word 0x00031630 12560: 00031464 .word 0x00031464 000129a4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 129a4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 129a8: e3500000 cmp r0, #0 ; 0x0 129ac: e24dd010 sub sp, sp, #16 ; 0x10 129b0: e1a07001 mov r7, r1 129b4: e1a06002 mov r6, r2 129b8: 1a000002 bne 129c8 * 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; 129bc: e3a00013 mov r0, #19 ; 0x13 } return status; } 129c0: e28dd010 add sp, sp, #16 ; 0x10 129c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 129c8: e59f3144 ldr r3, [pc, #324] ; 12b14 129cc: e5d32000 ldrb r2, [r3] 129d0: e1500002 cmp r0, r2 129d4: 8a00004a bhi 12b04 129d8: e1a08000 mov r8, r0 <== NOT EXECUTED 129dc: e59f3134 ldr r3, [pc, #308] ; 12b18 129e0: e5932000 ldr r2, [r3] 129e4: e2822001 add r2, r2, #1 ; 0x1 129e8: e5832000 str r2, [r3] /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 129ec: e59fa128 ldr sl, [pc, #296] ; 12b1c 129f0: e5da5000 ldrb r5, [sl] initialized = true; 129f4: e3a03001 mov r3, #1 ; 0x1 129f8: e5ca3000 strb r3, [sl] _Thread_Enable_dispatch(); 129fc: eb000bdc bl 15974 <_Thread_Enable_dispatch> if ( tmpInitialized ) 12a00: e3550000 cmp r5, #0 ; 0x0 12a04: 13a0000e movne r0, #14 ; 0xe 12a08: 1affffec bne 129c0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a0c: e59f410c ldr r4, [pc, #268] ; 12b20 12a10: e284c004 add ip, r4, #4 ; 0x4 12a14: e584c000 str ip, [r4] * 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( 12a18: e386e902 orr lr, r6, #32768 ; 0x8000 12a1c: e28dc00c add ip, sp, #12 ; 0xc the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12a20: e5844008 str r4, [r4, #8] 12a24: e1a01008 mov r1, r8 12a28: e58de000 str lr, [sp] 12a2c: e58dc004 str ip, [sp, #4] 12a30: e1a02007 mov r2, r7 12a34: e59f00e8 ldr r0, [pc, #232] ; 12b24 12a38: 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; 12a3c: e5845004 str r5, [r4, #4] 12a40: ebfffc60 bl 11bc8 /* 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) { 12a44: e3500000 cmp r0, #0 ; 0x0 initialized = false; 12a48: 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) { 12a4c: 1affffdb bne 129c0 * 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( 12a50: e59d200c ldr r2, [sp, #12] RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 12a54: e59fc0cc ldr ip, [pc, #204] ; 12b28 12a58: e1a03802 lsl r3, r2, #16 12a5c: e58d2008 str r2, [sp, #8] 12a60: e1dc21b0 ldrh r2, [ip, #16] 12a64: e1a01823 lsr r1, r3, #16 12a68: e1520001 cmp r2, r1 12a6c: 259c301c ldrcs r3, [ip, #28] 12a70: 27939101 ldrcs r9, [r3, r1, lsl #2] the_watchdog->routine = routine; 12a74: e59f30b0 ldr r3, [pc, #176] ; 12b2c 12a78: 31a09000 movcc r9, r0 12a7c: e5893064 str r3, [r9, #100] /* * 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; 12a80: e59fe0a8 ldr lr, [pc, #168] ; 12b30 12a84: e59f30a8 ldr r3, [pc, #168] ; 12b34 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12a88: e59f40a8 ldr r4, [pc, #168] ; 12b38 the_watchdog->id = id; 12a8c: e59f50a8 ldr r5, [pc, #168] ; 12b3c 12a90: e59d2008 ldr r2, [sp, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12a94: e59f60a4 ldr r6, [pc, #164] ; 12b40 12a98: 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( 12a9c: e59fc0a0 ldr ip, [pc, #160] ; 12b44 the_watchdog->routine = routine; 12aa0: e59f3084 ldr r3, [pc, #132] ; 12b2c the_chain->permanent_null = NULL; 12aa4: e3a0b000 mov fp, #0 ; 0x0 _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12aa8: e1a00002 mov r0, r2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12aac: e2847004 add r7, r4, #4 ; 0x4 12ab0: e2858004 add r8, r5, #4 ; 0x4 the_watchdog->id = id; 12ab4: e5892068 str r2, [r9, #104] the_watchdog->user_data = user_data; 12ab8: e589b06c str fp, [r9, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12abc: e589b050 str fp, [r9, #80] 12ac0: e59f1080 ldr r1, [pc, #128] ; 12b48 12ac4: 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( 12ac8: e58c9000 str r9, [ip] 12acc: e5847000 str r7, [r4] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad0: e5844008 str r4, [r4, #8] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 12ad4: e5858000 str r8, [r5] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 12ad8: e5855008 str r5, [r5, #8] the_watchdog->routine = routine; 12adc: e586301c str r3, [r6, #28] the_watchdog->id = id; the_watchdog->user_data = user_data; 12ae0: 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; 12ae4: e584b004 str fp, [r4, #4] 12ae8: e585b004 str fp, [r5, #4] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12aec: e586b008 str fp, [r6, #8] the_watchdog->routine = routine; the_watchdog->id = id; 12af0: e5860020 str r0, [r6, #32] _Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method; /* * Start the timer server */ status = rtems_task_start( 12af4: ebfffd8e bl 12134 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 12af8: 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; 12afc: 15cab000 strbne fp, [sl] 12b00: eaffffae b 129c0 * 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 ) 12b04: e3700001 cmn r0, #1 ; 0x1 12b08: 03a08000 moveq r8, #0 ; 0x0 12b0c: 0affffb2 beq 129dc 12b10: eaffffa9 b 129bc 12b14: 00024f10 .word 0x00024f10 12b18: 0003138c .word 0x0003138c 12b1c: 0002ce34 .word 0x0002ce34 12b20: 000312f4 .word 0x000312f4 12b24: 54494d45 .word 0x54494d45 12b28: 00031294 .word 0x00031294 12b2c: 000157dc .word 0x000157dc 12b30: 00012b4c .word 0x00012b4c 12b34: 00031670 .word 0x00031670 12b38: 000312d4 .word 0x000312d4 12b3c: 000312e8 .word 0x000312e8 12b40: 00031300 .word 0x00031300 12b44: 00031674 .word 0x00031674 12b48: 00012bfc .word 0x00012bfc 000126ec : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 126ec: e92d4030 push {r4, r5, lr} 126f0: e24dd004 sub sp, sp, #4 ; 0x4 126f4: e1a01000 mov r1, r0 126f8: e1a0200d mov r2, sp 126fc: e59f00a8 ldr r0, [pc, #168] ; 127ac 12700: eb000a56 bl 15060 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12704: e59d3000 ldr r3, [sp] 12708: e3530000 cmp r3, #0 ; 0x0 1270c: e1a04000 mov r4, r0 12710: 13a00004 movne r0, #4 ; 0x4 12714: 1a00000a bne 12744 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 12718: e5943038 ldr r3, [r4, #56] 1271c: e3530004 cmp r3, #4 ; 0x4 12720: 979ff103 ldrls pc, [pc, r3, lsl #2] 12724: ea000011 b 12770 <== NOT EXECUTED 12728: 00012788 .word 0x00012788 <== NOT EXECUTED 1272c: 0001274c .word 0x0001274c <== NOT EXECUTED 12730: 0001277c .word 0x0001277c <== NOT EXECUTED 12734: 0001277c .word 0x0001277c <== NOT EXECUTED 12738: 0001277c .word 0x0001277c <== 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(); 1273c: eb000c8c bl 15974 <_Thread_Enable_dispatch> <== NOT EXECUTED 12740: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12744: e28dd004 add sp, sp, #4 ; 0x4 12748: 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 ) { 1274c: e59f505c ldr r5, [pc, #92] ; 127b0 <== NOT EXECUTED 12750: e5953000 ldr r3, [r5] <== NOT EXECUTED 12754: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12758: 0afffff7 beq 1273c <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 1275c: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 12760: eb0012bd bl 1725c <_Watchdog_Remove> <== NOT EXECUTED (*_Timer_Server_schedule_operation)( the_timer ); 12764: e1a00004 mov r0, r4 <== NOT EXECUTED 12768: e1a0e00f mov lr, pc <== NOT EXECUTED 1276c: e595f000 ldr pc, [r5] <== NOT EXECUTED case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 12770: eb000c7f bl 15974 <_Thread_Enable_dispatch> <== NOT EXECUTED 12774: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12778: eafffff1 b 12744 <== NOT EXECUTED (*_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(); 1277c: eb000c7c bl 15974 <_Thread_Enable_dispatch> 12780: e3a0000b mov r0, #11 ; 0xb 12784: eaffffee b 12744 switch ( location ) { case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 12788: e2844010 add r4, r4, #16 ; 0x10 1278c: e1a00004 mov r0, r4 12790: eb0012b1 bl 1725c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 12794: e59f0018 ldr r0, [pc, #24] ; 127b4 12798: e1a01004 mov r1, r4 1279c: eb00123f bl 170a0 <_Watchdog_Insert> case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 127a0: eb000c73 bl 15974 <_Thread_Enable_dispatch> 127a4: e3a00000 mov r0, #0 ; 0x0 127a8: eaffffe5 b 12744 127ac: 00031630 .word 0x00031630 127b0: 00031670 .word 0x00031670 127b4: 00031464 .word 0x00031464 000127b8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127b8: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127bc: e59fc0d0 ldr ip, [pc, #208] ; 12894 127c0: e59c4000 ldr r4, [ip] 127c4: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 127c8: e1a07000 mov r7, r0 127cc: e24dd004 sub sp, sp, #4 ; 0x4 127d0: e1a06001 mov r6, r1 127d4: e1a05002 mov r5, r2 127d8: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 127dc: 03a0000e moveq r0, #14 ; 0xe 127e0: 0a000005 beq 127fc return RTEMS_INCORRECT_STATE; if ( !routine ) 127e4: e3520000 cmp r2, #0 ; 0x0 127e8: 03a00009 moveq r0, #9 ; 0x9 127ec: 0a000002 beq 127fc return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 127f0: e3510000 cmp r1, #0 ; 0x0 127f4: 03a0000a moveq r0, #10 ; 0xa 127f8: 1a000001 bne 12804 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 127fc: e28dd004 add sp, sp, #4 ; 0x4 12800: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 12804: e59f008c ldr r0, [pc, #140] ; 12898 12808: e1a01007 mov r1, r7 1280c: e1a0200d mov r2, sp 12810: eb000a12 bl 15060 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12814: e59d3000 ldr r3, [sp] 12818: e3530000 cmp r3, #0 ; 0x0 1281c: e1a04000 mov r4, r0 12820: 13a00004 movne r0, #4 ; 0x4 12824: 1afffff4 bne 127fc case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12828: e2840010 add r0, r4, #16 ; 0x10 1282c: eb00128a bl 1725c <_Watchdog_Remove> _ISR_Disable( level ); 12830: e10f1000 mrs r1, CPSR 12834: e38130c0 orr r3, r1, #192 ; 0xc0 12838: 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 ) { 1283c: e5942018 ldr r2, [r4, #24] 12840: e3520000 cmp r2, #0 ; 0x0 12844: 1a00000e bne 12884 /* * 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; 12848: e3a03001 mov r3, #1 ; 0x1 1284c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12850: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 12854: e584502c str r5, [r4, #44] the_watchdog->id = id; 12858: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 1285c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 12860: e584601c str r6, [r4, #28] _ISR_Enable( level ); 12864: 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 ); 12868: e59f302c ldr r3, [pc, #44] ; 1289c 1286c: e1a00004 mov r0, r4 12870: e1a0e00f mov lr, pc 12874: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 12878: eb000c3d bl 15974 <_Thread_Enable_dispatch> 1287c: e3a00000 mov r0, #0 ; 0x0 12880: eaffffdd b 127fc * 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 ); 12884: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Enable_dispatch(); 12888: eb000c39 bl 15974 <_Thread_Enable_dispatch> <== NOT EXECUTED 1288c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12890: eaffffd9 b 127fc <== NOT EXECUTED 12894: 00031674 .word 0x00031674 12898: 00031630 .word 0x00031630 1289c: 00031670 .word 0x00031670 000128a0 : Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128a0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128a4: e59fc0e4 ldr ip, [pc, #228] ; 12990 128a8: e59c4000 ldr r4, [ip] 128ac: e3540000 cmp r4, #0 ; 0x0 Objects_Id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 128b0: e1a06000 mov r6, r0 128b4: e24dd004 sub sp, sp, #4 ; 0x4 128b8: e1a04001 mov r4, r1 128bc: e1a05002 mov r5, r2 128c0: e1a0a003 mov sl, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_Timer_Server ) 128c4: 03a0000e moveq r0, #14 ; 0xe 128c8: 0a00000c beq 12900 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 128cc: e59f30c0 ldr r3, [pc, #192] ; 12994 128d0: e5d32000 ldrb r2, [r3] 128d4: e3520000 cmp r2, #0 ; 0x0 128d8: 03a0000b moveq r0, #11 ; 0xb 128dc: 0a000007 beq 12900 return RTEMS_NOT_DEFINED; if ( !routine ) 128e0: e3550000 cmp r5, #0 ; 0x0 128e4: 03a00009 moveq r0, #9 ; 0x9 128e8: 0a000004 beq 12900 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 128ec: e1a00001 mov r0, r1 128f0: ebfff458 bl fa58 <_TOD_Validate> 128f4: e3500000 cmp r0, #0 ; 0x0 128f8: 1a000002 bne 12908 */ (*_Timer_Server_schedule_operation)( the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 128fc: e3a00014 mov r0, #20 ; 0x14 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 12900: e28dd004 add sp, sp, #4 ; 0x4 12904: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 12908: e1a00004 mov r0, r4 1290c: ebfff417 bl f970 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch ) 12910: e59f9080 ldr r9, [pc, #128] ; 12998 12914: e5993000 ldr r3, [r9] 12918: e1500003 cmp r0, r3 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 1291c: e1a08000 mov r8, r0 if ( seconds <= _TOD_Seconds_since_epoch ) 12920: 9afffff5 bls 128fc 12924: e59f0070 ldr r0, [pc, #112] ; 1299c 12928: e1a01006 mov r1, r6 1292c: e1a0200d mov r2, sp 12930: eb0009ca bl 15060 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 12934: e59d7000 ldr r7, [sp] 12938: e3570000 cmp r7, #0 ; 0x0 1293c: e1a04000 mov r4, r0 12940: 13a00004 movne r0, #4 ; 0x4 12944: 1affffed bne 12900 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 12948: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED 1294c: eb001242 bl 1725c <_Watchdog_Remove> <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 12950: e5846030 str r6, [r4, #48] <== NOT EXECUTED the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12954: e5993000 ldr r3, [r9] <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12958: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 1295c: e0633008 rsb r3, r3, r8 <== NOT EXECUTED /* * _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 ); 12960: e1a00004 mov r0, r4 <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 12964: e5842038 str r2, [r4, #56] <== NOT EXECUTED _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch; 12968: e584301c str r3, [r4, #28] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 1296c: e584502c str r5, [r4, #44] <== NOT EXECUTED /* * _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 ); 12970: e59f3028 ldr r3, [pc, #40] ; 129a0 <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 12974: e584a034 str sl, [r4, #52] <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 12978: e5847018 str r7, [r4, #24] <== NOT EXECUTED 1297c: e1a0e00f mov lr, pc <== NOT EXECUTED 12980: e593f000 ldr pc, [r3] <== NOT EXECUTED _Thread_Enable_dispatch(); 12984: eb000bfa bl 15974 <_Thread_Enable_dispatch> <== NOT EXECUTED 12988: e1a00007 mov r0, r7 <== NOT EXECUTED 1298c: eaffffdb b 12900 <== NOT EXECUTED 12990: 00031674 .word 0x00031674 12994: 0003139c .word 0x0003139c 12998: 00031414 .word 0x00031414 1299c: 00031630 .word 0x00031630 129a0: 00031670 .word 0x00031670