30011ab4 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30011ab4: 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 ) { 30011ab8: 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 ) { 30011abc: 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 ) { 30011ac0: e1a07000 mov r7, r0 30011ac4: e1a06002 mov r6, r2 30011ac8: e1a08001 mov r8, r1 30011acc: 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 ) { 30011ad0: 83a00001 movhi r0, #1 ; 0x1 30011ad4: 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 ) { 30011ad8: e5973048 ldr r3, [r7, #72] 30011adc: e3530000 cmp r3, #0 ; 0x0 *count = 0; 30011ae0: 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))) { 30011ae4: 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; 30011ae8: 158a3000 strne r3, [sl] 30011aec: 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 ) { 30011af0: 0a000005 beq 30011b0c <_CORE_message_queue_Broadcast+0x58> 30011af4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30011af8: e594002c ldr r0, [r4, #44] 30011afc: eb001c4b bl 30018c30 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011b00: e5943028 ldr r3, [r4, #40] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30011b04: e2855001 add r5, r5, #1 ; 0x1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30011b08: e5836000 str r6, [r3] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 30011b0c: e1a00007 mov r0, r7 30011b10: eb00092b bl 30013fc4 <_Thread_queue_Dequeue> 30011b14: e2504000 subs r4, r0, #0 ; 0x0 30011b18: e1a01008 mov r1, r8 30011b1c: e1a02006 mov r2, r6 30011b20: 1afffff4 bne 30011af8 <_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; 30011b24: e58a5000 str r5, [sl] 30011b28: e1a00004 mov r0, r4 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30011b2c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3001247c <_CORE_message_queue_Insert_message>: ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 3001247c: 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 ) { 30012480: e92d4030 push {r4, r5, lr} ISR_Level level; bool notify = false; the_message->priority = submit_type; 30012484: 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 ) { 30012488: e1a05001 mov r5, r1 3001248c: e1a04000 mov r4, r0 ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 30012490: 0a000012 beq 300124e0 <_CORE_message_queue_Insert_message+0x64> 30012494: e3720106 cmn r2, #-2147483647 ; 0x80000001 30012498: 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; 3001249c: 15901050 ldrne r1, [r0, #80] ISR_Level level; bool notify = false; the_message->priority = submit_type; switch ( submit_type ) { 300124a0: 1a000022 bne 30012530 <_CORE_message_queue_Insert_message+0xb4> case CORE_MESSAGE_QUEUE_SEND_REQUEST: _ISR_Disable( level ); 300124a4: e10f0000 mrs r0, CPSR 300124a8: e38030c0 orr r3, r0, #192 ; 0xc0 300124ac: e129f003 msr CPSR_fc, r3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 300124b0: e585c000 str ip, [r5] if ( the_message_queue->number_of_pending_messages++ == 0 ) 300124b4: e5942048 ldr r2, [r4, #72] old_last_node = the_chain->last; 300124b8: e5941058 ldr r1, [r4, #88] 300124bc: e2823001 add r3, r2, #1 ; 0x1 the_chain->last = the_node; 300124c0: e5845058 str r5, [r4, #88] 300124c4: e5843048 str r3, [r4, #72] 300124c8: e2722001 rsbs r2, r2, #1 ; 0x1 300124cc: 33a02000 movcc r2, #0 ; 0x0 old_last_node->next = the_node; the_node->previous = old_last_node; 300124d0: 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; 300124d4: e5815000 str r5, [r1] notify = true; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 300124d8: e129f000 msr CPSR_fc, r0 300124dc: ea000024 b 30012574 <_CORE_message_queue_Insert_message+0xf8> break; case CORE_MESSAGE_QUEUE_URGENT_REQUEST: _ISR_Disable( level ); 300124e0: e10fc000 mrs ip, CPSR 300124e4: e38c30c0 orr r3, ip, #192 ; 0xc0 300124e8: e129f003 msr CPSR_fc, r3 if ( the_message_queue->number_of_pending_messages++ == 0 ) 300124ec: e5901048 ldr r1, [r0, #72] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 300124f0: e5900050 ldr r0, [r0, #80] 300124f4: e2812001 add r2, r1, #1 ; 0x1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head( Chain_Control *the_chain ) { return (Chain_Node *) the_chain; 300124f8: e2843050 add r3, r4, #80 ; 0x50 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 300124fc: e5853004 str r3, [r5, #4] 30012500: e5842048 str r2, [r4, #72] before_node = after_node->next; after_node->next = the_node; 30012504: e5845050 str r5, [r4, #80] the_node->next = before_node; before_node->previous = the_node; 30012508: e5805004 str r5, [r0, #4] 3001250c: e2712001 rsbs r2, r1, #1 ; 0x1 30012510: 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; 30012514: e5850000 str r0, [r5] notify = true; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 30012518: e129f00c msr CPSR_fc, ip 3001251c: ea000014 b 30012574 <_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 ) { 30012520: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED 30012524: e1530002 cmp r3, r2 <== NOT EXECUTED 30012528: ca000002 bgt 30012538 <_CORE_message_queue_Insert_message+0xbc> <== NOT EXECUTED the_node = the_node->next; 3001252c: 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 ) ) { 30012530: e151000c cmp r1, ip <== NOT EXECUTED 30012534: 1afffff9 bne 30012520 <_CORE_message_queue_Insert_message+0xa4> <== NOT EXECUTED continue; } break; } _ISR_Disable( level ); 30012538: e10fc000 mrs ip, CPSR <== NOT EXECUTED 3001253c: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED 30012540: 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 ); 30012544: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED } break; } _ISR_Disable( level ); if ( the_message_queue->number_of_pending_messages++ == 0 ) 30012548: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 3001254c: e5930000 ldr r0, [r3] <== NOT EXECUTED 30012550: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED after_node->next = the_node; 30012554: e5835000 str r5, [r3] <== NOT EXECUTED 30012558: e5842048 str r2, [r4, #72] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 3001255c: e5853004 str r3, [r5, #4] <== NOT EXECUTED 30012560: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED 30012564: 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; 30012568: 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; 3001256c: e5850000 str r0, [r5] <== NOT EXECUTED notify = true; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 30012570: 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 ) 30012574: e3520000 cmp r2, #0 ; 0x0 30012578: 08bd8030 popeq {r4, r5, pc} 3001257c: e5943060 ldr r3, [r4, #96] 30012580: e3530000 cmp r3, #0 ; 0x0 30012584: 08bd8030 popeq {r4, r5, pc} (*the_message_queue->notify_handler)( the_message_queue->notify_argument ); 30012588: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED 3001258c: e1a0e00f mov lr, pc <== NOT EXECUTED 30012590: e12fff13 bx r3 <== NOT EXECUTED 30012594: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3000f920 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 3000f920: 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; 3000f924: e59fc128 ldr ip, [pc, #296] ; 3000fa54 <_CORE_message_queue_Seize+0x134> void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 3000f928: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; Thread_Control *the_thread; executing = _Thread_Executing; 3000f92c: e59cc000 ldr ip, [ip] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 3000f930: 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; 3000f934: e3a03000 mov r3, #0 ; 0x0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 3000f938: e59da020 ldr sl, [sp, #32] 3000f93c: e1a07001 mov r7, r1 3000f940: 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; 3000f944: e58c3034 str r3, [ip, #52] void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 3000f948: 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 ); 3000f94c: e10f1000 mrs r1, CPSR 3000f950: e38130c0 orr r3, r1, #192 ; 0xc0 3000f954: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000f958: e5954050 ldr r4, [r5, #80] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 3000f95c: e2853054 add r3, r5, #84 ; 0x54 3000f960: e1540003 cmp r4, r3 3000f964: 0a000028 beq 3000fa0c <_CORE_message_queue_Seize+0xec> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 3000f968: e5942000 ldr r2, [r4] the_chain->first = new_first; 3000f96c: e1a03005 mov r3, r5 3000f970: e5a32050 str r2, [r3, #80]! the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { 3000f974: e3540000 cmp r4, #0 ; 0x0 new_first->previous = _Chain_Head(the_chain); 3000f978: e5823004 str r3, [r2, #4] 3000f97c: 0a000022 beq 3000fa0c <_CORE_message_queue_Seize+0xec> the_message_queue->number_of_pending_messages -= 1; 3000f980: e5953048 ldr r3, [r5, #72] 3000f984: e2433001 sub r3, r3, #1 ; 0x1 3000f988: e5853048 str r3, [r5, #72] _ISR_Enable( level ); 3000f98c: e129f001 msr CPSR_fc, r1 *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = the_message->priority; 3000f990: e59f30bc ldr r3, [pc, #188] ; 3000fa54 <_CORE_message_queue_Seize+0x134> 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; 3000f994: e594100c ldr r1, [r4, #12] _Thread_Executing->Wait.count = the_message->priority; 3000f998: e5932000 ldr r2, [r3] 3000f99c: e5943008 ldr r3, [r4, #8] the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 3000f9a0: e5801000 str r1, [r0] _Thread_Executing->Wait.count = the_message->priority; _CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p); 3000f9a4: e2846010 add r6, r4, #16 ; 0x10 if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = the_message->priority; 3000f9a8: e5823024 str r3, [r2, #36] const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 3000f9ac: e5902000 ldr r2, [r0] 3000f9b0: e1a01006 mov r1, r6 3000f9b4: e1a00008 mov r0, r8 3000f9b8: eb00120f bl 300141fc * * 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 ); 3000f9bc: e1a00005 mov r0, r5 3000f9c0: ebffec42 bl 3000aad0 <_Thread_queue_Dequeue> if ( !the_thread ) { 3000f9c4: e2501000 subs r1, r0, #0 ; 0x0 3000f9c8: 1a000003 bne 3000f9dc <_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 ); 3000f9cc: e2850068 add r0, r5, #104 ; 0x68 3000f9d0: 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 ); } 3000f9d4: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} 3000f9d8: eaffe5e7 b 3000917c <_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; 3000f9dc: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 3000f9e0: 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; 3000f9e4: e5843008 str r3, [r4, #8] <== NOT EXECUTED the_message->Contents.size = (size_t) the_thread->Wait.option; 3000f9e8: e584200c str r2, [r4, #12] <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 3000f9ec: e1a00006 mov r0, r6 <== NOT EXECUTED 3000f9f0: e591102c ldr r1, [r1, #44] <== NOT EXECUTED 3000f9f4: eb001200 bl 300141fc <== NOT EXECUTED the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 3000f9f8: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED 3000f9fc: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fa00: 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 ); } 3000fa04: 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( 3000fa08: ea000a9b b 3001247c <_CORE_message_queue_Insert_message> <== NOT EXECUTED the_message->priority ); return; } if ( !wait ) { 3000fa0c: e3560000 cmp r6, #0 ; 0x0 3000fa10: 1a000003 bne 3000fa24 <_CORE_message_queue_Seize+0x104> _ISR_Enable( level ); 3000fa14: e129f001 msr CPSR_fc, r1 executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 3000fa18: e3a03004 mov r3, #4 ; 0x4 3000fa1c: 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 ); } 3000fa20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000fa24: e3a03001 mov r3, #1 ; 0x1 3000fa28: 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; 3000fa2c: 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; 3000fa30: e58c7020 str r7, [ip, #32] executing->Wait.return_argument_second.mutable_object = buffer; 3000fa34: 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; 3000fa38: 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 ); 3000fa3c: e129f001 msr CPSR_fc, r1 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 3000fa40: e59f2010 ldr r2, [pc, #16] ; 3000fa58 <_CORE_message_queue_Seize+0x138> 3000fa44: e1a00005 mov r0, r5 3000fa48: e1a0100a mov r1, sl } 3000fa4c: 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 ); 3000fa50: eaffec77 b 3000ac34 <_Thread_queue_Enqueue_with_handler> 3000fa54: 30023124 .word 0x30023124 3000fa58: 3000b008 .word 0x3000b008 3000fa5c <_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 ) { 3000fa5c: 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 ) { 3000fa60: e590c04c ldr ip, [r0, #76] CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 3000fa64: e1a05000 mov r5, r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 3000fa68: 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 ) { 3000fa6c: e1a06002 mov r6, r2 3000fa70: e1a08001 mov r8, r1 3000fa74: e1a0b003 mov fp, r3 3000fa78: e59d9028 ldr r9, [sp, #40] 3000fa7c: 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 ) { 3000fa80: 83a00001 movhi r0, #1 ; 0x1 3000fa84: 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 ) { 3000fa88: e5957048 ldr r7, [r5, #72] 3000fa8c: e3570000 cmp r7, #0 ; 0x0 3000fa90: 1a00000b bne 3000fac4 <_CORE_message_queue_Submit+0x68> the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 3000fa94: ebffec0d bl 3000aad0 <_Thread_queue_Dequeue> if ( the_thread ) { 3000fa98: e2504000 subs r4, r0, #0 ; 0x0 3000fa9c: 0a000008 beq 3000fac4 <_CORE_message_queue_Submit+0x68> 3000faa0: e1a01008 mov r1, r8 3000faa4: e594002c ldr r0, [r4, #44] 3000faa8: e1a02006 mov r2, r6 3000faac: eb0011d2 bl 300141fc _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 3000fab0: e5943028 ldr r3, [r4, #40] the_thread->Wait.count = submit_type; 3000fab4: e1a00007 mov r0, r7 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 3000fab8: e5836000 str r6, [r3] the_thread->Wait.count = submit_type; 3000fabc: e5849024 str r9, [r4, #36] 3000fac0: 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 < 3000fac4: e5952048 ldr r2, [r5, #72] 3000fac8: e5953044 ldr r3, [r5, #68] 3000facc: e1520003 cmp r2, r3 3000fad0: 2a00000f bcs 3000fb14 <_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 *) 3000fad4: e2850068 add r0, r5, #104 ; 0x68 3000fad8: ebffe5b2 bl 300091a8 <_Chain_Get> /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 3000fadc: e2504000 subs r4, r0, #0 ; 0x0 3000fae0: 0a000025 beq 3000fb7c <_CORE_message_queue_Submit+0x120> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 3000fae4: e1a01008 mov r1, r8 3000fae8: e1a02006 mov r2, r6 3000faec: e2840010 add r0, r4, #16 ; 0x10 3000faf0: eb0011c1 bl 300141fc size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 3000faf4: e1a00005 mov r0, r5 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 3000faf8: e584600c str r6, [r4, #12] the_message->priority = submit_type; 3000fafc: e5849008 str r9, [r4, #8] _CORE_message_queue_Insert_message( 3000fb00: e1a01004 mov r1, r4 3000fb04: e1a02009 mov r2, r9 3000fb08: eb000a5b bl 3001247c <_CORE_message_queue_Insert_message> 3000fb0c: e3a00000 mov r0, #0 ; 0x0 3000fb10: 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 ) { 3000fb14: e35a0000 cmp sl, #0 ; 0x0 3000fb18: 03a00002 moveq r0, #2 ; 0x2 3000fb1c: 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() ) { 3000fb20: e59f305c ldr r3, [pc, #92] ; 3000fb84 <_CORE_message_queue_Submit+0x128> <== NOT EXECUTED 3000fb24: e5933000 ldr r3, [r3] <== NOT EXECUTED 3000fb28: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000fb2c: 1a000012 bne 3000fb7c <_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; 3000fb30: e59f3050 ldr r3, [pc, #80] ; 3000fb88 <_CORE_message_queue_Submit+0x12c> <== NOT EXECUTED 3000fb34: e5932000 ldr r2, [r3] <== NOT EXECUTED _ISR_Disable( level ); 3000fb38: e10f1000 mrs r1, CPSR <== NOT EXECUTED 3000fb3c: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED 3000fb40: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 3000fb44: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 3000fb48: 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; 3000fb4c: 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; 3000fb50: e582b020 str fp, [r2, #32] <== NOT EXECUTED executing->Wait.return_argument_second.immutable_object = buffer; 3000fb54: e582802c str r8, [r2, #44] <== NOT EXECUTED executing->Wait.option = (uint32_t) size; 3000fb58: 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; 3000fb5c: 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 ); 3000fb60: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 3000fb64: e59f2020 ldr r2, [pc, #32] ; 3000fb8c <_CORE_message_queue_Submit+0x130> <== NOT EXECUTED 3000fb68: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fb6c: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 3000fb70: ebffec2f bl 3000ac34 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED 3000fb74: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED 3000fb78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 3000fb7c: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED } 3000fb80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 3000fb84: 30023100 .word 0x30023100 3000fb88: 30023124 .word 0x30023124 3000fb8c: 3000b008 .word 0x3000b008 30009494 <_CORE_mutex_Seize_interrupt_trylock>: Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 30009494: e59f3130 ldr r3, [pc, #304] ; 300095cc <_CORE_mutex_Seize_interrupt_trylock+0x138> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009498: e3a02000 mov r2, #0 ; 0x0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 3000949c: e593c000 ldr ip, [r3] CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 300094a0: e5911000 ldr r1, [r1] /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 300094a4: e58c2034 str r2, [ip, #52] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 300094a8: e5903050 ldr r3, [r0, #80] #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 300094ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) 300094b0: e1530002 cmp r3, r2 300094b4: 0a00002f beq 30009578 <_CORE_mutex_Seize_interrupt_trylock+0xe4> the_mutex->lock = CORE_MUTEX_LOCKED; 300094b8: e5802050 str r2, [r0, #80] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 300094bc: e59c3008 ldr r3, [ip, #8] */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 300094c0: 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; 300094c4: e5803060 str r3, [r0, #96] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 300094c8: e3520002 cmp r2, #2 ; 0x2 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; the_mutex->nest_count = 1; 300094cc: e3a03001 mov r3, #1 ; 0x1 300094d0: 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; 300094d4: 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 ) || 300094d8: 0a000001 beq 300094e4 <_CORE_mutex_Seize_interrupt_trylock+0x50> 300094dc: e3520003 cmp r2, #3 ; 0x3 <== NOT EXECUTED 300094e0: 1a000002 bne 300094f0 <_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++; 300094e4: e59c301c ldr r3, [ip, #28] 300094e8: e2833001 add r3, r3, #1 ; 0x1 300094ec: e58c301c str r3, [ip, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 300094f0: e5903048 ldr r3, [r0, #72] 300094f4: e3530003 cmp r3, #3 ; 0x3 300094f8: 0a000001 beq 30009504 <_CORE_mutex_Seize_interrupt_trylock+0x70> _ISR_Enable( level ); 300094fc: e129f001 msr CPSR_fc, r1 30009500: ea00002d b 300095bc <_CORE_mutex_Seize_interrupt_trylock+0x128> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 30009504: e590204c ldr r2, [r0, #76] <== NOT EXECUTED current = executing->current_priority; 30009508: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED if ( current == ceiling ) { 3000950c: e1530002 cmp r3, r2 <== NOT EXECUTED 30009510: 1a000001 bne 3000951c <_CORE_mutex_Seize_interrupt_trylock+0x88> <== NOT EXECUTED _ISR_Enable( level ); 30009514: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30009518: ea000027 b 300095bc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } if ( current > ceiling ) { 3000951c: 9a00000a bls 3000954c <_CORE_mutex_Seize_interrupt_trylock+0xb8> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30009520: e59f20a8 ldr r2, [pc, #168] ; 300095d0 <_CORE_mutex_Seize_interrupt_trylock+0x13c> <== NOT EXECUTED 30009524: e5923000 ldr r3, [r2] <== NOT EXECUTED 30009528: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 3000952c: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 30009530: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _Thread_Change_priority( 30009534: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30009538: e590104c ldr r1, [r0, #76] <== NOT EXECUTED 3000953c: e590005c ldr r0, [r0, #92] <== NOT EXECUTED 30009540: ebfff1a6 bl 30005be0 <_Thread_Change_priority> <== NOT EXECUTED the_mutex->holder, the_mutex->Attributes.priority_ceiling, FALSE ); _Thread_Enable_dispatch(); 30009544: ebfff30d bl 30006180 <_Thread_Enable_dispatch> <== NOT EXECUTED 30009548: ea00001b b 300095bc <_CORE_mutex_Seize_interrupt_trylock+0x128> <== NOT EXECUTED return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 3000954c: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED 30009550: e58c3034 str r3, [ip, #52] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */ 30009554: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30009558: 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; 3000955c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30009560: e5803050 str r3, [r0, #80] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */ 30009564: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED 30009568: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 3000956c: e58c301c str r3, [ip, #28] <== NOT EXECUTED _ISR_Enable( level ); 30009570: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30009574: ea000010 b 300095bc <_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 ) ) { 30009578: e590205c ldr r2, [r0, #92] 3000957c: e152000c cmp r2, ip 30009580: 1a00000f bne 300095c4 <_CORE_mutex_Seize_interrupt_trylock+0x130> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30009584: e5903040 ldr r3, [r0, #64] 30009588: e3530000 cmp r3, #0 ; 0x0 3000958c: 0a000002 beq 3000959c <_CORE_mutex_Seize_interrupt_trylock+0x108> 30009590: e3530001 cmp r3, #1 ; 0x1 30009594: 1a00000a bne 300095c4 <_CORE_mutex_Seize_interrupt_trylock+0x130> 30009598: ea000004 b 300095b0 <_CORE_mutex_Seize_interrupt_trylock+0x11c> case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 3000959c: e5903054 ldr r3, [r0, #84] 300095a0: e2833001 add r3, r3, #1 ; 0x1 300095a4: e5803054 str r3, [r0, #84] _ISR_Enable( level ); 300095a8: e129f001 msr CPSR_fc, r1 300095ac: ea000002 b 300095bc <_CORE_mutex_Seize_interrupt_trylock+0x128> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 300095b0: e3a03002 mov r3, #2 ; 0x2 300095b4: e5823034 str r3, [r2, #52] _ISR_Enable( level ); 300095b8: e129f001 msr CPSR_fc, r1 300095bc: e3a00000 mov r0, #0 ; 0x0 300095c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300095c4: e3a00001 mov r0, #1 ; 0x1 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 300095c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) 300095cc: 300154c4 .word 0x300154c4 300095d0: 3001540c .word 0x3001540c 30004ec4 <_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 ) { 30004ec4: e5d03044 ldrb r3, [r0, #68] CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 30004ec8: e92d4010 push {r4, lr} * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 30004ecc: 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 ) { 30004ed0: 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; 30004ed4: 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 ) { 30004ed8: 0a000004 beq 30004ef0 <_CORE_mutex_Surrender+0x2c> if ( !_Thread_Is_executing( holder ) ) 30004edc: e59f3130 ldr r3, [pc, #304] ; 30005014 <_CORE_mutex_Surrender+0x150> 30004ee0: e5933000 ldr r3, [r3] 30004ee4: e1500003 cmp r0, r3 30004ee8: 13a00003 movne r0, #3 ; 0x3 30004eec: 18bd8010 popne {r4, pc} return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 30004ef0: e5943054 ldr r3, [r4, #84] 30004ef4: e3530000 cmp r3, #0 ; 0x0 30004ef8: 0a000043 beq 3000500c <_CORE_mutex_Surrender+0x148> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 30004efc: e2433001 sub r3, r3, #1 ; 0x1 if ( the_mutex->nest_count != 0 ) { 30004f00: 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--; 30004f04: e5843054 str r3, [r4, #84] if ( the_mutex->nest_count != 0 ) { 30004f08: 0a000005 beq 30004f24 <_CORE_mutex_Surrender+0x60> switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30004f0c: e5943040 ldr r3, [r4, #64] 30004f10: e3530000 cmp r3, #0 ; 0x0 30004f14: 0a00003c beq 3000500c <_CORE_mutex_Surrender+0x148> 30004f18: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED 30004f1c: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED 30004f20: 08bd8010 popeq {r4, pc} <== NOT EXECUTED 30004f24: 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 ) || 30004f28: e3530002 cmp r3, #2 ; 0x2 30004f2c: 0a000001 beq 30004f38 <_CORE_mutex_Surrender+0x74> 30004f30: e3530003 cmp r3, #3 ; 0x3 30004f34: 1a000002 bne 30004f44 <_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--; 30004f38: e590301c ldr r3, [r0, #28] 30004f3c: e2433001 sub r3, r3, #1 ; 0x1 30004f40: e580301c str r3, [r0, #28] 30004f44: e5942048 ldr r2, [r4, #72] } the_mutex->holder = NULL; 30004f48: 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 ) || 30004f4c: 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; 30004f50: e5843060 str r3, [r4, #96] } first_node = _Chain_Get_first_unprotected(&holder->lock_mutex); #endif holder->resource_count--; } the_mutex->holder = NULL; 30004f54: 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 ) || 30004f58: 0a000001 beq 30004f64 <_CORE_mutex_Surrender+0xa0> 30004f5c: e3520003 cmp r2, #3 ; 0x3 30004f60: 1a000007 bne 30004f84 <_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 && 30004f64: e590301c ldr r3, [r0, #28] 30004f68: e3530000 cmp r3, #0 ; 0x0 30004f6c: 1a000004 bne 30004f84 <_CORE_mutex_Surrender+0xc0> 30004f70: e5901018 ldr r1, [r0, #24] 30004f74: e5903014 ldr r3, [r0, #20] 30004f78: e1510003 cmp r1, r3 holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 30004f7c: 13a02001 movne r2, #1 ; 0x1 30004f80: 1b000316 blne 30005be0 <_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 ) ) ) { 30004f84: e1a00004 mov r0, r4 30004f88: eb00055d bl 30006504 <_Thread_queue_Dequeue> 30004f8c: e2501000 subs r1, r0, #0 ; 0x0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 30004f90: 03a03001 moveq r3, #1 ; 0x1 30004f94: 05843050 streq r3, [r4, #80] 30004f98: 01a00001 moveq r0, r1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 30004f9c: 08bd8010 popeq {r4, pc} } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30004fa0: e5913008 ldr r3, [r1, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30004fa4: e5942048 ldr r2, [r4, #72] } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 30004fa8: e5843060 str r3, [r4, #96] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30004fac: e3520002 cmp r2, #2 ; 0x2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 30004fb0: e3a03001 mov r3, #1 ; 0x1 30004fb4: e5843054 str r3, [r4, #84] } else #endif { the_mutex->holder = the_thread; 30004fb8: e584105c str r1, [r4, #92] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 30004fbc: 0a000002 beq 30004fcc <_CORE_mutex_Surrender+0x108> 30004fc0: e3520003 cmp r2, #3 ; 0x3 30004fc4: 1a000010 bne 3000500c <_CORE_mutex_Surrender+0x148> 30004fc8: ea000004 b 30004fe0 <_CORE_mutex_Surrender+0x11c> <== 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++; 30004fcc: e591301c ldr r3, [r1, #28] 30004fd0: e3a00000 mov r0, #0 ; 0x0 30004fd4: e2833001 add r3, r3, #1 ; 0x1 30004fd8: e581301c str r3, [r1, #28] 30004fdc: e8bd8010 pop {r4, pc} 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++; 30004fe0: e591301c ldr r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 30004fe4: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: #ifdef __RTEMS_STRICT_ORDER_MUTEX__ _Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue); the_mutex->queue.priority_before = the_thread->current_priority; #endif the_thread->resource_count++; 30004fe8: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED 30004fec: e581301c str r3, [r1, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < 30004ff0: e594104c ldr r1, [r4, #76] <== NOT EXECUTED 30004ff4: e1510002 cmp r1, r2 <== NOT EXECUTED 30004ff8: 2a000003 bcs 3000500c <_CORE_mutex_Surrender+0x148> <== NOT EXECUTED the_thread->current_priority){ _Thread_Change_priority( 30004ffc: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED 30005000: eb0002f6 bl 30005be0 <_Thread_Change_priority> <== NOT EXECUTED 30005004: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 30005008: e8bd8010 pop {r4, pc} <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 3000500c: e3a00000 mov r0, #0 ; 0x0 return CORE_MUTEX_STATUS_SUCCESSFUL; } 30005010: e8bd8010 pop {r4, pc} 30005014: 300154c4 .word 0x300154c4 3001e7f8 <_Chain_Insert>: Chain_Node *node ) { ISR_Level level; _ISR_Disable( level ); 3001e7f8: e10f2000 mrs r2, CPSR <== NOT EXECUTED 3001e7fc: e38230c0 orr r3, r2, #192 ; 0xc0 <== NOT EXECUTED 3001e800: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 3001e804: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 3001e808: e5810004 str r0, [r1, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; 3001e80c: e5801000 str r1, [r0] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; 3001e810: 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; 3001e814: e5813000 str r3, [r1] <== NOT EXECUTED _Chain_Insert_unprotected( after_node, node ); _ISR_Enable( level ); 3001e818: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } 3001e81c: e12fff1e bx lr <== NOT EXECUTED 30009390 <_Debug_Is_enabled>: */ bool _Debug_Is_enabled( rtems_debug_control level ) { 30009390: e59f3010 ldr r3, [pc, #16] ; 300093a8 <_Debug_Is_enabled+0x18> <== NOT EXECUTED 30009394: e5933000 ldr r3, [r3] <== NOT EXECUTED 30009398: e1100003 tst r0, r3 <== NOT EXECUTED return (_Debug_Level & level) ? true : false; } 3000939c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED 300093a0: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED 300093a4: e12fff1e bx lr <== NOT EXECUTED 300093a8: 300154c8 .word 0x300154c8 30003e60 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 30003e60: e92d40f0 push {r4, r5, r6, r7, lr} 30003e64: 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 ]; 30003e68: e5906104 ldr r6, [r0, #260] option_set = (rtems_option) the_thread->Wait.option; 30003e6c: e5907030 ldr r7, [r0, #48] _ISR_Disable( level ); 30003e70: e10f5000 mrs r5, CPSR 30003e74: e38530c0 orr r3, r5, #192 ; 0xc0 30003e78: e129f003 msr CPSR_fc, r3 pending_events = api->pending_events; 30003e7c: e596c000 ldr ip, [r6] event_condition = (rtems_event_set) the_thread->Wait.count; 30003e80: 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 ) ) { 30003e84: e012000c ands r0, r2, ip 30003e88: 1a000001 bne 30003e94 <_Event_Surrender+0x34> _ISR_Enable( level ); 30003e8c: e129f005 msr CPSR_fc, r5 30003e90: 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() && 30003e94: e59f30f0 ldr r3, [pc, #240] ; 30003f8c <_Event_Surrender+0x12c> 30003e98: e5933000 ldr r3, [r3] 30003e9c: e3530000 cmp r3, #0 ; 0x0 30003ea0: 0a000019 beq 30003f0c <_Event_Surrender+0xac> 30003ea4: e59f30e4 ldr r3, [pc, #228] ; 30003f90 <_Event_Surrender+0x130> 30003ea8: e5933000 ldr r3, [r3] 30003eac: e1540003 cmp r4, r3 30003eb0: 1a000015 bne 30003f0c <_Event_Surrender+0xac> 30003eb4: e59f10d8 ldr r1, [pc, #216] ; 30003f94 <_Event_Surrender+0x134> 30003eb8: e5913000 ldr r3, [r1] 30003ebc: e3530001 cmp r3, #1 ; 0x1 30003ec0: 0a000002 beq 30003ed0 <_Event_Surrender+0x70> 30003ec4: e5913000 ldr r3, [r1] 30003ec8: e3530002 cmp r3, #2 ; 0x2 30003ecc: 1a00000e bne 30003f0c <_Event_Surrender+0xac> _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) ) { 30003ed0: e1500002 cmp r0, r2 30003ed4: 0a000001 beq 30003ee0 <_Event_Surrender+0x80> 30003ed8: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED 30003edc: 0a000008 beq 30003f04 <_Event_Surrender+0xa4> <== NOT EXECUTED api->pending_events = _Event_sets_Clear( pending_events,seized_events ); 30003ee0: e1cc3000 bic r3, ip, r0 30003ee4: e5863000 str r3, [r6] the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ee8: e59f30a4 ldr r3, [pc, #164] ; 30003f94 <_Event_Surrender+0x134> ((_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; 30003eec: e5941028 ldr r1, [r4, #40] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 30003ef0: e3a02003 mov r2, #3 ; 0x3 30003ef4: e5832000 str r2, [r3] _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; 30003ef8: e3a03000 mov r3, #0 ; 0x0 30003efc: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f00: e5810000 str r0, [r1] _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; } _ISR_Enable( level ); 30003f04: e129f005 msr CPSR_fc, r5 30003f08: e8bd80f0 pop {r4, r5, r6, r7, pc} } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 30003f0c: e5943010 ldr r3, [r4, #16] 30003f10: e3130c01 tst r3, #256 ; 0x100 30003f14: 0a00001a beq 30003f84 <_Event_Surrender+0x124> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 30003f18: e1500002 cmp r0, r2 30003f1c: 0a000001 beq 30003f28 <_Event_Surrender+0xc8> 30003f20: e3170002 tst r7, #2 ; 0x2 30003f24: 0a000016 beq 30003f84 <_Event_Surrender+0x124> api->pending_events = _Event_sets_Clear( pending_events, seized_events ); 30003f28: e1cc3000 bic r3, ip, r0 the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f2c: 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 ); 30003f30: e5863000 str r3, [r6] the_thread->Wait.count = 0; 30003f34: e3a03000 mov r3, #0 ; 0x0 30003f38: e5843024 str r3, [r4, #36] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 30003f3c: e5820000 str r0, [r2] _ISR_Flash( level ); 30003f40: e10f3000 mrs r3, CPSR 30003f44: e129f005 msr CPSR_fc, r5 30003f48: e129f003 msr CPSR_fc, r3 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 30003f4c: e5943050 ldr r3, [r4, #80] 30003f50: e3530002 cmp r3, #2 ; 0x2 30003f54: 0a000001 beq 30003f60 <_Event_Surrender+0x100> _ISR_Enable( level ); 30003f58: e129f005 msr CPSR_fc, r5 30003f5c: ea000004 b 30003f74 <_Event_Surrender+0x114> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 30003f60: e3a03003 mov r3, #3 ; 0x3 30003f64: e5843050 str r3, [r4, #80] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 30003f68: e129f005 msr CPSR_fc, r5 (void) _Watchdog_Remove( &the_thread->Timer ); 30003f6c: e2840048 add r0, r4, #72 ; 0x48 30003f70: eb000d1b bl 300073e4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 30003f74: e59f101c ldr r1, [pc, #28] ; 30003f98 <_Event_Surrender+0x138> 30003f78: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } 30003f7c: e8bd40f0 pop {r4, r5, r6, r7, lr} 30003f80: ea00077e b 30005d80 <_Thread_Clear_state> _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 30003f84: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30003f88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30003f8c: 300154a0 .word 0x300154a0 30003f90: 300154c4 .word 0x300154c4 30003f94: 30015664 .word 0x30015664 30003f98: 1003fff8 .word 0x1003fff8 30003f9c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 30003f9c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 30003fa0: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 30003fa4: e1a0100d mov r1, sp 30003fa8: eb00087d bl 300061a4 <_Thread_Get> switch ( location ) { 30003fac: e59d2000 ldr r2, [sp] 30003fb0: e3520000 cmp r2, #0 ; 0x0 30003fb4: 1a00001e bne 30004034 <_Event_Timeout+0x98> * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 30003fb8: e10f1000 mrs r1, CPSR 30003fbc: e38130c0 orr r3, r1, #192 ; 0xc0 30003fc0: e129f003 msr CPSR_fc, r3 if ( !the_thread->Wait.count ) { /* verify thread is waiting */ 30003fc4: e5903024 ldr r3, [r0, #36] 30003fc8: e3530000 cmp r3, #0 ; 0x0 30003fcc: 1a000005 bne 30003fe8 <_Event_Timeout+0x4c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30003fd0: e59f2064 ldr r2, [pc, #100] ; 3000403c <_Event_Timeout+0xa0> <== NOT EXECUTED 30003fd4: e5923000 ldr r3, [r2] <== NOT EXECUTED 30003fd8: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30003fdc: e5823000 str r3, [r2] <== NOT EXECUTED _Thread_Unnest_dispatch(); _ISR_Enable( level ); 30003fe0: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30003fe4: ea000012 b 30004034 <_Event_Timeout+0x98> <== NOT EXECUTED return; } the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { 30003fe8: e59f3050 ldr r3, [pc, #80] ; 30004040 <_Event_Timeout+0xa4> _Thread_Unnest_dispatch(); _ISR_Enable( level ); return; } the_thread->Wait.count = 0; 30003fec: e5802024 str r2, [r0, #36] if ( _Thread_Is_executing( the_thread ) ) { 30003ff0: e5933000 ldr r3, [r3] 30003ff4: e1500003 cmp r0, r3 30003ff8: 1a000004 bne 30004010 <_Event_Timeout+0x74> Thread_blocking_operation_States sync = _Event_Sync_state; 30003ffc: e59f2040 ldr r2, [pc, #64] ; 30004044 <_Event_Timeout+0xa8> 30004000: e5923000 ldr r3, [r2] if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) || 30004004: e3530001 cmp r3, #1 ; 0x1 (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) { _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 30004008: 93a03002 movls r3, #2 ; 0x2 3000400c: 95823000 strls r3, [r2] } } the_thread->Wait.return_code = RTEMS_TIMEOUT; 30004010: e3a03006 mov r3, #6 ; 0x6 30004014: e5803034 str r3, [r0, #52] _ISR_Enable( level ); 30004018: e129f001 msr CPSR_fc, r1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000401c: e59f1024 ldr r1, [pc, #36] ; 30004048 <_Event_Timeout+0xac> 30004020: eb000756 bl 30005d80 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30004024: e59f2010 ldr r2, [pc, #16] ; 3000403c <_Event_Timeout+0xa0> 30004028: e5923000 ldr r3, [r2] 3000402c: e2433001 sub r3, r3, #1 ; 0x1 30004030: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 30004034: e28dd004 add sp, sp, #4 ; 0x4 30004038: e8bd8000 pop {pc} 3000403c: 3001540c .word 0x3001540c 30004040: 300154c4 .word 0x300154c4 30004044: 30015664 .word 0x30015664 30004048: 1003fff8 .word 0x1003fff8 30009640 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 30009640: e92d4070 push {r4, r5, r6, lr} 30009644: 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 = 30009648: e5942014 ldr r2, [r4, #20] 3000964c: e1a00001 mov r0, r1 30009650: e5941010 ldr r1, [r4, #16] 30009654: ebffef25 bl 300052f0 <_Heap_Calc_block_size> _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 30009658: e3500000 cmp r0, #0 ; 0x0 */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000965c: 15945008 ldrne r5, [r4, #8] 30009660: 13a06000 movne r6, #0 ; 0x0 30009664: 1a000012 bne 300096b4 <_Heap_Allocate+0x74> 30009668: 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) { 3000966c: e5953004 ldr r3, [r5, #4] 30009670: e1530000 cmp r3, r0 30009674: 3a00000c bcc 300096ac <_Heap_Allocate+0x6c> (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 30009678: e1a02000 mov r2, r0 3000967c: e1a01005 mov r1, r5 30009680: e1a00004 mov r0, r4 30009684: ebffef29 bl 30005330 <_Heap_Block_allocate> ptr = _Heap_User_area(the_block); stats->allocs += 1; stats->searches += search_count + 1; 30009688: e594304c ldr r3, [r4, #76] 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; 3000968c: e5942048 ldr r2, [r4, #72] stats->searches += search_count + 1; 30009690: 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; 30009694: e2822001 add r2, r2, #1 ; 0x1 stats->searches += search_count + 1; 30009698: 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; 3000969c: e5842048 str r2, [r4, #72] stats->searches += search_count + 1; 300096a0: e584304c str r3, [r4, #76] 300096a4: e2850008 add r0, r5, #8 ; 0x8 300096a8: ea000004 b 300096c0 <_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) 300096ac: e5955008 ldr r5, [r5, #8] 300096b0: 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; 300096b4: e1550004 cmp r5, r4 300096b8: 1affffeb bne 3000966c <_Heap_Allocate+0x2c> 300096bc: e3a00000 mov r0, #0 ; 0x0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 300096c0: e5943044 ldr r3, [r4, #68] 300096c4: e1530006 cmp r3, r6 stats->max_search = search_count; 300096c8: 35846044 strcc r6, [r4, #68] return ptr; } 300096cc: e8bd8070 pop {r4, r5, r6, pc} 30027b90 <_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; 30027b90: e3a03000 mov r3, #0 ; 0x0 Heap_Get_information_status _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 30027b94: e92d4030 push {r4, r5, lr} 30027b98: 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; 30027b9c: 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; 30027ba0: 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; 30027ba4: e5813000 str r3, [r1] the_info->Free.total = 0; 30027ba8: e5813008 str r3, [r1, #8] the_info->Free.largest = 0; 30027bac: e5813004 str r3, [r1, #4] the_info->Used.number = 0; 30027bb0: e581300c str r3, [r1, #12] the_info->Used.total = 0; 30027bb4: 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; 30027bb8: e5902020 ldr r2, [r0, #32] 30027bbc: ea00001d b 30027c38 <_Heap_Get_information+0xa8> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30027bc0: e5923004 ldr r3, [r2, #4] 30027bc4: 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 ); 30027bc8: 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) ) { 30027bcc: e5943004 ldr r3, [r4, #4] 30027bd0: e3130001 tst r3, #1 ; 0x1 30027bd4: 0a000009 beq 30027c00 <_Heap_Get_information+0x70> the_info->Used.number++; 30027bd8: e59c300c ldr r3, [ip, #12] the_info->Used.total += the_size; 30027bdc: e59c2014 ldr r2, [ip, #20] if ( the_info->Used.largest < the_size ) 30027be0: e59c1010 ldr r1, [ip, #16] while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 30027be4: e2833001 add r3, r3, #1 ; 0x1 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) 30027be8: e1510000 cmp r1, r0 uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; the_info->Used.total += the_size; 30027bec: e0822000 add r2, r2, r0 while ( the_block != end ) { uint32_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); if ( _Heap_Is_prev_used(next_block) ) { the_info->Used.number++; 30027bf0: e58c300c str r3, [ip, #12] the_info->Used.total += the_size; 30027bf4: e58c2014 str r2, [ip, #20] if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; 30027bf8: 358c0010 strcc r0, [ip, #16] 30027bfc: ea00000c b 30027c34 <_Heap_Get_information+0xa4> } else { the_info->Free.number++; 30027c00: e59c3000 ldr r3, [ip] the_info->Free.total += the_size; 30027c04: e99c0006 ldmib ip, {r1, r2} the_info->Used.number++; the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; 30027c08: e2833001 add r3, r3, #1 ; 0x1 the_info->Free.total += the_size; if ( the_info->Free.largest < the_size ) 30027c0c: e1510000 cmp r1, r0 the_info->Used.total += the_size; if ( the_info->Used.largest < the_size ) the_info->Used.largest = the_size; } else { the_info->Free.number++; the_info->Free.total += the_size; 30027c10: e0822000 add r2, r2, r0 if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; 30027c14: 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++; 30027c18: e58c3000 str r3, [ip] the_info->Free.total += the_size; 30027c1c: e58c2008 str r2, [ip, #8] if ( the_info->Free.largest < the_size ) the_info->Free.largest = the_size; if ( the_size != next_block->prev_size ) 30027c20: e5943000 ldr r3, [r4] 30027c24: e1500003 cmp r0, r3 30027c28: 0a000001 beq 30027c34 <_Heap_Get_information+0xa4> 30027c2c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30027c30: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30027c34: 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 ) { 30027c38: e1520005 cmp r2, r5 30027c3c: 1affffdf bne 30027bc0 <_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; 30027c40: e59c3014 ldr r3, [ip, #20] 30027c44: e3a00000 mov r0, #0 ; 0x0 30027c48: e2833008 add r3, r3, #8 ; 0x8 30027c4c: e58c3014 str r3, [ip, #20] return HEAP_GET_INFORMATION_SUCCESSFUL; } 30027c50: e8bd8030 pop {r4, r5, pc} 30013200 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013200: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30013204: e1a04001 mov r4, r1 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; 30013208: e5901014 ldr r1, [r0, #20] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 3001320c: 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; 30013210: e58d1004 str r1, [sp, #4] uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; *avail_mem_size = 0; 30013214: e59d1030 ldr r1, [sp, #48] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013218: 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; 3001321c: 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; 30013220: e590c010 ldr ip, [r0, #16] void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013224: e1a05000 mov r5, r0 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; 30013228: e5893000 str r3, [r9] *avail_mem_size = 0; 3001322c: e5813000 str r3, [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); 30013230: e5951010 ldr r1, [r5, #16] 30013234: e1a00004 mov r0, r4 void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 30013238: 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; 3001323c: e58dc008 str ip, [sp, #8] 30013240: ebfff8b5 bl 3001151c <__umodsi3> 30013244: 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 ); 30013248: e5951020 ldr r1, [r5, #32] 3001324c: e5952024 ldr r2, [r5, #36] /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 30013250: 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)) 30013254: e1570001 cmp r7, r1 30013258: 33a03000 movcc r3, #0 ; 0x0 3001325c: 23a03001 movcs r3, #1 ; 0x1 30013260: e1570002 cmp r7, r2 30013264: 83a03000 movhi r3, #0 ; 0x0 30013268: e3530000 cmp r3, #0 ; 0x0 3001326c: 0a000073 beq 30013440 <_Heap_Resize_block+0x240> return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 30013270: e597c004 ldr ip, [r7, #4] */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 30013274: 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 ); 30013278: e0876003 add r6, r7, r3 */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3001327c: 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) || 30013280: e1560001 cmp r6, r1 30013284: 33a03000 movcc r3, #0 ; 0x0 30013288: 23a03001 movcs r3, #1 ; 0x1 3001328c: e1560002 cmp r6, r2 30013290: 83a03000 movhi r3, #0 ; 0x0 30013294: e3530000 cmp r3, #0 ; 0x0 30013298: 0a000068 beq 30013440 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 3001329c: e5963004 ldr r3, [r6, #4] 300132a0: e3130001 tst r3, #1 ; 0x1 300132a4: 0a000065 beq 30013440 <_Heap_Resize_block+0x240> */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 300132a8: 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) || 300132ac: 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 ); 300132b0: e086300a add r3, r6, sl 300132b4: 15933004 ldrne r3, [r3, #4] 300132b8: 03a02001 moveq r2, #1 ; 0x1 300132bc: 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) 300132c0: e0643006 rsb r3, r4, r6 300132c4: e2830004 add r0, r3, #4 ; 0x4 + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; if (size > old_user_size) { 300132c8: 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; 300132cc: 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) || 300132d0: 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; 300132d4: 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) { 300132d8: 9a000019 bls 30013344 <_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 */ 300132dc: e35b0000 cmp fp, #0 ; 0x0 300132e0: 1a000058 bne 30013448 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 300132e4: e0604008 rsb r4, r0, r8 uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 300132e8: e1a00004 mov r0, r4 300132ec: e59d1008 ldr r1, [sp, #8] 300132f0: ebfff889 bl 3001151c <__umodsi3> *value = r ? v - r + a : v; 300132f4: e3500000 cmp r0, #0 ; 0x0 300132f8: 159dc008 ldrne ip, [sp, #8] 300132fc: e59d2004 ldr r2, [sp, #4] 30013300: 1084300c addne r3, r4, ip 30013304: 10604003 rsbne r4, r0, r3 30013308: e1540002 cmp r4, r2 3001330c: 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) 30013310: e152000a cmp r2, sl 30013314: 8a00004b bhi 30013448 <_Heap_Resize_block+0x248> return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 30013318: e1a01006 mov r1, r6 3001331c: e1a00005 mov r0, r5 30013320: ebffc802 bl 30005330 <_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; 30013324: e59d1000 ldr r1, [sp] 30013328: e0800001 add r0, r0, r1 3001332c: e1800009 orr r0, r0, r9 30013330: e5870004 str r0, [r7, #4] --stats->used_blocks; 30013334: e5953040 ldr r3, [r5, #64] 30013338: e2433001 sub r3, r3, #1 ; 0x1 3001333c: e5853040 str r3, [r5, #64] 30013340: ea000039 b 3001342c <_Heap_Resize_block+0x22c> } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 30013344: e0684000 rsb r4, r8, r0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 30013348: e1a00004 mov r0, r4 3001334c: e59d1008 ldr r1, [sp, #8] 30013350: ebfff871 bl 3001151c <__umodsi3> _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 30013354: e0544000 subs r4, r4, r0 30013358: 0a000033 beq 3001342c <_Heap_Resize_block+0x22c> /* 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; 3001335c: e89d000c ldm sp, {r2, r3} 30013360: e0640002 rsb r0, r4, r2 if (new_block_size < min_block_size) { 30013364: e1500003 cmp r0, r3 30013368: 2a000005 bcs 30013384 <_Heap_Resize_block+0x184> uint32_t delta = min_block_size - new_block_size; 3001336c: e0603003 rsb r3, r0, r3 _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 30013370: e0544003 subs r4, r4, r3 ++stats->resizes; 30013374: 05953054 ldreq r3, [r5, #84] 30013378: 01a00004 moveq r0, r4 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) { 3001337c: 0a00002c beq 30013434 <_Heap_Resize_block+0x234> ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; } new_block_size += delta; 30013380: e0800003 add r0, r0, r3 <== NOT EXECUTED _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) { 30013384: e35b0000 cmp fp, #0 ; 0x0 30013388: 1a000013 bne 300133dc <_Heap_Resize_block+0x1dc> /* 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; 3001338c: 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 ); 30013390: e0871000 add r1, r7, r0 _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 30013394: e1803009 orr r3, r0, r9 new_next_block->size = new_next_block_size | HEAP_PREV_USED; 30013398: 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; 3001339c: 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; 300133a0: 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; 300133a4: 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; 300133a8: e5953030 ldr r3, [r5, #48] Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 300133ac: e596000c ldr r0, [r6, #12] 300133b0: e0833004 add r3, r3, r4 Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 300133b4: e596c008 ldr ip, [r6, #8] 300133b8: e5853030 str r3, [r5, #48] *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 300133bc: e59d3030 ldr r3, [sp, #48] 300133c0: e2422004 sub r2, r2, #4 ; 0x4 Heap_Block *prev = block->prev; block = new_block; block->next = next; 300133c4: e581c008 str ip, [r1, #8] block->prev = prev; 300133c8: e581000c str r0, [r1, #12] 300133cc: e5832000 str r2, [r3] next->prev = prev->next = block; 300133d0: e5801008 str r1, [r0, #8] 300133d4: e58c100c str r1, [ip, #12] 300133d8: ea000013 b 3001342c <_Heap_Resize_block+0x22c> } else if (free_block_size >= min_block_size) { 300133dc: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED 300133e0: e154000c cmp r4, ip <== NOT EXECUTED 300133e4: 3a000010 bcc 3001342c <_Heap_Resize_block+0x22c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 300133e8: 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; 300133ec: 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; 300133f0: 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; 300133f4: 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; 300133f8: e5812004 str r2, [r1, #4] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 300133fc: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013400: 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 */ 30013404: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 30013408: 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 */ 3001340c: e5853040 str r3, [r5, #64] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ _Heap_Free(the_heap, _Heap_User_area(next_block)); 30013410: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ --stats->frees; /* Don't count next call in stats */ 30013414: e5852050 str r2, [r5, #80] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 30013418: e1a00005 mov r0, r5 <== NOT EXECUTED 3001341c: ebffd8ab bl 300096d0 <_Heap_Free> <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 30013420: e59d1030 ldr r1, [sp, #48] <== NOT EXECUTED 30013424: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED 30013428: e5813000 str r3, [r1] <== NOT EXECUTED } } } ++stats->resizes; 3001342c: e5953054 ldr r3, [r5, #84] 30013430: e3a00000 mov r0, #0 ; 0x0 30013434: e2833001 add r3, r3, #1 ; 0x1 30013438: e5853054 str r3, [r5, #84] 3001343c: ea000002 b 3001344c <_Heap_Resize_block+0x24c> return HEAP_RESIZE_SUCCESSFUL; 30013440: e3a00002 mov r0, #2 ; 0x2 30013444: ea000000 b 3001344c <_Heap_Resize_block+0x24c> 30013448: e3a00001 mov r0, #1 ; 0x1 } 3001344c: e28dd00c add sp, sp, #12 ; 0xc 30013450: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000ccb4 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000ccb4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Heap_Block *the_block = the_heap->start; 3000ccb8: e5907020 ldr r7, [r0, #32] /* if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) 3000ccbc: e2516000 subs r6, r1, #0 ; 0x0 /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000ccc0: e5973004 ldr r3, [r7, #4] if ( !_System_state_Is_up( _System_state_Get() ) ) return TRUE; */ if (source < 0) source = the_heap->stats.instance; 3000ccc4: b5906028 ldrlt r6, [r0, #40] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000ccc8: e3130001 tst r3, #1 ; 0x1 bool _Heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { 3000cccc: e1a05000 mov r5, r0 Heap_Block *the_block = the_heap->start; Heap_Block *const end = the_heap->final; 3000ccd0: e590b024 ldr fp, [r0, #36] /* * Handle the 1st block */ if (!_Heap_Is_prev_used(the_block)) { 3000ccd4: 13a04000 movne r4, #0 ; 0x0 3000ccd8: 1a000003 bne 3000ccec <_Heap_Walk+0x38> printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source); 3000ccdc: e59f01a0 ldr r0, [pc, #416] ; 3000ce84 <_Heap_Walk+0x1d0> <== NOT EXECUTED 3000cce0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cce4: ebffde33 bl 300045b8 <== NOT EXECUTED 3000cce8: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (the_block->prev_size != the_heap->page_size) { 3000ccec: e5972000 ldr r2, [r7] 3000ccf0: e5953010 ldr r3, [r5, #16] 3000ccf4: e1520003 cmp r2, r3 3000ccf8: 0a00004c beq 3000ce30 <_Heap_Walk+0x17c> printk("PASS: %d !prev_size of 1st block isn't page_size\n", source); 3000ccfc: e59f0184 ldr r0, [pc, #388] ; 3000ce88 <_Heap_Walk+0x1d4> <== NOT EXECUTED 3000cd00: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cd04: ebffde2b bl 300045b8 <== NOT EXECUTED 3000cd08: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED 3000cd0c: ea000047 b 3000ce30 <_Heap_Walk+0x17c> <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 3000cd10: 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)) { 3000cd14: e5952020 ldr r2, [r5, #32] 3000cd18: e3c9a001 bic sl, r9, #1 ; 0x1 3000cd1c: 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 ); 3000cd20: e087800a add r8, r7, sl 3000cd24: e1580002 cmp r8, r2 3000cd28: 33a01000 movcc r1, #0 ; 0x0 3000cd2c: 23a01001 movcs r1, #1 ; 0x1 3000cd30: e1580003 cmp r8, r3 3000cd34: 83a01000 movhi r1, #0 ; 0x0 3000cd38: e3510000 cmp r1, #0 ; 0x0 3000cd3c: 1a000004 bne 3000cd54 <_Heap_Walk+0xa0> if (do_dump) printk("\n"); printk("PASS: %d !block %p is out of heap\n", source, next_block); 3000cd40: e1a02008 mov r2, r8 <== NOT EXECUTED 3000cd44: e59f0140 ldr r0, [pc, #320] ; 3000ce8c <_Heap_Walk+0x1d8> <== NOT EXECUTED 3000cd48: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cd4c: ebffde19 bl 300045b8 <== NOT EXECUTED 3000cd50: ea000039 b 3000ce3c <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; break; } if (!_Heap_Is_prev_used(next_block)) { 3000cd54: e5983004 ldr r3, [r8, #4] 3000cd58: e3130001 tst r3, #1 ; 0x1 3000cd5c: 1a00001e bne 3000cddc <_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) { 3000cd60: e5983000 ldr r3, [r8] 3000cd64: e15a0003 cmp sl, r3 3000cd68: 0a000003 beq 3000cd7c <_Heap_Walk+0xc8> if (do_dump) printk("\n"); printk("PASS: %d !front and back sizes don't match", source); 3000cd6c: e59f011c ldr r0, [pc, #284] ; 3000ce90 <_Heap_Walk+0x1dc> <== NOT EXECUTED 3000cd70: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cd74: ebffde0f bl 300045b8 <== NOT EXECUTED 3000cd78: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED error = 1; } if (!prev_used) { 3000cd7c: e3190001 tst r9, #1 ; 0x1 3000cd80: 1a000006 bne 3000cda0 <_Heap_Walk+0xec> if (do_dump || error) printk("\n"); 3000cd84: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000cd88: 159f0104 ldrne r0, [pc, #260] ; 3000ce94 <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000cd8c: 1bffde09 blne 300045b8 <== NOT EXECUTED printk("PASS: %d !two consecutive blocks are free", source); 3000cd90: e59f0100 ldr r0, [pc, #256] ; 3000ce98 <_Heap_Walk+0x1e4> <== NOT EXECUTED 3000cd94: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cd98: ebffde06 bl 300045b8 <== NOT EXECUTED 3000cd9c: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 3000cda0: e5953008 ldr r3, [r5, #8] 3000cda4: ea000000 b 3000cdac <_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; 3000cda8: 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) 3000cdac: e1530007 cmp r3, r7 3000cdb0: 11530005 cmpne r3, r5 3000cdb4: 1afffffb bne 3000cda8 <_Heap_Walk+0xf4> block = block->next; if(block != the_block) { 3000cdb8: e1530007 cmp r3, r7 3000cdbc: 0a000006 beq 3000cddc <_Heap_Walk+0x128> if (do_dump || error) printk("\n"); 3000cdc0: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED 3000cdc4: 159f00c8 ldrne r0, [pc, #200] ; 3000ce94 <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000cdc8: 1bffddfa blne 300045b8 <== NOT EXECUTED printk("PASS: %d !the_block not in the free list", source); 3000cdcc: e59f00c8 ldr r0, [pc, #200] ; 3000ce9c <_Heap_Walk+0x1e8> <== NOT EXECUTED 3000cdd0: e1a01006 mov r1, r6 <== NOT EXECUTED 3000cdd4: ebffddf7 bl 300045b8 <== NOT EXECUTED 3000cdd8: ea000001 b 3000cde4 <_Heap_Walk+0x130> <== NOT EXECUTED error = 1; } } } if (do_dump || error) printk("\n"); 3000cddc: e3540000 cmp r4, #0 ; 0x0 3000cde0: 0a000002 beq 3000cdf0 <_Heap_Walk+0x13c> 3000cde4: e59f00a8 ldr r0, [pc, #168] ; 3000ce94 <_Heap_Walk+0x1e0> <== NOT EXECUTED 3000cde8: ebffddf2 bl 300045b8 <== NOT EXECUTED 3000cdec: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if (the_size < the_heap->min_block_size) { 3000cdf0: e5953014 ldr r3, [r5, #20] 3000cdf4: e15a0003 cmp sl, r3 printk("PASS: %d !block size is too small\n", source); 3000cdf8: 359f00a0 ldrcc r0, [pc, #160] ; 3000cea0 <_Heap_Walk+0x1ec> 3000cdfc: 3a000005 bcc 3000ce18 <_Heap_Walk+0x164> error = 1; break; } if (!_Heap_Is_aligned( the_size, the_heap->page_size)) { 3000ce00: e1a0000a mov r0, sl 3000ce04: e5951010 ldr r1, [r5, #16] 3000ce08: eb0025b9 bl 300164f4 <__umodsi3> 3000ce0c: e3500000 cmp r0, #0 ; 0x0 3000ce10: 0a000003 beq 3000ce24 <_Heap_Walk+0x170> printk("PASS: %d !block size is misaligned\n", source); 3000ce14: e59f0088 ldr r0, [pc, #136] ; 3000cea4 <_Heap_Walk+0x1f0> <== NOT EXECUTED 3000ce18: e1a01006 mov r1, r6 <== NOT EXECUTED 3000ce1c: ebffdde5 bl 300045b8 <== NOT EXECUTED 3000ce20: ea000005 b 3000ce3c <_Heap_Walk+0x188> <== NOT EXECUTED error = 1; } if (++passes > (do_dump ? 10 : 0) && error) 3000ce24: e3540000 cmp r4, #0 ; 0x0 3000ce28: 1a000003 bne 3000ce3c <_Heap_Walk+0x188> break; 3000ce2c: 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 ) { 3000ce30: e157000b cmp r7, fp 3000ce34: 1affffb5 bne 3000cd10 <_Heap_Walk+0x5c> 3000ce38: ea000005 b 3000ce54 <_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", 3000ce3c: e1a0300b mov r3, fp <== NOT EXECUTED 3000ce40: e59f0060 ldr r0, [pc, #96] ; 3000cea8 <_Heap_Walk+0x1f4> <== NOT EXECUTED 3000ce44: e1a01006 mov r1, r6 <== NOT EXECUTED 3000ce48: e1a02007 mov r2, r7 <== NOT EXECUTED 3000ce4c: ebffddd9 bl 300045b8 <== NOT EXECUTED 3000ce50: 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); 3000ce54: e5973004 ldr r3, [r7, #4] source, the_block, end); error = 1; } if (_Heap_Block_size(the_block) != the_heap->page_size) { 3000ce58: e5950010 ldr r0, [r5, #16] 3000ce5c: e3c32001 bic r2, r3, #1 ; 0x1 3000ce60: e1520000 cmp r2, r0 3000ce64: 0a000004 beq 3000ce7c <_Heap_Walk+0x1c8> printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source, 3000ce68: e1a03000 mov r3, r0 <== NOT EXECUTED 3000ce6c: e1a01006 mov r1, r6 <== NOT EXECUTED 3000ce70: e59f0034 ldr r0, [pc, #52] ; 3000ceac <_Heap_Walk+0x1f8> <== NOT EXECUTED 3000ce74: ebffddcf bl 300045b8 <== NOT EXECUTED 3000ce78: e3a04001 mov r4, #1 ; 0x1 <== NOT EXECUTED if(do_dump && error) _Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 ); return error; } 3000ce7c: e1a00004 mov r0, r4 3000ce80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 3000ce84: 30018f28 .word 0x30018f28 3000ce88: 30018f5e .word 0x30018f5e 3000ce8c: 30018f90 .word 0x30018f90 3000ce90: 30018fb3 .word 0x30018fb3 3000ce94: 30018935 .word 0x30018935 3000ce98: 30018fde .word 0x30018fde 3000ce9c: 30019008 .word 0x30019008 3000cea0: 30019031 .word 0x30019031 3000cea4: 30019054 .word 0x30019054 3000cea8: 30019078 .word 0x30019078 3000ceac: 300190b3 .word 0x300190b3 300098c4 <_Objects_API_maximum_class>: int _Objects_API_maximum_class( uint32_t api ) { switch (api) { 300098c4: e2400001 sub r0, r0, #1 ; 0x1 300098c8: e3500003 cmp r0, #3 ; 0x3 300098cc: 979ff100 ldrls pc, [pc, r0, lsl #2] 300098d0: ea00000b b 30009904 <_Objects_API_maximum_class+0x40> 300098d4: 300098ec .word 0x300098ec <== NOT EXECUTED 300098d8: 300098e4 .word 0x300098e4 <== NOT EXECUTED 300098dc: 300098f4 .word 0x300098f4 <== NOT EXECUTED 300098e0: 300098fc .word 0x300098fc <== NOT EXECUTED 300098e4: e3a0000a mov r0, #10 ; 0xa 300098e8: e12fff1e bx lr 300098ec: e3a00002 mov r0, #2 ; 0x2 300098f0: e12fff1e bx lr 300098f4: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED 300098f8: 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; 300098fc: e3a00008 mov r0, #8 ; 0x8 30009900: e12fff1e bx lr case OBJECTS_ITRON_API: return OBJECTS_ITRON_CLASSES_LAST; 30009904: e3e00000 mvn r0, #0 ; 0x0 case OBJECTS_NO_API: default: break; } return -1; } 30009908: e12fff1e bx lr 300054e8 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 300054e8: 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; 300054ec: e1d060b8 ldrh r6, [r0, #8] minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 300054f0: e1d041b0 ldrh r4, [r0, #16] */ void _Objects_Extend_information( Objects_Information *information ) { 300054f4: e24dd014 sub sp, sp, #20 ; 0x14 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 300054f8: e1540006 cmp r4, r6 300054fc: 33a07000 movcc r7, #0 ; 0x0 */ void _Objects_Extend_information( Objects_Information *information ) { 30005500: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 30005504: 31a0a006 movcc sl, r6 30005508: 31a08007 movcc r8, r7 3000550c: 3a00000f bcc 30005550 <_Objects_Extend_information+0x68> block_count = 0; else { block_count = information->maximum / information->allocation_size; 30005510: e5909014 ldr r9, [r0, #20] 30005514: e1a00004 mov r0, r4 30005518: e1a01009 mov r1, r9 3000551c: eb002fba bl 3001140c <__aeabi_uidiv> 30005520: e1a0a006 mov sl, r6 30005524: e1a07000 mov r7, r0 30005528: e3a08000 mov r8, #0 ; 0x0 3000552c: ea000005 b 30005548 <_Objects_Extend_information+0x60> for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 30005530: e5953034 ldr r3, [r5, #52] 30005534: e7933108 ldr r3, [r3, r8, lsl #2] 30005538: e3530000 cmp r3, #0 ; 0x0 3000553c: 0a000003 beq 30005550 <_Objects_Extend_information+0x68> break; else index_base += information->allocation_size; 30005540: 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++ ) { 30005544: e2888001 add r8, r8, #1 ; 0x1 30005548: e1580007 cmp r8, r7 3000554c: 3afffff7 bcc 30005530 <_Objects_Extend_information+0x48> /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 30005550: e15a0004 cmp sl, r4 30005554: 3a000056 bcc 300056b4 <_Objects_Extend_information+0x1cc> /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005558: e5d52012 ldrb r2, [r5, #18] * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 3000555c: e5953014 ldr r3, [r5, #20] /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005560: e3520000 cmp r2, #0 ; 0x0 * Up the block count and maximum */ block_count++; maximum = information->maximum + information->allocation_size; 30005564: e0843003 add r3, r4, r3 30005568: e58d3004 str r3, [sp, #4] /* * Up the block count and maximum */ block_count++; 3000556c: e2874001 add r4, r7, #1 ; 0x1 30005570: e0832006 add r2, r3, r6 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 30005574: 0a000007 beq 30005598 <_Objects_Extend_information+0xb0> object_blocks = (void**) 30005578: e3a03003 mov r3, #3 ; 0x3 3000557c: e0202493 mla r0, r3, r4, r2 30005580: e1a00100 lsl r0, r0, #2 30005584: eb0007e8 bl 3000752c <_Workspace_Allocate> block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 30005588: e3500000 cmp r0, #0 ; 0x0 3000558c: e58d0000 str r0, [sp] 30005590: 1a000005 bne 300055ac <_Objects_Extend_information+0xc4> 30005594: ea000078 b 3000577c <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { object_blocks = (void**) 30005598: e3a03003 mov r3, #3 ; 0x3 3000559c: e0202493 mla r0, r3, r4, r2 300055a0: e1a00100 lsl r0, r0, #2 300055a4: eb0007e4 bl 3000753c <_Workspace_Allocate_or_fatal_error> 300055a8: e58d0000 str r0, [sp] * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 300055ac: e1d531b0 ldrh r3, [r5, #16] /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 300055b0: e59d1000 ldr r1, [sp] 300055b4: e1a02104 lsl r2, r4, #2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 300055b8: e1530006 cmp r3, r6 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 300055bc: e081b002 add fp, r1, r2 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 300055c0: 93a03000 movls r3, #0 ; 0x0 300055c4: 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; 300055c8: 91a02003 movls r2, r3 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 300055cc: 9a000011 bls 30005618 <_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, 300055d0: e1a04107 lsl r4, r7, #2 300055d4: e5951034 ldr r1, [r5, #52] 300055d8: e1a02004 mov r2, r4 300055dc: e59d0000 ldr r0, [sp] 300055e0: eb001628 bl 3000ae88 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 300055e4: e1a02004 mov r2, r4 300055e8: e5951030 ldr r1, [r5, #48] 300055ec: e1a0000b mov r0, fp 300055f0: eb001624 bl 3000ae88 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 300055f4: e1d521b0 ldrh r2, [r5, #16] 300055f8: e1a00009 mov r0, r9 300055fc: e0862002 add r2, r6, r2 30005600: e1a02102 lsl r2, r2, #2 30005604: e595101c ldr r1, [r5, #28] 30005608: eb00161e bl 3000ae88 3000560c: ea000003 b 30005620 <_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; 30005610: 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++ ) { 30005614: e2833001 add r3, r3, #1 ; 0x1 30005618: e1530006 cmp r3, r6 3000561c: 3afffffb bcc 30005610 <_Objects_Extend_information+0x128> /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005620: e3a03000 mov r3, #0 ; 0x0 inactive_per_block[block_count] = 0; 30005624: e78b3107 str r3, [fp, r7, lsl #2] for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005628: e5952014 ldr r2, [r5, #20] /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 3000562c: e59dc000 ldr ip, [sp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005630: e08a0002 add r0, sl, r2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 30005634: e78c3107 str r3, [ip, r7, lsl #2] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 30005638: e089110a add r1, r9, sl, lsl #2 3000563c: e1a0200a mov r2, sl 30005640: ea000000 b 30005648 <_Objects_Extend_information+0x160> index++ ) { local_table[ index ] = NULL; 30005644: 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 ); 30005648: e1520000 cmp r2, r0 index++ ) { 3000564c: e2811004 add r1, r1, #4 ; 0x4 30005650: 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 ); 30005654: 3afffffa bcc 30005644 <_Objects_Extend_information+0x15c> index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 30005658: e10f0000 mrs r0, CPSR 3000565c: e38030c0 orr r3, r0, #192 ; 0xc0 30005660: 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( 30005664: 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; 30005668: e59dc004 ldr ip, [sp, #4] information->maximum_id = _Objects_Build_id( 3000566c: e1d510b4 ldrh r1, [r5, #4] 30005670: 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; 30005674: e1a0280c lsl r2, ip, #16 information->maximum_id = _Objects_Build_id( 30005678: 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; 3000567c: e1a02822 lsr r2, r2, #16 information->maximum_id = _Objects_Build_id( 30005680: e1833d81 orr r3, r3, r1, lsl #27 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 30005684: 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( 30005688: e1833002 orr r3, r3, r2 3000568c: 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; 30005690: e585b030 str fp, [r5, #48] local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 30005694: e5953034 ldr r3, [r5, #52] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; 30005698: e585901c str r9, [r5, #28] information->maximum = maximum; 3000569c: e1c521b0 strh r2, [r5, #16] _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 300056a0: e5851034 str r1, [r5, #52] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 300056a4: e129f000 msr CPSR_fc, r0 if ( old_tables ) 300056a8: e3530000 cmp r3, #0 ; 0x0 _Workspace_Free( old_tables ); 300056ac: 11a00003 movne r0, r3 300056b0: 1b000799 blne 3000751c <_Workspace_Free> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 300056b4: e5d53012 ldrb r3, [r5, #18] 300056b8: e5952014 ldr r2, [r5, #20] 300056bc: e3530000 cmp r3, #0 ; 0x0 300056c0: e5954034 ldr r4, [r5, #52] 300056c4: e5953018 ldr r3, [r5, #24] 300056c8: 0a000007 beq 300056ec <_Objects_Extend_information+0x204> information->object_blocks[ block ] = 300056cc: e0000392 mul r0, r2, r3 300056d0: eb000795 bl 3000752c <_Workspace_Allocate> _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 300056d4: e5953034 ldr r3, [r5, #52] /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 300056d8: e7840108 str r0, [r4, r8, lsl #2] _Workspace_Allocate( (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 300056dc: e7933108 ldr r3, [r3, r8, lsl #2] 300056e0: e3530000 cmp r3, #0 ; 0x0 300056e4: 1a000003 bne 300056f8 <_Objects_Extend_information+0x210> 300056e8: ea000023 b 3000577c <_Objects_Extend_information+0x294> <== NOT EXECUTED return; } else { information->object_blocks[ block ] = 300056ec: e0000392 mul r0, r2, r3 300056f0: eb000791 bl 3000753c <_Workspace_Allocate_or_fatal_error> 300056f4: e7840108 str r0, [r4, r8, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 300056f8: e5953034 ldr r3, [r5, #52] 300056fc: e28d4008 add r4, sp, #8 ; 0x8 30005700: e7931108 ldr r1, [r3, r8, lsl #2] 30005704: e1a00004 mov r0, r4 30005708: e5952014 ldr r2, [r5, #20] 3000570c: e5953018 ldr r3, [r5, #24] 30005710: eb000f4f bl 30009454 <_Chain_Initialize> information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005714: e1a0600a mov r6, sl /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 30005718: e1a08108 lsl r8, r8, #2 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 3000571c: e2857020 add r7, r5, #32 ; 0x20 30005720: ea000008 b 30005748 <_Objects_Extend_information+0x260> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 30005724: e5953000 ldr r3, [r5] 30005728: e1d520b4 ldrh r2, [r5, #4] 3000572c: e1a03c03 lsl r3, r3, #24 30005730: e3833801 orr r3, r3, #65536 ; 0x10000 30005734: e1833d82 orr r3, r3, r2, lsl #27 30005738: e1833006 orr r3, r3, r6 3000573c: e58c3008 str r3, [ip, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005740: ebfffd5b bl 30004cb4 <_Chain_Append> index++; 30005744: 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 ) { 30005748: e1a00004 mov r0, r4 3000574c: eb000f33 bl 30009420 <_Chain_Get> 30005750: e250c000 subs ip, r0, #0 ; 0x0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 30005754: e1a0100c mov r1, ip 30005758: 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 ) { 3000575c: 1afffff0 bne 30005724 <_Objects_Extend_information+0x23c> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 30005760: e5953014 ldr r3, [r5, #20] 30005764: e5952030 ldr r2, [r5, #48] information->inactive += information->allocation_size; 30005768: e1d512bc ldrh r1, [r5, #44] _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 3000576c: e7823008 str r3, [r2, r8] information->inactive += information->allocation_size; 30005770: e5953014 ldr r3, [r5, #20] 30005774: e0833001 add r3, r3, r1 30005778: e1c532bc strh r3, [r5, #44] } 3000577c: e28dd014 add sp, sp, #20 ; 0x14 30005780: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 30005880 <_Objects_Get_isr_disable>: #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 30005880: e1a01801 lsl r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 30005884: e92d4010 push {r4, lr} #if defined(RTEMS_MULTIPROCESSING) index = id - information->minimum_id + 1; #else /* index = _Objects_Get_index( id ); */ index = id & 0x0000ffff; 30005888: e1a01821 lsr r1, r1, #16 Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { 3000588c: e1a04003 mov r4, r3 index = id & 0x0000ffff; /* This should work but doesn't always :( */ /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); 30005890: e10fc000 mrs ip, CPSR 30005894: e38c30c0 orr r3, ip, #192 ; 0xc0 30005898: e129f003 msr CPSR_fc, r3 if ( information->maximum >= index ) { 3000589c: e1d031b0 ldrh r3, [r0, #16] 300058a0: e1530001 cmp r3, r1 300058a4: 3a00000a bcc 300058d4 <_Objects_Get_isr_disable+0x54> if ( (the_object = information->local_table[ index ]) != NULL ) { 300058a8: e590301c ldr r3, [r0, #28] 300058ac: e7930101 ldr r0, [r3, r1, lsl #2] 300058b0: e3500000 cmp r0, #0 ; 0x0 *location = OBJECTS_LOCAL; 300058b4: 13a03000 movne r3, #0 ; 0x0 300058b8: 15823000 strne r3, [r2] *level_p = level; 300058bc: 1584c000 strne ip, [r4] /* index = (uint16_t ) id; */ #endif _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { 300058c0: 18bd8010 popne {r4, pc} *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); 300058c4: e129f00c msr CPSR_fc, ip <== NOT EXECUTED *location = OBJECTS_ERROR; 300058c8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 300058cc: e5823000 str r3, [r2] <== NOT EXECUTED 300058d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED return NULL; } _ISR_Enable( level ); 300058d4: e129f00c msr CPSR_fc, ip *location = OBJECTS_ERROR; 300058d8: e3a03001 mov r3, #1 ; 0x1 300058dc: e5823000 str r3, [r2] 300058e0: e3a00000 mov r0, #0 ; 0x0 _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } 300058e4: e8bd8010 pop {r4, pc} 30010008 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 30010008: e92d40f0 push {r4, r5, r6, r7, lr} char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 3001000c: e2517000 subs r7, r1, #0 ; 0x0 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 30010010: e24dd00c sub sp, sp, #12 ; 0xc 30010014: e1a05002 mov r5, r2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 30010018: 0a000037 beq 300100fc <_Objects_Get_name_as_string+0xf4> return NULL; if ( name == NULL ) 3001001c: e3520000 cmp r2, #0 ; 0x0 30010020: 0a000036 beq 30010100 <_Objects_Get_name_as_string+0xf8> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 30010024: e3500000 cmp r0, #0 ; 0x0 30010028: 059f30dc ldreq r3, [pc, #220] ; 3001010c <_Objects_Get_name_as_string+0x104> 3001002c: 11a04000 movne r4, r0 30010030: 05933000 ldreq r3, [r3] 30010034: 05934008 ldreq r4, [r3, #8] information = _Objects_Get_information_id( tmpId ); 30010038: e1a00004 mov r0, r4 3001003c: ebffe72c bl 30009cf4 <_Objects_Get_information_id> if ( !information ) 30010040: e2506000 subs r6, r0, #0 ; 0x0 30010044: 0a00002c beq 300100fc <_Objects_Get_name_as_string+0xf4> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 30010048: e28d2008 add r2, sp, #8 ; 0x8 3001004c: e1a01004 mov r1, r4 30010050: ebffe763 bl 30009de4 <_Objects_Get> switch ( location ) { 30010054: e59d3008 ldr r3, [sp, #8] information = _Objects_Get_information_id( tmpId ); if ( !information ) return NULL; the_object = _Objects_Get( information, tmpId, &location ); 30010058: e1a02000 mov r2, r0 switch ( location ) { 3001005c: e3530000 cmp r3, #0 ; 0x0 30010060: 1a000025 bne 300100fc <_Objects_Get_name_as_string+0xf4> case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 30010064: e5d60038 ldrb r0, [r6, #56] 30010068: e3500000 cmp r0, #0 ; 0x0 3001006c: 0a000004 beq 30010084 <_Objects_Get_name_as_string+0x7c> s = the_object->name.name_p; 30010070: e592000c ldr r0, [r2, #12] lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 30010074: e3500000 cmp r0, #0 ; 0x0 30010078: 01a0e005 moveq lr, r5 3001007c: 1a00000a bne 300100ac <_Objects_Get_name_as_string+0xa4> 30010080: ea000019 b 300100ec <_Objects_Get_name_as_string+0xe4> <== 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; 30010084: e592300c ldr r3, [r2, #12] 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'; 30010088: e5cd0007 strb r0, [sp, #7] 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; 3001008c: e1a02c23 lsr r2, r3, #24 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 30010090: e1a00423 lsr r0, r3, #8 s = the_object->name.name_p; } else { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 30010094: e1a01823 lsr r1, r3, #16 lname[ 2 ] = (u32_name >> 8) & 0xff; 30010098: e5cd0005 strb r0, [sp, #5] 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; 3001009c: e5cd2003 strb r2, [sp, #3] lname[ 1 ] = (u32_name >> 16) & 0xff; 300100a0: e5cd1004 strb r1, [sp, #4] lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 300100a4: e5cd3006 strb r3, [sp, #6] lname[ 4 ] = '\0'; 300100a8: e28d0003 add r0, sp, #3 ; 0x3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 300100ac: 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'; 300100b0: e3a0c000 mov ip, #0 ; 0x0 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint(*s)) ? *s : '*'; 300100b4: e59f4054 ldr r4, [pc, #84] ; 30010110 <_Objects_Get_name_as_string+0x108> 300100b8: ea000005 b 300100d4 <_Objects_Get_name_as_string+0xcc> 300100bc: e5943000 ldr r3, [r4] 300100c0: e7d33002 ldrb r3, [r3, r2] 300100c4: e3130097 tst r3, #151 ; 0x97 300100c8: 03a0202a moveq r2, #42 ; 0x2a 300100cc: e7c5200c strb r2, [r5, ip] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 300100d0: e28cc001 add ip, ip, #1 ; 0x1 300100d4: e15c0001 cmp ip, r1 300100d8: e085e00c add lr, r5, ip 300100dc: 2a000002 bcs 300100ec <_Objects_Get_name_as_string+0xe4> 300100e0: e7d0200c ldrb r2, [r0, ip] 300100e4: e3520000 cmp r2, #0 ; 0x0 300100e8: 1afffff3 bne 300100bc <_Objects_Get_name_as_string+0xb4> *d = (isprint(*s)) ? *s : '*'; } } *d = '\0'; 300100ec: e3a03000 mov r3, #0 ; 0x0 300100f0: e5ce3000 strb r3, [lr] _Thread_Enable_dispatch(); 300100f4: ebffe97e bl 3000a6f4 <_Thread_Enable_dispatch> 300100f8: ea000000 b 30010100 <_Objects_Get_name_as_string+0xf8> return name; 300100fc: e3a05000 mov r5, #0 ; 0x0 } return NULL; /* unreachable path */ } 30010100: e1a00005 mov r0, r5 30010104: e28dd00c add sp, sp, #12 ; 0xc 30010108: e8bd80f0 pop {r4, r5, r6, r7, pc} 3001010c: 30023124 .word 0x30023124 30010110: 3002213c .word 0x3002213c 3001289c <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 3001289c: e1a0c001 mov ip, r1 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 300128a0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 300128a4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 300128a8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300128ac: 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; 300128b0: 05904008 ldreq r4, [r0, #8] <== NOT EXECUTED Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 300128b4: e1a05000 mov r5, r0 <== NOT EXECUTED 300128b8: e1a06002 mov r6, r2 <== NOT EXECUTED 300128bc: e1a07003 mov r7, r3 <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 300128c0: 11a0400c movne r4, ip <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 300128c4: e1a03804 lsl r3, r4, #16 <== NOT EXECUTED 300128c8: e1d5c1b0 ldrh ip, [r5, #16] <== NOT EXECUTED 300128cc: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED 300128d0: e153000c cmp r3, ip <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 300128d4: e1a01004 mov r1, r4 <== NOT EXECUTED 300128d8: e1a00005 mov r0, r5 <== NOT EXECUTED 300128dc: e1a02006 mov r2, r6 <== NOT EXECUTED next_id++; 300128e0: 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) 300128e4: 9a000005 bls 30012900 <_Objects_Get_next+0x64> <== NOT EXECUTED { *location_p = OBJECTS_ERROR; 300128e8: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED 300128ec: e5863000 str r3, [r6] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 300128f0: e3e03000 mvn r3, #0 ; 0x0 <== NOT EXECUTED 300128f4: e5873000 str r3, [r7] <== NOT EXECUTED 300128f8: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED 300128fc: 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); 30012900: ebffdd37 bl 30009de4 <_Objects_Get> <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 30012904: e5963000 ldr r3, [r6] <== NOT EXECUTED 30012908: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001290c: 1affffec bne 300128c4 <_Objects_Get_next+0x28> <== NOT EXECUTED *next_id_p = next_id; 30012910: e5874000 str r4, [r7] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 30012914: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 30006d3c <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006d3c: e92d4030 push {r4, r5, lr} Objects_Id tmpId; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 30006d40: e2515000 subs r5, r1, #0 ; 0x0 Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30006d44: 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 ) 30006d48: 03a00001 moveq r0, #1 ; 0x1 30006d4c: 0a00001b beq 30006dc0 <_Objects_Id_to_name+0x84> return OBJECTS_INVALID_NAME; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 30006d50: e3500000 cmp r0, #0 ; 0x0 30006d54: 059f3080 ldreq r3, [pc, #128] ; 30006ddc <_Objects_Id_to_name+0xa0> 30006d58: 11a01000 movne r1, r0 30006d5c: 05933000 ldreq r3, [r3] 30006d60: 05931008 ldreq r1, [r3, #8] */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 30006d64: e1a03c21 lsr r3, r1, #24 30006d68: 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 ) 30006d6c: e2403001 sub r3, r0, #1 ; 0x1 30006d70: e3530003 cmp r3, #3 ; 0x3 30006d74: 8a000010 bhi 30006dbc <_Objects_Id_to_name+0x80> 30006d78: ea000012 b 30006dc8 <_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 ]; 30006d7c: e1a03da1 lsr r3, r1, #27 30006d80: e7900103 ldr r0, [r0, r3, lsl #2] if ( !information ) 30006d84: e3500000 cmp r0, #0 ; 0x0 30006d88: 0a00000b beq 30006dbc <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; if ( information->is_string ) 30006d8c: e5d04038 ldrb r4, [r0, #56] 30006d90: e3540000 cmp r4, #0 ; 0x0 30006d94: 1a000008 bne 30006dbc <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &ignored_location ); 30006d98: e1a0200d mov r2, sp 30006d9c: ebffffcb bl 30006cd0 <_Objects_Get> if ( !the_object ) 30006da0: e3500000 cmp r0, #0 ; 0x0 30006da4: 0a000004 beq 30006dbc <_Objects_Id_to_name+0x80> return OBJECTS_INVALID_ID; *name = the_object->name; 30006da8: e590300c ldr r3, [r0, #12] 30006dac: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 30006db0: eb000216 bl 30007610 <_Thread_Enable_dispatch> 30006db4: e1a00004 mov r0, r4 30006db8: ea000000 b 30006dc0 <_Objects_Id_to_name+0x84> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 30006dbc: e3a00003 mov r0, #3 ; 0x3 } 30006dc0: e28dd004 add sp, sp, #4 ; 0x4 30006dc4: 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 ] ) 30006dc8: e59f3010 ldr r3, [pc, #16] ; 30006de0 <_Objects_Id_to_name+0xa4> 30006dcc: e7930100 ldr r0, [r3, r0, lsl #2] 30006dd0: e3500000 cmp r0, #0 ; 0x0 30006dd4: 1affffe8 bne 30006d7c <_Objects_Id_to_name+0x40> 30006dd8: eafffff7 b 30006dbc <_Objects_Id_to_name+0x80> <== NOT EXECUTED 30006ddc: 30019444 .word 0x30019444 30006de0: 30019348 .word 0x30019348 30005a10 <_Objects_Namespace_remove>: ) { /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30005a10: e5d03038 ldrb r3, [r0, #56] void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 30005a14: e92d4010 push {r4, lr} /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30005a18: e3530000 cmp r3, #0 ; 0x0 void _Objects_Namespace_remove( Objects_Information *information, Objects_Control *the_object ) { 30005a1c: e1a04001 mov r4, r1 /* * If this is a string format name, then free the memory. */ if ( information->is_string && the_object->name.name_p ) 30005a20: 0a000002 beq 30005a30 <_Objects_Namespace_remove+0x20> 30005a24: e591000c ldr r0, [r1, #12] <== NOT EXECUTED 30005a28: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 30005a2c: 1b0006ba blne 3000751c <_Workspace_Free> <== NOT EXECUTED /* * Clear out either format. */ the_object->name.name_p = NULL; 30005a30: e3a03000 mov r3, #0 ; 0x0 the_object->name.name_u32 = 0; 30005a34: e584300c str r3, [r4, #12] } 30005a38: e8bd8010 pop {r4, pc} 300076bc <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 300076bc: e92d40f0 push {r4, r5, r6, r7, lr} 300076c0: e1a04000 mov r4, r0 300076c4: e1a07001 mov r7, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 300076c8: e1a00002 mov r0, r2 300076cc: e1d413ba ldrh r1, [r4, #58] bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 300076d0: e1a06002 mov r6, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 300076d4: eb001ad3 bl 3000e228 if ( information->is_string ) { 300076d8: e5d43038 ldrb r3, [r4, #56] { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ) + 1; 300076dc: e2804001 add r4, r0, #1 ; 0x1 if ( information->is_string ) { 300076e0: e3530000 cmp r3, #0 ; 0x0 300076e4: 0a000013 beq 30007738 <_Objects_Set_name+0x7c> char *d; d = _Workspace_Allocate( length ); 300076e8: e1a00004 mov r0, r4 <== NOT EXECUTED 300076ec: eb0006c5 bl 30009208 <_Workspace_Allocate> <== NOT EXECUTED if ( !d ) 300076f0: e2505000 subs r5, r0, #0 ; 0x0 <== NOT EXECUTED 300076f4: 01a00005 moveq r0, r5 <== NOT EXECUTED 300076f8: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return FALSE; if ( the_object->name.name_p ) { 300076fc: e597000c ldr r0, [r7, #12] <== NOT EXECUTED 30007700: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30007704: 0a000002 beq 30007714 <_Objects_Set_name+0x58> <== NOT EXECUTED _Workspace_Free( (void *)the_object->name.name_p ); 30007708: eb0006ba bl 300091f8 <_Workspace_Free> <== NOT EXECUTED the_object->name.name_p = NULL; 3000770c: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30007710: e587300c str r3, [r7, #12] <== NOT EXECUTED } strncpy( d, name, length ); 30007714: e1a01006 mov r1, r6 <== NOT EXECUTED 30007718: e1a00005 mov r0, r5 <== NOT EXECUTED 3000771c: e1a02004 mov r2, r4 <== NOT EXECUTED 30007720: eb001a7d bl 3000e11c <== NOT EXECUTED d[ length ] = '\0'; 30007724: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 30007728: e7c53004 strb r3, [r5, r4] <== NOT EXECUTED the_object->name.name_p = d; 3000772c: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED 30007730: e587500c str r5, [r7, #12] <== NOT EXECUTED 30007734: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED } else { the_object->name.name_u32 = _Objects_Build_name( 30007738: e3540000 cmp r4, #0 ; 0x0 3000773c: 03a0c202 moveq ip, #536870912 ; 0x20000000 30007740: 0a000015 beq 3000779c <_Objects_Set_name+0xe0> 30007744: e5d63000 ldrb r3, [r6] 30007748: e3540001 cmp r4, #1 ; 0x1 3000774c: e1a0cc03 lsl ip, r3, #24 30007750: 0a000011 beq 3000779c <_Objects_Set_name+0xe0> 30007754: e5d63001 ldrb r3, [r6, #1] 30007758: e3540002 cmp r4, #2 ; 0x2 3000775c: e1a01803 lsl r1, r3, #16 30007760: 9a00000a bls 30007790 <_Objects_Set_name+0xd4> 30007764: e3540003 cmp r4, #3 ; 0x3 30007768: e5d63002 ldrb r3, [r6, #2] 3000776c: 85d60003 ldrbhi r0, [r6, #3] 30007770: e1a02403 lsl r2, r3, #8 30007774: 93a00020 movls r0, #32 ; 0x20 30007778: e18c3001 orr r3, ip, r1 3000777c: e1833002 orr r3, r3, r2 30007780: e1833000 orr r3, r3, r0 30007784: e587300c str r3, [r7, #12] 30007788: e3a00001 mov r0, #1 ; 0x1 ); } return TRUE; } 3000778c: 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( 30007790: e3a00020 mov r0, #32 ; 0x20 30007794: e3a02a02 mov r2, #8192 ; 0x2000 30007798: eafffff6 b 30007778 <_Objects_Set_name+0xbc> 3000779c: e3a01602 mov r1, #2097152 ; 0x200000 300077a0: eafffffa b 30007790 <_Objects_Set_name+0xd4> 3001eee8 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001eee8: e92d4070 push {r4, r5, r6, lr} Heap_Get_information_status status; if ( !the_heap ) 3001eeec: e2506000 subs r6, r0, #0 ; 0x0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 3001eef0: e1a04001 mov r4, r1 Heap_Get_information_status status; if ( !the_heap ) 3001eef4: 0a00000d beq 3001ef30 <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) 3001eef8: e3510000 cmp r1, #0 ; 0x0 3001eefc: 0a00000b beq 3001ef30 <_Protected_heap_Get_information+0x48> return false; _RTEMS_Lock_allocator(); 3001ef00: e59f5030 ldr r5, [pc, #48] ; 3001ef38 <_Protected_heap_Get_information+0x50> 3001ef04: e5950000 ldr r0, [r5] 3001ef08: ebffa453 bl 3000805c <_API_Mutex_Lock> status = _Heap_Get_information( the_heap, the_info ); 3001ef0c: e1a01004 mov r1, r4 3001ef10: e1a00006 mov r0, r6 3001ef14: eb00231d bl 30027b90 <_Heap_Get_information> 3001ef18: e1a04000 mov r4, r0 _RTEMS_Unlock_allocator(); 3001ef1c: e5950000 ldr r0, [r5] 3001ef20: ebffa469 bl 300080cc <_API_Mutex_Unlock> if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) 3001ef24: e2740001 rsbs r0, r4, #1 ; 0x1 3001ef28: 33a00000 movcc r0, #0 ; 0x0 3001ef2c: e8bd8070 pop {r4, r5, r6, pc} 3001ef30: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return true; return false; } 3001ef34: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3001ef38: 3005535c .word 0x3005535c 30004680 <_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; 30004680: e59f3094 ldr r3, [pc, #148] ; 3000471c <_RTEMS_tasks_Initialize_user_tasks_body+0x9c> * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 30004684: 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; 30004688: e5933000 ldr r3, [r3] * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 3000468c: e24dd00c sub sp, sp, #12 ; 0xc rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 30004690: e5933040 ldr r3, [r3, #64] /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 30004694: e593002c ldr r0, [r3, #44] maximum = api_configuration->number_of_initialization_tasks; 30004698: e5936028 ldr r6, [r3, #40] if ( !user_tasks || maximum == 0 ) 3000469c: e3560000 cmp r6, #0 ; 0x0 300046a0: 13500000 cmpne r0, #0 ; 0x0 300046a4: 13a03000 movne r3, #0 ; 0x0 300046a8: 03a03001 moveq r3, #1 ; 0x1 return; 300046ac: 11a04000 movne r4, r0 300046b0: 11a05003 movne r5, r3 for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046b4: 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 ) 300046b8: 1a000013 bne 3000470c <_RTEMS_tasks_Initialize_user_tasks_body+0x8c> 300046bc: ea000014 b 30004714 <_RTEMS_tasks_Initialize_user_tasks_body+0x94> <== NOT EXECUTED return; for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 300046c0: e594300c ldr r3, [r4, #12] 300046c4: e88d0088 stm sp, {r3, r7} 300046c8: e8940005 ldm r4, {r0, r2} 300046cc: e5941008 ldr r1, [r4, #8] 300046d0: e5943014 ldr r3, [r4, #20] 300046d4: ebffff63 bl 30004468 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 300046d8: e2502000 subs r2, r0, #0 ; 0x0 300046dc: 1a000006 bne 300046fc <_RTEMS_tasks_Initialize_user_tasks_body+0x7c> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 300046e0: e5942018 ldr r2, [r4, #24] 300046e4: e5941010 ldr r1, [r4, #16] 300046e8: e59d0008 ldr r0, [sp, #8] 300046ec: eb00000b bl 30004720 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f0: 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( 300046f4: e284401c add r4, r4, #28 ; 0x1c id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 300046f8: 0a000002 beq 30004708 <_RTEMS_tasks_Initialize_user_tasks_body+0x88> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 300046fc: e3a00001 mov r0, #1 ; 0x1 30004700: e1a01000 mov r1, r0 30004704: eb000335 bl 300053e0 <_Internal_error_Occurred> maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 30004708: e2855001 add r5, r5, #1 ; 0x1 3000470c: e1550006 cmp r5, r6 30004710: 3affffea bcc 300046c0 <_RTEMS_tasks_Initialize_user_tasks_body+0x40> ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); } } 30004714: e28dd00c add sp, sp, #12 ; 0xc 30004718: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000471c: 3001549c .word 0x3001549c 30005804 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 30005804: e92d4010 push {r4, lr} 30005808: e24dd004 sub sp, sp, #4 ; 0x4 3000580c: e1a01000 mov r1, r0 30005810: e1a0200d mov r2, sp 30005814: e59f008c ldr r0, [pc, #140] ; 300058a8 <_Rate_monotonic_Timeout+0xa4> 30005818: eb00070f bl 3000745c <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 3000581c: e59d3000 ldr r3, [sp] 30005820: e1a04000 mov r4, r0 30005824: e3530000 cmp r3, #0 ; 0x0 30005828: 1a00001c bne 300058a0 <_Rate_monotonic_Timeout+0x9c> case OBJECTS_LOCAL: the_thread = the_period->owner; 3000582c: e5900050 ldr r0, [r0, #80] if ( _States_Is_waiting_for_period( the_thread->current_state ) && 30005830: e5903010 ldr r3, [r0, #16] 30005834: e3130901 tst r3, #16384 ; 0x4000 30005838: 0a000006 beq 30005858 <_Rate_monotonic_Timeout+0x54> 3000583c: e5902020 ldr r2, [r0, #32] 30005840: e5943008 ldr r3, [r4, #8] 30005844: e1520003 cmp r2, r3 30005848: 1a000002 bne 30005858 <_Rate_monotonic_Timeout+0x54> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000584c: e59f1058 ldr r1, [pc, #88] ; 300058ac <_Rate_monotonic_Timeout+0xa8> 30005850: eb000827 bl 300078f4 <_Thread_Clear_state> 30005854: ea000006 b 30005874 <_Rate_monotonic_Timeout+0x70> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005858: e5943038 ldr r3, [r4, #56] 3000585c: e3530001 cmp r3, #1 ; 0x1 _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 30005860: 13a03004 movne r3, #4 ; 0x4 30005864: 15843038 strne r3, [r4, #56] _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 30005868: 1a000008 bne 30005890 <_Rate_monotonic_Timeout+0x8c> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 3000586c: e2833002 add r3, r3, #2 ; 0x2 <== NOT EXECUTED 30005870: e5843038 str r3, [r4, #56] <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); 30005874: e1a00004 mov r0, r4 30005878: ebfffe51 bl 300051c4 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 3000587c: e594304c ldr r3, [r4, #76] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005880: e2841010 add r1, r4, #16 ; 0x10 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30005884: e584301c str r3, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30005888: e59f0020 ldr r0, [pc, #32] ; 300058b0 <_Rate_monotonic_Timeout+0xac> 3000588c: eb000dfb bl 30009080 <_Watchdog_Insert> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 30005890: e59f201c ldr r2, [pc, #28] ; 300058b4 <_Rate_monotonic_Timeout+0xb0> 30005894: e5923000 ldr r3, [r2] 30005898: e2433001 sub r3, r3, #1 ; 0x1 3000589c: e5823000 str r3, [r2] case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 300058a0: e28dd004 add sp, sp, #4 ; 0x4 300058a4: e8bd8010 pop {r4, pc} 300058a8: 30019b04 .word 0x30019b04 300058ac: 1003fff8 .word 0x1003fff8 300058b0: 30019d04 .word 0x30019d04 300058b4: 30019c2c .word 0x30019c2c 3000508c <_TOD_Get>: */ void _TOD_Get( struct timespec *time ) { 3000508c: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 30005090: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get( struct timespec *time ) { 30005094: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 30005098: e58d3004 str r3, [sp, #4] */ void _TOD_Get( struct timespec *time ) { 3000509c: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume time checked by caller */ offset.tv_sec = 0; 300050a0: e58d3000 str r3, [sp] offset.tv_nsec = 0; /* _TOD_Now is a proper POSIX time */ _ISR_Disable( level ); 300050a4: e10f6000 mrs r6, CPSR 300050a8: e38630c0 orr r3, r6, #192 ; 0xc0 300050ac: e129f003 msr CPSR_fc, r3 *time = _TOD_Now; if ( _Watchdog_Nanoseconds_since_tick_handler ) 300050b0: e59f3038 ldr r3, [pc, #56] ; 300050f0 <_TOD_Get+0x64> 300050b4: 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; 300050b8: e59f3034 ldr r3, [pc, #52] ; 300050f4 <_TOD_Get+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 300050bc: 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; 300050c0: e8930018 ldm r3, {r3, r4} 300050c4: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 300050c8: 0a000002 beq 300050d8 <_TOD_Get+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 300050cc: e1a0e00f mov lr, pc <== NOT EXECUTED 300050d0: e12fff12 bx r2 <== NOT EXECUTED 300050d4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 300050d8: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( time, &offset ); 300050dc: e1a00005 mov r0, r5 300050e0: e1a0100d mov r1, sp 300050e4: eb000797 bl 30006f48 <_Timespec_Add_to> } 300050e8: e28dd008 add sp, sp, #8 ; 0x8 300050ec: e8bd8070 pop {r4, r5, r6, pc} 300050f0: 300155b8 .word 0x300155b8 300050f4: 30015494 .word 0x30015494 300095d4 <_TOD_Get_uptime>: */ void _TOD_Get_uptime( struct timespec *uptime ) { 300095d4: e92d4070 push {r4, r5, r6, lr} ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 300095d8: e3a03000 mov r3, #0 ; 0x0 */ void _TOD_Get_uptime( struct timespec *uptime ) { 300095dc: e24dd008 sub sp, sp, #8 ; 0x8 struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; offset.tv_nsec = 0; 300095e0: e58d3004 str r3, [sp, #4] */ void _TOD_Get_uptime( struct timespec *uptime ) { 300095e4: e1a05000 mov r5, r0 ISR_Level level; struct timespec offset; /* assume uptime checked by caller */ offset.tv_sec = 0; 300095e8: e58d3000 str r3, [sp] offset.tv_nsec = 0; _ISR_Disable( level ); 300095ec: e10f6000 mrs r6, CPSR 300095f0: e38630c0 orr r3, r6, #192 ; 0xc0 300095f4: e129f003 msr CPSR_fc, r3 *uptime = _TOD_Uptime; if ( _Watchdog_Nanoseconds_since_tick_handler ) 300095f8: e59f3038 ldr r3, [pc, #56] ; 30009638 <_TOD_Get_uptime+0x64> 300095fc: e5932000 ldr r2, [r3] offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009600: e59f3034 ldr r3, [pc, #52] ; 3000963c <_TOD_Get_uptime+0x68> if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009604: e3520000 cmp r2, #0 ; 0x0 offset.tv_sec = 0; offset.tv_nsec = 0; _ISR_Disable( level ); *uptime = _TOD_Uptime; 30009608: e8930018 ldm r3, {r3, r4} 3000960c: e8800018 stm r0, {r3, r4} if ( _Watchdog_Nanoseconds_since_tick_handler ) 30009610: 0a000002 beq 30009620 <_TOD_Get_uptime+0x4c> offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)(); 30009614: e1a0e00f mov lr, pc <== NOT EXECUTED 30009618: e12fff12 bx r2 <== NOT EXECUTED 3000961c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED _ISR_Enable( level ); 30009620: e129f006 msr CPSR_fc, r6 _Timespec_Add_to( uptime, &offset ); 30009624: e1a00005 mov r0, r5 30009628: e1a0100d mov r1, sp 3000962c: ebfff645 bl 30006f48 <_Timespec_Add_to> } 30009630: e28dd008 add sp, sp, #8 ; 0x8 30009634: e8bd8070 pop {r4, r5, r6, pc} 30009638: 300155b8 .word 0x300155b8 3000963c: 30015484 .word 0x30015484 3000a5a4 <_Thread_Handler>: #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000a5a4: e59f30b0 ldr r3, [pc, #176] ; 3000a65c <_Thread_Handler+0xb8> * * Output parameters: NONE */ void _Thread_Handler( void ) { 3000a5a8: e92d4030 push {r4, r5, lr} #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 3000a5ac: 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; 3000a5b0: e59530b8 ldr r3, [r5, #184] _ISR_Set_level(level); 3000a5b4: e3a02000 mov r2, #0 ; 0x0 3000a5b8: e10f2000 mrs r2, CPSR 3000a5bc: e3c220c0 bic r2, r2, #192 ; 0xc0 3000a5c0: e1822003 orr r2, r2, r3 3000a5c4: e121f002 msr CPSR_c, r2 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000a5c8: e59f2090 ldr r2, [pc, #144] ; 3000a660 <_Thread_Handler+0xbc> doneConstructors = 1; 3000a5cc: e3a03001 mov r3, #1 ; 0x1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 3000a5d0: 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 ); 3000a5d4: 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; 3000a5d8: 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 ); 3000a5dc: ebfff2a7 bl 30007080 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 3000a5e0: ebffeee6 bl 30006180 <_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) */ 3000a5e4: e3540000 cmp r4, #0 ; 0x0 { _init (); 3000a5e8: 0b002470 bleq 300137b0 <__start_set_sysctl_set> #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 3000a5ec: e59530a0 ldr r3, [r5, #160] 3000a5f0: e3530003 cmp r3, #3 ; 0x3 3000a5f4: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000a5f8: ea000011 b 3000a644 <_Thread_Handler+0xa0> <== NOT EXECUTED 3000a5fc: 3000a60c .word 0x3000a60c <== NOT EXECUTED 3000a600: 3000a614 .word 0x3000a614 <== NOT EXECUTED 3000a604: 3000a624 .word 0x3000a624 <== NOT EXECUTED 3000a608: 3000a630 .word 0x3000a630 <== NOT EXECUTED case THREAD_START_NUMERIC: executing->Wait.return_argument = 3000a60c: e59500a8 ldr r0, [r5, #168] 3000a610: ea000000 b 3000a618 <_Thread_Handler+0x74> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 3000a614: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000a618: e1a0e00f mov lr, pc 3000a61c: e595f09c ldr pc, [r5, #156] 3000a620: ea000006 b 3000a640 <_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 = 3000a624: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED 3000a628: e59510a8 ldr r1, [r5, #168] <== NOT EXECUTED 3000a62c: ea000001 b 3000a638 <_Thread_Handler+0x94> <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 3000a630: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED 3000a634: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED 3000a638: e1a0e00f mov lr, pc <== NOT EXECUTED 3000a63c: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED 3000a640: 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 ); 3000a644: e1a00005 mov r0, r5 3000a648: ebfff29b bl 300070bc <_User_extensions_Thread_exitted> _Internal_error_Occurred( 3000a64c: e3a00000 mov r0, #0 ; 0x0 3000a650: e3a01001 mov r1, #1 ; 0x1 3000a654: e3a02006 mov r2, #6 ; 0x6 3000a658: ebffeb60 bl 300053e0 <_Internal_error_Occurred> 3000a65c: 300154c4 .word 0x300154c4 3000a660: 30015258 .word 0x30015258 30006248 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 30006248: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 3000624c: 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 ) { 30006250: e1a09000 mov r9, r0 30006254: e1a05001 mov r5, r1 30006258: e1a04003 mov r4, r3 3000625c: e59d8024 ldr r8, [sp, #36] 30006260: e59da02c ldr sl, [sp, #44] 30006264: e5dd7028 ldrb r7, [sp, #40] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 30006268: 1a00000e bne 300062a8 <_Thread_Initialize+0x60> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 3000626c: e1a00001 mov r0, r1 30006270: e1a01003 mov r1, r3 30006274: eb000295 bl 30006cd0 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 30006278: e1500004 cmp r0, r4 3000627c: 23a03000 movcs r3, #0 ; 0x0 30006280: 33a03001 movcc r3, #1 ; 0x1 30006284: e3500000 cmp r0, #0 ; 0x0 30006288: 03833001 orreq r3, r3, #1 ; 0x1 3000628c: e3530000 cmp r3, #0 ; 0x0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006290: 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 ) 30006294: e1a01000 mov r1, r0 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; 30006298: 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; 3000629c: 0595c0cc ldreq ip, [r5, #204] if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) 300062a0: 0a000004 beq 300062b8 <_Thread_Initialize+0x70> 300062a4: ea000017 b 30006308 <_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; 300062a8: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED 300062ac: e5c130c0 strb r3, [r1, #192] <== NOT EXECUTED 300062b0: e1a0c006 mov ip, r6 <== NOT EXECUTED 300062b4: e1a01004 mov r1, r4 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 300062b8: e59f3128 ldr r3, [pc, #296] ; 300063e8 <_Thread_Initialize+0x1a0> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 300062bc: e3a02000 mov r2, #0 ; 0x0 300062c0: e5930000 ldr r0, [r3] Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 300062c4: e585c0c8 str ip, [r5, #200] 300062c8: e1500002 cmp r0, r2 the_stack->size = size; 300062cc: e58510c4 str r1, [r5, #196] /* * Clear the libc reent hook. */ the_thread->libc_reent = NULL; 300062d0: e5852100 str r2, [r5, #256] 300062d4: e5852050 str r2, [r5, #80] the_watchdog->routine = routine; 300062d8: e5852064 str r2, [r5, #100] the_watchdog->id = id; 300062dc: e5852068 str r2, [r5, #104] the_watchdog->user_data = user_data; 300062e0: e585206c str r2, [r5, #108] (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); return FALSE; 300062e4: 01a06000 moveq r6, r0 /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 300062e8: 0a000008 beq 30006310 <_Thread_Initialize+0xc8> extensions_area = _Workspace_Allocate( 300062ec: e2800001 add r0, r0, #1 ; 0x1 300062f0: e1a00100 lsl r0, r0, #2 300062f4: eb00048c bl 3000752c <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 300062f8: e2506000 subs r6, r0, #0 ; 0x0 300062fc: 1a000003 bne 30006310 <_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 ); 30006300: e1a00005 mov r0, r5 <== NOT EXECUTED 30006304: eb00028c bl 30006d3c <_Thread_Stack_Free> <== NOT EXECUTED 30006308: e1a00006 mov r0, r6 3000630c: 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 ) { 30006310: e3560000 cmp r6, #0 ; 0x0 return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 30006314: 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 ) { 30006318: 0a00000a beq 30006348 <_Thread_Initialize+0x100> 3000631c: e3a02000 mov r2, #0 ; 0x0 uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006320: e59f00c0 ldr r0, [pc, #192] ; 300063e8 <_Thread_Initialize+0x1a0> the_thread->extensions[i] = NULL; 30006324: e1a01002 mov r1, r2 30006328: ea000002 b 30006338 <_Thread_Initialize+0xf0> 3000632c: e5953110 ldr r3, [r5, #272] 30006330: e7831102 str r1, [r3, r2, lsl #2] * call. */ if ( the_thread->extensions ) { uint32_t i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 30006334: e2822001 add r2, r2, #1 ; 0x1 30006338: e5903000 ldr r3, [r0] 3000633c: e2833001 add r3, r3, #1 ; 0x1 30006340: e1520003 cmp r2, r3 30006344: 3afffff8 bcc 3000632c <_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; 30006348: e59d3030 ldr r3, [sp, #48] switch ( budget_algorithm ) { 3000634c: 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; 30006350: 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; 30006354: 059f3090 ldreq r3, [pc, #144] ; 300063ec <_Thread_Initialize+0x1a4> } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 30006358: e3a04000 mov r4, #0 ; 0x0 switch ( budget_algorithm ) { case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000635c: 05933000 ldreq r3, [r3] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 30006360: e5c570ac strb r7, [r5, #172] 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; 30006364: 05853078 streq r3, [r5, #120] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006368: e59d3034 ldr r3, [sp, #52] the_thread->current_state = STATES_DORMANT; 3000636c: e3a07001 mov r7, #1 ; 0x1 break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 30006370: 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 ); 30006374: e1a01008 mov r1, r8 30006378: e1a00005 mov r0, r5 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 3000637c: e585a0b0 str sl, [r5, #176] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 30006380: e5857010 str r7, [r5, #16] the_thread->Wait.queue = NULL; 30006384: e5854044 str r4, [r5, #68] the_thread->resource_count = 0; 30006388: e585401c str r4, [r5, #28] the_thread->suspend_count = 0; 3000638c: e5854070 str r4, [r5, #112] the_thread->real_priority = priority; 30006390: e5858018 str r8, [r5, #24] the_thread->Start.initial_priority = priority; 30006394: e58580bc str r8, [r5, #188] _Thread_Set_priority( the_thread, priority ); 30006398: eb0001b6 bl 30006a78 <_Thread_Set_priority> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 3000639c: e1d530b8 ldrh r3, [r5, #8] 300063a0: 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; 300063a4: e5854088 str r4, [r5, #136] 300063a8: e7825103 str r5, [r2, r3, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 300063ac: 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 ); 300063b0: e1a00005 mov r0, r5 300063b4: 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; 300063b8: 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 ); 300063bc: eb000362 bl 3000714c <_User_extensions_Thread_create> if ( !extension_status ) { 300063c0: e1500004 cmp r0, r4 300063c4: 11a00007 movne r0, r7 300063c8: 18bd87f0 popne {r4, r5, r6, r7, r8, r9, sl, pc} if ( extensions_area ) 300063cc: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED (void) _Workspace_Free( extensions_area ); 300063d0: 11a00006 movne r0, r6 <== NOT EXECUTED 300063d4: 1b000450 blne 3000751c <_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 ); 300063d8: e1a00005 mov r0, r5 <== NOT EXECUTED 300063dc: eb000256 bl 30006d3c <_Thread_Stack_Free> <== NOT EXECUTED 300063e0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED return FALSE; } return TRUE; } 300063e4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 300063e8: 300154a4 .word 0x300154a4 300063ec: 300153c4 .word 0x300153c4 300076b0 <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { 300076b0: e5903010 ldr r3, [r0, #16] bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 300076b4: e92d4070 push {r4, r5, r6, lr} if ( !_States_Is_dormant( the_thread->current_state ) ) { 300076b8: e3130001 tst r3, #1 ; 0x1 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 300076bc: e1a04000 mov r4, r0 300076c0: e1a06001 mov r6, r1 300076c4: e1a05002 mov r5, r2 if ( !_States_Is_dormant( the_thread->current_state ) ) { 300076c8: 13a00000 movne r0, #0 ; 0x0 300076cc: 18bd8070 popne {r4, r5, r6, pc} _Thread_Set_transient( the_thread ); 300076d0: eb000083 bl 300078e4 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 300076d4: e1a01006 mov r1, r6 300076d8: e1a02005 mov r2, r5 300076dc: e1a00004 mov r0, r4 300076e0: eb000ce4 bl 3000aa78 <_Thread_Reset> _Thread_Load_environment( the_thread ); 300076e4: e1a00004 mov r0, r4 300076e8: eb000c04 bl 3000a700 <_Thread_Load_environment> _Thread_Ready( the_thread ); 300076ec: e1a00004 mov r0, r4 300076f0: eb000c9d bl 3000a96c <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 300076f4: e1a00004 mov r0, r4 300076f8: eb0001e7 bl 30007e9c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 300076fc: e59f301c ldr r3, [pc, #28] ; 30007720 <_Thread_Restart+0x70> 30007700: e5933000 ldr r3, [r3] 30007704: e1540003 cmp r4, r3 30007708: 13a00001 movne r0, #1 ; 0x1 3000770c: 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 ); 30007710: e28400d0 add r0, r4, #208 ; 0xd0 30007714: eb0002f0 bl 300082dc <_CPU_Context_restore> 30007718: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED return TRUE; } return FALSE; } 3000771c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 30007720: 300188c4 .word 0x300188c4 300083e4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { 300083e4: e92d4030 push {r4, r5, lr} 300083e8: e20110ff and r1, r1, #255 ; 0xff 300083ec: e1a04000 mov r4, r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); 300083f0: e10f5000 mrs r5, CPSR 300083f4: e38530c0 orr r3, r5, #192 ; 0xc0 300083f8: e129f003 msr CPSR_fc, r3 if ( force == TRUE ) 300083fc: e3510000 cmp r1, #0 ; 0x0 the_thread->suspend_count = 0; else the_thread->suspend_count--; 30008400: 05903070 ldreq r3, [r0, #112] States_Control current_state; _ISR_Disable( level ); if ( force == TRUE ) the_thread->suspend_count = 0; 30008404: 13a03000 movne r3, #0 ; 0x0 else the_thread->suspend_count--; 30008408: 02433001 subeq r3, r3, #1 ; 0x1 3000840c: e5803070 str r3, [r0, #112] if ( the_thread->suspend_count > 0 ) { 30008410: e5903070 ldr r3, [r0, #112] 30008414: e3530000 cmp r3, #0 ; 0x0 30008418: 0a000001 beq 30008424 <_Thread_Resume+0x40> _ISR_Enable( level ); 3000841c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 30008420: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return; } current_state = the_thread->current_state; 30008424: e5903010 ldr r3, [r0, #16] if ( current_state & STATES_SUSPENDED ) { 30008428: e3130002 tst r3, #2 ; 0x2 3000842c: 0a000028 beq 300084d4 <_Thread_Resume+0xf0> 30008430: e3c33002 bic r3, r3, #2 ; 0x2 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 30008434: e3530000 cmp r3, #0 ; 0x0 return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = 30008438: e5803010 str r3, [r0, #16] the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 3000843c: 1a000024 bne 300084d4 <_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; 30008440: e5900090 ldr r0, [r0, #144] 30008444: e1d429b6 ldrh r2, [r4, #150] 30008448: e1d030b0 ldrh r3, [r0] _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 3000844c: e594108c ldr r1, [r4, #140] 30008450: e1833002 orr r3, r3, r2 _Priority_Major_bit_map |= the_priority_map->ready_major; 30008454: e59fc080 ldr ip, [pc, #128] ; 300084dc <_Thread_Resume+0xf8> RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 30008458: e1c030b0 strh r3, [r0] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 3000845c: e2813004 add r3, r1, #4 ; 0x4 30008460: e5843000 str r3, [r4] _Priority_Major_bit_map |= the_priority_map->ready_major; 30008464: e1d429b4 ldrh r2, [r4, #148] 30008468: e1dc30b0 ldrh r3, [ip] old_last_node = the_chain->last; 3000846c: e5910008 ldr r0, [r1, #8] 30008470: e1833002 orr r3, r3, r2 the_chain->last = the_node; 30008474: e5814008 str r4, [r1, #8] 30008478: e1cc30b0 strh r3, [ip] old_last_node->next = the_node; the_node->previous = old_last_node; 3000847c: 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; 30008480: e5804000 str r4, [r0] _ISR_Flash( level ); 30008484: e10f3000 mrs r3, CPSR 30008488: e129f005 msr CPSR_fc, r5 3000848c: e129f003 msr CPSR_fc, r3 if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 30008490: e59f1048 ldr r1, [pc, #72] ; 300084e0 <_Thread_Resume+0xfc> 30008494: e5942014 ldr r2, [r4, #20] 30008498: e5913000 ldr r3, [r1] 3000849c: e5933014 ldr r3, [r3, #20] 300084a0: e1520003 cmp r2, r3 300084a4: 2a00000a bcs 300084d4 <_Thread_Resume+0xf0> _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 300084a8: e59f3034 ldr r3, [pc, #52] ; 300084e4 <_Thread_Resume+0x100> _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; 300084ac: e5814000 str r4, [r1] if ( _Thread_Executing->is_preemptible || 300084b0: e5933000 ldr r3, [r3] 300084b4: e5d33076 ldrb r3, [r3, #118] 300084b8: e3530000 cmp r3, #0 ; 0x0 300084bc: 1a000001 bne 300084c8 <_Thread_Resume+0xe4> 300084c0: e3520000 cmp r2, #0 ; 0x0 300084c4: 1a000002 bne 300084d4 <_Thread_Resume+0xf0> the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 300084c8: e59f3018 ldr r3, [pc, #24] ; 300084e8 <_Thread_Resume+0x104> 300084cc: e3a02001 mov r2, #1 ; 0x1 300084d0: e5c32000 strb r2, [r3] } } } _ISR_Enable( level ); 300084d4: e129f005 msr CPSR_fc, r5 300084d8: e8bd8030 pop {r4, r5, pc} 300084dc: 300215d8 .word 0x300215d8 300084e0: 300215b0 .word 0x300215b0 300084e4: 300215e4 .word 0x300215e4 300084e8: 300215f4 .word 0x300215f4 30006cd0 <_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 ) { 30006cd0: e59f305c ldr r3, [pc, #92] ; 30006d34 <_Thread_Stack_Allocate+0x64> size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006cd4: e92d4030 push {r4, r5, lr} * 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 ) { 30006cd8: e5932000 ldr r2, [r3] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006cdc: e59f3054 ldr r3, [pc, #84] ; 30006d38 <_Thread_Stack_Allocate+0x68> * 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 ) { 30006ce0: e5922020 ldr r2, [r2, #32] size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 30006ce4: e5933000 ldr r3, [r3] 30006ce8: e1a05000 mov r5, r0 30006cec: e1510003 cmp r1, r3 30006cf0: 21a04001 movcs r4, r1 30006cf4: 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 ) { 30006cf8: e3520000 cmp r2, #0 ; 0x0 30006cfc: 0a000003 beq 30006d10 <_Thread_Stack_Allocate+0x40> stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size ); 30006d00: e1a00004 mov r0, r4 <== NOT EXECUTED 30006d04: e1a0e00f mov lr, pc <== NOT EXECUTED 30006d08: e12fff12 bx r2 <== NOT EXECUTED 30006d0c: ea000002 b 30006d1c <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size ( size_t size ) { return size + CPU_STACK_ALIGNMENT; 30006d10: 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 ); 30006d14: e1a00004 mov r0, r4 30006d18: eb000203 bl 3000752c <_Workspace_Allocate> 30006d1c: e1a03000 mov r3, r0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 30006d20: e3500000 cmp r0, #0 ; 0x0 30006d24: 11a00004 movne r0, r4 30006d28: 03a00000 moveq r0, #0 ; 0x0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 30006d2c: e58530cc str r3, [r5, #204] return the_stack_size; } 30006d30: e8bd8030 pop {r4, r5, pc} 30006d34: 3001549c .word 0x3001549c 30006d38: 30014644 .word 0x30014644 30006d3c <_Thread_Stack_Free>: { /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 30006d3c: e5d030c0 ldrb r3, [r0, #192] */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 30006d40: 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 ) 30006d44: e3530000 cmp r3, #0 ; 0x0 30006d48: 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 ) 30006d4c: e59f3028 ldr r3, [pc, #40] ; 30006d7c <_Thread_Stack_Free+0x40> 30006d50: e5933000 ldr r3, [r3] 30006d54: e5933024 ldr r3, [r3, #36] 30006d58: e3530000 cmp r3, #0 ; 0x0 30006d5c: 0a000003 beq 30006d70 <_Thread_Stack_Free+0x34> (*_Configuration_Table->stack_free_hook)( 30006d60: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED 30006d64: e1a0e00f mov lr, pc <== NOT EXECUTED 30006d68: e12fff13 bx r3 <== NOT EXECUTED 30006d6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED the_thread->Start.Initial_stack.area ); else _Workspace_Free( the_thread->Start.Initial_stack.area ); 30006d70: e59000c8 ldr r0, [r0, #200] } 30006d74: 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 ); 30006d78: ea0001e7 b 3000751c <_Workspace_Free> 30006d7c: 3001549c .word 0x3001549c 30006e10 <_Thread_Tickle_timeslice>: void _Thread_Tickle_timeslice( void ) { Thread_Control *executing; executing = _Thread_Executing; 30006e10: e59f3088 ldr r3, [pc, #136] ; 30006ea0 <_Thread_Tickle_timeslice+0x90> * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 30006e14: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; 30006e18: e5934000 ldr r4, [r3] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 30006e1c: e5d43076 ldrb r3, [r4, #118] 30006e20: e3530000 cmp r3, #0 ; 0x0 30006e24: 08bd8010 popeq {r4, pc} return; if ( !_States_Is_ready( executing->current_state ) ) 30006e28: e5943010 ldr r3, [r4, #16] 30006e2c: e3530000 cmp r3, #0 ; 0x0 30006e30: 18bd8010 popne {r4, pc} /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 30006e34: e594307c ldr r3, [r4, #124] 30006e38: e3530001 cmp r3, #1 ; 0x1 30006e3c: 38bd8010 popcc {r4, pc} 30006e40: e3530002 cmp r3, #2 ; 0x2 30006e44: 9a000002 bls 30006e54 <_Thread_Tickle_timeslice+0x44> 30006e48: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED 30006e4c: 18bd8010 popne {r4, pc} <== NOT EXECUTED 30006e50: ea000009 b 30006e7c <_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 ) { 30006e54: e5943078 ldr r3, [r4, #120] 30006e58: e2433001 sub r3, r3, #1 ; 0x1 30006e5c: e3530000 cmp r3, #0 ; 0x0 30006e60: e5843078 str r3, [r4, #120] 30006e64: c8bd8010 popgt {r4, pc} _Thread_Reset_timeslice(); 30006e68: eb000ba3 bl 30009cfc <_Thread_Reset_timeslice> executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 30006e6c: e59f3030 ldr r3, [pc, #48] ; 30006ea4 <_Thread_Tickle_timeslice+0x94> 30006e70: e5933000 ldr r3, [r3] 30006e74: e5843078 str r3, [r4, #120] 30006e78: e8bd8010 pop {r4, pc} } break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 30006e7c: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED 30006e80: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED 30006e84: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 30006e88: e5843078 str r3, [r4, #120] <== NOT EXECUTED 30006e8c: 18bd8010 popne {r4, pc} <== NOT EXECUTED (*executing->budget_callout)( executing ); 30006e90: e1a00004 mov r0, r4 <== NOT EXECUTED 30006e94: e1a0e00f mov lr, pc <== NOT EXECUTED 30006e98: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED 30006e9c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 30006ea0: 300154c4 .word 0x300154c4 30006ea4: 300153c4 .word 0x300153c4 30006710 <_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 ) { 30006710: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 30006714: e1a0c001 mov ip, r1 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 30006718: e5915014 ldr r5, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 3000671c: e281303c add r3, r1, #60 ; 0x3c 30006720: e58c3038 str r3, [ip, #56] the_chain->permanent_null = NULL; 30006724: e3a03000 mov r3, #0 ; 0x0 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 30006728: e1a04325 lsr r4, r5, #6 3000672c: e58c303c str r3, [ip, #60] header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; 30006730: e283300c add r3, r3, #12 ; 0xc 30006734: e0260493 mla r6, r3, r4, r0 block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 30006738: e3150020 tst r5, #32 ; 0x20 the_chain->last = _Chain_Head(the_chain); 3000673c: e2811038 add r1, r1, #56 ; 0x38 30006740: 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 ) { 30006744: 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; 30006748: e5908038 ldr r8, [r0, #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; 3000674c: 159fa19c ldrne sl, [pc, #412] ; 300068f0 <_Thread_queue_Enqueue_priority+0x1e0> _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 30006750: 12864008 addne r4, 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 ) ) 30006754: 1a00002d bne 30006810 <_Thread_queue_Enqueue_priority+0x100> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30006758: e3a03003 mov r3, #3 ; 0x3 3000675c: e0030394 mul r3, r4, r3 30006760: e2833001 add r3, r3, #1 ; 0x1 30006764: e0804103 add r4, r0, r3, lsl #2 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 30006768: 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 ); 3000676c: e10f6000 mrs r6, CPSR 30006770: e38630c0 orr r3, r6, #192 ; 0xc0 30006774: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->first; 30006778: e3e02000 mvn r2, #0 ; 0x0 3000677c: e5971000 ldr r1, [r7] 30006780: ea000011 b 300067cc <_Thread_queue_Enqueue_priority+0xbc> while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 30006784: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 30006788: e1550002 cmp r5, r2 3000678c: 9a000010 bls 300067d4 <_Thread_queue_Enqueue_priority+0xc4> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 30006790: e5911000 ldr r1, [r1] if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 30006794: e1510004 cmp r1, r4 30006798: 0a00000d beq 300067d4 <_Thread_queue_Enqueue_priority+0xc4> break; search_priority = search_thread->current_priority; 3000679c: e5912014 ldr r2, [r1, #20] if ( priority <= search_priority ) 300067a0: e1550002 cmp r5, r2 300067a4: 9a00000a bls 300067d4 <_Thread_queue_Enqueue_priority+0xc4> break; #endif _ISR_Flash( level ); 300067a8: e10f3000 mrs r3, CPSR 300067ac: e129f006 msr CPSR_fc, r6 300067b0: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 300067b4: e5913010 ldr r3, [r1, #16] 300067b8: e1180003 tst r8, r3 300067bc: 1a000001 bne 300067c8 <_Thread_queue_Enqueue_priority+0xb8> _ISR_Enable( level ); 300067c0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED 300067c4: eaffffe8 b 3000676c <_Thread_queue_Enqueue_priority+0x5c> <== NOT EXECUTED goto restart_forward_search; } search_thread = 300067c8: 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 ) ) { 300067cc: e1510004 cmp r1, r4 300067d0: 1affffeb bne 30006784 <_Thread_queue_Enqueue_priority+0x74> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 300067d4: e5903030 ldr r3, [r0, #48] 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 ) ) { 300067d8: e1a04006 mov r4, r6 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 300067dc: e3530001 cmp r3, #1 ; 0x1 300067e0: 1a00003f bne 300068e4 <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 300067e4: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 300067e8: 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; 300067ec: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 300067f0: 0a000031 beq 300068bc <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 300067f4: e5913004 ldr r3, [r1, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 300067f8: 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; 300067fc: e58c0044 str r0, [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; 30006800: e583c000 str ip, [r3] search_node->previous = the_node; 30006804: e581c004 str ip, [r1, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 30006808: e129f006 msr CPSR_fc, r6 3000680c: ea000032 b 300068dc <_Thread_queue_Enqueue_priority+0x1cc> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 30006810: e5da3000 ldrb r3, [sl] 30006814: e2832001 add r2, r3, #1 ; 0x1 _ISR_Disable( level ); 30006818: e10f7000 mrs r7, CPSR 3000681c: e38730c0 orr r3, r7, #192 ; 0xc0 30006820: e129f003 msr CPSR_fc, r3 search_thread = (Thread_Control *) header->last; 30006824: e5941000 ldr r1, [r4] 30006828: ea000011 b 30006874 <_Thread_queue_Enqueue_priority+0x164> while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { search_priority = search_thread->current_priority; 3000682c: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 30006830: e1550002 cmp r5, r2 30006834: 2a000010 bcs 3000687c <_Thread_queue_Enqueue_priority+0x16c> break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 30006838: e5911004 ldr r1, [r1, #4] if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 3000683c: e1510006 cmp r1, r6 30006840: 0a00000d beq 3000687c <_Thread_queue_Enqueue_priority+0x16c> break; search_priority = search_thread->current_priority; 30006844: e5912014 ldr r2, [r1, #20] if ( priority >= search_priority ) 30006848: e1550002 cmp r5, r2 3000684c: 2a00000a bcs 3000687c <_Thread_queue_Enqueue_priority+0x16c> break; #endif _ISR_Flash( level ); 30006850: e10f3000 mrs r3, CPSR 30006854: e129f007 msr CPSR_fc, r7 30006858: e129f003 msr CPSR_fc, r3 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 3000685c: e5913010 ldr r3, [r1, #16] 30006860: e1180003 tst r8, r3 30006864: 1a000001 bne 30006870 <_Thread_queue_Enqueue_priority+0x160> _ISR_Enable( level ); 30006868: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 3000686c: eaffffe7 b 30006810 <_Thread_queue_Enqueue_priority+0x100> <== NOT EXECUTED goto restart_reverse_search; } search_thread = (Thread_Control *) 30006870: 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 ) ) { 30006874: e1510006 cmp r1, r6 30006878: 1affffeb bne 3000682c <_Thread_queue_Enqueue_priority+0x11c> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 3000687c: e5903030 ldr r3, [r0, #48] restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 30006880: e1a04007 mov r4, r7 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 30006884: e3530001 cmp r3, #1 ; 0x1 30006888: 1a000015 bne 300068e4 <_Thread_queue_Enqueue_priority+0x1d4> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 3000688c: e3a03000 mov r3, #0 ; 0x0 if ( priority == search_priority ) 30006890: 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; 30006894: e5803030 str r3, [r0, #48] if ( priority == search_priority ) 30006898: 0a000007 beq 300068bc <_Thread_queue_Enqueue_priority+0x1ac> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 3000689c: e5913000 ldr r3, [r1] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 300068a0: 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; 300068a4: 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; 300068a8: e58c0044 str r0, [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; 300068ac: e581c000 str ip, [r1] next_node->previous = the_node; 300068b0: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 300068b4: e129f007 msr CPSR_fc, r7 300068b8: ea000007 b 300068dc <_Thread_queue_Enqueue_priority+0x1cc> 300068bc: 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; 300068c0: e5932004 ldr r2, [r3, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 300068c4: e58c3000 str r3, [ip] the_node->previous = previous_node; 300068c8: e58c2004 str r2, [ip, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 300068cc: e58c0044 str r0, [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; 300068d0: e582c000 str ip, [r2] search_node->previous = the_node; 300068d4: e583c004 str ip, [r3, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 300068d8: e129f004 msr CPSR_fc, r4 300068dc: e3a00001 mov r0, #1 ; 0x1 300068e0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; 300068e4: e5900030 ldr r0, [r0, #48] <== NOT EXECUTED * 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; 300068e8: e5894000 str r4, [r9] <== NOT EXECUTED return the_thread_queue->sync_state; } 300068ec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 300068f0: 30014648 .word 0x30014648 3000a664 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 3000a664: e92d4010 push {r4, lr} 3000a668: e1a04001 mov r4, r1 ISR_Level level; _ISR_Disable( level ); 3000a66c: e10f0000 mrs r0, CPSR 3000a670: e38030c0 orr r3, r0, #192 ; 0xc0 3000a674: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000a678: e59f3064 ldr r3, [pc, #100] ; 3000a6e4 <_Thread_queue_Extract_fifo+0x80> 3000a67c: e5912010 ldr r2, [r1, #16] 3000a680: e0023003 and r3, r2, r3 3000a684: e3530000 cmp r3, #0 ; 0x0 3000a688: 1a000001 bne 3000a694 <_Thread_queue_Extract_fifo+0x30> _ISR_Enable( level ); 3000a68c: 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 } 3000a690: 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 ) ) { 3000a694: e5913050 ldr r3, [r1, #80] { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 3000a698: e5942004 ldr r2, [r4, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 3000a69c: e5911000 ldr r1, [r1] 3000a6a0: e3530002 cmp r3, #2 ; 0x2 return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 3000a6a4: e3a03000 mov r3, #0 ; 0x0 previous = the_node->previous; next->previous = previous; previous->next = next; 3000a6a8: e5821000 str r1, [r2] 3000a6ac: e5843044 str r3, [r4, #68] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 3000a6b0: e5812004 str r2, [r1, #4] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000a6b4: 0a000001 beq 3000a6c0 <_Thread_queue_Extract_fifo+0x5c> _ISR_Enable( level ); 3000a6b8: e129f000 msr CPSR_fc, r0 3000a6bc: ea000004 b 3000a6d4 <_Thread_queue_Extract_fifo+0x70> 3000a6c0: e3a03003 mov r3, #3 ; 0x3 3000a6c4: e5843050 str r3, [r4, #80] } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 3000a6c8: e129f000 msr CPSR_fc, r0 (void) _Watchdog_Remove( &the_thread->Timer ); 3000a6cc: e2840048 add r0, r4, #72 ; 0x48 3000a6d0: ebfff343 bl 300073e4 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 3000a6d4: e59f100c ldr r1, [pc, #12] ; 3000a6e8 <_Thread_queue_Extract_fifo+0x84> 3000a6d8: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000a6dc: e8bd4010 pop {r4, lr} 3000a6e0: eaffeda6 b 30005d80 <_Thread_Clear_state> 3000a6e4: 0003bee0 .word 0x0003bee0 3000a6e8: 1003fff8 .word 0x1003fff8 30009ac4 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, bool requeuing ) { 30009ac4: e92d4070 push {r4, r5, r6, lr} 30009ac8: e1a04001 mov r4, r1 30009acc: 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 ); 30009ad0: e10fc000 mrs ip, CPSR 30009ad4: e38c30c0 orr r3, ip, #192 ; 0xc0 30009ad8: e129f003 msr CPSR_fc, r3 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 30009adc: e59f30b4 ldr r3, [pc, #180] ; 30009b98 <_Thread_queue_Extract_priority_helper+0xd4> 30009ae0: e5912010 ldr r2, [r1, #16] 30009ae4: e0023003 and r3, r2, r3 30009ae8: e3530000 cmp r3, #0 ; 0x0 30009aec: 1a000001 bne 30009af8 <_Thread_queue_Extract_priority_helper+0x34> _ISR_Enable( level ); 30009af0: e129f00c msr CPSR_fc, ip <== NOT EXECUTED 30009af4: 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)); 30009af8: e5911038 ldr r1, [r1, #56] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 30009afc: e284303c add r3, r4, #60 ; 0x3c 30009b00: e1510003 cmp r1, r3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 30009b04: 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; 30009b08: 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; 30009b0c: 05832000 streq r2, [r3] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 30009b10: 0a00000e beq 30009b50 <_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; 30009b14: e5945040 ldr r5, [r4, #64] new_second_node = new_first_node->next; 30009b18: e5910000 ldr r0, [r1] previous_node->next = new_first_node; next_node->previous = new_first_node; 30009b1c: 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; 30009b20: e5831000 str r1, [r3] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 30009b24: e881000c stm r1, {r2, r3} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 30009b28: e5942038 ldr r2, [r4, #56] 30009b2c: e5943040 ldr r3, [r4, #64] 30009b30: e1520003 cmp r2, r3 30009b34: 0a000005 beq 30009b50 <_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 ); 30009b38: 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 = 30009b3c: e2813038 add r3, r1, #56 ; 0x38 30009b40: e5803004 str r3, [r0, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 30009b44: e5810038 str r0, [r1, #56] new_first_thread->Wait.Block2n.last = last_node; 30009b48: e5815040 str r5, [r1, #64] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 30009b4c: e5852000 str r2, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 30009b50: e3560000 cmp r6, #0 ; 0x0 30009b54: 0a000001 beq 30009b60 <_Thread_queue_Extract_priority_helper+0x9c> _ISR_Enable( level ); 30009b58: e129f00c msr CPSR_fc, ip 30009b5c: e8bd8070 pop {r4, r5, r6, pc} return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 30009b60: e5943050 ldr r3, [r4, #80] 30009b64: e3530002 cmp r3, #2 ; 0x2 30009b68: 0a000001 beq 30009b74 <_Thread_queue_Extract_priority_helper+0xb0> _ISR_Enable( level ); 30009b6c: e129f00c msr CPSR_fc, ip 30009b70: ea000004 b 30009b88 <_Thread_queue_Extract_priority_helper+0xc4> 30009b74: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED 30009b78: e5843050 str r3, [r4, #80] <== NOT EXECUTED } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 30009b7c: e129f00c msr CPSR_fc, ip <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 30009b80: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 30009b84: ebfff616 bl 300073e4 <_Watchdog_Remove> <== NOT EXECUTED 30009b88: e59f100c ldr r1, [pc, #12] ; 30009b9c <_Thread_queue_Extract_priority_helper+0xd8> 30009b8c: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 30009b90: e8bd4070 pop {r4, r5, r6, lr} 30009b94: eafff079 b 30005d80 <_Thread_Clear_state> 30009b98: 0003bee0 .word 0x0003bee0 30009b9c: 1003fff8 .word 0x1003fff8 300105c4 <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 300105c4: e59f3038 ldr r3, [pc, #56] ; 30010604 <_Timespec_From_ticks+0x40> <== NOT EXECUTED void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 300105c8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 300105cc: e5933000 ldr r3, [r3] <== NOT EXECUTED void _Timespec_From_ticks( uint32_t ticks, struct timespec *time ) { 300105d0: e1a05001 mov r5, r1 <== NOT EXECUTED uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; 300105d4: e0040093 mul r4, r3, r0 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 300105d8: e59f1028 ldr r1, [pc, #40] ; 30010608 <_Timespec_From_ticks+0x44> <== NOT EXECUTED 300105dc: e1a00004 mov r0, r4 <== NOT EXECUTED 300105e0: ebffc0c8 bl 30000908 <__aeabi_uidiv> <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 300105e4: e59f101c ldr r1, [pc, #28] ; 30010608 <_Timespec_From_ticks+0x44> <== NOT EXECUTED { uint32_t usecs; usecs = ticks * _TOD_Microseconds_per_tick; time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; 300105e8: e5850000 str r0, [r5] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * 300105ec: e1a00004 mov r0, r4 <== NOT EXECUTED 300105f0: eb002e09 bl 3001be1c <__umodsi3> <== NOT EXECUTED 300105f4: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED 300105f8: e0030390 mul r3, r0, r3 <== NOT EXECUTED 300105fc: e5853004 str r3, [r5, #4] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } 30010600: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 30010604: 30023210 .word 0x30023210 30010608: 000f4240 .word 0x000f4240 3001060c <_Timespec_Is_valid>: bool _Timespec_Is_valid( const struct timespec *time ) { if ( !time ) 3001060c: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30010610: 0a00000a beq 30010640 <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_sec < 0 ) 30010614: e5903000 ldr r3, [r0] <== NOT EXECUTED 30010618: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3001061c: ba000007 blt 30010640 <_Timespec_Is_valid+0x34> <== NOT EXECUTED return FALSE; if ( time->tv_nsec < 0 ) 30010620: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 30010624: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30010628: ba000004 blt 30010640 <_Timespec_Is_valid+0x34> <== NOT EXECUTED 3001062c: e59f3014 ldr r3, [pc, #20] ; 30010648 <_Timespec_Is_valid+0x3c> <== NOT EXECUTED 30010630: e1500003 cmp r0, r3 <== NOT EXECUTED 30010634: 83a00000 movhi r0, #0 ; 0x0 <== NOT EXECUTED 30010638: 93a00001 movls r0, #1 ; 0x1 <== NOT EXECUTED 3001063c: e12fff1e bx lr <== NOT EXECUTED 30010640: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) return FALSE; return TRUE; } 30010644: e12fff1e bx lr <== NOT EXECUTED 30010648: 3b9ac9ff .word 0x3b9ac9ff 3001064c <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 3001064c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 30010650: e5907000 ldr r7, [r0] <== NOT EXECUTED */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { 30010654: e1a06000 mov r6, r0 <== NOT EXECUTED uint32_t ticks; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) 30010658: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED 3001065c: 1a000002 bne 3001066c <_Timespec_To_ticks+0x20> <== NOT EXECUTED 30010660: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED 30010664: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED 30010668: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED return 0; ticks = time->tv_sec * TOD_TICKS_PER_SECOND; 3001066c: e59f3030 ldr r3, [pc, #48] ; 300106a4 <_Timespec_To_ticks+0x58> <== NOT EXECUTED 30010670: e59f0030 ldr r0, [pc, #48] ; 300106a8 <_Timespec_To_ticks+0x5c> <== NOT EXECUTED 30010674: e5935000 ldr r5, [r3] <== NOT EXECUTED 30010678: e1a01005 mov r1, r5 <== NOT EXECUTED 3001067c: ebffc0a1 bl 30000908 <__aeabi_uidiv> <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 30010680: 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; 30010684: e0040097 mul r4, r7, r0 <== NOT EXECUTED ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / 30010688: e5960004 ldr r0, [r6, #4] <== NOT EXECUTED 3001068c: ebffc09d bl 30000908 <__aeabi_uidiv> <== NOT EXECUTED 30010690: e1a01005 mov r1, r5 <== NOT EXECUTED 30010694: ebffc09b bl 30000908 <__aeabi_uidiv> <== NOT EXECUTED _TOD_Microseconds_per_tick; if (ticks) 30010698: e0900004 adds r0, r0, r4 <== NOT EXECUTED 3001069c: 03a00001 moveq r0, #1 ; 0x1 <== NOT EXECUTED return ticks; return 1; } 300106a0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 300106a4: 30023210 .word 0x30023210 300106a8: 000f4240 .word 0x000f4240 3000b6a4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 3000b6a4: e92d4010 push {r4, lr} 3000b6a8: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); 3000b6ac: eb001061 bl 3000f838 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 3000b6b0: e5943024 ldr r3, [r4, #36] 3000b6b4: e3530000 cmp r3, #0 ; 0x0 3000b6b8: 08bd8010 popeq {r4, pc} _Chain_Extract( &the_extension->Switch.Node ); 3000b6bc: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED } 3000b6c0: 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 ); 3000b6c4: ea00105b b 3000f838 <_Chain_Extract> <== NOT EXECUTED 30007274 <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 30007274: e59f30fc ldr r3, [pc, #252] ; 30007378 <_Watchdog_Insert+0x104> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 30007278: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3000727c: e1a0c001 mov ip, r1 30007280: e1a06000 mov r6, r0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 30007284: e5934000 ldr r4, [r3] _ISR_Disable( level ); 30007288: e10f5000 mrs r5, CPSR 3000728c: e38530c0 orr r3, r5, #192 ; 0xc0 30007290: 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 ) { 30007294: e5913008 ldr r3, [r1, #8] 30007298: e3530000 cmp r3, #0 ; 0x0 3000729c: 0a000001 beq 300072a8 <_Watchdog_Insert+0x34> _ISR_Enable( level ); 300072a0: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 300072a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 300072a8: e59f30cc ldr r3, [pc, #204] ; 3000737c <_Watchdog_Insert+0x108> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 300072ac: e59f70cc ldr r7, [pc, #204] ; 30007380 <_Watchdog_Insert+0x10c> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 300072b0: e5932000 ldr r2, [r3] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 300072b4: e1a08007 mov r8, r7 _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 300072b8: e2822001 add r2, r2, #1 ; 0x1 300072bc: e5832000 str r2, [r3] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 300072c0: e3a03001 mov r3, #1 ; 0x1 300072c4: e5813008 str r3, [r1, #8] _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 300072c8: 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 ; 300072cc: e5961000 ldr r1, [r6] ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 300072d0: e3500000 cmp r0, #0 ; 0x0 300072d4: 0a000014 beq 3000732c <_Watchdog_Insert+0xb8> 300072d8: e5913000 ldr r3, [r1] 300072dc: e3530000 cmp r3, #0 ; 0x0 300072e0: 0a000011 beq 3000732c <_Watchdog_Insert+0xb8> break; if ( delta_interval < after->delta_interval ) { 300072e4: e5912010 ldr r2, [r1, #16] 300072e8: e1500002 cmp r0, r2 after->delta_interval -= delta_interval; 300072ec: 30603002 rsbcc r3, r0, r2 300072f0: 35813010 strcc r3, [r1, #16] 300072f4: 3a00000c bcc 3000732c <_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 ); 300072f8: e10f3000 mrs r3, CPSR 300072fc: e129f005 msr CPSR_fc, r5 30007300: e129f003 msr CPSR_fc, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 30007304: e59c3008 ldr r3, [ip, #8] if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 30007308: e0620000 rsb r0, r2, r0 * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 3000730c: e3530001 cmp r3, #1 ; 0x1 30007310: 1a000010 bne 30007358 <_Watchdog_Insert+0xe4> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 30007314: e5973000 ldr r3, [r7] 30007318: e1530004 cmp r3, r4 _Watchdog_Sync_level = insert_isr_nest_level; 3000731c: 85884000 strhi r4, [r8] 30007320: 8affffe8 bhi 300072c8 <_Watchdog_Insert+0x54> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 30007324: e5911000 ldr r1, [r1] 30007328: eaffffe8 b 300072d0 <_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; 3000732c: e59f3050 ldr r3, [pc, #80] ; 30007384 <_Watchdog_Insert+0x110> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 30007330: e5912004 ldr r2, [r1, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; 30007334: e5933000 ldr r3, [r3] ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 30007338: e5921000 ldr r1, [r2] 3000733c: e58c3014 str r3, [ip, #20] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 30007340: e3a03002 mov r3, #2 ; 0x2 after_node->next = the_node; 30007344: e582c000 str ip, [r2] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 30007348: e98c000c stmib ip, {r2, r3} } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 3000734c: 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; 30007350: 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; 30007354: 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; 30007358: e59f3020 ldr r3, [pc, #32] ; 30007380 <_Watchdog_Insert+0x10c> _Watchdog_Sync_count--; 3000735c: e59f2018 ldr r2, [pc, #24] ; 3000737c <_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; 30007360: e5834000 str r4, [r3] _Watchdog_Sync_count--; 30007364: e5923000 ldr r3, [r2] 30007368: e2433001 sub r3, r3, #1 ; 0x1 3000736c: e5823000 str r3, [r2] _ISR_Enable( level ); 30007370: e129f005 msr CPSR_fc, r5 30007374: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30007378: 300154a0 .word 0x300154a0 3000737c: 30015560 .word 0x30015560 30007380: 300154c0 .word 0x300154c0 30007384: 30015564 .word 0x30015564 30007564 <_Workspace_Handler_initialization>: */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 30007564: e92d4030 push {r4, r5, lr} uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007568: e2504000 subs r4, r0, #0 ; 0x0 */ void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 3000756c: e1a05001 mov r5, r1 uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 30007570: 0a000001 beq 3000757c <_Workspace_Handler_initialization+0x18> 30007574: e2141003 ands r1, r4, #3 ; 0x3 30007578: 0a000003 beq 3000758c <_Workspace_Handler_initialization+0x28> _Internal_error_Occurred( 3000757c: e3a00000 mov r0, #0 ; 0x0 30007580: e3a01001 mov r1, #1 ; 0x1 30007584: e3a02002 mov r2, #2 ; 0x2 30007588: ea00000e b 300075c8 <_Workspace_Handler_initialization+0x64> INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _Configuration_Table->do_zero_of_workspace ) 3000758c: e59f3038 ldr r3, [pc, #56] ; 300075cc <_Workspace_Handler_initialization+0x68> 30007590: e5933000 ldr r3, [r3] 30007594: e5d33028 ldrb r3, [r3, #40] 30007598: e3530000 cmp r3, #0 ; 0x0 memset( starting_address, 0, size ); 3000759c: 11a02005 movne r2, r5 300075a0: 1b000e77 blne 3000af84 memory_available = _Heap_Initialize( 300075a4: e1a01004 mov r1, r4 300075a8: e1a02005 mov r2, r5 300075ac: e59f001c ldr r0, [pc, #28] ; 300075d0 <_Workspace_Handler_initialization+0x6c> 300075b0: e3a03004 mov r3, #4 ; 0x4 300075b4: ebfff703 bl 300051c8 <_Heap_Initialize> starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 300075b8: e3500000 cmp r0, #0 ; 0x0 300075bc: 18bd8030 popne {r4, r5, pc} _Internal_error_Occurred( 300075c0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED 300075c4: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED 300075c8: ebfff784 bl 300053e0 <_Internal_error_Occurred> 300075cc: 3001549c .word 0x3001549c 300075d0: 3001542c .word 0x3001542c 30003a34 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 30003a34: e92d4010 push {r4, lr} if ( !time_buffer ) 30003a38: e2514000 subs r4, r1, #0 ; 0x0 30003a3c: 03a00009 moveq r0, #9 ; 0x9 30003a40: 08bd8010 popeq {r4, pc} return RTEMS_INVALID_ADDRESS; switch ( option ) { 30003a44: e3500004 cmp r0, #4 ; 0x4 30003a48: 979ff100 ldrls pc, [pc, r0, lsl #2] 30003a4c: ea000004 b 30003a64 30003a50: 30003a6c .word 0x30003a6c <== NOT EXECUTED 30003a54: 30003a78 .word 0x30003a78 <== NOT EXECUTED 30003a58: 30003a84 .word 0x30003a84 <== NOT EXECUTED 30003a5c: 30003a8c .word 0x30003a8c <== NOT EXECUTED 30003a60: 30003a9c .word 0x30003a9c <== NOT EXECUTED 30003a64: e3a0000a mov r0, #10 ; 0xa 30003a68: e8bd8010 pop {r4, pc} case RTEMS_CLOCK_GET_TOD: return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); 30003a6c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a70: 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 ); 30003a74: ea000025 b 30003b10 case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); 30003a78: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003a7c: 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); 30003a80: ea000008 b 30003aa8 case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); 30003a84: eb00001d bl 30003b00 30003a88: ea000000 b 30003a90 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); 30003a8c: eb000013 bl 30003ae0 30003a90: e5840000 str r0, [r4] 30003a94: e3a00000 mov r0, #0 ; 0x0 30003a98: e8bd8010 pop {r4, pc} return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_TIME_VALUE: return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); 30003a9c: e1a00004 mov r0, r4 break; } return RTEMS_INVALID_NUMBER; } 30003aa0: 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 ); 30003aa4: ea00004b b 30003bd8 30006c6c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 30006c6c: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 30006c70: e2507000 subs r7, r0, #0 ; 0x0 30006c74: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; 30006c78: e59f6054 ldr r6, [pc, #84] ; 30006cd4 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006c7c: e2868010 add r8, r6, #16 ; 0x10 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 30006c80: e5963004 ldr r3, [r6, #4] 30006c84: e3530000 cmp r3, #0 ; 0x0 30006c88: 0a00000d beq 30006cc4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 30006c8c: e5935004 ldr r5, [r3, #4] if ( information ) { 30006c90: e3550000 cmp r5, #0 ; 0x0 30006c94: 13a04001 movne r4, #1 ; 0x1 30006c98: 1a000006 bne 30006cb8 30006c9c: ea000008 b 30006cc4 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30006ca0: e595301c ldr r3, [r5, #28] 30006ca4: e7933104 ldr r3, [r3, r4, lsl #2] 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++ ) { 30006ca8: e2844001 add r4, r4, #1 ; 0x1 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 30006cac: e2530000 subs r0, r3, #0 ; 0x0 continue; (*routine)(the_thread); 30006cb0: 11a0e00f movne lr, pc 30006cb4: 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++ ) { 30006cb8: e1d531b0 ldrh r3, [r5, #16] 30006cbc: e1540003 cmp r4, r3 30006cc0: 9afffff6 bls 30006ca0 30006cc4: e2866004 add r6, r6, #4 ; 0x4 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 30006cc8: e1560008 cmp r6, r8 30006ccc: 1affffeb bne 30006c80 30006cd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30006cd4: 300214e8 .word 0x300214e8 3000f630 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f630: 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 ) 3000f634: e2517000 subs r7, r1, #0 ; 0x0 rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 3000f638: e1a04000 mov r4, r0 3000f63c: e24dd008 sub sp, sp, #8 ; 0x8 3000f640: 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 ) 3000f644: 03a04009 moveq r4, #9 ; 0x9 3000f648: 0a000029 beq 3000f6f4 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 3000f64c: e59f30ac ldr r3, [pc, #172] ; 3000f700 3000f650: e5930000 ldr r0, [r3] 3000f654: eb0008c6 bl 30011974 <_API_Mutex_Lock> RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 3000f658: e1a01004 mov r1, r4 3000f65c: e59f00a0 ldr r0, [pc, #160] ; 3000f704 3000f660: e1a0200d mov r2, sp 3000f664: eb000f3e bl 30013364 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000f668: e59d5000 ldr r5, [sp] 3000f66c: e1a04000 mov r4, r0 3000f670: e3550000 cmp r5, #0 ; 0x0 3000f674: 0a000003 beq 3000f688 3000f678: e3550001 cmp r5, #1 ; 0x1 3000f67c: 03a04004 moveq r4, #4 ; 0x4 3000f680: 1a000017 bne 3000f6e4 3000f684: ea000017 b 3000f6e8 case OBJECTS_LOCAL: heap_status = _Heap_Extend( 3000f688: e1a01007 mov r1, r7 3000f68c: e1a02006 mov r2, r6 3000f690: e2800068 add r0, r0, #104 ; 0x68 3000f694: e28d3004 add r3, sp, #4 ; 0x4 3000f698: eb000bb0 bl 30012560 <_Heap_Extend> starting_address, length, &amount_extended ); switch ( heap_status ) { 3000f69c: e3500001 cmp r0, #1 ; 0x1 3000f6a0: 03a04009 moveq r4, #9 ; 0x9 3000f6a4: 0a00000f beq 3000f6e8 3000f6a8: 3a000002 bcc 3000f6b8 3000f6ac: e3500002 cmp r0, #2 ; 0x2 3000f6b0: 1a00000b bne 3000f6e4 3000f6b4: ea000008 b 3000f6dc case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6b8: e59d1004 ldr r1, [sp, #4] 3000f6bc: e5942054 ldr r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6c0: e594305c ldr r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6c4: e0822001 add r2, r2, r1 the_region->maximum_segment_size += amount_extended; 3000f6c8: e0833001 add r3, r3, r1 3000f6cc: e584305c str r3, [r4, #92] &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 3000f6d0: e5842054 str r2, [r4, #84] the_region->maximum_segment_size += amount_extended; 3000f6d4: e1a04005 mov r4, r5 3000f6d8: ea000002 b 3000f6e8 return_status = RTEMS_SUCCESSFUL; break; 3000f6dc: e3a04018 mov r4, #24 ; 0x18 3000f6e0: ea000000 b 3000f6e8 3000f6e4: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000f6e8: e59f3010 ldr r3, [pc, #16] ; 3000f700 3000f6ec: e5930000 ldr r0, [r3] 3000f6f0: eb0008bb bl 300119e4 <_API_Mutex_Unlock> return return_status; } 3000f6f4: e1a00004 mov r0, r4 3000f6f8: e28dd008 add sp, sp, #8 ; 0x8 3000f6fc: e8bd80f0 pop {r4, r5, r6, r7, pc} 3000f700: 3002ee9c .word 0x3002ee9c 3000f704: 3002ec8c .word 0x3002ec8c 3000fa2c : Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa2c: 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 ) 3000fa30: e253a000 subs sl, r3, #0 ; 0x0 Objects_Id id, void *segment, size_t size, size_t *old_size ) { 3000fa34: e24dd010 sub sp, sp, #16 ; 0x10 3000fa38: e1a04000 mov r4, r0 3000fa3c: e1a06001 mov r6, r1 3000fa40: 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 ) 3000fa44: 0a000029 beq 3000faf0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 3000fa48: e59f80b0 ldr r8, [pc, #176] ; 3000fb00 3000fa4c: e5980000 ldr r0, [r8] 3000fa50: eb0007c7 bl 30011974 <_API_Mutex_Lock> 3000fa54: e1a01004 mov r1, r4 3000fa58: e59f00a4 ldr r0, [pc, #164] ; 3000fb04 3000fa5c: e28d2008 add r2, sp, #8 ; 0x8 3000fa60: eb000e3f bl 30013364 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa64: e59d3008 ldr r3, [sp, #8] 3000fa68: e1a05000 mov r5, r0 3000fa6c: e3530000 cmp r3, #0 ; 0x0 3000fa70: 0a000005 beq 3000fa8c 3000fa74: e3530001 cmp r3, #1 ; 0x1 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa78: e5980000 ldr r0, [r8] return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 3000fa7c: 03a04004 moveq r4, #4 ; 0x4 3000fa80: 13a04019 movne r4, #25 ; 0x19 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 3000fa84: eb0007d6 bl 300119e4 <_API_Mutex_Unlock> 3000fa88: ea000019 b 3000faf4 case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( 3000fa8c: e28d3004 add r3, sp, #4 ; 0x4 3000fa90: e28dc00c add ip, sp, #12 ; 0xc 3000fa94: e1a01006 mov r1, r6 3000fa98: e1a02007 mov r2, r7 3000fa9c: e2800068 add r0, r0, #104 ; 0x68 3000faa0: e58dc000 str ip, [sp] 3000faa4: eb000c2b bl 30012b58 <_Heap_Resize_block> segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000faa8: e59d3004 ldr r3, [sp, #4] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000faac: e2504000 subs r4, r0, #0 ; 0x0 segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; 3000fab0: e58a3000 str r3, [sl] _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 ) 3000fab4: 1a000005 bne 3000fad0 3000fab8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 3000fabc: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED 3000fac0: 0a000002 beq 3000fad0 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ 3000fac4: e1a00005 mov r0, r5 <== NOT EXECUTED 3000fac8: eb001d60 bl 30017050 <_Region_Process_queue> <== NOT EXECUTED 3000facc: ea000008 b 3000faf4 <== NOT EXECUTED else _RTEMS_Unlock_allocator(); 3000fad0: e59f3028 ldr r3, [pc, #40] ; 3000fb00 3000fad4: e5930000 ldr r0, [r3] 3000fad8: eb0007c1 bl 300119e4 <_API_Mutex_Unlock> return 3000fadc: e3540000 cmp r4, #0 ; 0x0 3000fae0: 0a000003 beq 3000faf4 3000fae4: e3540001 cmp r4, #1 ; 0x1 3000fae8: 0284400c addeq r4, r4, #12 ; 0xc 3000faec: 0a000000 beq 3000faf4 return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); return return_status; 3000faf0: e3a04009 mov r4, #9 ; 0x9 } 3000faf4: e1a00004 mov r0, r4 3000faf8: e28dd010 add sp, sp, #16 ; 0x10 3000fafc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 3000fb00: 3002ee9c .word 0x3002ee9c 3000fb04: 3002ec8c .word 0x3002ec8c 3000404c : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 3000404c: 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 ) ) 30004050: e250a000 subs sl, r0, #0 ; 0x0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 30004054: e24dd018 sub sp, sp, #24 ; 0x18 30004058: e1a07001 mov r7, r1 3000405c: e1a04002 mov r4, r2 30004060: e1a08003 mov r8, r3 30004064: 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 ) ) 30004068: 02800003 addeq r0, r0, #3 ; 0x3 3000406c: 0a000062 beq 300041fc return RTEMS_INVALID_NAME; if ( !id ) 30004070: e3590000 cmp r9, #0 ; 0x0 30004074: 03a00009 moveq r0, #9 ; 0x9 30004078: 0a00005f beq 300041fc return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 3000407c: e21220c0 ands r2, r2, #192 ; 0xc0 30004080: 0a000008 beq 300040a8 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); 30004084: e2043030 and r3, r4, #48 ; 0x30 _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 30004088: e3530010 cmp r3, #16 ; 0x10 3000408c: 0a000001 beq 30004098 30004090: e3530020 cmp r3, #32 ; 0x20 30004094: 1a000057 bne 300041f8 30004098: e3140004 tst r4, #4 ; 0x4 3000409c: 0a000055 beq 300041f8 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 300040a0: e35200c0 cmp r2, #192 ; 0xc0 300040a4: 0a000053 beq 300041f8 _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 300040a8: e2146030 ands r6, r4, #48 ; 0x30 300040ac: 0a000002 beq 300040bc 300040b0: e3570001 cmp r7, #1 ; 0x1 300040b4: 83a0000a movhi r0, #10 ; 0xa 300040b8: 8a00004f bhi 300041fc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 300040bc: e59f2140 ldr r2, [pc, #320] ; 30004204 300040c0: e5923000 ldr r3, [r2] 300040c4: e2833001 add r3, r3, #1 ; 0x1 300040c8: 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 ); 300040cc: e59f0134 ldr r0, [pc, #308] ; 30004208 300040d0: eb0004dc bl 30005448 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 300040d4: e2505000 subs r5, r0, #0 ; 0x0 300040d8: 1a000002 bne 300040e8 _Thread_Enable_dispatch(); 300040dc: eb000827 bl 30006180 <_Thread_Enable_dispatch> 300040e0: e3a00005 mov r0, #5 ; 0x5 300040e4: ea000044 b 300041fc * 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 ) ) { 300040e8: e3560000 cmp r6, #0 ; 0x0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; 300040ec: 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 ) ) { 300040f0: 0a000029 beq 3000419c CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040f4: e3140040 tst r4, #64 ; 0x40 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 300040f8: 13a03002 movne r3, #2 ; 0x2 */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 300040fc: 1a000004 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 30004100: e3140080 tst r4, #128 ; 0x80 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 30004104: 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 ) ) 30004108: 1a000001 bne 30004114 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 3000410c: e2143004 ands r3, r4, #4 ; 0x4 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 30004110: 13a03001 movne r3, #1 ; 0x1 else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 30004114: 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; 30004118: 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; 3000411c: 13a03002 movne r3, #2 ; 0x2 30004120: 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 ) ) { 30004124: 1a00000b bne 30004158 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 30004128: 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; 3000412c: e3a03000 mov r3, #0 ; 0x0 30004130: e58d3000 str r3, [sp] switch ( the_mutex_attributes.discipline ) { 30004134: e3520003 cmp r2, #3 ; 0x3 30004138: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000413c: ea000007 b 30004160 <== NOT EXECUTED 30004140: 30004158 .word 0x30004158 <== NOT EXECUTED 30004144: 30004158 .word 0x30004158 <== NOT EXECUTED 30004148: 30004150 .word 0x30004150 <== NOT EXECUTED 3000414c: 30004150 .word 0x30004150 <== 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; 30004150: e3a03001 mov r3, #1 ; 0x1 30004154: ea000000 b 3000415c break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 30004158: e3a03000 mov r3, #0 ; 0x0 3000415c: e5cd3004 strb r3, [sp, #4] } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 30004160: e3570001 cmp r7, #1 ; 0x1 30004164: 13a02000 movne r2, #0 ; 0x0 30004168: 03a02001 moveq r2, #1 ; 0x1 3000416c: e2850014 add r0, r5, #20 ; 0x14 30004170: 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; 30004174: e58d800c str r8, [sp, #12] mutex_status = _CORE_mutex_Initialize( 30004178: eb0002d9 bl 30004ce4 <_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 ) { 3000417c: e3500006 cmp r0, #6 ; 0x6 30004180: 1a000012 bne 300041d0 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 30004184: e59f007c ldr r0, [pc, #124] ; 30004208 <== NOT EXECUTED 30004188: e1a01005 mov r1, r5 <== NOT EXECUTED 3000418c: eb00057c bl 30005784 <_Objects_Free> <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); 30004190: eb0007fa bl 30006180 <_Thread_Enable_dispatch> <== NOT EXECUTED 30004194: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED 30004198: ea000017 b 300041fc <== NOT EXECUTED return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 3000419c: e3140004 tst r4, #4 ; 0x4 the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 300041a0: 13a03001 movne r3, #1 ; 0x1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041a4: 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; 300041a8: 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( 300041ac: e1a02007 mov r2, r7 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041b0: 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( 300041b4: e2850014 add r0, r5, #20 ; 0x14 300041b8: 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; 300041bc: 058d6014 streq r6, [sp, #20] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 300041c0: 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; 300041c4: e58dc00c str ip, [sp, #12] /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 300041c8: e58dc000 str ip, [sp] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 300041cc: eb000392 bl 3000501c <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041d0: e59f3030 ldr r3, [pc, #48] ; 30004208 300041d4: e1d510b8 ldrh r1, [r5, #8] 300041d8: e593301c ldr r3, [r3, #28] 300041dc: e5952008 ldr r2, [r5, #8] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 300041e0: e585a00c str sl, [r5, #12] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300041e4: e7835101 str r5, [r3, r1, lsl #2] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 300041e8: e5892000 str r2, [r9] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 300041ec: eb0007e3 bl 30006180 <_Thread_Enable_dispatch> 300041f0: e3a00000 mov r0, #0 ; 0x0 300041f4: ea000000 b 300041fc return RTEMS_SUCCESSFUL; 300041f8: e3a0000b mov r0, #11 ; 0xb } 300041fc: e28dd018 add sp, sp, #24 ; 0x18 30004200: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 30004204: 3001540c .word 0x3001540c 30004208: 3001532c .word 0x3001532c 3001e04c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 3001e04c: e52de004 push {lr} ; (str lr, [sp, #-4]!) 3001e050: e24dd004 sub sp, sp, #4 ; 0x4 3001e054: e1a01000 mov r1, r0 3001e058: e1a0200d mov r2, sp 3001e05c: e59f0048 ldr r0, [pc, #72] ; 3001e0ac 3001e060: ebffab9d bl 30008edc <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 3001e064: e59d2000 ldr r2, [sp] 3001e068: e3520000 cmp r2, #0 ; 0x0 3001e06c: 13a00004 movne r0, #4 ; 0x4 3001e070: 1a00000b bne 3001e0a4 case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 3001e074: e5903010 ldr r3, [r0, #16] 3001e078: e2800014 add r0, r0, #20 ; 0x14 3001e07c: e2131030 ands r1, r3, #48 ; 0x30 3001e080: 0a000003 beq 3001e094 _CORE_mutex_Flush( 3001e084: e1a01002 mov r1, r2 3001e088: e3a02001 mov r2, #1 ; 0x1 3001e08c: ebffa832 bl 3000815c <_CORE_mutex_Flush> 3001e090: ea000001 b 3001e09c &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 3001e094: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED 3001e098: ebffa8fd bl 30008494 <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 3001e09c: ebffadcf bl 300097e0 <_Thread_Enable_dispatch> 3001e0a0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e0a4: e28dd004 add sp, sp, #4 ; 0x4 3001e0a8: e8bd8000 pop {pc} 3001e0ac: 300551c8 .word 0x300551c8 30012f44 : */ void rtems_shutdown_executive( uint32_t result ) { 30012f44: e52de004 push {lr} ; (str lr, [sp, #-4]!) if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30012f48: e59f2024 ldr r2, [pc, #36] ; 30012f74 */ void rtems_shutdown_executive( uint32_t result ) { 30012f4c: e24dd030 sub sp, sp, #48 ; 0x30 if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 30012f50: e5923000 ldr r3, [r2] 30012f54: e3530004 cmp r3, #4 ; 0x4 30012f58: 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 ); 30012f5c: 11a0000d movne r0, sp 30012f60: 159f1010 ldrne r1, [pc, #16] ; 30012f78 30012f64: 15823000 strne r3, [r2] 30012f68: 1bffd199 blne 300075d4 <_CPU_Context_switch> _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } } 30012f6c: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED 30012f70: e8bd8000 pop {pc} <== NOT EXECUTED 30012f74: 300155b4 .word 0x300155b4 30012f78: 300153dc .word 0x300153dc 3001e500 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001e500: e92d40f0 push {r4, r5, r6, r7, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001e504: e2516000 subs r6, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 3001e508: e24dd004 sub sp, sp, #4 ; 0x4 3001e50c: e1a07002 mov r7, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 3001e510: 03a00009 moveq r0, #9 ; 0x9 3001e514: 0a000022 beq 3001e5a4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001e518: e1a0100d mov r1, sp 3001e51c: ebffacb8 bl 30009804 <_Thread_Get> switch (location) { 3001e520: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001e524: e1a05000 mov r5, r0 switch (location) { 3001e528: e3530000 cmp r3, #0 ; 0x0 3001e52c: 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; 3001e530: 05954114 ldreq r4, [r5, #276] if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001e534: 0a000008 beq 3001e55c 3001e538: ea000019 b 3001e5a4 <== 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) { 3001e53c: e5943004 ldr r3, [r4, #4] 3001e540: e1530006 cmp r3, r6 3001e544: 1a000003 bne 3001e558 tvp->dtor = dtor; 3001e548: e5847010 str r7, [r4, #16] _Thread_Enable_dispatch(); 3001e54c: ebffaca3 bl 300097e0 <_Thread_Enable_dispatch> 3001e550: e3a00000 mov r0, #0 ; 0x0 3001e554: ea000012 b 3001e5a4 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001e558: 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) { 3001e55c: e3540000 cmp r4, #0 ; 0x0 3001e560: 1afffff5 bne 3001e53c } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) 3001e564: e3a00014 mov r0, #20 ; 0x14 3001e568: ebffb187 bl 3000ab8c <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 3001e56c: e3500000 cmp r0, #0 ; 0x0 3001e570: 1a000002 bne 3001e580 _Thread_Enable_dispatch(); 3001e574: ebffac99 bl 300097e0 <_Thread_Enable_dispatch> 3001e578: e3a0001a mov r0, #26 ; 0x1a 3001e57c: ea000008 b 3001e5a4 } new->gval = *ptr; new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001e580: 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; 3001e584: 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; 3001e588: 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; 3001e58c: e5803008 str r3, [r0, #8] new->ptr = ptr; 3001e590: e5806004 str r6, [r0, #4] new->dtor = dtor; 3001e594: e5807010 str r7, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 3001e598: e5802000 str r2, [r0] the_thread->task_variables = new; _Thread_Enable_dispatch(); 3001e59c: ebffac8f bl 300097e0 <_Thread_Enable_dispatch> 3001e5a0: e1a00004 mov r0, r4 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e5a4: e28dd004 add sp, sp, #4 ; 0x4 3001e5a8: e8bd80f0 pop {r4, r5, r6, r7, pc} 3001e5ac : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001e5ac: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001e5b0: e2514000 subs r4, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 3001e5b4: e24dd004 sub sp, sp, #4 ; 0x4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 3001e5b8: 0a000018 beq 3001e620 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 3001e5bc: e1a0100d mov r1, sp 3001e5c0: ebffac8f bl 30009804 <_Thread_Get> switch (location) { 3001e5c4: e59d3000 ldr r3, [sp] 3001e5c8: e3530000 cmp r3, #0 ; 0x0 3001e5cc: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: tvp = the_thread->task_variables; 3001e5d0: 01a02003 moveq r2, r3 3001e5d4: 05901114 ldreq r1, [r0, #276] return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 3001e5d8: 0a00000d beq 3001e614 3001e5dc: ea000010 b 3001e624 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001e5e0: e5913004 ldr r3, [r1, #4] 3001e5e4: e1530004 cmp r3, r4 3001e5e8: 1a000007 bne 3001e60c 3001e5ec: e5913000 ldr r3, [r1] if (prev) 3001e5f0: e3520000 cmp r2, #0 ; 0x0 prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 3001e5f4: 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; 3001e5f8: 15823000 strne r3, [r2] else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 3001e5fc: eb000028 bl 3001e6a4 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 3001e600: ebffac76 bl 300097e0 <_Thread_Enable_dispatch> 3001e604: e3a00000 mov r0, #0 ; 0x0 3001e608: ea000005 b 3001e624 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 3001e60c: e1a02001 mov r2, r1 3001e610: e5911000 ldr r1, [r1] the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 3001e614: e3510000 cmp r1, #0 ; 0x0 3001e618: 1afffff0 bne 3001e5e0 return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001e61c: ebffac6f bl 300097e0 <_Thread_Enable_dispatch> 3001e620: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e624: e28dd004 add sp, sp, #4 ; 0x4 3001e628: e8bd8010 pop {r4, pc} 3001e62c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001e62c: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001e630: e2515000 subs r5, r1, #0 ; 0x0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 3001e634: e24dd004 sub sp, sp, #4 ; 0x4 3001e638: e1a04002 mov r4, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 3001e63c: 0a000015 beq 3001e698 return RTEMS_INVALID_ADDRESS; if ( !result ) 3001e640: e3520000 cmp r2, #0 ; 0x0 3001e644: 0a000013 beq 3001e698 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 3001e648: e1a0100d mov r1, sp 3001e64c: ebffac6c bl 30009804 <_Thread_Get> switch (location) { 3001e650: e59d3000 ldr r3, [sp] 3001e654: e3530000 cmp r3, #0 ; 0x0 3001e658: 13a00004 movne r0, #4 ; 0x4 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 3001e65c: 05900114 ldreq r0, [r0, #276] if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 3001e660: 0a000009 beq 3001e68c 3001e664: ea00000c b 3001e69c <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 3001e668: e5903004 ldr r3, [r0, #4] 3001e66c: e1530005 cmp r3, r5 3001e670: 1a000004 bne 3001e688 /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 3001e674: e590300c ldr r3, [r0, #12] 3001e678: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 3001e67c: ebffac57 bl 300097e0 <_Thread_Enable_dispatch> 3001e680: e3a00000 mov r0, #0 ; 0x0 3001e684: ea000004 b 3001e69c return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 3001e688: 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) { 3001e68c: e3500000 cmp r0, #0 ; 0x0 3001e690: 1afffff4 bne 3001e668 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 3001e694: ebffac51 bl 300097e0 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; 3001e698: e3a00009 mov r0, #9 ; 0x9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3001e69c: e28dd004 add sp, sp, #4 ; 0x4 3001e6a0: e8bd8030 pop {r4, r5, pc} 300109f4 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300109f4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 300109f8: e251a000 subs sl, r1, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 300109fc: e1a07000 mov r7, r0 30010a00: e24dd004 sub sp, sp, #4 ; 0x4 30010a04: e1a06002 mov r6, r2 30010a08: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 30010a0c: 03a0000a moveq r0, #10 ; 0xa 30010a10: 0a000022 beq 30010aa0 return RTEMS_INVALID_NUMBER; if ( !routine ) 30010a14: e3520000 cmp r2, #0 ; 0x0 30010a18: 03a00009 moveq r0, #9 ; 0x9 30010a1c: 0a00001f beq 30010aa0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 30010a20: e59f0080 ldr r0, [pc, #128] ; 30010aa8 30010a24: e1a01007 mov r1, r7 30010a28: e1a0200d mov r2, sp 30010a2c: eb000a5d bl 300133a8 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010a30: e59d3000 ldr r3, [sp] 30010a34: e1a04000 mov r4, r0 30010a38: e3530000 cmp r3, #0 ; 0x0 30010a3c: 13a00004 movne r0, #4 ; 0x4 30010a40: 1a000016 bne 30010aa0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30010a44: e2845010 add r5, r4, #16 ; 0x10 30010a48: e1a00005 mov r0, r5 30010a4c: eb001249 bl 30015378 <_Watchdog_Remove> _ISR_Disable( level ); 30010a50: e10f2000 mrs r2, CPSR 30010a54: e38230c0 orr r3, r2, #192 ; 0xc0 30010a58: 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 ) { 30010a5c: e5943018 ldr r3, [r4, #24] 30010a60: e3530000 cmp r3, #0 ; 0x0 30010a64: 0a000001 beq 30010a70 _ISR_Enable( level ); 30010a68: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED 30010a6c: ea000009 b 30010a98 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30010a70: e5843018 str r3, [r4, #24] the_watchdog->routine = routine; 30010a74: e584602c str r6, [r4, #44] the_watchdog->id = id; 30010a78: e5847030 str r7, [r4, #48] the_watchdog->user_data = user_data; 30010a7c: 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; 30010a80: e5843038 str r3, [r4, #56] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 30010a84: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30010a88: e59f001c ldr r0, [pc, #28] ; 30010aac Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 30010a8c: e584a01c str sl, [r4, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 30010a90: e1a01005 mov r1, r5 30010a94: eb0011db bl 30015208 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); 30010a98: eb000c68 bl 30013c40 <_Thread_Enable_dispatch> 30010a9c: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010aa0: e28dd004 add sp, sp, #4 ; 0x4 30010aa4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 30010aa8: 3002f090 .word 0x3002f090 30010aac: 3002eec4 .word 0x3002eec4 30010c30 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 30010c30: e92d4030 push {r4, r5, lr} 30010c34: e24dd004 sub sp, sp, #4 ; 0x4 30010c38: e1a01000 mov r1, r0 30010c3c: e1a0200d mov r2, sp 30010c40: e59f00a4 ldr r0, [pc, #164] ; 30010cec 30010c44: eb0009d7 bl 300133a8 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010c48: e59d3000 ldr r3, [sp] 30010c4c: e1a04000 mov r4, r0 30010c50: e3530000 cmp r3, #0 ; 0x0 30010c54: 13a00004 movne r0, #4 ; 0x4 30010c58: 1a000021 bne 30010ce4 case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 30010c5c: e5943038 ldr r3, [r4, #56] 30010c60: e3530004 cmp r3, #4 ; 0x4 30010c64: 979ff103 ldrls pc, [pc, r3, lsl #2] 30010c68: ea00001b b 30010cdc <== NOT EXECUTED 30010c6c: 30010c80 .word 0x30010c80 <== NOT EXECUTED 30010c70: 30010c9c .word 0x30010c9c <== NOT EXECUTED 30010c74: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c78: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED 30010c7c: 30010cd0 .word 0x30010cd0 <== NOT EXECUTED case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 30010c80: e2844010 add r4, r4, #16 ; 0x10 30010c84: e1a00004 mov r0, r4 30010c88: eb0011ba bl 30015378 <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 30010c8c: e1a01004 mov r1, r4 30010c90: e59f0058 ldr r0, [pc, #88] ; 30010cf0 30010c94: eb00115b bl 30015208 <_Watchdog_Insert> 30010c98: ea00000f b 30010cdc break; case TIMER_INTERVAL_ON_TASK: if ( !_Timer_Server_schedule_operation ) { 30010c9c: e59f5050 ldr r5, [pc, #80] ; 30010cf4 30010ca0: e5953000 ldr r3, [r5] 30010ca4: e3530000 cmp r3, #0 ; 0x0 30010ca8: 1a000002 bne 30010cb8 _Thread_Enable_dispatch(); 30010cac: eb000be3 bl 30013c40 <_Thread_Enable_dispatch> <== NOT EXECUTED 30010cb0: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED 30010cb4: ea00000a b 30010ce4 <== NOT EXECUTED return RTEMS_INCORRECT_STATE; } _Watchdog_Remove( &the_timer->Ticker ); 30010cb8: e2840010 add r0, r4, #16 ; 0x10 30010cbc: eb0011ad bl 30015378 <_Watchdog_Remove> (*_Timer_Server_schedule_operation)( the_timer ); 30010cc0: e1a00004 mov r0, r4 30010cc4: e1a0e00f mov lr, pc 30010cc8: e595f000 ldr pc, [r5] 30010ccc: ea000002 b 30010cdc break; case TIMER_TIME_OF_DAY: case TIMER_TIME_OF_DAY_ON_TASK: case TIMER_DORMANT: _Thread_Enable_dispatch(); 30010cd0: eb000bda bl 30013c40 <_Thread_Enable_dispatch> 30010cd4: e3a0000b mov r0, #11 ; 0xb 30010cd8: ea000001 b 30010ce4 return RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 30010cdc: eb000bd7 bl 30013c40 <_Thread_Enable_dispatch> 30010ce0: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010ce4: e28dd004 add sp, sp, #4 ; 0x4 30010ce8: e8bd8030 pop {r4, r5, pc} 30010cec: 3002f090 .word 0x3002f090 30010cf0: 3002eec4 .word 0x3002eec4 30010cf4: 3002f0d0 .word 0x3002f0d0 30010cf8 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010cf8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30010cfc: e1a06000 mov r6, r0 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d00: e59f00c0 ldr r0, [pc, #192] ; 30010dc8 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d04: e24dd004 sub sp, sp, #4 ; 0x4 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d08: e5900000 ldr r0, [r0] Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d0c: e1a07001 mov r7, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d10: e3500000 cmp r0, #0 ; 0x0 Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 30010d14: e1a05002 mov r5, r2 30010d18: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 30010d1c: 0280000e addeq r0, r0, #14 ; 0xe 30010d20: 0a000026 beq 30010dc0 return RTEMS_INCORRECT_STATE; if ( !routine ) 30010d24: e3520000 cmp r2, #0 ; 0x0 30010d28: 03a00009 moveq r0, #9 ; 0x9 30010d2c: 0a000023 beq 30010dc0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 30010d30: e3510000 cmp r1, #0 ; 0x0 30010d34: 03a0000a moveq r0, #10 ; 0xa 30010d38: 0a000020 beq 30010dc0 30010d3c: e59f0088 ldr r0, [pc, #136] ; 30010dcc 30010d40: e1a01006 mov r1, r6 30010d44: e1a0200d mov r2, sp 30010d48: eb000996 bl 300133a8 <_Objects_Get> return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 30010d4c: e59d3000 ldr r3, [sp] 30010d50: e1a04000 mov r4, r0 30010d54: e3530000 cmp r3, #0 ; 0x0 30010d58: 13a00004 movne r0, #4 ; 0x4 30010d5c: 1a000017 bne 30010dc0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 30010d60: e2840010 add r0, r4, #16 ; 0x10 30010d64: eb001183 bl 30015378 <_Watchdog_Remove> _ISR_Disable( level ); 30010d68: e10f1000 mrs r1, CPSR 30010d6c: e38130c0 orr r3, r1, #192 ; 0xc0 30010d70: 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 ) { 30010d74: e5942018 ldr r2, [r4, #24] 30010d78: e3520000 cmp r2, #0 ; 0x0 30010d7c: 0a000001 beq 30010d88 _ISR_Enable( level ); 30010d80: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED 30010d84: ea00000b b 30010db8 <== 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; 30010d88: e3a03001 mov r3, #1 ; 0x1 30010d8c: e5843038 str r3, [r4, #56] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 30010d90: e5842018 str r2, [r4, #24] the_watchdog->routine = routine; 30010d94: e584502c str r5, [r4, #44] the_watchdog->id = id; 30010d98: e5846030 str r6, [r4, #48] the_watchdog->user_data = user_data; 30010d9c: e5848034 str r8, [r4, #52] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 30010da0: e584701c str r7, [r4, #28] _ISR_Enable( level ); 30010da4: 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 ); 30010da8: e59f3020 ldr r3, [pc, #32] ; 30010dd0 30010dac: e1a00004 mov r0, r4 30010db0: e1a0e00f mov lr, pc 30010db4: e593f000 ldr pc, [r3] _Thread_Enable_dispatch(); 30010db8: eb000ba0 bl 30013c40 <_Thread_Enable_dispatch> 30010dbc: e3a00000 mov r0, #0 ; 0x0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 30010dc0: e28dd004 add sp, sp, #4 ; 0x4 30010dc4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30010dc8: 3002f0d4 .word 0x3002f0d4 30010dcc: 3002f090 .word 0x3002f090 30010dd0: 3002f0d0 .word 0x3002f0d0