00011a98 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11a98: e590304c ldr r3, [r0, #76] size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11a9c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11aa0: e1520003 cmp r2, r3 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 11aa4: e1a07000 mov r7, r0 11aa8: e1a06002 mov r6, r2 11aac: e1a08001 mov r8, r1 11ab0: e59da020 ldr sl, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 11ab4: 83a00001 movhi r0, #1 ; 0x1 11ab8: 88bd85f0 pophi {r4, r5, r6, r7, r8, sl, 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 ) { 11abc: e5973048 ldr r3, [r7, #72] 11ac0: e3530000 cmp r3, #0 ; 0x0 *count = 0; 11ac4: 13a03000 movne 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))) { 11ac8: 01a05003 moveq r5, r3 * 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 ) { *count = 0; 11acc: 158a3000 strne r3, [sl] 11ad0: 11a00003 movne r0, 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 ) { 11ad4: 0a000005 beq 11af0 <_CORE_message_queue_Broadcast+0x58> 11ad8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 11adc: e594002c ldr r0, [r4, #44] 11ae0: eb001c44 bl 18bf8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 11ae4: e5943028 ldr r3, [r4, #40] 11ae8: 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; 11aec: 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))) { 11af0: e1a00007 mov r0, r7 11af4: eb00092d bl 13fb0 <_Thread_queue_Dequeue> 11af8: e2504000 subs r4, r0, #0 ; 0x0 11afc: e1a01008 mov r1, r8 11b00: e1a02006 mov r2, r6 11b04: 1afffff4 bne 11adc <_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; 11b08: e58a5000 str r5, [sl] 11b0c: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 11b10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 000124e8 <_CORE_message_queue_Insert_message>: ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 124e8: 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 ) { 124ec: e92d4030 push {r4, r5, lr} ISR_Level level; bool notify = false; the_message->priority = submit_type; 124f0: 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 ) { 124f4: e1a05001 mov r5, r1 124f8: e1a04000 mov r4, r0 ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 124fc: 0a000012 beq 1254c <_CORE_message_queue_Insert_message+0x64> 12500: e3720106 cmn r2, #-2147483647 ; 0x80000001 12504: e280c054 add ip, r0, #84 ; 0x54 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; 12508: 15901050 ldrne r1, [r0, #80] ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 1250c: 1a000022 bne 1259c <_CORE_message_queue_Insert_message+0xb4> case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 12510: e10f0000 mrs r0, CPSR 12514: e38030c0 orr r3, r0, #192 ; 0xc0 12518: e129f003 msr CPSR_fc, r3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 1251c: e585c000 str ip, [r5] if ( the_message_queue->number_of_pending_messages++ == 0 ) 12520: e5942048 ldr r2, [r4, #72] old_last_node = the_chain->last; 12524: e5941058 ldr r1, [r4, #88] 12528: e2823001 add r3, r2, #1 ; 0x1 the_chain->last = the_node; 1252c: e5845058 str r5, [r4, #88] 12530: e5843048 str r3, [r4, #72] 12534: e2722001 rsbs r2, r2, #1 ; 0x1 12538: 33a02000 movcc r2, #0 ; 0x0 old_last_node->next = the_node; the_node->previous = old_last_node; 1253c: 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; 12540: e5815000 str r5, [r1] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 12544: e129f000 msr CPSR_fc, r0 12548: ea000024 b 125e0 <_CORE_message_queue_Insert_message+0xf8> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 1254c: e10fc000 mrs ip, CPSR 12550: e38c30c0 orr r3, ip, #192 ; 0xc0 12554: e129f003 msr CPSR_fc, r3 if ( the_message_queue->number_of_pending_messages++ == 0 ) 12558: e5901048 ldr r1, [r0, #72] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1255c: e5900050 ldr r0, [r0, #80] 12560: e2812001 add r2, r1, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 12564: e2843050 add r3, r4, #80 ; 0x50 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 12568: e5853004 str r3, [r5, #4] 1256c: e5842048 str r2, [r4, #72] before_node = after_node->next; after_node->next = the_node; 12570: e5845050 str r5, [r4, #80] the_node->next = before_node; before_node->previous = the_node; 12574: e5805004 str r5, [r0, #4] 12578: e2712001 rsbs r2, r1, #1 ; 0x1 1257c: 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; 12580: e5850000 str r0, [r5] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 12584: e129f00c msr CPSR_fc, ip 12588: ea000014 b 125e0 <_CORE_message_queue_Insert_message+0xf8> the_node = the_header->first; while ( !_Chain_Is_tail( the_header, the_node ) ) { this_message = (CORE_message_queue_Buffer_control *) the_node; if ( this_message->priority <= the_message->priority ) { 1258c: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 12590: e1530002 cmp r3, r2 <== NOT EXECUTED 12594: ca000002 bgt 125a4 <_CORE_message_queue_Insert_message+0xbc> <== NOT EXECUTED the_node = the_node->next; 12598: 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 ) ) { 1259c: e151000c cmp r1, ip <== NOT EXECUTED 125a0: 1afffff9 bne 1258c <_CORE_message_queue_Insert_message+0xa4> <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 125a4: e10fc000 mrs ip, CPSR <== NOT EXECUTED 125a8: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 125ac: 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 ); 125b0: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 125b4: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 125b8: e5930000 ldr r0, [r3] <== NOT EXECUTED 125bc: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED after_node->next = the_node; 125c0: e5835000 str r5, [r3] <== NOT EXECUTED 125c4: e5842048 str r2, [r4, #72] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 125c8: e5853004 str r3, [r5, #4] <== NOT EXECUTED 125cc: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED 125d0: 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; 125d4: 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; 125d8: e5850000 str r0, [r5] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 125dc: 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 ) 125e0: e3520000 cmp r2, #0 ; 0x0 125e4: 08bd8030 popeq {r4, r5, pc} 125e8: e5943060 ldr r3, [r4, #96] 125ec: e3530000 cmp r3, #0 ; 0x0 125f0: 08bd8030 popeq {r4, r5, pc} (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 125f4: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 125f8: e1a0e00f mov lr, pc <== NOT EXECUTED 125fc: e12fff13 bx r3 <== NOT EXECUTED 12600: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000f990 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { f990: 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; f994: e59fc128 ldr ip, [pc, #296] ; fac4 <_CORE_message_queue_Seize+0x134> f998: e59cc000 ldr ip, [ip] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { f99c: e1a05000 mov r5, r0 f9a0: 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; f9a4: e3a03000 mov r3, #0 ; 0x0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { f9a8: e59da020 ldr sl, [sp, #32] f9ac: e1a07001 mov r7, r1 f9b0: e1a08002 mov r8, r2 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; f9b4: e58c3034 str r3, [ip, #52] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { f9b8: e5dd601c ldrb r6, [sp, #28] Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); f9bc: e10f1000 mrs r1, CPSR f9c0: e38130c0 orr r3, r1, #192 ; 0xc0 f9c4: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); f9c8: e5954050 ldr r4, [r5, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) f9cc: e2853054 add r3, r5, #84 ; 0x54 f9d0: e1540003 cmp r4, r3 f9d4: 0a000028 beq fa7c <_CORE_message_queue_Seize+0xec> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; f9d8: e5942000 ldr r2, [r4] the_chain->first = new_first; f9dc: e1a03005 mov r3, r5 f9e0: e5a32050 str r2, [r3, #80]! the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { f9e4: e3540000 cmp r4, #0 ; 0x0 new_first->previous = _Chain_Head(the_chain); f9e8: e5823004 str r3, [r2, #4] f9ec: 0a000022 beq fa7c <_CORE_message_queue_Seize+0xec> the_message_queue->number_of_pending_messages -= 1; f9f0: e5953048 ldr r3, [r5, #72] f9f4: e2433001 sub r3, r3, #1 ; 0x1 f9f8: e5853048 str r3, [r5, #72] _ISR_Enable( level ); f9fc: e129f001 msr CPSR_fc, r1 *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = the_message->priority; fa00: e59f30bc ldr r3, [pc, #188] ; fac4 <_CORE_message_queue_Seize+0x134> fa04: e5942008 ldr r2, [r4, #8] fa08: e5931000 ldr r1, [r3] 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; fa0c: e594300c ldr r3, [r4, #12] fa10: e5803000 str r3, [r0] _Thread_Executing->Wait.count = the_message->priority; fa14: e5812024 str r2, [r1, #36] _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); fa18: e2846010 add r6, r4, #16 ; 0x10 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); fa1c: e5902000 ldr r2, [r0] fa20: e1a01006 mov r1, r6 fa24: e1a00008 mov r0, r8 fa28: eb001210 bl 14270 * * 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 ); fa2c: e1a00005 mov r0, r5 fa30: ebffec45 bl ab4c <_Thread_queue_Dequeue> if ( !the_thread ) { fa34: e2501000 subs r1, r0, #0 ; 0x0 fa38: 1a000003 bne fa4c <_CORE_message_queue_Seize+0xbc> 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 ); fa3c: e2850068 add r0, r5, #104 ; 0x68 fa40: e1a01004 mov r1, r4 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 ); } fa44: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} fa48: eaffe5eb b 91fc <_Chain_Append> * 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; fa4c: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; fa50: 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; fa54: e5843008 str r3, [r4, #8] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; fa58: e584200c str r2, [r4, #12] <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); fa5c: e1a00006 mov r0, r6 <== NOT EXECUTED fa60: e591102c ldr r1, [r1, #44] <== NOT EXECUTED fa64: eb001201 bl 14270 <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( fa68: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED fa6c: e1a00005 mov r0, r5 <== NOT EXECUTED fa70: 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 ); } fa74: 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( fa78: ea000a9a b 124e8 <_CORE_message_queue_Insert_message> <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { fa7c: e3560000 cmp r6, #0 ; 0x0 fa80: 1a000003 bne fa94 <_CORE_message_queue_Seize+0x104> _ISR_Enable( level ); fa84: e129f001 msr CPSR_fc, r1 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; fa88: e3a03004 mov r3, #4 ; 0x4 fa8c: 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 ); } fa90: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} fa94: e3a03001 mov r3, #1 ; 0x1 fa98: 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; fa9c: 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; faa0: e58c7020 str r7, [ip, #32] executing->Wait.return_argument_second.mutable_object = buffer; faa4: e58c802c str r8, [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; faa8: 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 ); faac: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); fab0: e59f2010 ldr r2, [pc, #16] ; fac8 <_CORE_message_queue_Seize+0x138> fab4: e1a00005 mov r0, r5 fab8: e1a0100a mov r1, sl } fabc: 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 ); fac0: eaffec7a b acb0 <_Thread_queue_Enqueue_with_handler> fac4: 000230c4 .word 0x000230c4 fac8: 0000b088 .word 0x0000b088 0000facc <_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 ) { facc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { fad0: e590c04c ldr ip, [r0, #76] fad4: e152000c cmp r2, ip CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { fad8: e1a05000 mov r5, r0 fadc: e1a06002 mov r6, r2 fae0: e1a07001 mov r7, r1 fae4: e1a0b003 mov fp, r3 fae8: e59d9028 ldr r9, [sp, #40] faec: e5dda02c ldrb sl, [sp, #44] ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { faf0: 83a00001 movhi r0, #1 ; 0x1 faf4: 88bd8ff0 pophi {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { faf8: e5958048 ldr r8, [r5, #72] fafc: e3580000 cmp r8, #0 ; 0x0 fb00: 1a00000b bne fb34 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); fb04: ebffec10 bl ab4c <_Thread_queue_Dequeue> if ( the_thread ) { fb08: e2504000 subs r4, r0, #0 ; 0x0 fb0c: 0a000008 beq fb34 <_CORE_message_queue_Submit+0x68> fb10: e1a01007 mov r1, r7 fb14: e594002c ldr r0, [r4, #44] fb18: e1a02006 mov r2, r6 fb1c: eb0011d3 bl 14270 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; fb20: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; fb24: e1a00008 mov r0, r8 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; fb28: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; fb2c: e5849024 str r9, [r4, #36] fb30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* * 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 < fb34: e5952048 ldr r2, [r5, #72] fb38: e5953044 ldr r3, [r5, #68] fb3c: e1520003 cmp r2, r3 fb40: 2a00000f bcs fb84 <_CORE_message_queue_Submit+0xb8> 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 *) fb44: e2850068 add r0, r5, #104 ; 0x68 fb48: ebffe5b6 bl 9228 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { fb4c: e2504000 subs r4, r0, #0 ; 0x0 fb50: 0a000025 beq fbec <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); fb54: e1a01007 mov r1, r7 fb58: e1a02006 mov r2, r6 fb5c: e2840010 add r0, r4, #16 ; 0x10 fb60: eb0011c2 bl 14270 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( fb64: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; fb68: e584600c str r6, [r4, #12] the_message->priority = submit_type; fb6c: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( fb70: e1a01004 mov r1, r4 fb74: e1a02009 mov r2, r9 fb78: eb000a5a bl 124e8 <_CORE_message_queue_Insert_message> fb7c: e3a00000 mov r0, #0 ; 0x0 fb80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * 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 ) { fb84: e35a0000 cmp sl, #0 ; 0x0 fb88: 03a00002 moveq r0, #2 ; 0x2 fb8c: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, 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() ) { fb90: e59f305c ldr r3, [pc, #92] ; fbf4 <_CORE_message_queue_Submit+0x128> <== NOT EXECUTED fb94: e5933000 ldr r3, [r3] <== NOT EXECUTED fb98: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED fb9c: 1a000012 bne fbec <_CORE_message_queue_Submit+0x120> <== 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; fba0: e59f3050 ldr r3, [pc, #80] ; fbf8 <_CORE_message_queue_Submit+0x12c> <== NOT EXECUTED fba4: e5932000 ldr r2, [r3] <== NOT EXECUTED _ISR_Disable( level ); fba8: e10f1000 mrs r1, CPSR <== NOT EXECUTED fbac: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED fbb0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED fbb4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED fbb8: e5853030 str r3, [r5, #48] <== 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; fbbc: e5829024 str r9, [r2, #36] <== NOT EXECUTED Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; fbc0: e582b020 str fp, [r2, #32] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; fbc4: e582702c str r7, [r2, #44] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; fbc8: e5826030 str r6, [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; fbcc: e5825044 str r5, [r2, #68] <== NOT EXECUTED executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; executing->Wait.option = (uint32_t) size; executing->Wait.count = submit_type; _ISR_Enable( level ); fbd0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); fbd4: e59f2020 ldr r2, [pc, #32] ; fbfc <_CORE_message_queue_Submit+0x130> <== NOT EXECUTED fbd8: e1a00005 mov r0, r5 <== NOT EXECUTED fbdc: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED fbe0: ebffec32 bl acb0 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED fbe4: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED fbe8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; fbec: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } fbf0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED fbf4: 000230a0 .word 0x000230a0 fbf8: 000230c4 .word 0x000230c4 fbfc: 0000b088 .word 0x0000b088 000094dc <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 94dc: e59f3130 ldr r3, [pc, #304] ; 9614 <_CORE_mutex_Seize_interrupt_trylock+0x138> 94e0: e593c000 ldr ip, [r3] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 94e4: e3a02000 mov r2, #0 ; 0x0 CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 94e8: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 94ec: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 94f0: e5903050 ldr r3, [r0, #80] 94f4: e1530002 cmp r3, r2 #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 94f8: e52de004 push {lr} ; (str lr, [sp, #-4]!) 94fc: 0a00002f beq 95c0 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 9500: 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; 9504: e5902048 ldr r2, [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; 9508: e59c3008 ldr r3, [ip, #8] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 950c: e3520002 cmp r2, #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; 9510: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; 9514: e3a03001 mov r3, #1 ; 0x1 9518: 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; 951c: 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 ) || 9520: 0a000001 beq 952c <_CORE_mutex_Seize_interrupt_trylock+0x50> 9524: e3520003 cmp r2, #3 ; 0x3 <== NOT EXECUTED 9528: 1a000002 bne 9538 <_CORE_mutex_Seize_interrupt_trylock+0x5c> <== NOT EXECUTED _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 952c: e59c301c ldr r3, [ip, #28] 9530: e2833001 add r3, r3, #1 ; 0x1 9534: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9538: e5903048 ldr r3, [r0, #72] 953c: e3530003 cmp r3, #3 ; 0x3 9540: 0a000001 beq 954c <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 9544: e129f001 msr CPSR_fc, r1 9548: ea00002d b 9604 <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 954c: e590204c ldr r2, [r0, #76] <== NOT EXECUTED current = executing->current_priority; 9550: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED if ( current == ceiling ) { 9554: e1530002 cmp r3, r2 <== NOT EXECUTED 9558: 1a000001 bne 9564 <_CORE_mutex_Seize_interrupt_trylock+0x88> <== NOT EXECUTED _ISR_Enable( level ); 955c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 9560: ea000027 b 9604 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 9564: 9a00000a bls 9594 <_CORE_mutex_Seize_interrupt_trylock+0xb8> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9568: e59f20a8 ldr r2, [pc, #168] ; 9618 <_CORE_mutex_Seize_interrupt_trylock+0x13c> <== NOT EXECUTED 956c: e5923000 ldr r3, [r2] <== NOT EXECUTED 9570: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 9574: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 9578: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Change_priority( 957c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 9580: e590104c ldr r1, [r0, #76] <== NOT EXECUTED 9584: e590005c ldr r0, [r0, #92] <== NOT EXECUTED 9588: ebfff1ac bl 5c40 <_Thread_Change_priority> <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 958c: ebfff313 bl 61e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 9590: ea00001b b 9604 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9594: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED 9598: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 959c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 95a0: e5803054 str r3, [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; 95a4: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 95a8: e5803050 str r3, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 95ac: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 95b0: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 95b4: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 95b8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 95bc: ea000010 b 9604 <_CORE_mutex_Seize_interrupt_trylock+0x128> <== 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 ) ) { 95c0: e590205c ldr r2, [r0, #92] 95c4: e152000c cmp r2, ip 95c8: 1a00000f bne 960c <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 95cc: e5903040 ldr r3, [r0, #64] 95d0: e3530000 cmp r3, #0 ; 0x0 95d4: 0a000002 beq 95e4 <_CORE_mutex_Seize_interrupt_trylock+0x108> 95d8: e3530001 cmp r3, #1 ; 0x1 95dc: 1a00000a bne 960c <_CORE_mutex_Seize_interrupt_trylock+0x130> 95e0: ea000004 b 95f8 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 95e4: e5903054 ldr r3, [r0, #84] 95e8: e2833001 add r3, r3, #1 ; 0x1 95ec: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 95f0: e129f001 msr CPSR_fc, r1 95f4: ea000002 b 9604 <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 95f8: e3a03002 mov r3, #2 ; 0x2 95fc: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 9600: e129f001 msr CPSR_fc, r1 9604: e3a00000 mov r0, #0 ; 0x0 9608: e49df004 pop {pc} ; (ldr pc, [sp], #4) 960c: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9610: e49df004 pop {pc} ; (ldr pc, [sp], #4) 9614: 00015444 .word 0x00015444 9618: 0001538c .word 0x0001538c 00004f2c <_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 ) { 4f2c: e5d03044 ldrb r3, [r0, #68] 4f30: 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 ) { 4f34: e92d4010 push {r4, lr} 4f38: 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; 4f3c: 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 ) { 4f40: 0a000004 beq 4f58 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 4f44: e59f312c ldr r3, [pc, #300] ; 5078 <_CORE_mutex_Surrender+0x14c> 4f48: e5933000 ldr r3, [r3] 4f4c: e1500003 cmp r0, r3 4f50: 13a00003 movne r0, #3 ; 0x3 4f54: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 4f58: e5943054 ldr r3, [r4, #84] 4f5c: e3530000 cmp r3, #0 ; 0x0 4f60: 0a000042 beq 5070 <_CORE_mutex_Surrender+0x144> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 4f64: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 4f68: 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--; 4f6c: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 4f70: 0a000005 beq 4f8c <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4f74: e5943040 ldr r3, [r4, #64] 4f78: e3530000 cmp r3, #0 ; 0x0 4f7c: 0a00003b beq 5070 <_CORE_mutex_Surrender+0x144> 4f80: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 4f84: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 4f88: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 4f8c: e5943048 ldr r3, [r4, #72] /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4f90: e3530002 cmp r3, #2 ; 0x2 4f94: 0a000001 beq 4fa0 <_CORE_mutex_Surrender+0x74> 4f98: e3530003 cmp r3, #3 ; 0x3 4f9c: 1a000002 bne 4fac <_CORE_mutex_Surrender+0x80> the_mutex->nest_count++; return CORE_MUTEX_RELEASE_NOT_ORDER; } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; 4fa0: e590301c ldr r3, [r0, #28] 4fa4: e2433001 sub r3, r3, #1 ; 0x1 4fa8: e580301c str r3, [r0, #28] 4fac: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 4fb0: 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 ) || 4fb4: 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; 4fb8: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 4fbc: 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 ) || 4fc0: 0a000001 beq 4fcc <_CORE_mutex_Surrender+0xa0> 4fc4: e3520003 cmp r2, #3 ; 0x3 4fc8: 1a000007 bne 4fec <_CORE_mutex_Surrender+0xc0> _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 && 4fcc: e590301c ldr r3, [r0, #28] 4fd0: e3530000 cmp r3, #0 ; 0x0 4fd4: 1a000004 bne 4fec <_CORE_mutex_Surrender+0xc0> 4fd8: e5901018 ldr r1, [r0, #24] 4fdc: e5903014 ldr r3, [r0, #20] 4fe0: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 4fe4: 13a02001 movne r2, #1 ; 0x1 4fe8: 1b000314 blne 5c40 <_Thread_Change_priority> /* * 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 ) ) ) { 4fec: e1a00004 mov r0, r4 4ff0: eb00055c bl 6568 <_Thread_queue_Dequeue> 4ff4: e2502000 subs r2, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 4ff8: 03a03001 moveq r3, #1 ; 0x1 4ffc: 05843050 streq r3, [r4, #80] 5000: 01a00002 moveq r0, r2 /* * 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 ) ) ) { 5004: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 5008: e5923008 ldr r3, [r2, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 500c: e5941048 ldr r1, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 5010: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5014: e3510002 cmp r1, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 5018: e3a03001 mov r3, #1 ; 0x1 501c: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 5020: e584205c str r2, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 5024: 0a000002 beq 5034 <_CORE_mutex_Surrender+0x108> 5028: e3510003 cmp r1, #3 ; 0x3 502c: 1a00000f bne 5070 <_CORE_mutex_Surrender+0x144> 5030: ea000003 b 5044 <_CORE_mutex_Surrender+0x118> <== 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++; 5034: e592301c ldr r3, [r2, #28] 5038: e2833001 add r3, r3, #1 ; 0x1 503c: e582301c str r3, [r2, #28] 5040: ea000008 b 5068 <_CORE_mutex_Surrender+0x13c> 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++; 5044: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 5048: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 504c: e582301c str r3, [r2, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 5050: e5923014 ldr r3, [r2, #20] <== NOT EXECUTED 5054: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 5058: e1510003 cmp r1, r3 <== NOT EXECUTED 505c: 2a000003 bcs 5070 <_CORE_mutex_Surrender+0x144> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 5060: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 5064: eb0002f5 bl 5c40 <_Thread_Change_priority> <== NOT EXECUTED 5068: e3a00000 mov r0, #0 ; 0x0 506c: e8bd8010 pop {r4, pc} } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 5070: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 5074: e8bd8010 pop {r4, pc} 5078: 00015444 .word 0x00015444 0001e850 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 1e850: e10f2000 mrs r2, CPSR <== NOT EXECUTED 1e854: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 1e858: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 1e85c: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 1e860: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 1e864: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 1e868: 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; 1e86c: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 1e870: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 1e874: e12fff1e bx lr <== NOT EXECUTED 000093d8 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 93d8: e59f3010 ldr r3, [pc, #16] ; 93f0 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 93dc: e5933000 ldr r3, [r3] <== NOT EXECUTED 93e0: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 93e4: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 93e8: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 93ec: e12fff1e bx lr <== NOT EXECUTED 93f0: 00015448 .word 0x00015448 00003d54 <_Event_Seize>: rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d54: e59fc104 ldr ip, [pc, #260] ; 3e60 <_Event_Seize+0x10c> rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d58: e92d40f0 push {r4, r5, r6, r7, lr} rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Thread_blocking_operation_States sync_state; executing = _Thread_Executing; 3d5c: e59c4000 ldr r4, [ip] executing->Wait.return_code = RTEMS_SUCCESSFUL; 3d60: e3a0c000 mov ip, #0 ; 0x0 3d64: e584c034 str ip, [r4, #52] rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 3d68: e1a07002 mov r7, r2 3d6c: e1a05003 mov r5, r3 Thread_blocking_operation_States sync_state; executing = _Thread_Executing; executing->Wait.return_code = RTEMS_SUCCESSFUL; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3d70: e5946104 ldr r6, [r4, #260] _ISR_Disable( level ); 3d74: e10fc000 mrs ip, CPSR 3d78: e38c30c0 orr r3, ip, #192 ; 0xc0 3d7c: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3d80: e5963000 ldr r3, [r6] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 3d84: e0102003 ands r2, r0, r3 3d88: 0a000007 beq 3dac <_Event_Seize+0x58> 3d8c: e1520000 cmp r2, r0 3d90: 0a000001 beq 3d9c <_Event_Seize+0x48> 3d94: e3110002 tst r1, #2 ; 0x2 3d98: 0a000003 beq 3dac <_Event_Seize+0x58> (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 3d9c: e1c33002 bic r3, r3, r2 3da0: e5863000 str r3, [r6] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 3da4: e129f00c msr CPSR_fc, ip 3da8: ea000004 b 3dc0 <_Event_Seize+0x6c> *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { 3dac: e3110001 tst r1, #1 ; 0x1 3db0: 0a000004 beq 3dc8 <_Event_Seize+0x74> _ISR_Enable( level ); 3db4: e129f00c msr CPSR_fc, ip executing->Wait.return_code = RTEMS_UNSATISFIED; 3db8: e3a0300d mov r3, #13 ; 0xd 3dbc: e5843034 str r3, [r4, #52] *event_out = seized_events; 3dc0: e5852000 str r2, [r5] 3dc4: e8bd80f0 pop {r4, r5, r6, r7, pc} return; } _Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 3dc8: e59f3094 ldr r3, [pc, #148] ; 3e64 <_Event_Seize+0x110> 3dcc: e3a02001 mov r2, #1 ; 0x1 3dd0: e5832000 str r2, [r3] executing->Wait.option = (uint32_t) option_set; 3dd4: e5841030 str r1, [r4, #48] executing->Wait.count = (uint32_t) event_in; 3dd8: e5840024 str r0, [r4, #36] executing->Wait.return_argument = event_out; 3ddc: e5845028 str r5, [r4, #40] _ISR_Enable( level ); 3de0: e129f00c msr CPSR_fc, ip if ( ticks ) { 3de4: e3570000 cmp r7, #0 ; 0x0 3de8: 0a00000a beq 3e18 <_Event_Seize+0xc4> _Watchdog_Initialize( 3dec: e5943008 ldr r3, [r4, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 3df0: e59f2070 ldr r2, [pc, #112] ; 3e68 <_Event_Seize+0x114> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3df4: e3a01000 mov r1, #0 ; 0x0 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 3df8: e584106c str r1, [r4, #108] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 3dfc: e5841050 str r1, [r4, #80] the_watchdog->routine = routine; 3e00: e5842064 str r2, [r4, #100] the_watchdog->id = id; 3e04: e5843068 str r3, [r4, #104] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3e08: e5847054 str r7, [r4, #84] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 3e0c: e59f0058 ldr r0, [pc, #88] ; 3e6c <_Event_Seize+0x118> 3e10: e2841048 add r1, r4, #72 ; 0x48 3e14: eb000d2c bl 72cc <_Watchdog_Insert> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 3e18: e1a00004 mov r0, r4 3e1c: e3a01c01 mov r1, #256 ; 0x100 3e20: eb000b4b bl 6b54 <_Thread_Set_state> _ISR_Disable( level ); 3e24: e10fc000 mrs ip, CPSR 3e28: e38c30c0 orr r3, ip, #192 ; 0xc0 3e2c: e129f003 msr CPSR_fc, r3 sync_state = _Event_Sync_state; 3e30: e59f202c ldr r2, [pc, #44] ; 3e64 <_Event_Seize+0x110> 3e34: e5920000 ldr r0, [r2] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3e38: e3a03000 mov r3, #0 ; 0x0 if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e3c: 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; 3e40: e5823000 str r3, [r2] if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { 3e44: 1a000001 bne 3e50 <_Event_Seize+0xfc> _ISR_Enable( level ); 3e48: e129f00c msr CPSR_fc, ip 3e4c: e8bd80f0 pop {r4, r5, r6, r7, pc} * 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 ); 3e50: e1a01004 mov r1, r4 <== NOT EXECUTED 3e54: e1a0200c mov r2, ip <== NOT EXECUTED } 3e58: e8bd40f0 pop {r4, r5, r6, r7, 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 ); 3e5c: ea000764 b 5bf4 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED 3e60: 00015444 .word 0x00015444 3e64: 000155e4 .word 0x000155e4 3e68: 00004004 .word 0x00004004 3e6c: 00015464 .word 0x00015464 00003ec8 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 3ec8: e92d40f0 push {r4, r5, r6, r7, lr} 3ecc: e1a04000 mov r4, r0 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 ]; 3ed0: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 3ed4: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 3ed8: e10f5000 mrs r5, CPSR 3edc: e38530c0 orr r3, r5, #192 ; 0xc0 3ee0: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 3ee4: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 3ee8: e5902024 ldr r2, [r0, #36] seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 3eec: e012000c ands r0, r2, ip 3ef0: 1a000001 bne 3efc <_Event_Surrender+0x34> _ISR_Enable( level ); 3ef4: e129f005 msr CPSR_fc, r5 3ef8: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * 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() && 3efc: e59f30f0 ldr r3, [pc, #240] ; 3ff4 <_Event_Surrender+0x12c> 3f00: e5933000 ldr r3, [r3] 3f04: e3530000 cmp r3, #0 ; 0x0 3f08: 0a000019 beq 3f74 <_Event_Surrender+0xac> 3f0c: e59f30e4 ldr r3, [pc, #228] ; 3ff8 <_Event_Surrender+0x130> 3f10: e5933000 ldr r3, [r3] 3f14: e1540003 cmp r4, r3 3f18: 1a000015 bne 3f74 <_Event_Surrender+0xac> 3f1c: e59f10d8 ldr r1, [pc, #216] ; 3ffc <_Event_Surrender+0x134> <== NOT EXECUTED 3f20: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f24: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 3f28: 0a000002 beq 3f38 <_Event_Surrender+0x70> <== NOT EXECUTED 3f2c: e5913000 ldr r3, [r1] <== NOT EXECUTED 3f30: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED 3f34: 1a00000e bne 3f74 <_Event_Surrender+0xac> <== 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) ) { 3f38: e1500002 cmp r0, r2 <== NOT EXECUTED 3f3c: 0a000001 beq 3f48 <_Event_Surrender+0x80> <== NOT EXECUTED 3f40: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 3f44: 0a000008 beq 3f6c <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 3f48: e1cc3000 bic r3, ip, r0 <== NOT EXECUTED 3f4c: e5863000 str r3, [r6] <== NOT EXECUTED the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f50: e59f30a4 ldr r3, [pc, #164] ; 3ffc <_Event_Surrender+0x134> <== 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; 3f54: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 3f58: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 3f5c: e5832000 str r2, [r3] <== 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; 3f60: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 3f64: e5843024 str r3, [r4, #36] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f68: e5810000 str r0, [r1] <== NOT EXECUTED _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 3f6c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3f70: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 3f74: e5943010 ldr r3, [r4, #16] 3f78: e3130c01 tst r3, #256 ; 0x100 3f7c: 0a00001a beq 3fec <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 3f80: e1500002 cmp r0, r2 3f84: 0a000001 beq 3f90 <_Event_Surrender+0xc8> 3f88: e3170002 tst r7, #2 ; 0x2 3f8c: 0a000016 beq 3fec <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 3f90: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3f94: e5942028 ldr r2, [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 ); 3f98: e5863000 str r3, [r6] the_thread->Wait.count = 0; 3f9c: e3a03000 mov r3, #0 ; 0x0 3fa0: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 3fa4: e5820000 str r0, [r2] _ISR_Flash( level ); 3fa8: e10f3000 mrs r3, CPSR 3fac: e129f005 msr CPSR_fc, r5 3fb0: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3fb4: e5943050 ldr r3, [r4, #80] 3fb8: e3530002 cmp r3, #2 ; 0x2 3fbc: 0a000001 beq 3fc8 <_Event_Surrender+0x100> _ISR_Enable( level ); 3fc0: e129f005 msr CPSR_fc, r5 3fc4: ea000004 b 3fdc <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 3fc8: e3a03003 mov r3, #3 ; 0x3 3fcc: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3fd0: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 3fd4: e2840048 add r0, r4, #72 ; 0x48 3fd8: eb000d17 bl 743c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3fdc: e59f101c ldr r1, [pc, #28] ; 4000 <_Event_Surrender+0x138> 3fe0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 3fe4: e8bd40f0 pop {r4, r5, r6, r7, lr} 3fe8: ea00077c b 5de0 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 3fec: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 3ff0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 3ff4: 00015420 .word 0x00015420 3ff8: 00015444 .word 0x00015444 3ffc: 000155e4 .word 0x000155e4 4000: 1003fff8 .word 0x1003fff8 00004004 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 4004: e52de004 push {lr} ; (str lr, [sp, #-4]!) 4008: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 400c: e1a0100d mov r1, sp 4010: eb00087b bl 6204 <_Thread_Get> switch ( location ) { 4014: e59d2000 ldr r2, [sp] 4018: e3520000 cmp r2, #0 ; 0x0 401c: 1a00001e bne 409c <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 4020: e10f1000 mrs r1, CPSR 4024: e38130c0 orr r3, r1, #192 ; 0xc0 4028: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 402c: e5903024 ldr r3, [r0, #36] 4030: e3530000 cmp r3, #0 ; 0x0 4034: 1a000005 bne 4050 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4038: e59f2064 ldr r2, [pc, #100] ; 40a4 <_Event_Timeout+0xa0> <== NOT EXECUTED 403c: e5923000 ldr r3, [r2] <== NOT EXECUTED 4040: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 4044: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 4048: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 404c: ea000012 b 409c <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 4050: e59f3050 ldr r3, [pc, #80] ; 40a8 <_Event_Timeout+0xa4> 4054: e5933000 ldr r3, [r3] 4058: e1500003 cmp r0, r3 _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 405c: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 4060: 1a000004 bne 4078 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 4064: e59f2040 ldr r2, [pc, #64] ; 40ac <_Event_Timeout+0xa8> <== NOT EXECUTED 4068: e5923000 ldr r3, [r2] <== NOT EXECUTED if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 406c: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4070: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED 4074: 95823000 strls r3, [r2] <== NOT EXECUTED } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4078: e3a03006 mov r3, #6 ; 0x6 407c: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 4080: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4084: e59f1024 ldr r1, [pc, #36] ; 40b0 <_Event_Timeout+0xac> 4088: eb000754 bl 5de0 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 408c: e59f2010 ldr r2, [pc, #16] ; 40a4 <_Event_Timeout+0xa0> 4090: e5923000 ldr r3, [r2] 4094: e2433001 sub r3, r3, #1 ; 0x1 4098: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 409c: e28dd004 add sp, sp, #4 ; 0x4 40a0: e8bd8000 pop {pc} 40a4: 0001538c .word 0x0001538c 40a8: 00015444 .word 0x00015444 40ac: 000155e4 .word 0x000155e4 40b0: 1003fff8 .word 0x1003fff8 00009688 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 9688: e92d4070 push {r4, r5, r6, lr} 968c: e1a04000 mov r4, r0 Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 9690: e5942014 ldr r2, [r4, #20] 9694: e1a00001 mov r0, r1 9698: e5941010 ldr r1, [r4, #16] 969c: ebffef2c bl 5354 <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 96a0: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 96a4: 15945008 ldrne r5, [r4, #8] 96a8: 13a06000 movne r6, #0 ; 0x0 96ac: 1a000012 bne 96fc <_Heap_Allocate+0x74> 96b0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 96b4: e5953004 ldr r3, [r5, #4] 96b8: e1530000 cmp r3, r0 96bc: 3a00000c bcc 96f4 <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 96c0: e1a02000 mov r2, r0 96c4: e1a01005 mov r1, r5 96c8: e1a00004 mov r0, r4 96cc: ebffef30 bl 5394 <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 96d0: e2842048 add r2, r4, #72 ; 0x48 96d4: e892000c ldm r2, {r2, r3} 96d8: e2833001 add r3, r3, #1 ; 0x1 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 96dc: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 96e0: e0833006 add r3, r3, r6 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 96e4: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 96e8: e584304c str r3, [r4, #76] 96ec: e2850008 add r0, r5, #8 ; 0x8 96f0: ea000004 b 9708 <_Heap_Allocate+0x80> return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 96f4: e5955008 ldr r5, [r5, #8] 96f8: e2866001 add r6, r6, #1 ; 0x1 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 96fc: e1550004 cmp r5, r4 9700: 1affffeb bne 96b4 <_Heap_Allocate+0x2c> 9704: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 9708: e5943044 ldr r3, [r4, #68] 970c: e1530006 cmp r3, r6 stats->max_search = search_count; 9710: 35846044 strcc r6, [r4, #68] return ptr; } 9714: e8bd8070 pop {r4, r5, r6, pc} 00027bd0 <_Heap_Get_information>: 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; 27bd0: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 27bd4: e92d4030 push {r4, r5, lr} 27bd8: 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; 27bdc: e5813010 str r3, [r1, #16] Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 27be0: e5905024 ldr r5, [r0, #36] _HAssert(the_block->prev_size == HEAP_PREV_USED); _HAssert(_Heap_Is_prev_used(the_block)); the_info->Free.number = 0; 27be4: e5813000 str r3, [r1] the_info->Free.total = 0; 27be8: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 27bec: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 27bf0: e581300c str r3, [r1, #12] the_info->Used.total = 0; 27bf4: e5813014 str r3, [r1, #20] Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->start; 27bf8: e5902020 ldr r2, [r0, #32] 27bfc: ea00001e b 27c7c <_Heap_Get_information+0xac> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 27c00: e5923004 ldr r3, [r2, #4] 27c04: e3c30001 bic r0, r3, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 27c08: e0824000 add r4, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { 27c0c: e5943004 ldr r3, [r4, #4] 27c10: e3130001 tst r3, #1 ; 0x1 27c14: 0a000009 beq 27c40 <_Heap_Get_information+0x70> the_info->Used.number++; 27c18: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 27c1c: e59c1014 ldr r1, [ip, #20] if ( the_info->Used.largest < the_size ) 27c20: 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++; 27c24: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 27c28: 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; 27c2c: 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++; 27c30: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 27c34: e58c1014 str r1, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 27c38: 358c0010 strcc r0, [ip, #16] 27c3c: ea00000d b 27c78 <_Heap_Get_information+0xa8> } else { the_info->Free.number++; 27c40: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 27c44: e59c1008 ldr r1, [ip, #8] if ( the_info->Free.largest < the_size ) 27c48: 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++; 27c4c: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 27c50: 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; 27c54: e0811000 add r1, r1, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 27c58: 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++; 27c5c: e58c3000 str r3, [ip] the_info->Free.total += the_size; 27c60: 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 ) 27c64: e5943000 ldr r3, [r4] 27c68: e1500003 cmp r0, r3 27c6c: 0a000001 beq 27c78 <_Heap_Get_information+0xa8> 27c70: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 27c74: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 27c78: 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 ) { 27c7c: e1520005 cmp r2, r5 27c80: 1affffde bne 27c00 <_Heap_Get_information+0x30> } /* 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; 27c84: e59c3014 ldr r3, [ip, #20] 27c88: e2833008 add r3, r3, #8 ; 0x8 27c8c: e58c3014 str r3, [ip, #20] 27c90: e3a00000 mov r0, #0 ; 0x0 return HEAP_GET_INFORMATION_SUCCESSFUL; } 27c94: e8bd8030 pop {r4, r5, pc} 000131f4 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 131f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 131f8: e1a05000 mov r5, r0 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; 131fc: e5900014 ldr r0, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13200: e24dd00c sub sp, sp, #12 ; 0xc 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; 13204: e58d0004 str r0, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 13208: e59d0030 ldr r0, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 1320c: 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; 13210: e3a03000 mov r3, #0 ; 0x0 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13214: e595c010 ldr ip, [r5, #16] *old_mem_size = 0; 13218: e5893000 str r3, [r9] *avail_mem_size = 0; 1321c: e5803000 str r3, [r0] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 13220: 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); 13224: e1a00001 mov r0, r1 13228: e5951010 ldr r1, [r5, #16] 1322c: e1a08002 mov r8, r2 uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 13230: e58dc008 str ip, [sp, #8] 13234: ebfff8ca bl 11564 <__umodsi3> 13238: e2443008 sub r3, 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 ); 1323c: e2851020 add r1, r5, #32 ; 0x20 13240: e8910006 ldm r1, {r1, r2} /* 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); 13244: e0607003 rsb r7, r0, r3 *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)) 13248: e1570001 cmp r7, r1 1324c: 33a03000 movcc r3, #0 ; 0x0 13250: 23a03001 movcs r3, #1 ; 0x1 13254: e1570002 cmp r7, r2 13258: 83a03000 movhi r3, #0 ; 0x0 1325c: e3530000 cmp r3, #0 ; 0x0 13260: 0a000075 beq 1343c <_Heap_Resize_block+0x248> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 13264: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13268: e3cc3001 bic r3, ip, #1 ; 0x1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 1326c: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 13270: e58d3000 str r3, [sp] 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) || 13274: e1560001 cmp r6, r1 13278: 33a03000 movcc r3, #0 ; 0x0 1327c: 23a03001 movcs r3, #1 ; 0x1 13280: e1560002 cmp r6, r2 13284: 83a03000 movhi r3, #0 ; 0x0 13288: e3530000 cmp r3, #0 ; 0x0 1328c: 0a00006a beq 1343c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 13290: e5963004 ldr r3, [r6, #4] 13294: e3130001 tst r3, #1 ; 0x1 13298: 0a000067 beq 1343c <_Heap_Resize_block+0x248> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 1329c: e3c3a001 bic sl, 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) || 132a0: e1560002 cmp r6, r2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 132a4: e086300a add r3, r6, sl 132a8: 15933004 ldrne r3, [r3, #4] 132ac: 12032001 andne r2, r3, #1 ; 0x1 _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) 132b0: e0643006 rsb r3, r4, r6 132b4: e2830004 add r0, r3, #4 ; 0x4 !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 132b8: 03a02001 moveq 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) { 132bc: e1580000 cmp r8, r0 /* 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; 132c0: e5890000 str r0, [r9] !_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) || 132c4: e202b0ff and fp, r2, #255 ; 0xff _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; 132c8: e20c9001 and r9, ip, #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) { 132cc: 9a000019 bls 13338 <_Heap_Resize_block+0x144> /* 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 */ 132d0: e35b0000 cmp fp, #0 ; 0x0 132d4: 1a00005a bne 13444 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 132d8: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 132dc: e1a00004 mov r0, r4 132e0: e59d1008 ldr r1, [sp, #8] 132e4: ebfff89e bl 11564 <__umodsi3> *value = r ? v - r + a : v; 132e8: e3500000 cmp r0, #0 ; 0x0 132ec: 159dc008 ldrne ip, [sp, #8] 132f0: e59d2004 ldr r2, [sp, #4] 132f4: 1084300c addne r3, r4, ip 132f8: 10604003 rsbne r4, r0, r3 132fc: e1540002 cmp r4, r2 13300: 21a02004 movcs r2, r4 _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) 13304: e152000a cmp r2, sl 13308: 8a00004d bhi 13444 <_Heap_Resize_block+0x250> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 1330c: e1a01006 mov r1, r6 13310: e1a00005 mov r0, r5 13314: ebffc81e bl 5394 <_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; 13318: e59d2000 ldr r2, [sp] 1331c: e0800002 add r0, r0, r2 13320: e1800009 orr r0, r0, r9 13324: e5870004 str r0, [r7, #4] --stats->used_blocks; 13328: e5953040 ldr r3, [r5, #64] 1332c: e2433001 sub r3, r3, #1 ; 0x1 13330: e5853040 str r3, [r5, #64] 13334: ea00003b b 13428 <_Heap_Resize_block+0x234> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 13338: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 1333c: e1a00004 mov r0, r4 13340: e59d1008 ldr r1, [sp, #8] 13344: ebfff886 bl 11564 <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 13348: e0544000 subs r4, r4, r0 1334c: 0a000035 beq 13428 <_Heap_Resize_block+0x234> /* 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; 13350: e89d1008 ldm sp, {r3, ip} 13354: e0640003 rsb r0, r4, r3 if (new_block_size < min_block_size) { 13358: e150000c cmp r0, ip 1335c: 2a000007 bcs 13380 <_Heap_Resize_block+0x18c> uint32_t delta = min_block_size - new_block_size; 13360: e060300c rsb r3, r0, ip _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 13364: e0544003 subs r4, r4, r3 ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 13368: 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) { ++stats->resizes; 1336c: 05953054 ldreq r3, [r5, #84] 13370: 02833001 addeq r3, r3, #1 ; 0x1 13374: 05853054 streq r3, [r5, #84] 13378: 01a00004 moveq r0, r4 1337c: 0a000031 beq 13448 <_Heap_Resize_block+0x254> _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) { 13380: e35b0000 cmp fp, #0 ; 0x0 13384: 1a000013 bne 133d8 <_Heap_Resize_block+0x1e4> /* 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; 13388: e084200a add r2, r4, sl RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 1338c: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 13390: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 13394: e3820001 orr r0, r2, #1 ; 0x1 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; 13398: e5873004 str r3, [r7, #4] new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 1339c: e786200a str r2, [r6, sl] _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; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 133a0: 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; 133a4: e5953030 ldr r3, [r5, #48] 133a8: e0833004 add r3, r3, r4 Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 133ac: e596000c ldr r0, [r6, #12] Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 133b0: e596c008 ldr ip, [r6, #8] 133b4: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 133b8: e59d3030 ldr r3, [sp, #48] 133bc: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 133c0: e581c008 str ip, [r1, #8] block->prev = prev; 133c4: e581000c str r0, [r1, #12] 133c8: e5832000 str r2, [r3] next->prev = prev->next = block; 133cc: e5801008 str r1, [r0, #8] 133d0: e58c100c str r1, [ip, #12] 133d4: ea000013 b 13428 <_Heap_Resize_block+0x234> } else if (free_block_size >= min_block_size) { 133d8: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 133dc: e154000c cmp r4, ip <== NOT EXECUTED 133e0: 3a000010 bcc 13428 <_Heap_Resize_block+0x234> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 133e4: e0871000 add r1, r7, r0 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 133e8: 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; 133ec: 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; 133f0: e5873004 str r3, [r7, #4] <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 133f4: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 133f8: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 133fc: 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 */ 13400: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 13404: 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 */ 13408: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 1340c: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 13410: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED 13414: e1a00005 mov r0, r5 <== NOT EXECUTED 13418: ebffd8be bl 9718 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 1341c: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED 13420: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 13424: e5803000 str r3, [r0] <== NOT EXECUTED } } } ++stats->resizes; 13428: e5953054 ldr r3, [r5, #84] 1342c: e2833001 add r3, r3, #1 ; 0x1 13430: e5853054 str r3, [r5, #84] 13434: e3a00000 mov r0, #0 ; 0x0 13438: ea000002 b 13448 <_Heap_Resize_block+0x254> return HEAP_RESIZE_SUCCESSFUL; 1343c: e3a00002 mov r0, #2 ; 0x2 13440: ea000000 b 13448 <_Heap_Resize_block+0x254> 13444: e3a00001 mov r0, #1 ; 0x1 } 13448: e28dd00c add sp, sp, #12 ; 0xc 1344c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0000cd08 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { cd08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; cd0c: e5907020 ldr r7, [r0, #32] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { cd10: e5973004 ldr r3, [r7, #4] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) cd14: e2516000 subs r6, r1, #0 ; 0x0 source = the_heap->stats.instance; cd18: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { cd1c: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { cd20: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; cd24: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { cd28: 13a04000 movne r4, #0 ; 0x0 cd2c: 1a000003 bne cd40 <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); cd30: e59f01a0 ldr r0, [pc, #416] ; ced8 <_Heap_Walk+0x1d0> <== NOT EXECUTED cd34: e1a01006 mov r1, r6 <== NOT EXECUTED cd38: ebffde35 bl 4614 <== NOT EXECUTED cd3c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { cd40: e5972000 ldr r2, [r7] cd44: e5953010 ldr r3, [r5, #16] cd48: e1520003 cmp r2, r3 cd4c: 0a00004c beq ce84 <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); cd50: e59f0184 ldr r0, [pc, #388] ; cedc <_Heap_Walk+0x1d4> <== NOT EXECUTED cd54: e1a01006 mov r1, r6 <== NOT EXECUTED cd58: ebffde2d bl 4614 <== NOT EXECUTED cd5c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED cd60: ea000047 b ce84 <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); cd64: e5979004 ldr r9, [r7, #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)) { cd68: e5952020 ldr r2, [r5, #32] cd6c: e3c9a001 bic sl, r9, #1 ; 0x1 cd70: e5953024 ldr r3, [r5, #36] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); cd74: e087800a add r8, r7, sl cd78: e1580002 cmp r8, r2 cd7c: 33a01000 movcc r1, #0 ; 0x0 cd80: 23a01001 movcs r1, #1 ; 0x1 cd84: e1580003 cmp r8, r3 cd88: 83a01000 movhi r1, #0 ; 0x0 cd8c: e3510000 cmp r1, #0 ; 0x0 cd90: 1a000004 bne cda8 <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); cd94: e1a02008 mov r2, r8 <== NOT EXECUTED cd98: e59f0140 ldr r0, [pc, #320] ; cee0 <_Heap_Walk+0x1d8> <== NOT EXECUTED cd9c: e1a01006 mov r1, r6 <== NOT EXECUTED cda0: ebffde1b bl 4614 <== NOT EXECUTED cda4: ea000039 b ce90 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { cda8: e5983004 ldr r3, [r8, #4] cdac: e3130001 tst r3, #1 ; 0x1 cdb0: 1a00001e bne ce30 <_Heap_Walk+0x128> if (do_dump) printk( " prev %p next %p", the_block->prev, the_block->next); if (_Heap_Block_size(the_block) != next_block->prev_size) { cdb4: e5983000 ldr r3, [r8] cdb8: e15a0003 cmp sl, r3 cdbc: 0a000003 beq cdd0 <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); cdc0: e59f011c ldr r0, [pc, #284] ; cee4 <_Heap_Walk+0x1dc> <== NOT EXECUTED cdc4: e1a01006 mov r1, r6 <== NOT EXECUTED cdc8: ebffde11 bl 4614 <== NOT EXECUTED cdcc: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { cdd0: e3190001 tst r9, #1 ; 0x1 cdd4: 1a000006 bne cdf4 <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); cdd8: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED cddc: 159f0104 ldrne r0, [pc, #260] ; cee8 <_Heap_Walk+0x1e0> <== NOT EXECUTED cde0: 1bffde0b blne 4614 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); cde4: e59f0100 ldr r0, [pc, #256] ; ceec <_Heap_Walk+0x1e4> <== NOT EXECUTED cde8: e1a01006 mov r1, r6 <== NOT EXECUTED cdec: ebffde08 bl 4614 <== NOT EXECUTED cdf0: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; cdf4: e5953008 ldr r3, [r5, #8] cdf8: ea000000 b ce00 <_Heap_Walk+0xf8> } { /* 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; cdfc: 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) ce00: e1530007 cmp r3, r7 ce04: 11530005 cmpne r3, r5 ce08: 1afffffb bne cdfc <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { ce0c: e1530007 cmp r3, r7 ce10: 0a000006 beq ce30 <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); ce14: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED ce18: 159f00c8 ldrne r0, [pc, #200] ; cee8 <_Heap_Walk+0x1e0> <== NOT EXECUTED ce1c: 1bffddfc blne 4614 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); ce20: e59f00c8 ldr r0, [pc, #200] ; cef0 <_Heap_Walk+0x1e8> <== NOT EXECUTED ce24: e1a01006 mov r1, r6 <== NOT EXECUTED ce28: ebffddf9 bl 4614 <== NOT EXECUTED ce2c: ea000001 b ce38 <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); ce30: e3540000 cmp r4, #0 ; 0x0 ce34: 0a000002 beq ce44 <_Heap_Walk+0x13c> ce38: e59f00a8 ldr r0, [pc, #168] ; cee8 <_Heap_Walk+0x1e0> <== NOT EXECUTED ce3c: ebffddf4 bl 4614 <== NOT EXECUTED ce40: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { ce44: e5953014 ldr r3, [r5, #20] ce48: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); ce4c: 359f00a0 ldrcc r0, [pc, #160] ; cef4 <_Heap_Walk+0x1ec> ce50: 3a000005 bcc ce6c <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { ce54: e1a0000a mov r0, sl ce58: e5951010 ldr r1, [r5, #16] ce5c: eb0025b9 bl 16548 <__umodsi3> ce60: e3500000 cmp r0, #0 ; 0x0 ce64: 0a000003 beq ce78 <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); ce68: e59f0088 ldr r0, [pc, #136] ; cef8 <_Heap_Walk+0x1f0> <== NOT EXECUTED ce6c: e1a01006 mov r1, r6 <== NOT EXECUTED ce70: ebffdde7 bl 4614 <== NOT EXECUTED ce74: ea000005 b ce90 <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) ce78: e3540000 cmp r4, #0 ; 0x0 ce7c: 1a000003 bne ce90 <_Heap_Walk+0x188> break; ce80: e1a07008 mov r7, r8 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 ) { ce84: e157000b cmp r7, fp ce88: 1affffb5 bne cd64 <_Heap_Walk+0x5c> ce8c: ea000005 b cea8 <_Heap_Walk+0x1a0> the_block = next_block; } if (the_block != end) { printk("PASS: %d !last block address isn't equal to 'final' %p %p\n", ce90: e1a0300b mov r3, fp <== NOT EXECUTED ce94: e59f0060 ldr r0, [pc, #96] ; cefc <_Heap_Walk+0x1f4> <== NOT EXECUTED ce98: e1a01006 mov r1, r6 <== NOT EXECUTED ce9c: e1a02007 mov r2, r7 <== NOT EXECUTED cea0: ebffdddb bl 4614 <== NOT EXECUTED cea4: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); cea8: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { ceac: e5950010 ldr r0, [r5, #16] ceb0: e3c32001 bic r2, r3, #1 ; 0x1 ceb4: e1520000 cmp r2, r0 ceb8: 0a000004 beq ced0 <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, cebc: e1a03000 mov r3, r0 <== NOT EXECUTED cec0: e1a01006 mov r1, r6 <== NOT EXECUTED cec4: e59f0034 ldr r0, [pc, #52] ; cf00 <_Heap_Walk+0x1f8> <== NOT EXECUTED cec8: ebffddd1 bl 4614 <== NOT EXECUTED cecc: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } ced0: e1a00004 mov r0, r4 ced4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} ced8: 00019a2e .word 0x00019a2e cedc: 00019a64 .word 0x00019a64 cee0: 00019a96 .word 0x00019a96 cee4: 00019ab9 .word 0x00019ab9 cee8: 00019431 .word 0x00019431 ceec: 00019ae4 .word 0x00019ae4 cef0: 00019b0e .word 0x00019b0e cef4: 00019b37 .word 0x00019b37 cef8: 00019b5a .word 0x00019b5a cefc: 00019b7e .word 0x00019b7e cf00: 00019bb9 .word 0x00019bb9 0000990c <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 990c: e2400001 sub r0, r0, #1 ; 0x1 9910: e3500003 cmp r0, #3 ; 0x3 9914: 979ff100 ldrls pc, [pc, r0, lsl #2] 9918: ea00000b b 994c <_Objects_API_maximum_class+0x40> 991c: 00009934 .word 0x00009934 <== NOT EXECUTED 9920: 0000992c .word 0x0000992c <== NOT EXECUTED 9924: 0000993c .word 0x0000993c <== NOT EXECUTED 9928: 00009944 .word 0x00009944 <== NOT EXECUTED 992c: e3a0000a mov r0, #10 ; 0xa 9930: e12fff1e bx lr 9934: e3a00002 mov r0, #2 ; 0x2 9938: e12fff1e bx lr 993c: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED 9940: e12fff1e bx lr <== NOT EXECUTED 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; 9944: e3a00008 mov r0, #8 ; 0x8 9948: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 994c: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 9950: e12fff1e bx lr 00005548 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 5548: 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; 554c: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5550: e1d041b0 ldrh r4, [r0, #16] 5554: e1540006 cmp r4, r6 5558: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 555c: e24dd014 sub sp, sp, #20 ; 0x14 5560: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 5564: 31a0a006 movcc sl, r6 5568: 31a08007 movcc r8, r7 556c: 3a00000f bcc 55b0 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 5570: e5909014 ldr r9, [r0, #20] 5574: e1a00004 mov r0, r4 5578: e1a01009 mov r1, r9 557c: eb002fb4 bl 11454 <__aeabi_uidiv> 5580: e1a0a006 mov sl, r6 5584: e1a07000 mov r7, r0 5588: e3a08000 mov r8, #0 ; 0x0 558c: ea000005 b 55a8 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 5590: e5953034 ldr r3, [r5, #52] 5594: e7933108 ldr r3, [r3, r8, lsl #2] 5598: e3530000 cmp r3, #0 ; 0x0 559c: 0a000003 beq 55b0 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 55a0: e08aa009 add sl, sl, r9 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 55a4: e2888001 add r8, r8, #1 ; 0x1 55a8: e1580007 cmp r8, r7 55ac: 3afffff7 bcc 5590 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 55b0: e15a0004 cmp sl, r4 55b4: 3a000056 bcc 5714 <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 55b8: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 55bc: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 55c0: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 55c4: e0843003 add r3, r4, r3 55c8: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 55cc: e2874001 add r4, r7, #1 ; 0x1 55d0: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 55d4: 0a000007 beq 55f8 <_Objects_Extend_information+0xb0> object_blocks = (void**) 55d8: e3a03003 mov r3, #3 ; 0x3 55dc: e0202493 mla r0, r3, r4, r2 55e0: e1a00100 lsl r0, r0, #2 55e4: eb0007e6 bl 7584 <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 55e8: e3500000 cmp r0, #0 ; 0x0 55ec: e58d0000 str r0, [sp] 55f0: 1a000005 bne 560c <_Objects_Extend_information+0xc4> 55f4: ea000078 b 57dc <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 55f8: e3a03003 mov r3, #3 ; 0x3 55fc: e0202493 mla r0, r3, r4, r2 5600: e1a00100 lsl r0, r0, #2 5604: eb0007e2 bl 7594 <_Workspace_Allocate_or_fatal_error> 5608: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 560c: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 5610: e59d1000 ldr r1, [sp] 5614: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5618: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 561c: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 5620: 93a03000 movls r3, #0 ; 0x0 5624: e08b9002 add r9, fp, r2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5628: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 562c: 9a000011 bls 5678 <_Objects_Extend_information+0x130> /* * 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, 5630: e1a04107 lsl r4, r7, #2 5634: e5951034 ldr r1, [r5, #52] 5638: e1a02004 mov r2, r4 563c: e59d0000 ldr r0, [sp] 5640: eb001622 bl aed0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 5644: e1a02004 mov r2, r4 5648: e5951030 ldr r1, [r5, #48] 564c: e1a0000b mov r0, fp 5650: eb00161e bl aed0 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 5654: e1d521b0 ldrh r2, [r5, #16] 5658: e0862002 add r2, r6, r2 565c: e1a02102 lsl r2, r2, #2 5660: e1a00009 mov r0, r9 5664: e595101c ldr r1, [r5, #28] 5668: eb001618 bl aed0 566c: ea000003 b 5680 <_Objects_Extend_information+0x138> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 5670: e7892103 str r2, [r9, r3, lsl #2] else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 5674: e2833001 add r3, r3, #1 ; 0x1 5678: e1530006 cmp r3, r6 567c: 3afffffb bcc 5670 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5680: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 5684: e78b3107 str r3, [fp, r7, lsl #2] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5688: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 568c: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 5690: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 5694: e08a0002 add r0, sl, r2 5698: e089110a add r1, r9, sl, lsl #2 569c: e1a0200a mov r2, sl 56a0: ea000000 b 56a8 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 56a4: e5013004 str r3, [r1, #-4] object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 56a8: e1520000 cmp r2, r0 index++ ) { 56ac: e2811004 add r1, r1, #4 ; 0x4 56b0: e2822001 add r2, r2, #1 ; 0x1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 56b4: 3afffffa bcc 56a4 <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 56b8: e10f0000 mrs r0, CPSR 56bc: e38030c0 orr r3, r0, #192 ; 0xc0 56c0: 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( 56c4: 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; 56c8: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 56cc: e1d510b4 ldrh r1, [r5, #4] 56d0: 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; 56d4: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 56d8: 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; 56dc: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 56e0: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 56e4: e59d1000 ldr r1, [sp] information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 56e8: e1833002 orr r3, r3, r2 56ec: 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; 56f0: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 56f4: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 56f8: e585901c str r9, [r5, #28] information->maximum = maximum; 56fc: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 5700: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 5704: e129f000 msr CPSR_fc, r0 if ( old_tables ) 5708: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 570c: 11a00003 movne r0, r3 5710: 1b000797 blne 7574 <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 5714: e5d53012 ldrb r3, [r5, #18] 5718: e3530000 cmp r3, #0 ; 0x0 571c: e5952014 ldr r2, [r5, #20] 5720: e5954034 ldr r4, [r5, #52] 5724: e5953018 ldr r3, [r5, #24] 5728: 0a000007 beq 574c <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 572c: e0000392 mul r0, r2, r3 5730: eb000793 bl 7584 <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 5734: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 5738: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 573c: e7933108 ldr r3, [r3, r8, lsl #2] 5740: e3530000 cmp r3, #0 ; 0x0 5744: 1a000003 bne 5758 <_Objects_Extend_information+0x210> 5748: ea000023 b 57dc <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 574c: e0000392 mul r0, r2, r3 5750: eb00078f bl 7594 <_Workspace_Allocate_or_fatal_error> 5754: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5758: e5953034 ldr r3, [r5, #52] 575c: e28d4008 add r4, sp, #8 ; 0x8 5760: e7931108 ldr r1, [r3, r8, lsl #2] 5764: e1a00004 mov r0, r4 5768: e2852014 add r2, r5, #20 ; 0x14 576c: e892000c ldm r2, {r2, r3} 5770: eb000f49 bl 949c <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 5774: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 5778: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 577c: e2857020 add r7, r5, #32 ; 0x20 5780: ea000008 b 57a8 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 5784: e5953000 ldr r3, [r5] 5788: e1d520b4 ldrh r2, [r5, #4] 578c: e1a03c03 lsl r3, r3, #24 5790: e3833801 orr r3, r3, #65536 ; 0x10000 5794: e1833d82 orr r3, r3, r2, lsl #27 5798: e1833006 orr r3, r3, r6 579c: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 57a0: ebfffd5d bl 4d1c <_Chain_Append> index++; 57a4: e2866001 add r6, r6, #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 ) { 57a8: e1a00004 mov r0, r4 57ac: eb000f2d bl 9468 <_Chain_Get> 57b0: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 57b4: e1a0100c mov r1, ip 57b8: e1a00007 mov r0, r7 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 57bc: 1afffff0 bne 5784 <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 57c0: e5952030 ldr r2, [r5, #48] 57c4: e5953014 ldr r3, [r5, #20] 57c8: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 57cc: e1d522bc ldrh r2, [r5, #44] 57d0: e5953014 ldr r3, [r5, #20] 57d4: e0833002 add r3, r3, r2 57d8: e1c532bc strh r3, [r5, #44] } 57dc: e28dd014 add sp, sp, #20 ; 0x14 57e0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 000058e0 <_Objects_Get_isr_disable>: #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 58e0: e1a01801 lsl r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 58e4: e92d4010 push {r4, lr} #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 58e8: e1a01821 lsr r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 58ec: e1a04003 mov r4, r3 index = id & 0x0000ffff; /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 58f0: e10fc000 mrs ip, CPSR 58f4: e38c30c0 orr r3, ip, #192 ; 0xc0 58f8: e129f003 msr CPSR_fc, r3 if ( information->maximum >= index ) { 58fc: e1d031b0 ldrh r3, [r0, #16] 5900: e1530001 cmp r3, r1 5904: 3a00000a bcc 5934 <_Objects_Get_isr_disable+0x54> if ( (the_object = information->local_table[ index ]) != NULL ) { 5908: e590301c ldr r3, [r0, #28] 590c: e7930101 ldr r0, [r3, r1, lsl #2] 5910: e3500000 cmp r0, #0 ; 0x0 *location = OBJECTS_LOCAL; 5914: 13a03000 movne r3, #0 ; 0x0 5918: 15823000 strne r3, [r2] *level_p = level; 591c: 1584c000 strne ip, [r4] /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { 5920: 18bd8010 popne {r4, pc} *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 5924: e129f00c msr CPSR_fc, ip <== NOT EXECUTED *location = OBJECTS_ERROR; 5928: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 592c: e5823000 str r3, [r2] <== NOT EXECUTED 5930: e8bd8010 pop {r4, pc} <== NOT EXECUTED return NULL; } _ISR_Enable( level ); 5934: e129f00c msr CPSR_fc, ip *location = OBJECTS_ERROR; 5938: e3a03001 mov r3, #1 ; 0x1 593c: e5823000 str r3, [r2] 5940: e3a00000 mov r0, #0 ; 0x0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 5944: e8bd8010 pop {r4, pc} 00010078 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10078: e92d40f0 push {r4, r5, r6, r7, lr} char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 1007c: e2517000 subs r7, r1, #0 ; 0x0 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 10080: e24dd00c sub sp, sp, #12 ; 0xc 10084: e1a05002 mov r5, r2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 10088: 0a000036 beq 10168 <_Objects_Get_name_as_string+0xf0> return NULL; if ( name == NULL ) 1008c: e3520000 cmp r2, #0 ; 0x0 10090: 0a000035 beq 1016c <_Objects_Get_name_as_string+0xf4> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 10094: e3500000 cmp r0, #0 ; 0x0 10098: 059f30d8 ldreq r3, [pc, #216] ; 10178 <_Objects_Get_name_as_string+0x100> 1009c: 05933000 ldreq r3, [r3] 100a0: 05934008 ldreq r4, [r3, #8] 100a4: 11a04000 movne r4, r0 information = _Objects_Get_information_id( tmpId ); 100a8: e1a00004 mov r0, r4 100ac: ebffe72e bl 9d6c <_Objects_Get_information_id> if ( !information ) 100b0: e2506000 subs r6, r0, #0 ; 0x0 100b4: 0a00002b beq 10168 <_Objects_Get_name_as_string+0xf0> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 100b8: e1a01004 mov r1, r4 100bc: e28d2008 add r2, sp, #8 ; 0x8 100c0: ebffe765 bl 9e5c <_Objects_Get> switch ( location ) { 100c4: e59d3008 ldr r3, [sp, #8] 100c8: e3530000 cmp r3, #0 ; 0x0 100cc: 1a000025 bne 10168 <_Objects_Get_name_as_string+0xf0> case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 100d0: e5d6c038 ldrb ip, [r6, #56] 100d4: e35c0000 cmp ip, #0 ; 0x0 100d8: 0a000004 beq 100f0 <_Objects_Get_name_as_string+0x78> s = the_object->name.name_p; 100dc: e590000c ldr r0, [r0, #12] lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 100e0: e3500000 cmp r0, #0 ; 0x0 100e4: 01a0e005 moveq lr, r5 100e8: 1a00000a bne 10118 <_Objects_Get_name_as_string+0xa0> 100ec: ea000019 b 10158 <_Objects_Get_name_as_string+0xe0> <== NOT EXECUTED case OBJECTS_LOCAL: if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 100f0: e590300c ldr r3, [r0, #12] lname[ 0 ] = (u32_name >> 24) & 0xff; 100f4: e1a02c23 lsr r2, r3, #24 lname[ 1 ] = (u32_name >> 16) & 0xff; 100f8: e1a01823 lsr r1, r3, #16 lname[ 2 ] = (u32_name >> 8) & 0xff; 100fc: e1a00423 lsr r0, r3, #8 if ( information->is_string ) { s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 10100: e5cd2003 strb r2, [sp, #3] lname[ 1 ] = (u32_name >> 16) & 0xff; 10104: e5cd1004 strb r1, [sp, #4] lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 10108: e5cd3006 strb r3, [sp, #6] lname[ 4 ] = '\0'; 1010c: e5cdc007 strb ip, [sp, #7] } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 10110: e5cd0005 strb r0, [sp, #5] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 10114: e28d0003 add r0, sp, #3 ; 0x3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 10118: e2471001 sub r1, r7, #1 ; 0x1 lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 1011c: e3a0c000 mov ip, #0 ; 0x0 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 10120: e59f4054 ldr r4, [pc, #84] ; 1017c <_Objects_Get_name_as_string+0x104> 10124: ea000005 b 10140 <_Objects_Get_name_as_string+0xc8> 10128: e5943000 ldr r3, [r4] 1012c: e7d33002 ldrb r3, [r3, r2] 10130: e3130097 tst r3, #151 ; 0x97 10134: 03a0202a moveq r2, #42 ; 0x2a 10138: e7c5200c strb r2, [r5, ip] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 1013c: e28cc001 add ip, ip, #1 ; 0x1 10140: e15c0001 cmp ip, r1 10144: e085e00c add lr, r5, ip 10148: 2a000002 bcs 10158 <_Objects_Get_name_as_string+0xe0> 1014c: e7d0200c ldrb r2, [r0, ip] 10150: e3520000 cmp r2, #0 ; 0x0 10154: 1afffff3 bne 10128 <_Objects_Get_name_as_string+0xb0> *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; 10158: e3a03000 mov r3, #0 ; 0x0 1015c: e5ce3000 strb r3, [lr] _Thread_Enable_dispatch(); 10160: ebffe981 bl a76c <_Thread_Enable_dispatch> 10164: ea000000 b 1016c <_Objects_Get_name_as_string+0xf4> return name; 10168: e3a05000 mov r5, #0 ; 0x0 } return NULL; /* unreachable path */ } 1016c: e1a00005 mov r0, r5 10170: e28dd00c add sp, sp, #12 ; 0xc 10174: e8bd80f0 pop {r4, r5, r6, r7, pc} 10178: 000230c4 .word 0x000230c4 1017c: 0001ea78 .word 0x0001ea78 00012910 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 12910: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 12914: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 12918: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 1291c: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 12920: 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; 12924: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 12928: e1a05000 mov r5, r0 <== NOT EXECUTED 1292c: e1a06002 mov r6, r2 <== NOT EXECUTED 12930: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 12934: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 12938: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 1293c: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 12940: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 12944: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 12948: e1a01004 mov r1, r4 <== NOT EXECUTED 1294c: e1a00005 mov r0, r5 <== NOT EXECUTED 12950: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 12954: 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) 12958: 9a000005 bls 12974 <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 1295c: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 12960: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 12964: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 12968: e5873000 str r3, [r7] <== NOT EXECUTED 1296c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 12970: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 12974: ebffdd38 bl 9e5c <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 12978: e5963000 ldr r3, [r6] <== NOT EXECUTED 1297c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 12980: 1affffec bne 12938 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 12984: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 12988: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 00006d9c <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6d9c: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6da0: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 6da4: e24dd004 sub sp, sp, #4 ; 0x4 Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 6da8: 03a00001 moveq r0, #1 ; 0x1 6dac: 0a00001b beq 6e20 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 6db0: e3500000 cmp r0, #0 ; 0x0 6db4: 059f3080 ldreq r3, [pc, #128] ; 6e3c <_Objects_Id_to_name+0xa0> 6db8: 05933000 ldreq r3, [r3] 6dbc: 05931008 ldreq r1, [r3, #8] 6dc0: 11a01000 movne r1, r0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 6dc4: e1a03c21 lsr r3, r1, #24 6dc8: e2030007 and r0, r3, #7 ; 0x7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 6dcc: e2403001 sub r3, r0, #1 ; 0x1 6dd0: e3530003 cmp r3, #3 ; 0x3 6dd4: 8a000010 bhi 6e1c <_Objects_Id_to_name+0x80> 6dd8: ea000012 b 6e28 <_Objects_Id_to_name+0x8c> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 6ddc: e1a03da1 lsr r3, r1, #27 6de0: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 6de4: e3500000 cmp r0, #0 ; 0x0 6de8: 0a00000b beq 6e1c <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 6dec: e5d04038 ldrb r4, [r0, #56] 6df0: e3540000 cmp r4, #0 ; 0x0 6df4: 1a000008 bne 6e1c <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 6df8: e1a0200d mov r2, sp 6dfc: ebffffcb bl 6d30 <_Objects_Get> if ( !the_object ) 6e00: e3500000 cmp r0, #0 ; 0x0 6e04: 0a000004 beq 6e1c <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 6e08: e590300c ldr r3, [r0, #12] 6e0c: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 6e10: eb000216 bl 7670 <_Thread_Enable_dispatch> 6e14: e1a00004 mov r0, r4 6e18: ea000000 b 6e20 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 6e1c: e3a00003 mov r0, #3 ; 0x3 } 6e20: e28dd004 add sp, sp, #4 ; 0x4 6e24: e8bd8030 pop {r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 6e28: e59f3010 ldr r3, [pc, #16] ; 6e40 <_Objects_Id_to_name+0xa4> 6e2c: e7930100 ldr r0, [r3, r0, lsl #2] 6e30: e3500000 cmp r0, #0 ; 0x0 6e34: 1affffe8 bne 6ddc <_Objects_Id_to_name+0x40> 6e38: eafffff7 b 6e1c <_Objects_Id_to_name+0x80> <== NOT EXECUTED 6e3c: 000193c4 .word 0x000193c4 6e40: 000192c8 .word 0x000192c8 00005a70 <_Objects_Namespace_remove>: ) { /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 5a70: e5d03038 ldrb r3, [r0, #56] 5a74: e3530000 cmp r3, #0 ; 0x0 void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 5a78: e92d4010 push {r4, lr} 5a7c: e1a04001 mov r4, r1 /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 5a80: 0a000002 beq 5a90 <_Objects_Namespace_remove+0x20> 5a84: e591000c ldr r0, [r1, #12] <== NOT EXECUTED 5a88: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 5a8c: 1b0006b8 blne 7574 <_Workspace_Free> <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; 5a90: e3a03000 mov r3, #0 ; 0x0 the_object->name.name_u32 = 0; 5a94: e584300c str r3, [r4, #12] } 5a98: e8bd8010 pop {r4, pc} 0000770c <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 770c: e92d40f0 push {r4, r5, r6, r7, lr} 7710: e1a04000 mov r4, r0 7714: e1a07001 mov r7, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7718: e1a00002 mov r0, r2 771c: e1d413ba ldrh r1, [r4, #58] bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 7720: e1a06002 mov r6, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7724: eb001acd bl e260 if ( information->is_string ) { 7728: e5d43038 ldrb r3, [r4, #56] 772c: e3530000 cmp r3, #0 ; 0x0 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 7730: e2804001 add r4, r0, #1 ; 0x1 if ( information->is_string ) { 7734: 0a000013 beq 7788 <_Objects_Set_name+0x7c> char *d; d = _Workspace_Allocate( length ); 7738: e1a00004 mov r0, r4 <== NOT EXECUTED 773c: eb0006c3 bl 9250 <_Workspace_Allocate> <== NOT EXECUTED if ( !d ) 7740: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 7744: 01a00005 moveq r0, r5 <== NOT EXECUTED 7748: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 774c: e597000c ldr r0, [r7, #12] <== NOT EXECUTED 7750: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 7754: 0a000002 beq 7764 <_Objects_Set_name+0x58> <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 7758: eb0006b8 bl 9240 <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 775c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7760: e587300c str r3, [r7, #12] <== NOT EXECUTED } strncpy( d, name, length ); 7764: e1a01006 mov r1, r6 <== NOT EXECUTED 7768: e1a00005 mov r0, r5 <== NOT EXECUTED 776c: e1a02004 mov r2, r4 <== NOT EXECUTED 7770: eb001a77 bl e154 <== NOT EXECUTED d[ length ] = '\0'; 7774: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 7778: e7c53004 strb r3, [r5, r4] <== NOT EXECUTED the_object->name.name_p = d; 777c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 7780: e587500c str r5, [r7, #12] <== NOT EXECUTED 7784: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 7788: e3540000 cmp r4, #0 ; 0x0 778c: 03a0c202 moveq ip, #536870912 ; 0x20000000 7790: 0a000015 beq 77ec <_Objects_Set_name+0xe0> 7794: e5d63000 ldrb r3, [r6] 7798: e3540001 cmp r4, #1 ; 0x1 779c: e1a0cc03 lsl ip, r3, #24 77a0: 0a000011 beq 77ec <_Objects_Set_name+0xe0> 77a4: e5d63001 ldrb r3, [r6, #1] 77a8: e3540002 cmp r4, #2 ; 0x2 77ac: e1a01803 lsl r1, r3, #16 77b0: 9a00000a bls 77e0 <_Objects_Set_name+0xd4> 77b4: e3540003 cmp r4, #3 ; 0x3 77b8: e5d63002 ldrb r3, [r6, #2] 77bc: 85d60003 ldrbhi r0, [r6, #3] 77c0: e1a02403 lsl r2, r3, #8 77c4: 93a00020 movls r0, #32 ; 0x20 77c8: e18c3001 orr r3, ip, r1 77cc: e1833002 orr r3, r3, r2 77d0: e1833000 orr r3, r3, r0 77d4: e587300c str r3, [r7, #12] 77d8: e3a00001 mov r0, #1 ; 0x1 ); } return TRUE; } 77dc: e8bd80f0 pop {r4, r5, r6, r7, pc} strncpy( d, name, length ); d[ length ] = '\0'; the_object->name.name_p = d; } else { the_object->name.name_u32 = _Objects_Build_name( 77e0: e3a00020 mov r0, #32 ; 0x20 77e4: e3a02a02 mov r2, #8192 ; 0x2000 77e8: eafffff6 b 77c8 <_Objects_Set_name+0xbc> 77ec: e3a01602 mov r1, #2097152 ; 0x200000 77f0: eafffffa b 77e0 <_Objects_Set_name+0xd4> 0001ef40 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1ef40: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 1ef44: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 1ef48: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 1ef4c: 0a00000d beq 1ef88 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 1ef50: e3510000 cmp r1, #0 ; 0x0 1ef54: 0a00000b beq 1ef88 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 1ef58: e59f5030 ldr r5, [pc, #48] ; 1ef90 <_Protected_heap_Get_information+0x50> 1ef5c: e5950000 ldr r0, [r5] 1ef60: ebffa459 bl 80cc <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 1ef64: e1a01004 mov r1, r4 1ef68: e1a00006 mov r0, r6 1ef6c: eb002317 bl 27bd0 <_Heap_Get_information> 1ef70: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 1ef74: e5950000 ldr r0, [r5] 1ef78: ebffa46f bl 813c <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 1ef7c: e2740001 rsbs r0, r4, #1 ; 0x1 1ef80: 33a00000 movcc r0, #0 ; 0x0 1ef84: e8bd8070 pop {r4, r5, r6, pc} 1ef88: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 1ef8c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 1ef90: 0005533c .word 0x0005533c 000046e8 <_RTEMS_tasks_Initialize_user_tasks_body>: rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46e8: e59f3094 ldr r3, [pc, #148] ; 4784 <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> 46ec: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46f0: e92d40f0 push {r4, r5, r6, r7, lr} rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 46f4: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 46f8: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 46fc: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 4700: e3560000 cmp r6, #0 ; 0x0 4704: 13500000 cmpne r0, #0 ; 0x0 * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 4708: e24dd00c sub sp, sp, #12 ; 0xc */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 470c: 13a03000 movne r3, #0 ; 0x0 4710: 03a03001 moveq r3, #1 ; 0x1 return; 4714: 11a04000 movne r4, r0 4718: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 471c: 128d7008 addne r7, sp, #8 ; 0x8 */ user_tasks = api_configuration->User_initialization_tasks_table; maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 4720: 1a000013 bne 4774 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 4724: ea000014 b 477c <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 4728: e594300c ldr r3, [r4, #12] 472c: e88d0088 stm sp, {r3, r7} 4730: e8940005 ldm r4, {r0, r2} 4734: e5941008 ldr r1, [r4, #8] 4738: e5943014 ldr r3, [r4, #20] 473c: ebffff63 bl 44d0 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 4740: e2502000 subs r2, r0, #0 ; 0x0 4744: 1a000006 bne 4764 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 4748: e5942018 ldr r2, [r4, #24] 474c: e5941010 ldr r1, [r4, #16] 4750: e59d0008 ldr r0, [sp, #8] 4754: eb00000b bl 4788 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4758: e2502000 subs r2, r0, #0 ; 0x0 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 475c: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 4760: 0a000002 beq 4770 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 4764: e3a00001 mov r0, #1 ; 0x1 4768: e1a01000 mov r1, r0 476c: eb000333 bl 5440 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 4770: e2855001 add r5, r5, #1 ; 0x1 4774: e1550006 cmp r5, r6 4778: 3affffea bcc 4728 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 477c: e28dd00c add sp, sp, #12 ; 0xc 4780: e8bd80f0 pop {r4, r5, r6, r7, pc} 4784: 0001541c .word 0x0001541c 000050f0 <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 50f0: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 50f4: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 50f8: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 50fc: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 5100: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 5104: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 5108: e10f6000 mrs r6, CPSR 510c: e38630c0 orr r3, r6, #192 ; 0xc0 5110: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 5114: e59f3038 ldr r3, [pc, #56] ; 5154 <_TOD_Get+0x64> 5118: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 511c: e59f3034 ldr r3, [pc, #52] ; 5158 <_TOD_Get+0x68> 5120: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 5124: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); *time = _TOD_Now; 5128: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 512c: 0a000002 beq 513c <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 5130: e1a0e00f mov lr, pc <== NOT EXECUTED 5134: e12fff12 bx r2 <== NOT EXECUTED 5138: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 513c: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 5140: e1a00005 mov r0, r5 5144: e1a0100d mov r1, sp 5148: eb000794 bl 6fa0 <_Timespec_Add_to> } 514c: e28dd008 add sp, sp, #8 ; 0x8 5150: e8bd8070 pop {r4, r5, r6, pc} 5154: 00015538 .word 0x00015538 5158: 00015414 .word 0x00015414 0000961c <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 961c: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9620: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 9624: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 9628: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 962c: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 9630: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 9634: e10f6000 mrs r6, CPSR 9638: e38630c0 orr r3, r6, #192 ; 0xc0 963c: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 9640: e59f3038 ldr r3, [pc, #56] ; 9680 <_TOD_Get_uptime+0x64> 9644: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9648: e59f3034 ldr r3, [pc, #52] ; 9684 <_TOD_Get_uptime+0x68> 964c: e8930018 ldm r3, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9650: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 9654: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 9658: 0a000002 beq 9668 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 965c: e1a0e00f mov lr, pc <== NOT EXECUTED 9660: e12fff12 bx r2 <== NOT EXECUTED 9664: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 9668: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 966c: e1a00005 mov r0, r5 9670: e1a0100d mov r1, sp 9674: ebfff649 bl 6fa0 <_Timespec_Add_to> } 9678: e28dd008 add sp, sp, #8 ; 0x8 967c: e8bd8070 pop {r4, r5, r6, pc} 9680: 00015538 .word 0x00015538 9684: 00015404 .word 0x00015404 0000a5ec <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; a5ec: e59f30b0 ldr r3, [pc, #176] ; a6a4 <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { a5f0: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; a5f4: 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; a5f8: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); a5fc: e3a02000 mov r2, #0 ; 0x0 a600: e10f2000 mrs r2, CPSR a604: e3c220c0 bic r2, r2, #192 ; 0xc0 a608: e1822003 orr r2, r2, r3 a60c: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; a610: e59f2090 ldr r2, [pc, #144] ; a6a8 <_Thread_Handler+0xbc> doneConstructors = 1; a614: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; a618: 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 ); a61c: 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; a620: 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 ); a624: ebfff2ab bl 70d8 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); a628: ebffeeec bl 61e0 <_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) */ a62c: e3540000 cmp r4, #0 ; 0x0 { _init (); a630: 0bffd6ba bleq 120 <_init> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { a634: e59530a0 ldr r3, [r5, #160] a638: e3530003 cmp r3, #3 ; 0x3 a63c: 979ff103 ldrls pc, [pc, r3, lsl #2] a640: ea000011 b a68c <_Thread_Handler+0xa0> <== NOT EXECUTED a644: 0000a654 .word 0x0000a654 <== NOT EXECUTED a648: 0000a65c .word 0x0000a65c <== NOT EXECUTED a64c: 0000a66c .word 0x0000a66c <== NOT EXECUTED a650: 0000a678 .word 0x0000a678 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = a654: e59500a8 ldr r0, [r5, #168] a658: ea000000 b a660 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = a65c: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED a660: e1a0e00f mov lr, pc a664: e595f09c ldr pc, [r5, #156] a668: ea000006 b a688 <_Thread_Handler+0x9c> (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = a66c: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED a670: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a674: ea000001 b a680 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = a678: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED a67c: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED a680: e1a0e00f mov lr, pc <== NOT EXECUTED a684: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED a688: 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 ); a68c: e1a00005 mov r0, r5 a690: ebfff29f bl 7114 <_User_extensions_Thread_exitted> _Internal_error_Occurred( a694: e3a00000 mov r0, #0 ; 0x0 a698: e3a01001 mov r1, #1 ; 0x1 a69c: e3a02006 mov r2, #6 ; 0x6 a6a0: ebffeb66 bl 5440 <_Internal_error_Occurred> a6a4: 00015444 .word 0x00015444 a6a8: 000151d8 .word 0x000151d8 000062ac <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 62ac: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 62b0: 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 ) { 62b4: e1a09000 mov r9, r0 62b8: e1a05001 mov r5, r1 62bc: e1a04003 mov r4, r3 62c0: e59d8024 ldr r8, [sp, #36] 62c4: e59da02c ldr sl, [sp, #44] 62c8: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 62cc: 1a00000e bne 630c <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 62d0: e1a00001 mov r0, r1 62d4: e1a01003 mov r1, r3 62d8: eb000292 bl 6d28 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 62dc: e1500004 cmp r0, r4 62e0: 23a03000 movcs r3, #0 ; 0x0 62e4: 33a03001 movcc r3, #1 ; 0x1 62e8: e3500000 cmp r0, #0 ; 0x0 62ec: 03833001 orreq r3, r3, #1 ; 0x1 62f0: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 62f4: 03a03001 moveq r3, #1 ; 0x1 if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 62f8: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 62fc: 05c530c0 strbeq 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; 6300: 059520cc ldreq r2, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 6304: 0a000004 beq 631c <_Thread_Initialize+0x70> 6308: ea000017 b 636c <_Thread_Initialize+0xc0> 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; 630c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 6310: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 6314: e1a02006 mov r2, r6 <== NOT EXECUTED 6318: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 631c: e59f3128 ldr r3, [pc, #296] ; 644c <_Thread_Initialize+0x1a0> 6320: e5930000 ldr r0, [r3] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 6324: e3a03000 mov r3, #0 ; 0x0 6328: e3500000 cmp r0, #0 ; 0x0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 632c: e58520c8 str r2, [r5, #200] the_stack->size = size; 6330: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 6334: e5853100 str r3, [r5, #256] 6338: e5853050 str r3, [r5, #80] the_watchdog->routine = routine; 633c: e5853064 str r3, [r5, #100] the_watchdog->id = id; 6340: e5853068 str r3, [r5, #104] the_watchdog->user_data = user_data; 6344: e585306c str r3, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 6348: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 634c: 0a000008 beq 6374 <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 6350: e2800001 add r0, r0, #1 ; 0x1 6354: e1a00100 lsl r0, r0, #2 6358: eb000489 bl 7584 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 635c: e2506000 subs r6, r0, #0 ; 0x0 6360: 1a000003 bne 6374 <_Thread_Initialize+0xc8> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 6364: e1a00005 mov r0, r5 <== NOT EXECUTED 6368: eb000289 bl 6d94 <_Thread_Stack_Free> <== NOT EXECUTED 636c: e1a00006 mov r0, r6 6370: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 6374: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 6378: e5856110 str r6, [r5, #272] * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { 637c: 0a00000a beq 63ac <_Thread_Initialize+0x100> 6380: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6384: e59f00c0 ldr r0, [pc, #192] ; 644c <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 6388: e1a01002 mov r1, r2 638c: ea000002 b 639c <_Thread_Initialize+0xf0> 6390: e5953110 ldr r3, [r5, #272] 6394: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 6398: e2822001 add r2, r2, #1 ; 0x1 639c: e5903000 ldr r3, [r0] 63a0: e2833001 add r3, r3, #1 ; 0x1 63a4: e1520003 cmp r2, r3 63a8: 3afffff8 bcc 6390 <_Thread_Initialize+0xe4> * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 63ac: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 63b0: e35a0002 cmp sl, #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; 63b4: 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; 63b8: 059f3090 ldreq r3, [pc, #144] ; 6450 <_Thread_Initialize+0x1a4> 63bc: 05933000 ldreq r3, [r3] 63c0: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 63c4: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 63c8: e3a04000 mov r4, #0 ; 0x0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 63cc: e5c570ac strb r7, [r5, #172] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 63d0: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 63d4: 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 ); 63d8: e1a01008 mov r1, r8 63dc: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 63e0: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 63e4: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 63e8: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 63ec: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 63f0: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 63f4: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 63f8: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 63fc: eb0001b7 bl 6ae0 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 6400: e1d530b8 ldrh r3, [r5, #8] 6404: 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; 6408: e5854088 str r4, [r5, #136] 640c: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 6410: e59d3038 ldr r3, [sp, #56] * 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 ); 6414: e1a00005 mov r0, r5 6418: 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; 641c: 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 ); 6420: eb00035f bl 71a4 <_User_extensions_Thread_create> if ( !extension_status ) { 6424: e1500004 cmp r0, r4 6428: 11a00007 movne r0, r7 642c: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 6430: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 6434: 11a00006 movne r0, r6 <== NOT EXECUTED 6438: 1b00044d blne 7574 <_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 ); 643c: e1a00005 mov r0, r5 <== NOT EXECUTED 6440: eb000253 bl 6d94 <_Thread_Stack_Free> <== NOT EXECUTED 6444: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 6448: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 644c: 00015424 .word 0x00015424 6450: 00015344 .word 0x00015344 00007718 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 7718: e5903010 ldr r3, [r0, #16] 771c: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 7720: e92d4070 push {r4, r5, r6, lr} 7724: e1a04000 mov r4, r0 7728: e1a05001 mov r5, r1 772c: e1a06002 mov r6, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 7730: 13a00000 movne r0, #0 ; 0x0 7734: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 7738: eb000081 bl 7944 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 773c: e1a01005 mov r1, r5 7740: e1a02006 mov r2, r6 7744: e1a00004 mov r0, r4 7748: eb000cdc bl aac0 <_Thread_Reset> _Thread_Load_environment( the_thread ); 774c: e1a00004 mov r0, r4 7750: eb000bfc bl a748 <_Thread_Load_environment> _Thread_Ready( the_thread ); 7754: e1a00004 mov r0, r4 7758: eb000c95 bl a9b4 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 775c: e1a00004 mov r0, r4 7760: eb0001e3 bl 7ef4 <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 7764: e59f301c ldr r3, [pc, #28] ; 7788 <_Thread_Restart+0x70> 7768: e5933000 ldr r3, [r3] 776c: e1540003 cmp r4, r3 7770: 13a00001 movne r0, #1 ; 0x1 7774: 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 ); 7778: e28400d0 add r0, r4, #208 ; 0xd0 777c: eb0002ec bl 8334 <_CPU_Context_restore> 7780: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 7784: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 7788: 00018844 .word 0x00018844 00008448 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 8448: e92d4030 push {r4, r5, lr} 844c: e20110ff and r1, r1, #255 ; 0xff 8450: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 8454: e10f5000 mrs r5, CPSR 8458: e38530c0 orr r3, r5, #192 ; 0xc0 845c: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 8460: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 8464: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 8468: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 846c: 02433001 subeq r3, r3, #1 ; 0x1 8470: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 8474: e5903070 ldr r3, [r0, #112] 8478: e3530000 cmp r3, #0 ; 0x0 847c: 0a000001 beq 8488 <_Thread_Resume+0x40> _ISR_Enable( level ); 8480: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 8484: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 8488: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 848c: e3130002 tst r3, #2 ; 0x2 8490: 0a000028 beq 8538 <_Thread_Resume+0xf0> 8494: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 8498: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 849c: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 84a0: 1a000024 bne 8538 <_Thread_Resume+0xf0> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 84a4: e5900090 ldr r0, [r0, #144] 84a8: e1d429b6 ldrh r2, [r4, #150] 84ac: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 84b0: e594108c ldr r1, [r4, #140] 84b4: e1833002 orr r3, r3, r2 84b8: e1c030b0 strh r3, [r0] _Priority_Major_bit_map |= the_priority_map->ready_major; 84bc: e59fc07c ldr ip, [pc, #124] ; 8540 <_Thread_Resume+0xf8> Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 84c0: e2813004 add r3, r1, #4 ; 0x4 84c4: e5843000 str r3, [r4] 84c8: e1d429b4 ldrh r2, [r4, #148] 84cc: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 84d0: e5910008 ldr r0, [r1, #8] 84d4: e1833002 orr r3, r3, r2 the_chain->last = the_node; 84d8: e5814008 str r4, [r1, #8] 84dc: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 84e0: 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; 84e4: e5804000 str r4, [r0] _ISR_Flash( level ); 84e8: e10f3000 mrs r3, CPSR 84ec: e129f005 msr CPSR_fc, r5 84f0: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 84f4: e59f1048 ldr r1, [pc, #72] ; 8544 <_Thread_Resume+0xfc> 84f8: e5913000 ldr r3, [r1] 84fc: e5942014 ldr r2, [r4, #20] 8500: e5933014 ldr r3, [r3, #20] 8504: e1520003 cmp r2, r3 8508: 2a00000a bcs 8538 <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 850c: e59f3034 ldr r3, [pc, #52] ; 8548 <_Thread_Resume+0x100> 8510: e5933000 ldr r3, [r3] 8514: e5d33076 ldrb r3, [r3, #118] 8518: e3530000 cmp r3, #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; 851c: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 8520: 1a000001 bne 852c <_Thread_Resume+0xe4> 8524: e3520000 cmp r2, #0 ; 0x0 8528: 1a000002 bne 8538 <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 852c: e59f3018 ldr r3, [pc, #24] ; 854c <_Thread_Resume+0x104> 8530: e3a02001 mov r2, #1 ; 0x1 8534: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 8538: e129f005 msr CPSR_fc, r5 853c: e8bd8030 pop {r4, r5, pc} 8540: 00021558 .word 0x00021558 8544: 00021530 .word 0x00021530 8548: 00021564 .word 0x00021564 854c: 00021574 .word 0x00021574 00006d28 <_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 ) { 6d28: e59f305c ldr r3, [pc, #92] ; 6d8c <_Thread_Stack_Allocate+0x64> 6d2c: e5933000 ldr r3, [r3] 6d30: e5932020 ldr r2, [r3, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6d34: e59f3054 ldr r3, [pc, #84] ; 6d90 <_Thread_Stack_Allocate+0x68> 6d38: e5933000 ldr r3, [r3] 6d3c: e92d4030 push {r4, r5, lr} 6d40: e1510003 cmp r1, r3 6d44: 21a04001 movcs r4, r1 6d48: 31a04003 movcc r4, r3 * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _Configuration_Table->stack_allocate_hook ) { 6d4c: e3520000 cmp r2, #0 ; 0x0 size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 6d50: 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 ) { 6d54: 0a000003 beq 6d68 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 6d58: e1a00004 mov r0, r4 <== NOT EXECUTED 6d5c: e1a0e00f mov lr, pc <== NOT EXECUTED 6d60: e12fff12 bx r2 <== NOT EXECUTED 6d64: ea000002 b 6d74 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 6d68: 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 ); 6d6c: e1a00004 mov r0, r4 6d70: eb000203 bl 7584 <_Workspace_Allocate> 6d74: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 6d78: e3500000 cmp r0, #0 ; 0x0 6d7c: 11a00004 movne r0, r4 6d80: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 6d84: e58530cc str r3, [r5, #204] return the_stack_size; } 6d88: e8bd8030 pop {r4, r5, pc} 6d8c: 0001541c .word 0x0001541c 6d90: 0001389c .word 0x0001389c 00006d94 <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 6d94: e5d030c0 ldrb r3, [r0, #192] 6d98: e3530000 cmp r3, #0 ; 0x0 */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 6d9c: 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 ) 6da0: 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 ) 6da4: e59f3028 ldr r3, [pc, #40] ; 6dd4 <_Thread_Stack_Free+0x40> 6da8: e5933000 ldr r3, [r3] 6dac: e5933024 ldr r3, [r3, #36] 6db0: e3530000 cmp r3, #0 ; 0x0 6db4: 0a000003 beq 6dc8 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 6db8: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 6dbc: e1a0e00f mov lr, pc <== NOT EXECUTED 6dc0: e12fff13 bx r3 <== NOT EXECUTED 6dc4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 6dc8: e59000c8 ldr r0, [r0, #200] } 6dcc: 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 ); 6dd0: ea0001e7 b 7574 <_Workspace_Free> 6dd4: 0001541c .word 0x0001541c 00006e68 <_Thread_Tickle_timeslice>: void _Thread_Tickle_timeslice( void ) { Thread_Control *executing; executing = _Thread_Executing; 6e68: e59f3088 ldr r3, [pc, #136] ; 6ef8 <_Thread_Tickle_timeslice+0x90> * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 6e6c: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; 6e70: e5934000 ldr r4, [r3] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 6e74: e5d43076 ldrb r3, [r4, #118] 6e78: e3530000 cmp r3, #0 ; 0x0 6e7c: 08bd8010 popeq {r4, pc} return; if ( !_States_Is_ready( executing->current_state ) ) 6e80: e5943010 ldr r3, [r4, #16] 6e84: e3530000 cmp r3, #0 ; 0x0 6e88: 18bd8010 popne {r4, pc} /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 6e8c: e594307c ldr r3, [r4, #124] 6e90: e3530001 cmp r3, #1 ; 0x1 6e94: 38bd8010 popcc {r4, pc} 6e98: e3530002 cmp r3, #2 ; 0x2 6e9c: 9a000002 bls 6eac <_Thread_Tickle_timeslice+0x44> 6ea0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 6ea4: 18bd8010 popne {r4, pc} <== NOT EXECUTED 6ea8: ea000009 b 6ed4 <_Thread_Tickle_timeslice+0x6c> <== 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 ) { 6eac: e5943078 ldr r3, [r4, #120] 6eb0: e2433001 sub r3, r3, #1 ; 0x1 6eb4: e3530000 cmp r3, #0 ; 0x0 6eb8: e5843078 str r3, [r4, #120] 6ebc: c8bd8010 popgt {r4, pc} _Thread_Reset_timeslice(); 6ec0: eb000b9f bl 9d44 <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 6ec4: e59f3030 ldr r3, [pc, #48] ; 6efc <_Thread_Tickle_timeslice+0x94> 6ec8: e5933000 ldr r3, [r3] 6ecc: e5843078 str r3, [r4, #120] 6ed0: e8bd8010 pop {r4, pc} } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 6ed4: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 6ed8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 6edc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 6ee0: e5843078 str r3, [r4, #120] <== NOT EXECUTED 6ee4: 18bd8010 popne {r4, pc} <== NOT EXECUTED (*executing->budget_callout)( executing ); 6ee8: e1a00004 mov r0, r4 <== NOT EXECUTED 6eec: e1a0e00f mov lr, pc <== NOT EXECUTED 6ef0: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED 6ef4: e8bd8010 pop {r4, pc} <== NOT EXECUTED 6ef8: 00015444 .word 0x00015444 6efc: 00015344 .word 0x00015344 00005bf4 <_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 ) ) { 5bf4: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED 5bf8: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5bfc: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5c00: e92d4010 push {r4, lr} <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 5c04: e5813044 str r3, [r1, #68] <== NOT EXECUTED void _Thread_blocking_operation_Cancel( Thread_blocking_operation_States sync_state, Thread_Control *the_thread, ISR_Level level ) { 5c08: e1a04001 mov r4, r1 <== 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 ) ) { 5c0c: 1a000005 bne 5c28 <_Thread_blocking_operation_Cancel+0x34> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 5c10: e2833003 add r3, r3, #3 ; 0x3 <== NOT EXECUTED 5c14: e5813050 str r3, [r1, #80] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 5c18: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 5c1c: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED 5c20: eb000605 bl 743c <_Watchdog_Remove> <== NOT EXECUTED 5c24: ea000000 b 5c2c <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED } else _ISR_Enable( level ); 5c28: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5c2c: e59f1008 ldr r1, [pc, #8] ; 5c3c <_Thread_blocking_operation_Cancel+0x48> <== NOT EXECUTED 5c30: e1a00004 mov r0, r4 <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 5c34: e8bd4010 pop {r4, lr} <== NOT EXECUTED 5c38: ea000068 b 5de0 <_Thread_Clear_state> <== NOT EXECUTED 5c3c: 1003fff8 .word 0x1003fff8 00006774 <_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 ) { 6774: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 6778: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 677c: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6780: e281303c add r3, r1, #60 ; 0x3c 6784: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 6788: e3a03000 mov r3, #0 ; 0x0 Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 678c: e1a04000 mov r4, r0 6790: e58c303c str r3, [ip, #60] RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 6794: e1a00325 lsr r0, r5, #6 _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 ]; 6798: e283300c add r3, r3, #12 ; 0xc 679c: e0264093 mla r6, r3, r0, r4 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 67a0: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 67a4: e2811038 add r1, r1, #56 ; 0x38 67a8: e58c1040 str r1, [ip, #64] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 67ac: e1a09002 mov r9, r2 _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; 67b0: e5948038 ldr r8, [r4, #56] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 67b4: 159fa19c ldrne sl, [pc, #412] ; 6958 <_Thread_queue_Enqueue_priority+0x1e4> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 67b8: 12860008 addne r0, r6, #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 ) ) 67bc: 1a00002d bne 6878 <_Thread_queue_Enqueue_priority+0x104> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 67c0: e3a03003 mov r3, #3 ; 0x3 67c4: e0030390 mul r3, r0, r3 67c8: e2833001 add r3, r3, #1 ; 0x1 67cc: e0840103 add r0, r4, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 67d0: e1a07006 mov r7, r6 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 67d4: e10f6000 mrs r6, CPSR 67d8: e38630c0 orr r3, r6, #192 ; 0xc0 67dc: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 67e0: e3e02000 mvn r2, #0 ; 0x0 67e4: e5971000 ldr r1, [r7] 67e8: ea000011 b 6834 <_Thread_queue_Enqueue_priority+0xc0> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 67ec: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 67f0: e1550002 cmp r5, r2 67f4: 9a000010 bls 683c <_Thread_queue_Enqueue_priority+0xc8> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 67f8: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 67fc: e1510000 cmp r1, r0 6800: 0a00000d beq 683c <_Thread_queue_Enqueue_priority+0xc8> break; search_priority = search_thread->current_priority; 6804: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 6808: e1550002 cmp r5, r2 680c: 9a00000a bls 683c <_Thread_queue_Enqueue_priority+0xc8> break; #endif _ISR_Flash( level ); 6810: e10f3000 mrs r3, CPSR 6814: e129f006 msr CPSR_fc, r6 6818: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 681c: e5913010 ldr r3, [r1, #16] 6820: e1180003 tst r8, r3 6824: 1a000001 bne 6830 <_Thread_queue_Enqueue_priority+0xbc> _ISR_Enable( level ); 6828: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 682c: eaffffe8 b 67d4 <_Thread_queue_Enqueue_priority+0x60> <== NOT EXECUTED goto restart_forward_search; } search_thread = 6830: 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 ) ) { 6834: e1510000 cmp r1, r0 6838: 1affffeb bne 67ec <_Thread_queue_Enqueue_priority+0x78> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 683c: e5943030 ldr r3, [r4, #48] 6840: e3530001 cmp r3, #1 ; 0x1 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 ) ) { 6844: e1a00006 mov r0, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6848: 1a00003f bne 694c <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 684c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 6850: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 6854: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 6858: 0a000031 beq 6924 <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 685c: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6860: e88c000a stm ip, {r1, r3} the_node->previous = previous_node; previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6864: e58c4044 str r4, [ip, #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; 6868: e583c000 str ip, [r3] search_node->previous = the_node; 686c: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6870: e129f006 msr CPSR_fc, r6 6874: ea000032 b 6944 <_Thread_queue_Enqueue_priority+0x1d0> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6878: e5da3000 ldrb r3, [sl] 687c: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 6880: e10f7000 mrs r7, CPSR 6884: e38730c0 orr r3, r7, #192 ; 0xc0 6888: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 688c: e5901000 ldr r1, [r0] 6890: ea000011 b 68dc <_Thread_queue_Enqueue_priority+0x168> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 6894: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 6898: e1550002 cmp r5, r2 689c: 2a000010 bcs 68e4 <_Thread_queue_Enqueue_priority+0x170> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 68a0: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 68a4: e1510006 cmp r1, r6 68a8: 0a00000d beq 68e4 <_Thread_queue_Enqueue_priority+0x170> break; search_priority = search_thread->current_priority; 68ac: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 68b0: e1550002 cmp r5, r2 68b4: 2a00000a bcs 68e4 <_Thread_queue_Enqueue_priority+0x170> break; #endif _ISR_Flash( level ); 68b8: e10f3000 mrs r3, CPSR 68bc: e129f007 msr CPSR_fc, r7 68c0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 68c4: e5913010 ldr r3, [r1, #16] 68c8: e1180003 tst r8, r3 68cc: 1a000001 bne 68d8 <_Thread_queue_Enqueue_priority+0x164> _ISR_Enable( level ); 68d0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 68d4: eaffffe7 b 6878 <_Thread_queue_Enqueue_priority+0x104> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 68d8: 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 ) ) { 68dc: e1510006 cmp r1, r6 68e0: 1affffeb bne 6894 <_Thread_queue_Enqueue_priority+0x120> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 68e4: e5943030 ldr r3, [r4, #48] 68e8: e3530001 cmp r3, #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 ) ) { 68ec: e1a00007 mov r0, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 68f0: 1a000015 bne 694c <_Thread_queue_Enqueue_priority+0x1d8> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68f4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 68f8: e1550002 cmp r5, r2 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 68fc: e5843030 str r3, [r4, #48] if ( priority == search_priority ) 6900: 0a000007 beq 6924 <_Thread_queue_Enqueue_priority+0x1b0> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 6904: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 6908: e58c1004 str r1, [ip, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 690c: e58c3000 str r3, [ip] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6910: e58c4044 str r4, [ip, #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; 6914: e581c000 str ip, [r1] next_node->previous = the_node; 6918: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 691c: e129f007 msr CPSR_fc, r7 6920: ea000007 b 6944 <_Thread_queue_Enqueue_priority+0x1d0> 6924: e281303c add r3, r1, #60 ; 0x3c 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; 6928: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 692c: e58c3000 str r3, [ip] the_node->previous = previous_node; 6930: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6934: e58c4044 str r4, [ip, #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; 6938: e582c000 str ip, [r2] search_node->previous = the_node; 693c: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6940: e129f000 msr CPSR_fc, r0 6944: e3a00001 mov r0, #1 ; 0x1 6948: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 694c: e5890000 str r0, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; 6950: e5940030 ldr r0, [r4, #48] <== NOT EXECUTED } 6954: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 6958: 000138a0 .word 0x000138a0 0000a6ac <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { a6ac: e92d4010 push {r4, lr} a6b0: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); a6b4: e10f0000 mrs r0, CPSR a6b8: e38030c0 orr r3, r0, #192 ; 0xc0 a6bc: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a6c0: e59f3064 ldr r3, [pc, #100] ; a72c <_Thread_queue_Extract_fifo+0x80> a6c4: e5912010 ldr r2, [r1, #16] a6c8: e0023003 and r3, r2, r3 a6cc: e3530000 cmp r3, #0 ; 0x0 a6d0: 1a000001 bne a6dc <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); a6d4: 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 } a6d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a6dc: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; a6e0: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a6e4: e5911000 ldr r1, [r1] a6e8: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; a6ec: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; a6f0: e5821000 str r1, [r2] a6f4: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; a6f8: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a6fc: 0a000001 beq a708 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); a700: e129f000 msr CPSR_fc, r0 a704: ea000004 b a71c <_Thread_queue_Extract_fifo+0x70> a708: e3a03003 mov r3, #3 ; 0x3 a70c: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); a710: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); a714: e2840048 add r0, r4, #72 ; 0x48 a718: ebfff347 bl 743c <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a71c: e59f100c ldr r1, [pc, #12] ; a730 <_Thread_queue_Extract_fifo+0x84> a720: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a724: e8bd4010 pop {r4, lr} a728: eaffedac b 5de0 <_Thread_Clear_state> a72c: 0003bee0 .word 0x0003bee0 a730: 1003fff8 .word 0x1003fff8 00009b0c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 9b0c: e92d4070 push {r4, r5, r6, lr} 9b10: e1a04001 mov r4, r1 9b14: 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 ); 9b18: e10fc000 mrs ip, CPSR 9b1c: e38c30c0 orr r3, ip, #192 ; 0xc0 9b20: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 9b24: e59f30b4 ldr r3, [pc, #180] ; 9be0 <_Thread_queue_Extract_priority_helper+0xd4> 9b28: e5912010 ldr r2, [r1, #16] 9b2c: e0023003 and r3, r2, r3 9b30: e3530000 cmp r3, #0 ; 0x0 9b34: 1a000001 bne 9b40 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); 9b38: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 9b3c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 9b40: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 9b44: e284303c add r3, r4, #60 ; 0x3c 9b48: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 9b4c: 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; 9b50: 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; 9b54: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 9b58: 0a00000e beq 9b98 <_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; 9b5c: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 9b60: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 9b64: 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; 9b68: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 9b6c: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 9b70: e5942038 ldr r2, [r4, #56] 9b74: e5943040 ldr r3, [r4, #64] 9b78: e1520003 cmp r2, r3 9b7c: 0a000005 beq 9b98 <_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 ); 9b80: 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 = 9b84: e2813038 add r3, r1, #56 ; 0x38 9b88: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 9b8c: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 9b90: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 9b94: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 9b98: e3560000 cmp r6, #0 ; 0x0 9b9c: 0a000001 beq 9ba8 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 9ba0: e129f00c msr CPSR_fc, ip 9ba4: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 9ba8: e5943050 ldr r3, [r4, #80] 9bac: e3530002 cmp r3, #2 ; 0x2 9bb0: 0a000001 beq 9bbc <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); 9bb4: e129f00c msr CPSR_fc, ip 9bb8: ea000004 b 9bd0 <_Thread_queue_Extract_priority_helper+0xc4> 9bbc: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED 9bc0: e5843050 str r3, [r4, #80] <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 9bc4: e129f00c msr CPSR_fc, ip <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 9bc8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 9bcc: ebfff61a bl 743c <_Watchdog_Remove> <== NOT EXECUTED 9bd0: e59f100c ldr r1, [pc, #12] ; 9be4 <_Thread_queue_Extract_priority_helper+0xd8> 9bd4: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 9bd8: e8bd4070 pop {r4, r5, r6, lr} 9bdc: eafff07f b 5de0 <_Thread_Clear_state> 9be0: 0003bee0 .word 0x0003bee0 9be4: 1003fff8 .word 0x1003fff8 00009be8 <_Thread_queue_Process_timeout>: void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 9be8: e5902044 ldr r2, [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 && 9bec: e5921030 ldr r1, [r2, #48] 9bf0: e3510000 cmp r1, #0 ; 0x0 9bf4: 0a000009 beq 9c20 <_Thread_queue_Process_timeout+0x38> 9bf8: e59f3034 ldr r3, [pc, #52] ; 9c34 <_Thread_queue_Process_timeout+0x4c> <== NOT EXECUTED 9bfc: e5933000 ldr r3, [r3] <== NOT EXECUTED 9c00: e1500003 cmp r0, r3 <== NOT EXECUTED 9c04: 1a000005 bne 9c20 <_Thread_queue_Process_timeout+0x38> <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 9c08: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 9c0c: 1592303c ldrne r3, [r2, #60] <== NOT EXECUTED 9c10: 15803034 strne r3, [r0, #52] <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 9c14: 13a03002 movne r3, #2 ; 0x2 <== NOT EXECUTED 9c18: 15823030 strne r3, [r2, #48] <== NOT EXECUTED 9c1c: e12fff1e bx lr <== NOT EXECUTED } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 9c20: e592303c ldr r3, [r2, #60] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 9c24: e1a01000 mov r1, r0 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; 9c28: e5803034 str r3, [r0, #52] _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 9c2c: e5900044 ldr r0, [r0, #68] 9c30: eaffffaf b 9af4 <_Thread_queue_Extract> 9c34: 00015444 .word 0x00015444 0001f458 <_Timespec_Divide_by_integer>: /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1f458: e5903000 ldr r3, [r0] <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1f45c: e59fc06c ldr ip, [pc, #108] ; 1f4d0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1f460: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ t = time->tv_sec; 1f464: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED t *= TOD_NANOSECONDS_PER_SECOND; 1f468: e086539c umull r5, r6, ip, r3 <== NOT EXECUTED 1f46c: e026649c mla r6, ip, r4, r6 <== NOT EXECUTED t += time->tv_nsec; 1f470: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1f474: e0957000 adds r7, r5, r0 <== NOT EXECUTED 1f478: e0a68fc0 adc r8, r6, r0, asr #31 <== NOT EXECUTED 1f47c: e1a03001 mov r3, r1 <== NOT EXECUTED 1f480: e3a04000 mov r4, #0 ; 0x0 <== NOT EXECUTED void _Timespec_Divide_by_integer( const struct timespec *time, uint32_t iterations, struct timespec *result ) { 1f484: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1f488: e1a00007 mov r0, r7 <== NOT EXECUTED 1f48c: e1a02003 mov r2, r3 <== NOT EXECUTED 1f490: e1a01008 mov r1, r8 <== NOT EXECUTED 1f494: e1a03004 mov r3, r4 <== NOT EXECUTED 1f498: eb006a32 bl 39d68 <__udivdi3> <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1f49c: e59f202c ldr r2, [pc, #44] ; 1f4d0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1f4a0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED /* * Divide to get nanoseconds per iteration */ t /= iterations; 1f4a4: e1a04000 mov r4, r0 <== NOT EXECUTED 1f4a8: e1a05001 mov r5, r1 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1f4ac: eb006a2d bl 39d68 <__udivdi3> <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1f4b0: e1a01005 mov r1, r5 <== NOT EXECUTED /* * Put it back in the timespec result */ result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND; 1f4b4: e5860000 str r0, [r6] <== NOT EXECUTED result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND; 1f4b8: e59f2010 ldr r2, [pc, #16] ; 1f4d0 <_Timespec_Divide_by_integer+0x78> <== NOT EXECUTED 1f4bc: e1a00004 mov r0, r4 <== NOT EXECUTED 1f4c0: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 1f4c4: eb006b6f bl 3a288 <__umoddi3> <== NOT EXECUTED 1f4c8: e5860004 str r0, [r6, #4] <== NOT EXECUTED } 1f4cc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 1f4d0: 3b9aca00 .word 0x3b9aca00 00010630 <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 10630: e59f3038 ldr r3, [pc, #56] ; 10670 <_Timespec_From_ticks+0x40> <== NOT EXECUTED 10634: e5933000 ldr r3, [r3] <== NOT EXECUTED void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 10638: e92d4030 push {r4, r5, lr} <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 1063c: e0040093 mul r4, r3, r0 <== NOT EXECUTED void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 10640: e1a05001 mov r5, r1 <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 10644: e1a00004 mov r0, r4 <== NOT EXECUTED 10648: e59f1024 ldr r1, [pc, #36] ; 10674 <_Timespec_From_ticks+0x44> <== NOT EXECUTED 1064c: ebffc0ae bl 90c <__aeabi_uidiv> <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 10650: e59f101c ldr r1, [pc, #28] ; 10674 <_Timespec_From_ticks+0x44> <== NOT EXECUTED { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 10654: e5850000 str r0, [r5] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 10658: e1a00004 mov r0, r4 <== NOT EXECUTED 1065c: eb002e0b bl 1be90 <__umodsi3> <== NOT EXECUTED 10660: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED 10664: e0030390 mul r3, r0, r3 <== NOT EXECUTED 10668: e5853004 str r3, [r5, #4] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 1066c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 10670: 000231b0 .word 0x000231b0 10674: 000f4240 .word 0x000f4240 00010678 <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 10678: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 1067c: 0a00000a beq 106ac <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 10680: e5903000 ldr r3, [r0] <== NOT EXECUTED 10684: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 10688: ba000007 blt 106ac <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 1068c: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 10690: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 10694: ba000004 blt 106ac <_Timespec_Is_valid+0x34> <== NOT EXECUTED 10698: e59f3014 ldr r3, [pc, #20] ; 106b4 <_Timespec_Is_valid+0x3c> <== NOT EXECUTED 1069c: e1500003 cmp r0, r3 <== NOT EXECUTED 106a0: 83a00000 movhi r0, #0 ; 0x0 <== NOT EXECUTED 106a4: 93a00001 movls r0, #1 ; 0x1 <== NOT EXECUTED 106a8: e12fff1e bx lr <== NOT EXECUTED 106ac: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 106b0: e12fff1e bx lr <== NOT EXECUTED 106b4: 3b9ac9ff .word 0x3b9ac9ff 000106b8 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 106b8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 106bc: e5907000 ldr r7, [r0] <== NOT EXECUTED 106c0: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 106c4: e1a06000 mov r6, r0 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 106c8: 1a000002 bne 106d8 <_Timespec_To_ticks+0x20> <== NOT EXECUTED 106cc: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 106d0: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 106d4: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 106d8: e59f3030 ldr r3, [pc, #48] ; 10710 <_Timespec_To_ticks+0x58> <== NOT EXECUTED 106dc: e5935000 ldr r5, [r3] <== NOT EXECUTED 106e0: e59f002c ldr r0, [pc, #44] ; 10714 <_Timespec_To_ticks+0x5c> <== NOT EXECUTED 106e4: e1a01005 mov r1, r5 <== NOT EXECUTED 106e8: ebffc087 bl 90c <__aeabi_uidiv> <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 106ec: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 106f0: e0040097 mul r4, r7, r0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 106f4: e5960004 ldr r0, [r6, #4] <== NOT EXECUTED 106f8: ebffc083 bl 90c <__aeabi_uidiv> <== NOT EXECUTED 106fc: e1a01005 mov r1, r5 <== NOT EXECUTED 10700: ebffc081 bl 90c <__aeabi_uidiv> <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 10704: e0900004 adds r0, r0, r4 <== NOT EXECUTED 10708: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED return ticks; return 1; } 1070c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 10710: 000231b0 .word 0x000231b0 10714: 000f4240 .word 0x000f4240 0000b714 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { b714: e92d4010 push {r4, lr} b718: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); b71c: eb001061 bl f8a8 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) b720: e5943024 ldr r3, [r4, #36] b724: e3530000 cmp r3, #0 ; 0x0 b728: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); b72c: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } b730: 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 ); b734: ea00105b b f8a8 <_Chain_Extract> <== NOT EXECUTED 000072cc <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 72cc: e59f30fc ldr r3, [pc, #252] ; 73d0 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 72d0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 72d4: e1a0c001 mov ip, r1 72d8: e1a07000 mov r7, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 72dc: e5934000 ldr r4, [r3] _ISR_Disable( level ); 72e0: e10f5000 mrs r5, CPSR 72e4: e38530c0 orr r3, r5, #192 ; 0xc0 72e8: 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 ) { 72ec: e5913008 ldr r3, [r1, #8] 72f0: e3530000 cmp r3, #0 ; 0x0 72f4: 0a000001 beq 7300 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 72f8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 72fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7300: e59f30cc ldr r3, [pc, #204] ; 73d4 <_Watchdog_Insert+0x108> 7304: e5932000 ldr r2, [r3] 7308: e2822001 add r2, r2, #1 ; 0x1 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 730c: e59f60c4 ldr r6, [pc, #196] ; 73d8 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 7310: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 7314: e3a03001 mov r3, #1 ; 0x1 7318: e5813008 str r3, [r1, #8] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 731c: e1a08006 mov r8, r6 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 7320: e59c000c ldr r0, [ip, #12] * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 7324: e5971000 ldr r1, [r7] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 7328: e3500000 cmp r0, #0 ; 0x0 732c: 0a000014 beq 7384 <_Watchdog_Insert+0xb8> 7330: e5913000 ldr r3, [r1] 7334: e3530000 cmp r3, #0 ; 0x0 7338: 0a000011 beq 7384 <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 733c: e5912010 ldr r2, [r1, #16] 7340: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 7344: 30603002 rsbcc r3, r0, r2 7348: 35813010 strcc r3, [r1, #16] 734c: 3a00000c bcc 7384 <_Watchdog_Insert+0xb8> * 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 ); 7350: e10f3000 mrs r3, CPSR 7354: e129f005 msr CPSR_fc, r5 7358: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 735c: e59c3008 ldr r3, [ip, #8] 7360: e3530001 cmp r3, #1 ; 0x1 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 7364: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 7368: 1a000010 bne 73b0 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 736c: e5963000 ldr r3, [r6] 7370: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 7374: 85884000 strhi r4, [r8] 7378: 8affffe8 bhi 7320 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 737c: e5911000 ldr r1, [r1] 7380: eaffffe8 b 7328 <_Watchdog_Insert+0x5c> the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 7384: e59f3050 ldr r3, [pc, #80] ; 73dc <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 7388: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 738c: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 7390: e5921000 ldr r1, [r2] 7394: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 7398: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 739c: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 73a0: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 73a4: e58c0010 str r0, [ip, #16] before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 73a8: e581c004 str ip, [r1, #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; 73ac: e58c1000 str r1, [ip] _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; 73b0: e59f3020 ldr r3, [pc, #32] ; 73d8 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 73b4: e59f2018 ldr r2, [pc, #24] ; 73d4 <_Watchdog_Insert+0x108> _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; 73b8: e5834000 str r4, [r3] _Watchdog_Sync_count--; 73bc: e5923000 ldr r3, [r2] 73c0: e2433001 sub r3, r3, #1 ; 0x1 73c4: e5823000 str r3, [r2] _ISR_Enable( level ); 73c8: e129f005 msr CPSR_fc, r5 73cc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 73d0: 00015420 .word 0x00015420 73d4: 000154e0 .word 0x000154e0 73d8: 00015440 .word 0x00015440 73dc: 000154e4 .word 0x000154e4 000075bc <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 75bc: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 75c0: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 75c4: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 75c8: 0a000001 beq 75d4 <_Workspace_Handler_initialization+0x18> 75cc: e2141003 ands r1, r4, #3 ; 0x3 75d0: 0a000003 beq 75e4 <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 75d4: e3a00000 mov r0, #0 ; 0x0 75d8: e3a01001 mov r1, #1 ; 0x1 75dc: e3a02002 mov r2, #2 ; 0x2 75e0: ea00000e b 7620 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 75e4: e59f3038 ldr r3, [pc, #56] ; 7624 <_Workspace_Handler_initialization+0x68> 75e8: e5933000 ldr r3, [r3] 75ec: e5d33028 ldrb r3, [r3, #40] 75f0: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 75f4: 11a02005 movne r2, r5 75f8: 1b000e73 blne afcc memory_available = _Heap_Initialize( 75fc: e1a01004 mov r1, r4 7600: e1a02005 mov r2, r5 7604: e59f001c ldr r0, [pc, #28] ; 7628 <_Workspace_Handler_initialization+0x6c> 7608: e3a03004 mov r3, #4 ; 0x4 760c: ebfff706 bl 522c <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 7610: e3500000 cmp r0, #0 ; 0x0 7614: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 7618: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 761c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 7620: ebfff786 bl 5440 <_Internal_error_Occurred> 7624: 0001541c .word 0x0001541c 7628: 000153ac .word 0x000153ac 00003aa0 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 3aa0: e92d4010 push {r4, lr} if ( !time_buffer ) 3aa4: e2514000 subs r4, r1, #0 ; 0x0 3aa8: 03a00009 moveq r0, #9 ; 0x9 3aac: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 3ab0: e3500004 cmp r0, #4 ; 0x4 3ab4: 979ff100 ldrls pc, [pc, r0, lsl #2] 3ab8: ea000004 b 3ad0 3abc: 00003ad8 .word 0x00003ad8 <== NOT EXECUTED 3ac0: 00003ae4 .word 0x00003ae4 <== NOT EXECUTED 3ac4: 00003af0 .word 0x00003af0 <== NOT EXECUTED 3ac8: 00003af8 .word 0x00003af8 <== NOT EXECUTED 3acc: 00003b08 .word 0x00003b08 <== NOT EXECUTED 3ad0: e3a0000a mov r0, #10 ; 0xa 3ad4: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 3ad8: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3adc: 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 ); 3ae0: ea000025 b 3b7c case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 3ae4: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3ae8: 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); 3aec: ea000008 b 3b14 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 3af0: eb00001d bl 3b6c 3af4: ea000000 b 3afc return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 3af8: eb000013 bl 3b4c 3afc: e5840000 str r0, [r4] 3b00: e3a00000 mov r0, #0 ; 0x0 3b04: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 3b08: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 3b0c: 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 ); 3b10: ea00004b b 3c44 00006ccc : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 6ccc: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 6cd0: e2507000 subs r7, r0, #0 ; 0x0 6cd4: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 6cd8: e59f6054 ldr r6, [pc, #84] ; 6d34 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6cdc: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 6ce0: e5963004 ldr r3, [r6, #4] 6ce4: e3530000 cmp r3, #0 ; 0x0 6ce8: 0a00000d beq 6d24 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 6cec: e5935004 ldr r5, [r3, #4] if ( information ) { 6cf0: e3550000 cmp r5, #0 ; 0x0 6cf4: 13a04001 movne r4, #1 ; 0x1 6cf8: 1a000006 bne 6d18 6cfc: ea000008 b 6d24 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 6d00: e595301c ldr r3, [r5, #28] 6d04: e7933104 ldr r3, [r3, r4, lsl #2] if ( !the_thread ) 6d08: e2530000 subs r0, r3, #0 ; 0x0 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6d0c: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; (*routine)(the_thread); 6d10: 11a0e00f movne lr, pc 6d14: 112fff17 bxne r7 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 6d18: e1d531b0 ldrh r3, [r5, #16] 6d1c: e1540003 cmp r4, r3 6d20: 9afffff6 bls 6d00 6d24: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 6d28: e1560008 cmp r6, r8 6d2c: 1affffeb bne 6ce0 6d30: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 6d34: 00021468 .word 0x00021468 00027630 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 27630: e92d4030 push {r4, r5, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 27634: e2514000 subs r4, r1, #0 ; 0x0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 27638: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 2763c: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED 27640: 0a000013 beq 27694 <== NOT EXECUTED 27644: e1a01000 mov r1, r0 <== NOT EXECUTED 27648: e1a0200d mov r2, sp <== NOT EXECUTED 2764c: e59f0048 ldr r0, [pc, #72] ; 2769c <== NOT EXECUTED 27650: ebff863a bl 8f40 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 27654: e59d5000 ldr r5, [sp] <== NOT EXECUTED 27658: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 2765c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 27660: 1a00000b bne 27694 <== NOT EXECUTED case OBJECTS_LOCAL: *statistics = the_period->Statistics; 27664: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED 27668: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 2766c: e1a0e004 mov lr, r4 <== NOT EXECUTED 27670: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 27674: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 27678: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 2767c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 27680: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 27684: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED 27688: e88e0003 stm lr, {r0, r1} <== NOT EXECUTED _Thread_Enable_dispatch(); 2768c: ebff886c bl 9844 <_Thread_Enable_dispatch> <== NOT EXECUTED 27690: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 27694: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 27698: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2769c: 00055790 .word 0x00055790 000276a0 : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 276a0: e92d4070 push {r4, r5, r6, lr} Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 276a4: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 276a8: e24dd00c sub sp, sp, #12 ; 0xc Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 276ac: 03a00009 moveq r0, #9 ; 0x9 276b0: 0a000021 beq 2773c 276b4: e1a01000 mov r1, r0 276b8: e28d2008 add r2, sp, #8 ; 0x8 276bc: e59f0080 ldr r0, [pc, #128] ; 27744 276c0: ebff861e bl 8f40 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 276c4: e59d3008 ldr r3, [sp, #8] 276c8: e3530000 cmp r3, #0 ; 0x0 276cc: e1a06000 mov r6, r0 276d0: 13a00004 movne r0, #4 ; 0x4 276d4: 1a000018 bne 2773c case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 276d8: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED 276dc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 276e0: 01a02003 moveq r2, r3 <== NOT EXECUTED 276e4: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED status->state = the_period->state; 276e8: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED if ( status->state == RATE_MONOTONIC_INACTIVE ) { 276ec: 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); 276f0: e885000c stm r5, {r2, r3} <== 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; 276f4: 05853014 streq 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; 276f8: 05853008 streq r3, [r5, #8] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 276fc: 0585300c streq 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; 27700: 05853010 streq r3, [r5, #16] <== NOT EXECUTED 27704: 0a00000a beq 27734 <== 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 ); 27708: e1a0000d mov r0, sp <== NOT EXECUTED 2770c: ebffdcb9 bl 1e9f8 <_TOD_Get_uptime> <== NOT EXECUTED #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 27710: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED 27714: e1a0100d mov r1, sp <== NOT EXECUTED 27718: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED 2771c: ebff8bd1 bl a668 <_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( 27720: e1a0100d mov r1, sp <== NOT EXECUTED 27724: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED 27728: e59f0018 ldr r0, [pc, #24] ; 27748 <== 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 ); 2772c: 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( 27730: ebff8bcc bl a668 <_Timespec_Subtract> <== NOT EXECUTED the_period->owner->cpu_time_used - the_period->owner_executed_at_period; #endif } _Thread_Enable_dispatch(); 27734: ebff8842 bl 9844 <_Thread_Enable_dispatch> <== NOT EXECUTED 27738: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 2773c: e28dd00c add sp, sp, #12 ; 0xc 27740: e8bd8070 pop {r4, r5, r6, pc} 27744: 00055790 .word 0x00055790 27748: 0005534c .word 0x0005534c 0001df50 : void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); 1df50: e59f1004 ldr r1, [pc, #4] ; 1df5c <== NOT EXECUTED 1df54: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 1df58: eaffff79 b 1dd44 <== NOT EXECUTED 1df5c: 00005128 .word 0x00005128 0001dd44 : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1dd44: 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 ) 1dd48: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 1dd4c: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED 1dd50: e1a06000 mov r6, 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 ) 1dd54: 0a000071 beq 1df20 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); 1dd58: e59f11c8 ldr r1, [pc, #456] ; 1df28 <== NOT EXECUTED 1dd5c: e1a0e00f mov lr, pc <== NOT EXECUTED 1dd60: e12fff15 bx r5 <== NOT EXECUTED #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 1dd64: e59f11c0 ldr r1, [pc, #448] ; 1df2c <== NOT EXECUTED 1dd68: e1a00006 mov r0, r6 <== NOT EXECUTED 1dd6c: e1a0e00f mov lr, pc <== NOT EXECUTED 1dd70: e12fff15 bx r5 <== NOT EXECUTED #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 1dd74: e59f11b4 ldr r1, [pc, #436] ; 1df30 <== NOT EXECUTED 1dd78: e1a00006 mov r0, r6 <== NOT EXECUTED 1dd7c: e1a0e00f mov lr, pc <== NOT EXECUTED 1dd80: e12fff15 bx r5 <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 1dd84: e59f11a8 ldr r1, [pc, #424] ; 1df34 <== NOT EXECUTED 1dd88: e1a00006 mov r0, r6 <== NOT EXECUTED 1dd8c: e1a0e00f mov lr, pc <== NOT EXECUTED 1dd90: e12fff15 bx r5 <== NOT EXECUTED #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 1dd94: e1a00006 mov r0, r6 <== NOT EXECUTED 1dd98: e59f1198 ldr r1, [pc, #408] ; 1df38 <== NOT EXECUTED 1dd9c: e1a0e00f mov lr, pc <== NOT EXECUTED 1dda0: e12fff15 bx r5 <== 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 ; 1dda4: e59f3190 ldr r3, [pc, #400] ; 1df3c <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1dda8: e28d8010 add r8, sp, #16 ; 0x10 <== 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 ; 1ddac: e5937008 ldr r7, [r3, #8] <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1ddb0: e2889018 add r9, r8, #24 ; 0x18 <== NOT EXECUTED 1ddb4: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1ddb8: e288a030 add sl, r8, #48 ; 0x30 <== NOT EXECUTED 1ddbc: ea000051 b 1df08 <== NOT EXECUTED * 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 ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1ddc0: eb00261a bl 27630 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) 1ddc4: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED 1ddc8: 1a00004d bne 1df04 <== NOT EXECUTED continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 1ddcc: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED 1ddd0: e1a00007 mov r0, r7 <== NOT EXECUTED 1ddd4: eb002631 bl 276a0 <== NOT EXECUTED continue; #endif name[ 0 ] = '\0'; if ( the_status.owner ) { 1ddd8: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED 1dddc: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif name[ 0 ] = '\0'; 1dde0: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 1dde4: 128d206b addne r2, sp, #107 ; 0x6b <== NOT EXECUTED 1dde8: 13a01005 movne r1, #5 ; 0x5 <== NOT EXECUTED 1ddec: 1bffa5d9 blne 7558 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, 1ddf0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1ddf4: e58d3000 str r3, [sp] <== NOT EXECUTED 1ddf8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 1ddfc: e1a02007 mov r2, r7 <== NOT EXECUTED 1de00: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 1de04: e59f1134 ldr r1, [pc, #308] ; 1df40 <== NOT EXECUTED 1de08: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED 1de0c: e1a00006 mov r0, r6 <== NOT EXECUTED 1de10: e1a0e00f mov lr, pc <== NOT EXECUTED 1de14: e12fff15 bx r5 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1de18: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1de1c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1de20: e1a0200b mov r2, fp <== NOT EXECUTED 1de24: e1a00009 mov r0, r9 <== NOT EXECUTED /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 1de28: 1a000004 bne 1de40 <== NOT EXECUTED (*print)( context, "\n" ); 1de2c: e1a00006 mov r0, r6 <== NOT EXECUTED 1de30: e59f110c ldr r1, [pc, #268] ; 1df44 <== NOT EXECUTED 1de34: e1a0e00f mov lr, pc <== NOT EXECUTED 1de38: e12fff15 bx r5 <== NOT EXECUTED 1de3c: ea000030 b 1df04 <== NOT EXECUTED */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 1de40: eb000584 bl 1f458 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 1de44: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED 1de48: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1de4c: eb006e6a bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1de50: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 1de54: e1a04000 mov r4, r0 <== NOT EXECUTED 1de58: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1de5c: e59d0024 ldr r0, [sp, #36] <== NOT EXECUTED 1de60: e58d3000 str r3, [sp] <== NOT EXECUTED 1de64: eb006e64 bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1de68: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1de6c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1de70: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1de74: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1de78: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1de7c: eb006e5e bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1de80: e1a03004 mov r3, r4 <== NOT EXECUTED 1de84: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1de88: e59f10b8 ldr r1, [pc, #184] ; 1df48 <== NOT EXECUTED 1de8c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED 1de90: e1a00006 mov r0, r6 <== NOT EXECUTED 1de94: e1a0e00f mov lr, pc <== NOT EXECUTED 1de98: e12fff15 bx r5 <== NOT EXECUTED * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 1de9c: e1a0200b mov r2, fp <== NOT EXECUTED 1dea0: e1a0000a mov r0, sl <== NOT EXECUTED 1dea4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED 1dea8: eb00056a bl 1f458 <_Timespec_Divide_by_integer> <== NOT EXECUTED &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 1deac: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1deb0: e59d0034 ldr r0, [sp, #52] <== NOT EXECUTED 1deb4: eb006e50 bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1deb8: e59d3038 ldr r3, [sp, #56] <== NOT EXECUTED 1debc: e1a04000 mov r4, r0 <== NOT EXECUTED 1dec0: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1dec4: e59d003c ldr r0, [sp, #60] <== NOT EXECUTED 1dec8: e58d3000 str r3, [sp] <== NOT EXECUTED 1decc: eb006e4a bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1ded0: e59d3060 ldr r3, [sp, #96] <== NOT EXECUTED 1ded4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED 1ded8: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 1dedc: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED 1dee0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED 1dee4: eb006e44 bl 397fc <__aeabi_idiv> <== NOT EXECUTED 1dee8: e1a03004 mov r3, r4 <== NOT EXECUTED 1deec: e58d000c str r0, [sp, #12] <== NOT EXECUTED 1def0: e59f1054 ldr r1, [pc, #84] ; 1df4c <== NOT EXECUTED 1def4: e1a00006 mov r0, r6 <== NOT EXECUTED 1def8: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED 1defc: e1a0e00f mov lr, pc <== NOT EXECUTED 1df00: e12fff15 bx r5 <== 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 ; id++ ) { 1df04: e2877001 add r7, r7, #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 ; 1df08: e59f202c ldr r2, [pc, #44] ; 1df3c <== NOT EXECUTED 1df0c: e592300c ldr r3, [r2, #12] <== NOT EXECUTED 1df10: e1570003 cmp r7, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 1df14: e1a00007 mov r0, r7 <== NOT EXECUTED 1df18: e1a01008 mov r1, r8 <== 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 ; 1df1c: 9affffa7 bls 1ddc0 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 1df20: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED 1df24: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 1df28: 0004018d .word 0x0004018d 1df2c: 000401ab .word 0x000401ab 1df30: 000401cd .word 0x000401cd 1df34: 000401f0 .word 0x000401f0 1df38: 0004023b .word 0x0004023b 1df3c: 00055790 .word 0x00055790 1df40: 00040287 .word 0x00040287 1df44: 000404f8 .word 0x000404f8 1df48: 0004029e .word 0x0004029e 1df4c: 000402bd .word 0x000402bd 0001df60 : 1df60: e59f303c ldr r3, [pc, #60] ; 1dfa4 <== NOT EXECUTED 1df64: e5932000 ldr r2, [r3] <== NOT EXECUTED 1df68: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 1df6c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1df70: 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 ; 1df74: e59f302c ldr r3, [pc, #44] ; 1dfa8 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; 1df78: e1a05003 mov r5, 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 ; 1df7c: e5934008 ldr r4, [r3, #8] <== NOT EXECUTED 1df80: ea000000 b 1df88 <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1df84: eb000008 bl 1dfac <== 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 ; 1df88: e595300c ldr r3, [r5, #12] <== NOT EXECUTED 1df8c: e1540003 cmp r4, r3 <== NOT EXECUTED id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 1df90: e1a00004 mov r0, r4 <== 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 ; id++ ) { 1df94: 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 ; 1df98: 9afffff9 bls 1df84 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 1df9c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 1dfa0: eaffae27 b 9844 <_Thread_Enable_dispatch> <== NOT EXECUTED 1dfa4: 0005528c .word 0x0005528c 1dfa8: 00055790 .word 0x00055790 0001dfac : */ rtems_status_code rtems_rate_monotonic_reset_statistics( Objects_Id id ) { 1dfac: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 1dfb0: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED 1dfb4: 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 *) 1dfb8: e1a0200d mov r2, sp <== NOT EXECUTED 1dfbc: e59f0048 ldr r0, [pc, #72] ; 1e00c <== NOT EXECUTED 1dfc0: ebffabde bl 8f40 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 1dfc4: e59d5000 ldr r5, [sp] <== NOT EXECUTED 1dfc8: e3550000 cmp r5, #0 ; 0x0 <== NOT EXECUTED 1dfcc: e1a04000 mov r4, r0 <== NOT EXECUTED 1dfd0: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED 1dfd4: 1a00000a bne 1e004 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); 1dfd8: e1a01005 mov r1, r5 <== NOT EXECUTED 1dfdc: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 1dfe0: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED 1dfe4: eb003746 bl 2bd04 <== NOT EXECUTED 1dfe8: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED 1dfec: e5843078 str r3, [r4, #120] <== NOT EXECUTED 1dff0: e584305c str r3, [r4, #92] <== NOT EXECUTED 1dff4: e5843060 str r3, [r4, #96] <== NOT EXECUTED 1dff8: e5843074 str r3, [r4, #116] <== NOT EXECUTED _Thread_Enable_dispatch(); 1dffc: ebffae10 bl 9844 <_Thread_Enable_dispatch> <== NOT EXECUTED 1e000: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e004: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED 1e008: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 1e00c: 00055790 .word 0x00055790 0000f614 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f614: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Region_Control *the_region; if ( !starting_address ) f618: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { f61c: e1a04000 mov r4, r0 f620: e24dd008 sub sp, sp, #8 ; 0x8 f624: 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 ) f628: 03a04009 moveq r4, #9 ; 0x9 f62c: 0a000029 beq f6d8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ f630: e59f30ac ldr r3, [pc, #172] ; f6e4 f634: e5930000 ldr r0, [r3] f638: eb0008c6 bl 11958 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) f63c: e1a01004 mov r1, r4 f640: e59f00a0 ldr r0, [pc, #160] ; f6e8 f644: e1a0200d mov r2, sp f648: eb000f3f bl 1334c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { f64c: e59d5000 ldr r5, [sp] f650: e3550000 cmp r5, #0 ; 0x0 f654: e1a04000 mov r4, r0 f658: 0a000003 beq f66c f65c: e3550001 cmp r5, #1 ; 0x1 f660: 03a04004 moveq r4, #4 ; 0x4 f664: 1a000017 bne f6c8 f668: ea000017 b f6cc case OBJECTS_LOCAL: heap_status = _Heap_Extend( f66c: e1a01007 mov r1, r7 f670: e1a02006 mov r2, r6 f674: e2800068 add r0, r0, #104 ; 0x68 f678: e28d3004 add r3, sp, #4 ; 0x4 f67c: eb000baf bl 12540 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { f680: e3500001 cmp r0, #1 ; 0x1 f684: 03a04009 moveq r4, #9 ; 0x9 f688: 0a00000f beq f6cc f68c: 3a000002 bcc f69c f690: e3500002 cmp r0, #2 ; 0x2 f694: 1a00000b bne f6c8 f698: ea000008 b f6c0 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f69c: e59d1004 ldr r1, [sp, #4] f6a0: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6a4: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6a8: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; f6ac: e0833001 add r3, r3, r1 f6b0: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; f6b4: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; f6b8: e1a04005 mov r4, r5 f6bc: ea000002 b f6cc return_status = RTEMS_SUCCESSFUL; break; f6c0: e3a04018 mov r4, #24 ; 0x18 f6c4: ea000000 b f6cc f6c8: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); f6cc: e59f3010 ldr r3, [pc, #16] ; f6e4 f6d0: e5930000 ldr r0, [r3] f6d4: eb0008bb bl 119c8 <_API_Mutex_Unlock> return return_status; } f6d8: e1a00004 mov r0, r4 f6dc: e28dd008 add sp, sp, #8 ; 0x8 f6e0: e8bd80f0 pop {r4, r5, r6, r7, pc} f6e4: 0002ed9c .word 0x0002ed9c f6e8: 0002eb74 .word 0x0002eb74 0000fa10 : Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa10: 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 ) fa14: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { fa18: e24dd010 sub sp, sp, #16 ; 0x10 fa1c: e1a04000 mov r4, r0 fa20: e1a06001 mov r6, r1 fa24: e1a07002 mov r7, r2 uint32_t osize; rtems_status_code return_status = RTEMS_INTERNAL_ERROR; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) fa28: 0a000029 beq fad4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); fa2c: e59f80b0 ldr r8, [pc, #176] ; fae4 fa30: e5980000 ldr r0, [r8] fa34: eb0007c7 bl 11958 <_API_Mutex_Lock> fa38: e1a01004 mov r1, r4 fa3c: e59f00a4 ldr r0, [pc, #164] ; fae8 fa40: e28d2008 add r2, sp, #8 ; 0x8 fa44: eb000e40 bl 1334c <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { fa48: e59d3008 ldr r3, [sp, #8] fa4c: e3530000 cmp r3, #0 ; 0x0 fa50: e1a05000 mov r5, r0 fa54: 0a000005 beq fa70 fa58: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa5c: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { fa60: 03a04004 moveq r4, #4 ; 0x4 fa64: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); fa68: eb0007d6 bl 119c8 <_API_Mutex_Unlock> fa6c: ea000019 b fad8 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( fa70: e28d3004 add r3, sp, #4 ; 0x4 fa74: e28dc00c add ip, sp, #12 ; 0xc fa78: e1a01006 mov r1, r6 fa7c: e1a02007 mov r2, r7 fa80: e2800068 add r0, r0, #104 ; 0x68 fa84: e58dc000 str ip, [sp] fa88: eb000c2a bl 12b38 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa8c: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa90: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; fa94: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) fa98: 1a000005 bne fab4 fa9c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED faa0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED faa4: 0a000002 beq fab4 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ faa8: e1a00005 mov r0, r5 <== NOT EXECUTED faac: eb001d59 bl 17018 <_Region_Process_queue> <== NOT EXECUTED fab0: ea000008 b fad8 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); fab4: e59f3028 ldr r3, [pc, #40] ; fae4 fab8: e5930000 ldr r0, [r3] fabc: eb0007c1 bl 119c8 <_API_Mutex_Unlock> return fac0: e3540000 cmp r4, #0 ; 0x0 fac4: 0a000003 beq fad8 fac8: e3540001 cmp r4, #1 ; 0x1 facc: 0284400c addeq r4, r4, #12 ; 0xc fad0: 0a000000 beq fad8 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; fad4: e3a04009 mov r4, #9 ; 0x9 } fad8: e1a00004 mov r0, r4 fadc: e28dd010 add sp, sp, #16 ; 0x10 fae0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} fae4: 0002ed9c .word 0x0002ed9c fae8: 0002eb74 .word 0x0002eb74 000040b4 : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40b4: 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 ) ) 40b8: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40bc: e24dd018 sub sp, sp, #24 ; 0x18 40c0: e1a07001 mov r7, r1 40c4: e1a04002 mov r4, r2 40c8: e1a08003 mov r8, r3 40cc: e59d9038 ldr r9, [sp, #56] register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40d0: 02800003 addeq r0, r0, #3 ; 0x3 40d4: 0a000062 beq 4264 return RTEMS_INVALID_NAME; if ( !id ) 40d8: e3590000 cmp r9, #0 ; 0x0 40dc: 03a00009 moveq r0, #9 ; 0x9 40e0: 0a00005f beq 4264 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40e4: e21220c0 ands r2, r2, #192 ; 0xc0 40e8: 0a000008 beq 4110 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 40ec: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40f0: e3530010 cmp r3, #16 ; 0x10 40f4: 0a000001 beq 4100 40f8: e3530020 cmp r3, #32 ; 0x20 40fc: 1a000057 bne 4260 4100: e3140004 tst r4, #4 ; 0x4 4104: 0a000055 beq 4260 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 4108: e35200c0 cmp r2, #192 ; 0xc0 410c: 0a000053 beq 4260 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 4110: e2146030 ands r6, r4, #48 ; 0x30 4114: 0a000002 beq 4124 4118: e3570001 cmp r7, #1 ; 0x1 411c: 83a0000a movhi r0, #10 ; 0xa 4120: 8a00004f bhi 4264 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4124: e59f2140 ldr r2, [pc, #320] ; 426c 4128: e5923000 ldr r3, [r2] 412c: e2833001 add r3, r3, #1 ; 0x1 4130: 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 ); 4134: e59f0134 ldr r0, [pc, #308] ; 4270 4138: eb0004da bl 54a8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 413c: e2505000 subs r5, r0, #0 ; 0x0 4140: 1a000002 bne 4150 _Thread_Enable_dispatch(); 4144: eb000825 bl 61e0 <_Thread_Enable_dispatch> 4148: e3a00005 mov r0, #5 ; 0x5 414c: ea000044 b 4264 * 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 ) ) { 4150: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 4154: e5854010 str r4, [r5, #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 ) ) { 4158: 0a000029 beq 4204 CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 415c: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4160: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 4164: 1a000004 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 4168: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 416c: 13a03003 movne r3, #3 ; 0x3 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 ) ) 4170: 1a000001 bne 417c the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 4174: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 4178: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 417c: e3560010 cmp r6, #16 ; 0x10 else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; 4180: e58d3008 str r3, [sp, #8] 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; 4184: 13a03002 movne r3, #2 ; 0x2 4188: 158d3000 strne r3, [sp] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 418c: 1a00000b bne 41c0 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 4190: 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; 4194: e3a03000 mov r3, #0 ; 0x0 4198: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 419c: e3520003 cmp r2, #3 ; 0x3 41a0: 979ff102 ldrls pc, [pc, r2, lsl #2] 41a4: ea000007 b 41c8 <== NOT EXECUTED 41a8: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41ac: 000041c0 .word 0x000041c0 <== NOT EXECUTED 41b0: 000041b8 .word 0x000041b8 <== NOT EXECUTED 41b4: 000041b8 .word 0x000041b8 <== 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; 41b8: e3a03001 mov r3, #1 ; 0x1 41bc: ea000000 b 41c4 break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 41c0: e3a03000 mov r3, #0 ; 0x0 41c4: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 41c8: e3570001 cmp r7, #1 ; 0x1 41cc: 13a02000 movne r2, #0 ; 0x0 41d0: 03a02001 moveq r2, #1 ; 0x1 41d4: e2850014 add r0, r5, #20 ; 0x14 41d8: 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; 41dc: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 41e0: eb0002d9 bl 4d4c <_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 ) { 41e4: e3500006 cmp r0, #6 ; 0x6 41e8: 1a000012 bne 4238 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 41ec: e59f007c ldr r0, [pc, #124] ; 4270 <== NOT EXECUTED 41f0: e1a01005 mov r1, r5 <== NOT EXECUTED 41f4: eb00057a bl 57e4 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 41f8: eb0007f8 bl 61e0 <_Thread_Enable_dispatch> <== NOT EXECUTED 41fc: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 4200: ea000017 b 4264 <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 4204: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 4208: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 420c: 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; 4210: 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( 4214: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4218: 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( 421c: e2850014 add r0, r5, #20 ; 0x14 4220: 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; 4224: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 4228: 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; 422c: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 4230: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 4234: eb000391 bl 5080 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4238: e59f3030 ldr r3, [pc, #48] ; 4270 423c: e5952008 ldr r2, [r5, #8] 4240: e593101c ldr r1, [r3, #28] 4244: e1d530b8 ldrh r3, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4248: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 424c: e7815103 str r5, [r1, r3, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 4250: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 4254: eb0007e1 bl 61e0 <_Thread_Enable_dispatch> 4258: e3a00000 mov r0, #0 ; 0x0 425c: ea000000 b 4264 return RTEMS_SUCCESSFUL; 4260: e3a0000b mov r0, #11 ; 0xb } 4264: e28dd018 add sp, sp, #24 ; 0x18 4268: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 426c: 0001538c .word 0x0001538c 4270: 000152b4 .word 0x000152b4 0001e0a4 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 1e0a4: e52de004 push {lr} ; (str lr, [sp, #-4]!) 1e0a8: e24dd004 sub sp, sp, #4 ; 0x4 1e0ac: e1a01000 mov r1, r0 1e0b0: e1a0200d mov r2, sp 1e0b4: e59f0048 ldr r0, [pc, #72] ; 1e104 1e0b8: ebffaba0 bl 8f40 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 1e0bc: e59d2000 ldr r2, [sp] 1e0c0: e3520000 cmp r2, #0 ; 0x0 1e0c4: 13a00004 movne r0, #4 ; 0x4 1e0c8: 1a00000b bne 1e0fc case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 1e0cc: e5903010 ldr r3, [r0, #16] 1e0d0: e2131030 ands r1, r3, #48 ; 0x30 1e0d4: e2800014 add r0, r0, #20 ; 0x14 1e0d8: 0a000003 beq 1e0ec _CORE_mutex_Flush( 1e0dc: e1a01002 mov r1, r2 1e0e0: e3a02001 mov r2, #1 ; 0x1 1e0e4: ebffa838 bl 81cc <_CORE_mutex_Flush> 1e0e8: ea000001 b 1e0f4 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 1e0ec: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 1e0f0: ebffa902 bl 8500 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 1e0f4: ebffadd2 bl 9844 <_Thread_Enable_dispatch> 1e0f8: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e0fc: e28dd004 add sp, sp, #4 ; 0x4 1e100: e8bd8000 pop {pc} 1e104: 000551a8 .word 0x000551a8 00012f38 : */ void rtems_shutdown_executive( uint32_t result ) { 12f38: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 12f3c: e59f2024 ldr r2, [pc, #36] ; 12f68 12f40: e5923000 ldr r3, [r2] 12f44: e3530004 cmp r3, #4 ; 0x4 */ void rtems_shutdown_executive( uint32_t result ) { 12f48: e24dd030 sub sp, sp, #48 ; 0x30 12f4c: 13a03004 movne 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 ); 12f50: 11a0000d movne r0, sp 12f54: 159f1010 ldrne r1, [pc, #16] ; 12f6c 12f58: 15823000 strne r3, [r2] 12f5c: 1bffd1b2 blne 762c <_CPU_Context_switch> if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 12f60: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 12f64: e8bd8000 pop {pc} <== NOT EXECUTED 12f68: 00015534 .word 0x00015534 12f6c: 0001535c .word 0x0001535c 0001e558 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1e558: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1e55c: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 1e560: e24dd004 sub sp, sp, #4 ; 0x4 1e564: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 1e568: 03a00009 moveq r0, #9 ; 0x9 1e56c: 0a000022 beq 1e5fc return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1e570: e1a0100d mov r1, sp 1e574: ebffacbb bl 9868 <_Thread_Get> switch (location) { 1e578: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1e57c: e1a05000 mov r5, r0 switch (location) { 1e580: e3530000 cmp r3, #0 ; 0x0 1e584: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 1e588: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1e58c: 0a000008 beq 1e5b4 1e590: ea000019 b 1e5fc <== NOT EXECUTED /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1e594: e5943004 ldr r3, [r4, #4] 1e598: e1530006 cmp r3, r6 1e59c: 1a000003 bne 1e5b0 tvp->dtor = dtor; 1e5a0: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 1e5a4: ebffaca6 bl 9844 <_Thread_Enable_dispatch> 1e5a8: e3a00000 mov r0, #0 ; 0x0 1e5ac: ea000012 b 1e5fc return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1e5b0: e5944000 ldr r4, [r4] case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1e5b4: e3540000 cmp r4, #0 ; 0x0 1e5b8: 1afffff5 bne 1e594 } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 1e5bc: e3a00014 mov r0, #20 ; 0x14 1e5c0: ebffb188 bl abe8 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 1e5c4: e3500000 cmp r0, #0 ; 0x0 1e5c8: 1a000002 bne 1e5d8 _Thread_Enable_dispatch(); 1e5cc: ebffac9c bl 9844 <_Thread_Enable_dispatch> 1e5d0: e3a0001a mov r0, #26 ; 0x1a 1e5d4: ea000008 b 1e5fc } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1e5d8: e5952114 ldr r2, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1e5dc: e5963000 ldr r3, [r6] new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 1e5e0: e5850114 str r0, [r5, #276] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 1e5e4: e5803008 str r3, [r0, #8] new->ptr = ptr; 1e5e8: e5806004 str r6, [r0, #4] new->dtor = dtor; 1e5ec: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 1e5f0: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 1e5f4: ebffac92 bl 9844 <_Thread_Enable_dispatch> 1e5f8: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e5fc: e28dd004 add sp, sp, #4 ; 0x4 1e600: e8bd80f0 pop {r4, r5, r6, r7, pc} 0001e604 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1e604: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1e608: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 1e60c: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 1e610: 0a000018 beq 1e678 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 1e614: e1a0100d mov r1, sp 1e618: ebffac92 bl 9868 <_Thread_Get> switch (location) { 1e61c: e59d3000 ldr r3, [sp] 1e620: e3530000 cmp r3, #0 ; 0x0 1e624: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 1e628: 01a02003 moveq r2, r3 1e62c: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 1e630: 0a00000d beq 1e66c 1e634: ea000010 b 1e67c <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1e638: e5913004 ldr r3, [r1, #4] 1e63c: e1530004 cmp r3, r4 1e640: 1a000007 bne 1e664 1e644: e5913000 ldr r3, [r1] if (prev) 1e648: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 1e64c: 05803114 streq r3, [r0, #276] case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 1e650: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 1e654: eb000028 bl 1e6fc <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 1e658: ebffac79 bl 9844 <_Thread_Enable_dispatch> 1e65c: e3a00000 mov r0, #0 ; 0x0 1e660: ea000005 b 1e67c return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 1e664: e1a02001 mov r2, r1 1e668: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 1e66c: e3510000 cmp r1, #0 ; 0x0 1e670: 1afffff0 bne 1e638 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1e674: ebffac72 bl 9844 <_Thread_Enable_dispatch> 1e678: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e67c: e28dd004 add sp, sp, #4 ; 0x4 1e680: e8bd8010 pop {r4, pc} 0001e684 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1e684: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1e688: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 1e68c: e24dd004 sub sp, sp, #4 ; 0x4 1e690: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 1e694: 0a000015 beq 1e6f0 return RTEMS_INVALID_ADDRESS; if ( !result ) 1e698: e3520000 cmp r2, #0 ; 0x0 1e69c: 0a000013 beq 1e6f0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 1e6a0: e1a0100d mov r1, sp 1e6a4: ebffac6f bl 9868 <_Thread_Get> switch (location) { 1e6a8: e59d3000 ldr r3, [sp] 1e6ac: e3530000 cmp r3, #0 ; 0x0 1e6b0: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 1e6b4: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 1e6b8: 0a000009 beq 1e6e4 1e6bc: ea00000c b 1e6f4 <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 1e6c0: e5903004 ldr r3, [r0, #4] 1e6c4: e1530005 cmp r3, r5 1e6c8: 1a000004 bne 1e6e0 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 1e6cc: e590300c ldr r3, [r0, #12] 1e6d0: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 1e6d4: ebffac5a bl 9844 <_Thread_Enable_dispatch> 1e6d8: e3a00000 mov r0, #0 ; 0x0 1e6dc: ea000004 b 1e6f4 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 1e6e0: e5900000 ldr r0, [r0] case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 1e6e4: e3500000 cmp r0, #0 ; 0x0 1e6e8: 1afffff4 bne 1e6c0 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 1e6ec: ebffac54 bl 9844 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 1e6f0: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 1e6f4: e28dd004 add sp, sp, #4 ; 0x4 1e6f8: e8bd8030 pop {r4, r5, pc} 000109d8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 109d8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 109dc: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 109e0: e1a07000 mov r7, r0 109e4: e24dd004 sub sp, sp, #4 ; 0x4 109e8: e1a06002 mov r6, r2 109ec: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 109f0: 03a0000a moveq r0, #10 ; 0xa 109f4: 0a000022 beq 10a84 return RTEMS_INVALID_NUMBER; if ( !routine ) 109f8: e3520000 cmp r2, #0 ; 0x0 109fc: 03a00009 moveq r0, #9 ; 0x9 10a00: 0a00001f beq 10a84 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 10a04: e59f0080 ldr r0, [pc, #128] ; 10a8c 10a08: e1a01007 mov r1, r7 10a0c: e1a0200d mov r2, sp 10a10: eb000a5e bl 13390 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10a14: e59d3000 ldr r3, [sp] 10a18: e3530000 cmp r3, #0 ; 0x0 10a1c: e1a04000 mov r4, r0 10a20: 13a00004 movne r0, #4 ; 0x4 10a24: 1a000016 bne 10a84 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10a28: e2845010 add r5, r4, #16 ; 0x10 10a2c: e1a00005 mov r0, r5 10a30: eb001246 bl 15350 <_Watchdog_Remove> _ISR_Disable( level ); 10a34: e10f2000 mrs r2, CPSR 10a38: e38230c0 orr r3, r2, #192 ; 0xc0 10a3c: 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 ) { 10a40: e5943018 ldr r3, [r4, #24] 10a44: e3530000 cmp r3, #0 ; 0x0 10a48: 0a000001 beq 10a54 _ISR_Enable( level ); 10a4c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 10a50: ea000009 b 10a7c <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10a54: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 10a58: e584602c str r6, [r4, #44] the_watchdog->id = id; 10a5c: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 10a60: e5848034 str r8, [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; 10a64: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 10a68: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a6c: e59f001c ldr r0, [pc, #28] ; 10a90 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 10a70: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 10a74: e1a01005 mov r1, r5 10a78: eb0011d8 bl 151e0 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 10a7c: eb000c69 bl 13c28 <_Thread_Enable_dispatch> 10a80: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10a84: e28dd004 add sp, sp, #4 ; 0x4 10a88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 10a8c: 0002ef90 .word 0x0002ef90 10a90: 0002edc4 .word 0x0002edc4 00010c14 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 10c14: e92d4030 push {r4, r5, lr} 10c18: e24dd004 sub sp, sp, #4 ; 0x4 10c1c: e1a01000 mov r1, r0 10c20: e1a0200d mov r2, sp 10c24: e59f00a4 ldr r0, [pc, #164] ; 10cd0 10c28: eb0009d8 bl 13390 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10c2c: e59d3000 ldr r3, [sp] 10c30: e3530000 cmp r3, #0 ; 0x0 10c34: e1a04000 mov r4, r0 10c38: 13a00004 movne r0, #4 ; 0x4 10c3c: 1a000021 bne 10cc8 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 10c40: e5943038 ldr r3, [r4, #56] 10c44: e3530004 cmp r3, #4 ; 0x4 10c48: 979ff103 ldrls pc, [pc, r3, lsl #2] 10c4c: ea00001b b 10cc0 <== NOT EXECUTED 10c50: 00010c64 .word 0x00010c64 <== NOT EXECUTED 10c54: 00010c80 .word 0x00010c80 <== NOT EXECUTED 10c58: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c5c: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED 10c60: 00010cb4 .word 0x00010cb4 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 10c64: e2844010 add r4, r4, #16 ; 0x10 10c68: e1a00004 mov r0, r4 10c6c: eb0011b7 bl 15350 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 10c70: e1a01004 mov r1, r4 10c74: e59f0058 ldr r0, [pc, #88] ; 10cd4 10c78: eb001158 bl 151e0 <_Watchdog_Insert> 10c7c: ea00000f b 10cc0 break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 10c80: e59f5050 ldr r5, [pc, #80] ; 10cd8 10c84: e5953000 ldr r3, [r5] 10c88: e3530000 cmp r3, #0 ; 0x0 10c8c: 1a000002 bne 10c9c _Thread_Enable_dispatch(); 10c90: eb000be4 bl 13c28 <_Thread_Enable_dispatch> <== NOT EXECUTED 10c94: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 10c98: ea00000a b 10cc8 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 10c9c: e2840010 add r0, r4, #16 ; 0x10 10ca0: eb0011aa bl 15350 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 10ca4: e1a00004 mov r0, r4 10ca8: e1a0e00f mov lr, pc 10cac: e595f000 ldr pc, [r5] 10cb0: ea000002 b 10cc0 break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 10cb4: eb000bdb bl 13c28 <_Thread_Enable_dispatch> 10cb8: e3a0000b mov r0, #11 ; 0xb 10cbc: ea000001 b 10cc8 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 10cc0: eb000bd8 bl 13c28 <_Thread_Enable_dispatch> 10cc4: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10cc8: e28dd004 add sp, sp, #4 ; 0x4 10ccc: e8bd8030 pop {r4, r5, pc} 10cd0: 0002ef90 .word 0x0002ef90 10cd4: 0002edc4 .word 0x0002edc4 10cd8: 0002efd0 .word 0x0002efd0 00010cdc : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cdc: e92d41f0 push {r4, r5, r6, r7, r8, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10ce0: e59fc0c4 ldr ip, [pc, #196] ; 10dac 10ce4: e59cc000 ldr ip, [ip] 10ce8: e35c0000 cmp ip, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 10cec: e1a06000 mov r6, r0 10cf0: e24dd004 sub sp, sp, #4 ; 0x4 10cf4: e1a07001 mov r7, r1 10cf8: e1a05002 mov r5, r2 10cfc: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 10d00: 03a0000e moveq r0, #14 ; 0xe 10d04: 0a000026 beq 10da4 return RTEMS_INCORRECT_STATE; if ( !routine ) 10d08: e3520000 cmp r2, #0 ; 0x0 10d0c: 03a00009 moveq r0, #9 ; 0x9 10d10: 0a000023 beq 10da4 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 10d14: e3510000 cmp r1, #0 ; 0x0 10d18: 03a0000a moveq r0, #10 ; 0xa 10d1c: 0a000020 beq 10da4 10d20: e59f0088 ldr r0, [pc, #136] ; 10db0 10d24: e1a01006 mov r1, r6 10d28: e1a0200d mov r2, sp 10d2c: eb000997 bl 13390 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 10d30: e59d3000 ldr r3, [sp] 10d34: e3530000 cmp r3, #0 ; 0x0 10d38: e1a04000 mov r4, r0 10d3c: 13a00004 movne r0, #4 ; 0x4 10d40: 1a000017 bne 10da4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 10d44: e2840010 add r0, r4, #16 ; 0x10 10d48: eb001180 bl 15350 <_Watchdog_Remove> _ISR_Disable( level ); 10d4c: e10f1000 mrs r1, CPSR 10d50: e38130c0 orr r3, r1, #192 ; 0xc0 10d54: 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 ) { 10d58: e5942018 ldr r2, [r4, #24] 10d5c: e3520000 cmp r2, #0 ; 0x0 10d60: 0a000001 beq 10d6c _ISR_Enable( level ); 10d64: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 10d68: ea00000b b 10d9c <== NOT EXECUTED /* * 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; 10d6c: e3a03001 mov r3, #1 ; 0x1 10d70: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 10d74: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 10d78: e584502c str r5, [r4, #44] the_watchdog->id = id; 10d7c: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 10d80: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 10d84: e584701c str r7, [r4, #28] _ISR_Enable( level ); 10d88: 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 ); 10d8c: e59f3020 ldr r3, [pc, #32] ; 10db4 10d90: e1a00004 mov r0, r4 10d94: e1a0e00f mov lr, pc 10d98: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 10d9c: eb000ba1 bl 13c28 <_Thread_Enable_dispatch> 10da0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 10da4: e28dd004 add sp, sp, #4 ; 0x4 10da8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 10dac: 0002efd4 .word 0x0002efd4 10db0: 0002ef90 .word 0x0002ef90 10db4: 0002efd0 .word 0x0002efd0