=============================================================================== a001064c : /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); a001064c: e59f3030 ldr r3, [pc, #48] ; a0010684 <== NOT EXECUTED #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { a0010650: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); a0010654: e593500c ldr r5, [r3, #12] <== NOT EXECUTED #include uint32_t TOD_MICROSECONDS_TO_TICKS( uint32_t microseconds ) { a0010658: e1a06000 mov r6, r0 <== NOT EXECUTED * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; a001065c: e1a01005 mov r1, r5 <== NOT EXECUTED a0010660: eb004c25 bl a00236fc <__aeabi_uidiv> <== NOT EXECUTED if ( (microseconds % microseconds_per_tick) != 0 ) a0010664: e1a01005 mov r1, r5 <== NOT EXECUTED * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ microseconds_per_tick = rtems_configuration_get_microseconds_per_tick(); ticks = microseconds / microseconds_per_tick; a0010668: e1a04000 mov r4, r0 <== NOT EXECUTED if ( (microseconds % microseconds_per_tick) != 0 ) a001066c: e1a00006 mov r0, r6 <== NOT EXECUTED a0010670: eb004c67 bl a0023814 <__umodsi3> <== NOT EXECUTED a0010674: e3500000 cmp r0, #0 <== NOT EXECUTED ticks += 1; a0010678: 12844001 addne r4, r4, #1 <== NOT EXECUTED return ticks; } a001067c: e1a00004 mov r0, r4 <== NOT EXECUTED a0010680: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a001bb20 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a001bb20: e590304c ldr r3, [r0, #76] ; 0x4c Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a001bb24: 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 ) { a001bb28: e1530002 cmp r3, r2 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { a001bb2c: e1a07000 mov r7, r0 a001bb30: e1a05002 mov r5, r2 a001bb34: e1a08001 mov r8, r1 a001bb38: 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 ) { a001bb3c: 3a000013 bcc a001bb90 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { a001bb40: e5906048 ldr r6, [r0, #72] ; 0x48 a001bb44: e3560000 cmp r6, #0 a001bb48: 0a000009 beq a001bb74 <_CORE_message_queue_Broadcast+0x54> *count = 0; a001bb4c: e3a00000 mov r0, #0 a001bb50: e58a0000 str r0, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a001bb54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a001bb58: e594002c ldr r0, [r4, #44] ; 0x2c a001bb5c: e1a01008 mov r1, r8 a001bb60: e1a02005 mov r2, r5 a001bb64: eb001ea8 bl a002360c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a001bb68: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a001bb6c: e2866001 add r6, r6, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a001bb70: e5835000 str r5, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a001bb74: e1a00007 mov r0, r7 a001bb78: eb000bbd bl a001ea74 <_Thread_queue_Dequeue> a001bb7c: e2504000 subs r4, r0, #0 a001bb80: 1afffff4 bne a001bb58 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; a001bb84: e58a6000 str r6, [sl] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a001bb88: e1a00004 mov r0, r4 a001bb8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; a001bb90: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a001bb94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a0013a78 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a0013a78: e92d40f0 push {r4, r5, r6, r7, lr} /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { a0013a7c: e3130003 tst r3, #3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a0013a80: e1a04000 mov r4, r0 size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a0013a84: e3a00000 mov r0, #0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a0013a88: e1a05002 mov r5, r2 a0013a8c: e1a07001 mov r7, r1 size_t message_buffering_required = 0; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; a0013a90: e5842044 str r2, [r4, #68] ; 0x44 the_message_queue->number_of_pending_messages = 0; a0013a94: e5840048 str r0, [r4, #72] ; 0x48 the_message_queue->maximum_message_size = maximum_message_size; a0013a98: e584304c str r3, [r4, #76] ; 0x4c /* * Check if allocated_message_size is aligned to uintptr-size boundary. * If not, it will increase allocated_message_size to multiplicity of pointer * size. */ if (allocated_message_size & (sizeof(uintptr_t) - 1)) { a0013a9c: 01a06003 moveq r6, r3 a0013aa0: 0a000004 beq a0013ab8 <_CORE_message_queue_Initialize+0x40> allocated_message_size += sizeof(uintptr_t); a0013aa4: e2836004 add r6, r3, #4 allocated_message_size &= ~(sizeof(uintptr_t) - 1); a0013aa8: e3c66003 bic r6, r6, #3 /* * Check for an overflow. It can occur while increasing allocated_message_size * to multiplicity of uintptr_t above. */ if (allocated_message_size < maximum_message_size) a0013aac: e1530006 cmp r3, r6 a0013ab0: 9a000000 bls a0013ab8 <_CORE_message_queue_Initialize+0x40> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } a0013ab4: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ if ( !size_t_mult32_with_overflow( a0013ab8: e2866010 add r6, r6, #16 size_t a, size_t b, size_t *c ) { long long x = (long long)a*b; a0013abc: e0810695 umull r0, r1, r5, r6 if ( x > SIZE_MAX ) a0013ac0: e3e02000 mvn r2, #0 a0013ac4: e3a03000 mov r3, #0 a0013ac8: e1520000 cmp r2, r0 a0013acc: e0d3c001 sbcs ip, r3, r1 a0013ad0: ba000018 blt a0013b38 <_CORE_message_queue_Initialize+0xc0> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a0013ad4: eb000bde bl a0016a54 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) a0013ad8: e3500000 cmp r0, #0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a0013adc: e1a01000 mov r1, r0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) a0013ae0: e584005c str r0, [r4, #92] ; 0x5c _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) a0013ae4: 0afffff2 beq a0013ab4 <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( a0013ae8: e2840060 add r0, r4, #96 ; 0x60 a0013aec: e1a02005 mov r2, r5 a0013af0: e1a03006 mov r3, r6 a0013af4: ebffffc6 bl a0013a14 <_Chain_Initialize> allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( a0013af8: e5971000 ldr r1, [r7] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a0013afc: e2843050 add r3, r4, #80 ; 0x50 a0013b00: e2842054 add r2, r4, #84 ; 0x54 head->next = tail; head->previous = NULL; tail->previous = head; a0013b04: e5843058 str r3, [r4, #88] ; 0x58 a0013b08: e2413001 sub r3, r1, #1 a0013b0c: e2731000 rsbs r1, r3, #0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a0013b10: e5842050 str r2, [r4, #80] ; 0x50 head->previous = NULL; a0013b14: e3a02000 mov r2, #0 a0013b18: e5842054 str r2, [r4, #84] ; 0x54 a0013b1c: e1a00004 mov r0, r4 a0013b20: e0a11003 adc r1, r1, r3 a0013b24: e3a02080 mov r2, #128 ; 0x80 a0013b28: e3a03006 mov r3, #6 a0013b2c: eb000997 bl a0016190 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; a0013b30: e3a00001 mov r0, #1 a0013b34: e8bd80f0 pop {r4, r5, r6, r7, pc} */ if ( !size_t_mult32_with_overflow( (size_t) maximum_pending_messages, allocated_message_size + sizeof(CORE_message_queue_Buffer_control), &message_buffering_required ) ) return false; a0013b38: e3a00000 mov r0, #0 <== NOT EXECUTED a0013b3c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a0013c20 <_CORE_message_queue_Submit>: ) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { a0013c20: e590304c ldr r3, [r0, #76] ; 0x4c #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { a0013c24: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { a0013c28: e1530002 cmp r3, r2 #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { a0013c2c: e1a04000 mov r4, r0 a0013c30: e1a05002 mov r5, r2 a0013c34: e1a0a001 mov sl, r1 a0013c38: e59d6020 ldr r6, [sp, #32] CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { a0013c3c: 3a00001d bcc a0013cb8 <_CORE_message_queue_Submit+0x98> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { a0013c40: e5907048 ldr r7, [r0, #72] ; 0x48 a0013c44: e3570000 cmp r7, #0 a0013c48: 0a00000e beq a0013c88 <_CORE_message_queue_Submit+0x68> 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 *) a0013c4c: e2840060 add r0, r4, #96 ; 0x60 a0013c50: ebffff62 bl a00139e0 <_Chain_Get> * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ the_message = _CORE_message_queue_Allocate_message_buffer( the_message_queue ); if ( the_message ) { a0013c54: e2507000 subs r7, r0, #0 a0013c58: 0a000018 beq a0013cc0 <_CORE_message_queue_Submit+0xa0> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0013c5c: e1a0100a mov r1, sl a0013c60: e1a02005 mov r2, r5 a0013c64: e287000c add r0, r7, #12 a0013c68: eb001c7b bl a001ae5c size ); the_message->Contents.size = size; _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( a0013c6c: e1a00004 mov r0, r4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; a0013c70: e5875008 str r5, [r7, #8] _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( a0013c74: e1a01007 mov r1, r7 a0013c78: e1a02006 mov r2, r6 a0013c7c: eb001287 bl a00186a0 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0013c80: e3a00000 mov r0, #0 a0013c84: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); a0013c88: eb000838 bl a0015d70 <_Thread_queue_Dequeue> if ( the_thread ) { a0013c8c: e2508000 subs r8, r0, #0 a0013c90: 0affffed beq a0013c4c <_CORE_message_queue_Submit+0x2c> a0013c94: e598002c ldr r0, [r8, #44] ; 0x2c a0013c98: e1a0100a mov r1, sl a0013c9c: e1a02005 mov r2, r5 a0013ca0: eb001c6d bl a001ae5c _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0013ca4: e5983028 ldr r3, [r8, #40] ; 0x28 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0013ca8: 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; a0013cac: e5835000 str r5, [r3] the_thread->Wait.count = (uint32_t) submit_type; a0013cb0: e5886024 str r6, [r8, #36] ; 0x24 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0013cb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; a0013cb8: e3a00001 mov r0, #1 <== NOT EXECUTED a0013cbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } #if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND) return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; a0013cc0: e3a00002 mov r0, #2 <== NOT EXECUTED _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } a0013cc4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000b29c <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { a000b29c: e92d40f0 push {r4, r5, r6, r7, lr} initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; a000b2a0: e3a05000 mov r5, #0 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { a000b2a4: e1a0c000 mov ip, r0 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { a000b2a8: e1520005 cmp r2, r5 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { a000b2ac: e1a06002 mov r6, r2 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; a000b2b0: e2804040 add r4, r0, #64 ; 0x40 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { a000b2b4: e1a07001 mov r7, r1 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; a000b2b8: e891000f ldm r1, {r0, r1, r2, r3} the_mutex->lock = initial_lock; a000b2bc: e58c6050 str r6, [ip, #80] ; 0x50 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; a000b2c0: e884000f stm r4, {r0, r1, r2, r3} the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; a000b2c4: e58c5058 str r5, [ip, #88] ; 0x58 #endif _Thread_Executing->resource_count++; } } else { the_mutex->nest_count = 0; a000b2c8: 158c5054 strne r5, [ip, #84] ; 0x54 the_mutex->holder = NULL; a000b2cc: 158c505c strne r5, [ip, #92] ; 0x5c the_mutex->holder_id = 0; a000b2d0: 158c5060 strne r5, [ip, #96] ; 0x60 the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { a000b2d4: 1a00000b bne a000b308 <_CORE_mutex_Initialize+0x6c> the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; a000b2d8: e59f3074 ldr r3, [pc, #116] ; a000b354 <_CORE_mutex_Initialize+0xb8> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; a000b2dc: e3a01001 mov r1, #1 */ RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; a000b2e0: e59c2048 ldr r2, [ip, #72] ; 0x48 the_mutex->holder = _Thread_Executing; a000b2e4: e5933008 ldr r3, [r3, #8] the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; a000b2e8: e58c1054 str r1, [ip, #84] ; 0x54 the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a000b2ec: e3520002 cmp r2, #2 the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; a000b2f0: e5931008 ldr r1, [r3, #8] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; a000b2f4: e58c305c str r3, [ip, #92] ; 0x5c the_mutex->holder_id = _Thread_Executing->Object.id; a000b2f8: e58c1060 str r1, [ip, #96] ; 0x60 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a000b2fc: 0a00000a beq a000b32c <_CORE_mutex_Initialize+0x90> a000b300: e3520003 cmp r2, #3 a000b304: 0a000008 beq a000b32c <_CORE_mutex_Initialize+0x90> the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( a000b308: e5971008 ldr r1, [r7, #8] a000b30c: e1a0000c mov r0, ip a000b310: e3a02b01 mov r2, #1024 ; 0x400 a000b314: e2911000 adds r1, r1, #0 a000b318: 13a01001 movne r1, #1 a000b31c: e3a03004 mov r3, #4 a000b320: eb00090e bl a000d760 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY, STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; a000b324: e3a00000 mov r0, #0 a000b328: e8bd80f0 pop {r4, r5, r6, r7, pc} the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( _Thread_Executing->current_priority < a000b32c: e5931014 ldr r1, [r3, #20] a000b330: e59c204c ldr r2, [ip, #76] ; 0x4c a000b334: e1510002 cmp r1, r2 a000b338: 2a000001 bcs a000b344 <_CORE_mutex_Initialize+0xa8> the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; a000b33c: e3a00005 mov r0, #5 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } a000b340: e8bd80f0 pop {r4, r5, r6, r7, pc} _Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = _Thread_Executing->current_priority; #endif _Thread_Executing->resource_count++; a000b344: e593201c ldr r2, [r3, #28] <== NOT EXECUTED a000b348: e2822001 add r2, r2, #1 <== NOT EXECUTED a000b34c: e583201c str r2, [r3, #28] <== NOT EXECUTED a000b350: eaffffec b a000b308 <_CORE_mutex_Initialize+0x6c> <== NOT EXECUTED =============================================================================== a000b4ac <_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 ) { a000b4ac: e5d03044 ldrb r3, [r0, #68] ; 0x44 #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { a000b4b0: e92d4030 push {r4, r5, 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 ) { a000b4b4: e3530000 cmp r3, #0 #else Objects_Id id __attribute__((unused)), CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused)) #endif ) { a000b4b8: e1a04000 mov r4, r0 Thread_Control *the_thread; Thread_Control *holder; holder = the_mutex->holder; a000b4bc: e590205c ldr r2, [r0, #92] ; 0x5c * 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 ) { a000b4c0: 0a000005 beq a000b4dc <_CORE_mutex_Surrender+0x30> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); a000b4c4: e59f3120 ldr r3, [pc, #288] ; a000b5ec <_CORE_mutex_Surrender+0x140> if ( !_Thread_Is_executing( holder ) ) a000b4c8: e5933008 ldr r3, [r3, #8] a000b4cc: e1520003 cmp r2, r3 a000b4d0: 0a000001 beq a000b4dc <_CORE_mutex_Surrender+0x30> return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; a000b4d4: e3a00002 mov r0, #2 a000b4d8: e8bd8030 pop {r4, r5, pc} } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) a000b4dc: e5940054 ldr r0, [r4, #84] ; 0x54 a000b4e0: e3500000 cmp r0, #0 a000b4e4: 0a000023 beq a000b578 <_CORE_mutex_Surrender+0xcc> return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; a000b4e8: e2400001 sub r0, r0, #1 if ( the_mutex->nest_count != 0 ) { a000b4ec: e3500000 cmp r0, #0 /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; a000b4f0: e5840054 str r0, [r4, #84] ; 0x54 if ( the_mutex->nest_count != 0 ) { a000b4f4: 1a00002d bne a000b5b0 <_CORE_mutex_Surrender+0x104> a000b4f8: e5943048 ldr r3, [r4, #72] ; 0x48 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a000b4fc: e3530002 cmp r3, #2 a000b500: 0a00001d beq a000b57c <_CORE_mutex_Surrender+0xd0> a000b504: e3530003 cmp r3, #3 a000b508: 0a00001b beq a000b57c <_CORE_mutex_Surrender+0xd0> if ( holder->resource_count == 0 && holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); } } the_mutex->holder = NULL; a000b50c: e3a05000 mov r5, #0 a000b510: e584505c str r5, [r4, #92] ; 0x5c the_mutex->holder_id = 0; a000b514: e5845060 str r5, [r4, #96] ; 0x60 /* * 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 ) ) ) { a000b518: e1a00004 mov r0, r4 a000b51c: eb000787 bl a000d340 <_Thread_queue_Dequeue> a000b520: e2503000 subs r3, r0, #0 a000b524: 0a00002c beq a000b5dc <_CORE_mutex_Surrender+0x130> } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; a000b528: e5931008 ldr r1, [r3, #8] the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { a000b52c: e5942048 ldr r2, [r4, #72] ; 0x48 } else #endif { the_mutex->holder = the_thread; a000b530: e584305c str r3, [r4, #92] ; 0x5c the_mutex->holder_id = the_thread->Object.id; a000b534: e5841060 str r1, [r4, #96] ; 0x60 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { a000b538: e3520002 cmp r2, #2 #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; a000b53c: e3a01001 mov r1, #1 a000b540: e5841054 str r1, [r4, #84] ; 0x54 switch ( the_mutex->Attributes.discipline ) { a000b544: 0a00001b beq a000b5b8 <_CORE_mutex_Surrender+0x10c> a000b548: e3520003 cmp r2, #3 <== NOT EXECUTED a000b54c: 0a000001 beq a000b558 <_CORE_mutex_Surrender+0xac> <== NOT EXECUTED } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; a000b550: e1a00005 mov r0, r5 <== NOT EXECUTED a000b554: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; a000b558: e593c01c ldr ip, [r3, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < a000b55c: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED a000b560: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; a000b564: e28cc001 add ip, ip, #1 <== NOT EXECUTED a000b568: e583c01c str ip, [r3, #28] <== NOT EXECUTED if (the_mutex->Attributes.priority_ceiling < a000b56c: e1510002 cmp r1, r2 <== NOT EXECUTED } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; a000b570: 21a00005 movcs r0, r5 <== NOT EXECUTED the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < a000b574: 3a000014 bcc a000b5cc <_CORE_mutex_Surrender+0x120> <== NOT EXECUTED } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } a000b578: e8bd8030 pop {r4, r5, pc} _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; a000b57c: e592301c ldr r3, [r2, #28] a000b580: e2433001 sub r3, r3, #1 /* * 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 ( holder->resource_count == 0 && a000b584: e3530000 cmp r3, #0 _CORE_mutex_Pop_priority( the_mutex, holder ); if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL ) return pop_status; holder->resource_count--; a000b588: e582301c str r3, [r2, #28] /* * 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 ( holder->resource_count == 0 && a000b58c: 1affffde bne a000b50c <_CORE_mutex_Surrender+0x60> holder->real_priority != holder->current_priority ) { a000b590: e5921018 ldr r1, [r2, #24] /* * 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 ( holder->resource_count == 0 && a000b594: e5923014 ldr r3, [r2, #20] a000b598: e1510003 cmp r1, r3 a000b59c: 0affffda beq a000b50c <_CORE_mutex_Surrender+0x60> holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, true ); a000b5a0: e1a00002 mov r0, r2 a000b5a4: e3a02001 mov r2, #1 a000b5a8: eb000564 bl a000cb40 <_Thread_Change_priority> a000b5ac: eaffffd6 b a000b50c <_CORE_mutex_Surrender+0x60> /* Currently no API exercises this behavior. */ break; } #else /* must be CORE_MUTEX_NESTING_ACQUIRES or we wouldn't be here */ return CORE_MUTEX_STATUS_SUCCESSFUL; a000b5b0: e3a00000 mov r0, #0 a000b5b4: e8bd8030 pop {r4, r5, pc} case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; a000b5b8: e593201c ldr r2, [r3, #28] } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; a000b5bc: e1a00005 mov r0, r5 case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; a000b5c0: e2822001 add r2, r2, #1 a000b5c4: e583201c str r2, [r3, #28] break; a000b5c8: e8bd8030 pop {r4, r5, pc} case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: _CORE_mutex_Push_priority( the_mutex, the_thread ); the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < the_thread->current_priority){ _Thread_Change_priority( a000b5cc: e1a02005 mov r2, r5 <== NOT EXECUTED a000b5d0: eb00055a bl a000cb40 <_Thread_Change_priority> <== NOT EXECUTED } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; a000b5d4: e1a00005 mov r0, r5 <== NOT EXECUTED a000b5d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; a000b5dc: e3a02001 mov r2, #1 a000b5e0: e5842050 str r2, [r4, #80] ; 0x50 return CORE_MUTEX_STATUS_SUCCESSFUL; a000b5e4: e1a00003 mov r0, r3 a000b5e8: e8bd8030 pop {r4, r5, pc} =============================================================================== a000ba5c <_Chain_Get_with_empty_check>: bool _Chain_Get_with_empty_check( Chain_Control *chain, Chain_Node **node ) { a000ba5c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000ba60: e10f4000 mrs r4, CPSR <== NOT EXECUTED a000ba64: e3843080 orr r3, r4, #128 ; 0x80 <== NOT EXECUTED a000ba68: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED ) { bool is_empty_now = true; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_first = head->next; a000ba6c: e5903000 ldr r3, [r0] <== NOT EXECUTED Chain_Node **the_node ) { bool is_empty_now = true; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a000ba70: e280c004 add ip, r0, #4 <== NOT EXECUTED Chain_Node *old_first = head->next; if ( old_first != tail ) { a000ba74: e15c0003 cmp ip, r3 <== NOT EXECUTED *the_node = old_first; is_empty_now = new_first == tail; } else *the_node = NULL; a000ba78: 03a03000 moveq r3, #0 <== NOT EXECUTED a000ba7c: 05813000 streq r3, [r1] <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Get_with_empty_check_unprotected( Chain_Control *the_chain, Chain_Node **the_node ) { bool is_empty_now = true; a000ba80: 03a00001 moveq r0, #1 <== NOT EXECUTED Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_first = head->next; if ( old_first != tail ) { a000ba84: 0a000006 beq a000baa4 <_Chain_Get_with_empty_check+0x48> <== NOT EXECUTED Chain_Node *new_first = old_first->next; a000ba88: e5932000 ldr r2, [r3] <== NOT EXECUTED head->next = new_first; a000ba8c: e5802000 str r2, [r0] <== NOT EXECUTED new_first->previous = head; a000ba90: e5820004 str r0, [r2, #4] <== NOT EXECUTED *the_node = old_first; is_empty_now = new_first == tail; a000ba94: e062200c rsb r2, r2, ip <== NOT EXECUTED a000ba98: e2720000 rsbs r0, r2, #0 <== NOT EXECUTED a000ba9c: e0a00002 adc r0, r0, r2 <== NOT EXECUTED Chain_Node *new_first = old_first->next; head->next = new_first; new_first->previous = head; *the_node = old_first; a000baa0: e5813000 str r3, [r1] <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000baa4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED _ISR_Disable( level ); is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node ); _ISR_Enable( level ); return is_empty_now; } a000baa8: e8bd0010 pop {r4} <== NOT EXECUTED a000baac: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000a1ec <_Event_Seize>: Thread_Control *executing, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { a000a1ec: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000a1f0: e59d401c ldr r4, [sp, #28] rtems_event_set seized_events; rtems_event_set pending_events; ISR_Level level; Thread_blocking_operation_States current_sync_state; executing->Wait.return_code = RTEMS_SUCCESSFUL; a000a1f4: e3a06000 mov r6, #0 Thread_Control *executing, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { a000a1f8: e59dc020 ldr ip, [sp, #32] a000a1fc: e59d5024 ldr r5, [sp, #36] ; 0x24 a000a200: e59d7028 ldr r7, [sp, #40] ; 0x28 rtems_event_set seized_events; rtems_event_set pending_events; ISR_Level level; Thread_blocking_operation_States current_sync_state; executing->Wait.return_code = RTEMS_SUCCESSFUL; a000a204: e5846034 str r6, [r4, #52] ; 0x34 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000a208: e10fa000 mrs sl, CPSR a000a20c: e38a6080 orr r6, sl, #128 ; 0x80 a000a210: e129f006 msr CPSR_fc, r6 _ISR_Disable( level ); pending_events = event->pending_events; a000a214: e59c6000 ldr r6, [ip] seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && a000a218: e0108006 ands r8, r0, r6 a000a21c: 0a000003 beq a000a230 <_Event_Seize+0x44> a000a220: e1500008 cmp r0, r8 a000a224: 0a00001e beq a000a2a4 <_Event_Seize+0xb8> (seized_events == event_in || _Options_Is_any( option_set )) ) { a000a228: e3110002 tst r1, #2 <== NOT EXECUTED a000a22c: 1a00001c bne a000a2a4 <_Event_Seize+0xb8> <== NOT EXECUTED _ISR_Enable( level ); *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { a000a230: e3110001 tst r1, #1 a000a234: 1a000015 bne a000a290 <_Event_Seize+0xa4> * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = option_set; executing->Wait.count = event_in; executing->Wait.return_argument = event_out; a000a238: e5843028 str r3, [r4, #40] ; 0x28 *sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000a23c: e3a03001 mov r3, #1 * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = option_set; a000a240: e5841030 str r1, [r4, #48] ; 0x30 executing->Wait.count = event_in; a000a244: e5840024 str r0, [r4, #36] ; 0x24 executing->Wait.return_argument = event_out; *sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000a248: e5853000 str r3, [r5] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000a24c: e129f00a msr CPSR_fc, sl _ISR_Enable( level ); if ( ticks ) { a000a250: e3520000 cmp r2, #0 a000a254: 1a000019 bne a000a2c0 <_Event_Seize+0xd4> sync_state ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, wait_state ); a000a258: e1a00004 mov r0, r4 a000a25c: e1a01007 mov r1, r7 a000a260: eb000d8b bl a000d894 <_Thread_Set_state> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000a264: e10f2000 mrs r2, CPSR a000a268: e3823080 orr r3, r2, #128 ; 0x80 a000a26c: e129f003 msr CPSR_fc, r3 _ISR_Disable( level ); current_sync_state = *sync_state; a000a270: e5950000 ldr r0, [r5] *sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a000a274: e3a03000 mov r3, #0 a000a278: e5853000 str r3, [r5] if ( current_sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) { a000a27c: e3500001 cmp r0, #1 a000a280: 0a00000c beq a000a2b8 <_Event_Seize+0xcc> * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Entering with interrupts disabled and returning with interrupts * enabled! */ _Thread_blocking_operation_Cancel( current_sync_state, executing, level ); a000a284: e1a01004 mov r1, r4 <== NOT EXECUTED } a000a288: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Entering with interrupts disabled and returning with interrupts * enabled! */ _Thread_blocking_operation_Cancel( current_sync_state, executing, level ); a000a28c: ea000a15 b a000cae8 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000a290: e129f00a msr CPSR_fc, sl return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); executing->Wait.return_code = RTEMS_UNSATISFIED; a000a294: e3a0200d mov r2, #13 a000a298: e5842034 str r2, [r4, #52] ; 0x34 *event_out = seized_events; a000a29c: e5838000 str r8, [r3] return; a000a2a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); a000a2a4: e1c66008 bic r6, r6, r8 pending_events = event->pending_events; seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && (seized_events == event_in || _Options_Is_any( option_set )) ) { event->pending_events = a000a2a8: e58c6000 str r6, [ip] a000a2ac: e129f00a msr CPSR_fc, sl _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); *event_out = seized_events; a000a2b0: e5838000 str r8, [r3] return; a000a2b4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a000a2b8: e129f002 msr CPSR_fc, r2 a000a2bc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000a2c0: e3a01000 mov r1, #0 *sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; _ISR_Enable( level ); if ( ticks ) { _Watchdog_Initialize( a000a2c4: e5943008 ldr r3, [r4, #8] a000a2c8: e5841050 str r1, [r4, #80] ; 0x50 the_watchdog->routine = routine; a000a2cc: e59f101c ldr r1, [pc, #28] ; a000a2f0 <_Event_Seize+0x104> the_watchdog->id = id; a000a2d0: e5843068 str r3, [r4, #104] ; 0x68 the_watchdog->user_data = user_data; a000a2d4: e584506c str r5, [r4, #108] ; 0x6c Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a000a2d8: e5841064 str r1, [r4, #100] ; 0x64 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a000a2dc: e5842054 str r2, [r4, #84] ; 0x54 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a000a2e0: e59f000c ldr r0, [pc, #12] ; a000a2f4 <_Event_Seize+0x108> a000a2e4: e2841048 add r1, r4, #72 ; 0x48 a000a2e8: eb000e43 bl a000dbfc <_Watchdog_Insert> a000a2ec: eaffffd9 b a000a258 <_Event_Seize+0x6c> =============================================================================== a000a34c <_Event_Surrender>: rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { a000a34c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_event_set pending_events; rtems_event_set event_condition; rtems_event_set seized_events; rtems_option option_set; option_set = the_thread->Wait.option; a000a350: e590c030 ldr ip, [r0, #48] ; 0x30 rtems_event_set event_in, Event_Control *event, Thread_blocking_operation_States *sync_state, States_Control wait_state ) { a000a354: e1a04000 mov r4, r0 a000a358: e59d001c ldr r0, [sp, #28] uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000a35c: e10f6000 mrs r6, CPSR a000a360: e3865080 orr r5, r6, #128 ; 0x80 a000a364: e129f005 msr CPSR_fc, r5 RTEMS_INLINE_ROUTINE void _Event_sets_Post( rtems_event_set the_new_events, rtems_event_set *the_event_set ) { *the_event_set |= the_new_events; a000a368: e5925000 ldr r5, [r2] a000a36c: e1811005 orr r1, r1, r5 a000a370: e5821000 str r1, [r2] option_set = the_thread->Wait.option; _ISR_Disable( level ); _Event_sets_Post( event_in, &event->pending_events ); pending_events = event->pending_events; event_condition = the_thread->Wait.count; a000a374: e5945024 ldr r5, [r4, #36] ; 0x24 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { a000a378: e0117005 ands r7, r1, r5 a000a37c: 0a00002e beq a000a43c <_Event_Surrender+0xf0> /* * 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() && a000a380: e59f80e0 ldr r8, [pc, #224] ; a000a468 <_Event_Surrender+0x11c> a000a384: e598a000 ldr sl, [r8] a000a388: e35a0000 cmp sl, #0 a000a38c: 0a000002 beq a000a39c <_Event_Surrender+0x50> a000a390: e5988008 ldr r8, [r8, #8] <== NOT EXECUTED a000a394: e1540008 cmp r4, r8 <== NOT EXECUTED a000a398: 0a000017 beq a000a3fc <_Event_Surrender+0xb0> <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); a000a39c: e5943010 ldr r3, [r4, #16] } /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { a000a3a0: e1100003 tst r0, r3 a000a3a4: 0a000024 beq a000a43c <_Event_Surrender+0xf0> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { a000a3a8: e1550007 cmp r5, r7 a000a3ac: 0a000001 beq a000a3b8 <_Event_Surrender+0x6c> a000a3b0: e31c0002 tst ip, #2 <== NOT EXECUTED a000a3b4: 0a000020 beq a000a43c <_Event_Surrender+0xf0> <== NOT EXECUTED event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a000a3b8: e5943028 ldr r3, [r4, #40] ; 0x28 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); a000a3bc: e1c11007 bic r1, r1, r7 /* * Otherwise, this is a normal send to another thread */ if ( _States_Are_set( the_thread->current_state, wait_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { event->pending_events = _Event_sets_Clear( a000a3c0: e5821000 str r1, [r2] pending_events, seized_events ); the_thread->Wait.count = 0; a000a3c4: e3a02000 mov r2, #0 a000a3c8: e5842024 str r2, [r4, #36] ; 0x24 *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a000a3cc: e5837000 str r7, [r3] static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000a3d0: e10f3000 mrs r3, CPSR a000a3d4: e129f006 msr CPSR_fc, r6 a000a3d8: e129f003 msr CPSR_fc, r3 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a000a3dc: e5943050 ldr r3, [r4, #80] ; 0x50 a000a3e0: e3530002 cmp r3, #2 a000a3e4: 0a000016 beq a000a444 <_Event_Surrender+0xf8> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000a3e8: e129f006 msr CPSR_fc, r6 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a000a3ec: e59f1078 ldr r1, [pc, #120] ; a000a46c <_Event_Surrender+0x120> a000a3f0: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } a000a3f4: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} a000a3f8: ea000a0d b a000cc34 <_Thread_Clear_state> * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || a000a3fc: e5938000 ldr r8, [r3] <== NOT EXECUTED a000a400: e2488001 sub r8, r8, #1 <== NOT EXECUTED /* * 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() && _Thread_Is_executing( the_thread ) && a000a404: e3580001 cmp r8, #1 <== NOT EXECUTED a000a408: 8affffe3 bhi a000a39c <_Event_Surrender+0x50> <== NOT EXECUTED ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { a000a40c: e1550007 cmp r5, r7 <== NOT EXECUTED a000a410: 0a000001 beq a000a41c <_Event_Surrender+0xd0> <== NOT EXECUTED a000a414: e31c0002 tst ip, #2 <== NOT EXECUTED a000a418: 0a000007 beq a000a43c <_Event_Surrender+0xf0> <== NOT EXECUTED event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a000a41c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a000a420: e1c11007 bic r1, r1, r7 <== NOT EXECUTED if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { event->pending_events = _Event_sets_Clear( a000a424: e5821000 str r1, [r2] <== NOT EXECUTED pending_events, seized_events ); the_thread->Wait.count = 0; a000a428: e3a02000 mov r2, #0 <== NOT EXECUTED a000a42c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; a000a430: e3a02003 mov r2, #3 <== NOT EXECUTED event->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; a000a434: e5807000 str r7, [r0] <== NOT EXECUTED *sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; a000a438: e5832000 str r2, [r3] <== NOT EXECUTED a000a43c: e129f006 msr CPSR_fc, r6 a000a440: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; a000a444: e3a03003 mov r3, #3 a000a448: e5843050 str r3, [r4, #80] ; 0x50 a000a44c: e129f006 msr CPSR_fc, r6 _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a000a450: e2840048 add r0, r4, #72 ; 0x48 a000a454: eb000e55 bl a000ddb0 <_Watchdog_Remove> a000a458: e59f100c ldr r1, [pc, #12] ; a000a46c <_Event_Surrender+0x120> a000a45c: e1a00004 mov r0, r4 } return; } } _ISR_Enable( level ); } a000a460: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} a000a464: ea0009f2 b a000cc34 <_Thread_Clear_state> =============================================================================== a000a470 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *arg ) { a000a470: e92d4010 push {r4, lr} <== NOT EXECUTED a000a474: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a000a478: e1a04001 mov r4, r1 <== NOT EXECUTED ISR_Level level; Thread_blocking_operation_States *sync_state; sync_state = arg; the_thread = _Thread_Get( id, &location ); a000a47c: e1a0100d mov r1, sp <== NOT EXECUTED a000a480: eb000ae9 bl a000d02c <_Thread_Get> <== NOT EXECUTED switch ( location ) { a000a484: e59d3000 ldr r3, [sp] <== NOT EXECUTED a000a488: e3530000 cmp r3, #0 <== NOT EXECUTED a000a48c: 1a000010 bne a000a4d4 <_Event_Timeout+0x64> <== NOT EXECUTED uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000a490: e10f2000 mrs r2, CPSR <== NOT EXECUTED a000a494: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED a000a498: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; a000a49c: e5803024 str r3, [r0, #36] ; 0x24 <== NOT EXECUTED if ( _Thread_Is_executing( the_thread ) ) { a000a4a0: e59f3048 ldr r3, [pc, #72] ; a000a4f0 <_Event_Timeout+0x80><== NOT EXECUTED a000a4a4: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a000a4a8: e1500003 cmp r0, r3 <== NOT EXECUTED a000a4ac: 0a00000a beq a000a4dc <_Event_Timeout+0x6c> <== NOT EXECUTED if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; a000a4b0: e3a03006 mov r3, #6 <== NOT EXECUTED a000a4b4: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000a4b8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED a000a4bc: e59f1030 ldr r1, [pc, #48] ; a000a4f4 <_Event_Timeout+0x84><== NOT EXECUTED a000a4c0: eb0009db bl a000cc34 <_Thread_Clear_state> <== NOT EXECUTED * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000a4c4: e59f302c ldr r3, [pc, #44] ; a000a4f8 <_Event_Timeout+0x88><== NOT EXECUTED a000a4c8: e5932000 ldr r2, [r3] <== NOT EXECUTED --level; a000a4cc: e2422001 sub r2, r2, #1 <== NOT EXECUTED _Thread_Dispatch_disable_level = level; a000a4d0: e5832000 str r2, [r3] <== NOT EXECUTED case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } a000a4d4: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000a4d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) a000a4dc: e5943000 ldr r3, [r4] <== NOT EXECUTED a000a4e0: e3530001 cmp r3, #1 <== NOT EXECUTED *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a000a4e4: 03a03002 moveq r3, #2 <== NOT EXECUTED a000a4e8: 05843000 streq r3, [r4] <== NOT EXECUTED a000a4ec: eaffffef b a000a4b0 <_Event_Timeout+0x40> <== NOT EXECUTED =============================================================================== a000fc80 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000fc80: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000fc84: e1a08002 mov r8, r2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000fc88: e5902010 ldr r2, [r0, #16] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000fc8c: e24dd01c sub sp, sp, #28 a000fc90: e1a06001 mov r6, r1 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000fc94: e2911004 adds r1, r1, #4 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000fc98: e1a07000 mov r7, r0 Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000fc9c: e58d1000 str r1, [sp] Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { a000fca0: e1a0b003 mov fp, r3 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; a000fca4: e58d200c str r2, [sp, #12] Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { a000fca8: 2a000086 bcs a000fec8 <_Heap_Allocate_aligned_with_boundary+0x248> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { a000fcac: e3530000 cmp r3, #0 a000fcb0: 1a000078 bne a000fe98 <_Heap_Allocate_aligned_with_boundary+0x218> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a000fcb4: e597a008 ldr sl, [r7, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000fcb8: e3a05000 mov r5, #0 a000fcbc: e157000a cmp r7, sl a000fcc0: 0a00007b beq a000feb4 <_Heap_Allocate_aligned_with_boundary+0x234> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000fcc4: e59d300c ldr r3, [sp, #12] + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; a000fcc8: e2662004 rsb r2, r6, #4 a000fccc: e58d2014 str r2, [sp, #20] uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000fcd0: e2833007 add r3, r3, #7 a000fcd4: e58d3010 str r3, [sp, #16] a000fcd8: ea000005 b a000fcf4 <_Heap_Allocate_aligned_with_boundary+0x74> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { a000fcdc: e3540000 cmp r4, #0 ); } } /* Statistics */ ++search_count; a000fce0: e2855001 add r5, r5, #1 if ( alloc_begin != 0 ) { a000fce4: 1a00005a bne a000fe54 <_Heap_Allocate_aligned_with_boundary+0x1d4> break; } block = block->next; a000fce8: e59aa008 ldr sl, [sl, #8] do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000fcec: e157000a cmp r7, sl a000fcf0: 0a00006f beq a000feb4 <_Heap_Allocate_aligned_with_boundary+0x234> /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { a000fcf4: e59a9004 ldr r9, [sl, #4] a000fcf8: e59d3000 ldr r3, [sp] a000fcfc: e1530009 cmp r3, r9 ); } } /* Statistics */ ++search_count; a000fd00: 22855001 addcs r5, r5, #1 /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { a000fd04: 2afffff7 bcs a000fce8 <_Heap_Allocate_aligned_with_boundary+0x68> if ( alignment == 0 ) { a000fd08: e3580000 cmp r8, #0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a000fd0c: 028a4008 addeq r4, sl, #8 a000fd10: 0afffff1 beq a000fcdc <_Heap_Allocate_aligned_with_boundary+0x5c> uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000fd14: e59d3014 ldr r3, [sp, #20] uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000fd18: e5972014 ldr r2, [r7, #20] uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a000fd1c: e59d1010 ldr r1, [sp, #16] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000fd20: e3c99001 bic r9, r9, #1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; a000fd24: e08a9009 add r9, sl, r9 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; a000fd28: e0834009 add r4, r3, r9 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000fd2c: e1a00004 mov r0, r4 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; a000fd30: e0623001 rsb r3, r2, r1 a000fd34: e1a01008 mov r1, r8 uintptr_t alignment, uintptr_t boundary ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000fd38: e58d2004 str r2, [sp, #4] uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size a000fd3c: e0839009 add r9, r3, r9 a000fd40: eb002b71 bl a001ab0c <__umodsi3> a000fd44: e0604004 rsb r4, r0, r4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a000fd48: e28a2008 add r2, sl, #8 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { a000fd4c: e1590004 cmp r9, r4 a000fd50: e58d2008 str r2, [sp, #8] a000fd54: 2a000003 bcs a000fd68 <_Heap_Allocate_aligned_with_boundary+0xe8> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000fd58: e1a00009 mov r0, r9 a000fd5c: e1a01008 mov r1, r8 a000fd60: eb002b69 bl a001ab0c <__umodsi3> a000fd64: e0604009 rsb r4, r0, r9 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { a000fd68: e35b0000 cmp fp, #0 a000fd6c: 0a000025 beq a000fe08 <_Heap_Allocate_aligned_with_boundary+0x188> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; a000fd70: e0849006 add r9, r4, r6 <== NOT EXECUTED a000fd74: e1a00009 mov r0, r9 <== NOT EXECUTED a000fd78: e1a0100b mov r1, fp <== NOT EXECUTED a000fd7c: eb002b62 bl a001ab0c <__umodsi3> <== NOT EXECUTED a000fd80: e0600009 rsb r0, r0, r9 <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { a000fd84: e1540000 cmp r4, r0 <== NOT EXECUTED a000fd88: 23a03000 movcs r3, #0 <== NOT EXECUTED a000fd8c: 33a03001 movcc r3, #1 <== NOT EXECUTED a000fd90: e1590000 cmp r9, r0 <== NOT EXECUTED a000fd94: 93a03000 movls r3, #0 <== NOT EXECUTED a000fd98: e3530000 cmp r3, #0 <== NOT EXECUTED a000fd9c: 0a000019 beq a000fe08 <_Heap_Allocate_aligned_with_boundary+0x188><== NOT EXECUTED alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; a000fda0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED a000fda4: e0839006 add r9, r3, r6 <== NOT EXECUTED uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { a000fda8: e1590000 cmp r9, r0 <== NOT EXECUTED a000fdac: 958da018 strls sl, [sp, #24] <== NOT EXECUTED a000fdb0: 9a000002 bls a000fdc0 <_Heap_Allocate_aligned_with_boundary+0x140><== NOT EXECUTED a000fdb4: ea00003c b a000feac <_Heap_Allocate_aligned_with_boundary+0x22c><== NOT EXECUTED a000fdb8: e1590000 cmp r9, r0 <== NOT EXECUTED a000fdbc: 8a00003e bhi a000febc <_Heap_Allocate_aligned_with_boundary+0x23c><== NOT EXECUTED return 0; } alloc_begin = boundary_line - alloc_size; a000fdc0: e0664000 rsb r4, r6, r0 <== NOT EXECUTED a000fdc4: e1a01008 mov r1, r8 <== NOT EXECUTED a000fdc8: e1a00004 mov r0, r4 <== NOT EXECUTED a000fdcc: eb002b4e bl a001ab0c <__umodsi3> <== NOT EXECUTED a000fdd0: e0604004 rsb r4, r0, r4 <== NOT EXECUTED alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; a000fdd4: e084a006 add sl, r4, r6 <== NOT EXECUTED a000fdd8: e1a0000a mov r0, sl <== NOT EXECUTED a000fddc: e1a0100b mov r1, fp <== NOT EXECUTED a000fde0: eb002b49 bl a001ab0c <__umodsi3> <== NOT EXECUTED a000fde4: e060000a rsb r0, r0, sl <== NOT EXECUTED /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { a000fde8: e15a0000 cmp sl, r0 <== NOT EXECUTED a000fdec: 93a0a000 movls sl, #0 <== NOT EXECUTED a000fdf0: 83a0a001 movhi sl, #1 <== NOT EXECUTED a000fdf4: e1540000 cmp r4, r0 <== NOT EXECUTED a000fdf8: 23a0a000 movcs sl, #0 <== NOT EXECUTED a000fdfc: e35a0000 cmp sl, #0 <== NOT EXECUTED a000fe00: 1affffec bne a000fdb8 <_Heap_Allocate_aligned_with_boundary+0x138><== NOT EXECUTED a000fe04: e59da018 ldr sl, [sp, #24] <== NOT EXECUTED boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { a000fe08: e59d2008 ldr r2, [sp, #8] a000fe0c: e1520004 cmp r2, r4 a000fe10: 8a000025 bhi a000feac <_Heap_Allocate_aligned_with_boundary+0x22c> a000fe14: e1a00004 mov r0, r4 a000fe18: e59d100c ldr r1, [sp, #12] a000fe1c: eb002b3a bl a001ab0c <__umodsi3> a000fe20: e3e09007 mvn r9, #7 a000fe24: e06a9009 rsb r9, sl, r9 if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; a000fe28: e59d2004 ldr r2, [sp, #4] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000fe2c: e0899004 add r9, r9, r4 if ( alloc_begin >= alloc_begin_floor ) { uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; if ( free_size >= min_block_size || free_size == 0 ) { a000fe30: e0603009 rsb r3, r0, r9 return alloc_begin; } } return 0; a000fe34: e1590000 cmp r9, r0 a000fe38: 11520003 cmpne r2, r3 a000fe3c: 83a03000 movhi r3, #0 a000fe40: 93a03001 movls r3, #1 a000fe44: 81a04003 movhi r4, r3 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { a000fe48: e3540000 cmp r4, #0 ); } } /* Statistics */ ++search_count; a000fe4c: e2855001 add r5, r5, #1 if ( alloc_begin != 0 ) { a000fe50: 0affffa4 beq a000fce8 <_Heap_Allocate_aligned_with_boundary+0x68> search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000fe54: e5972048 ldr r2, [r7, #72] ; 0x48 stats->searches += search_count; a000fe58: e597304c ldr r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000fe5c: e1a00007 mov r0, r7 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000fe60: e2822001 add r2, r2, #1 stats->searches += search_count; a000fe64: e0833005 add r3, r3, r5 search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; a000fe68: e5872048 str r2, [r7, #72] ; 0x48 stats->searches += search_count; a000fe6c: e587304c str r3, [r7, #76] ; 0x4c block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); a000fe70: e1a0100a mov r1, sl a000fe74: e1a02004 mov r2, r4 a000fe78: e1a03006 mov r3, r6 a000fe7c: ebffeef7 bl a000ba60 <_Heap_Block_allocate> boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { a000fe80: e5973044 ldr r3, [r7, #68] ; 0x44 stats->max_search = search_count; } return (void *) alloc_begin; a000fe84: e1a00004 mov r0, r4 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { a000fe88: e1530005 cmp r3, r5 stats->max_search = search_count; a000fe8c: 35875044 strcc r5, [r7, #68] ; 0x44 } return (void *) alloc_begin; } a000fe90: e28dd01c add sp, sp, #28 a000fe94: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { a000fe98: e1560003 cmp r6, r3 <== NOT EXECUTED a000fe9c: 8a000009 bhi a000fec8 <_Heap_Allocate_aligned_with_boundary+0x248><== NOT EXECUTED return NULL; } if ( alignment == 0 ) { alignment = page_size; a000fea0: e3580000 cmp r8, #0 <== NOT EXECUTED a000fea4: 01a08002 moveq r8, r2 <== NOT EXECUTED a000fea8: eaffff81 b a000fcb4 <_Heap_Allocate_aligned_with_boundary+0x34><== NOT EXECUTED if ( free_size >= min_block_size || free_size == 0 ) { return alloc_begin; } } return 0; a000feac: e3a04000 mov r4, #0 a000feb0: eaffff89 b a000fcdc <_Heap_Allocate_aligned_with_boundary+0x5c> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { a000feb4: e3a04000 mov r4, #0 a000feb8: eafffff0 b a000fe80 <_Heap_Allocate_aligned_with_boundary+0x200> a000febc: e59da018 ldr sl, [sp, #24] <== NOT EXECUTED uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { return 0; a000fec0: e3a04000 mov r4, #0 <== NOT EXECUTED a000fec4: eaffff84 b a000fcdc <_Heap_Allocate_aligned_with_boundary+0x5c><== NOT EXECUTED return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; a000fec8: e3a00000 mov r0, #0 a000fecc: eaffffef b a000fe90 <_Heap_Allocate_aligned_with_boundary+0x210> =============================================================================== a000ba60 <_Heap_Block_allocate>: Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { a000ba60: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ba64: e5917004 ldr r7, [r1, #4] a000ba68: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; a000ba6c: e2426008 sub r6, r2, #8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ba70: e3c71001 bic r1, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000ba74: e0858001 add r8, r5, r1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ba78: e598c004 ldr ip, [r8, #4] a000ba7c: e1a0a003 mov sl, r3 a000ba80: e1a04000 mov r4, r0 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { a000ba84: e31c0001 tst ip, #1 ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; a000ba88: e0653006 rsb r3, r5, r6 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); a000ba8c: 11a09000 movne r9, r0 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { a000ba90: 1a00000c bne a000bac8 <_Heap_Block_allocate+0x68> free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; a000ba94: e590e038 ldr lr, [r0, #56] ; 0x38 ++stats->used_blocks; a000ba98: e590c040 ldr ip, [r0, #64] ; 0x40 stats->free_size -= _Heap_Block_size( block ); a000ba9c: e590b030 ldr fp, [r0, #48] ; 0x30 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; a000baa0: e595900c ldr r9, [r5, #12] return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; a000baa4: e5950008 ldr r0, [r5, #8] _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; a000baa8: e24ee001 sub lr, lr, #1 ++stats->used_blocks; a000baac: e28cc001 add ip, ip, #1 stats->free_size -= _Heap_Block_size( block ); a000bab0: e061100b rsb r1, r1, fp Heap_Block *prev = block->prev; prev->next = next; a000bab4: e5890008 str r0, [r9, #8] next->prev = prev; a000bab8: e580900c str r9, [r0, #12] free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; a000babc: e584e038 str lr, [r4, #56] ; 0x38 ++stats->used_blocks; a000bac0: e584c040 str ip, [r4, #64] ; 0x40 stats->free_size -= _Heap_Block_size( block ); a000bac4: e5841030 str r1, [r4, #48] ; 0x30 } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { a000bac8: e5941010 ldr r1, [r4, #16] a000bacc: e1530001 cmp r3, r1 a000bad0: 2a00000a bcs a000bb00 <_Heap_Block_allocate+0xa0> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); a000bad4: e1a00004 mov r0, r4 a000bad8: e1a02009 mov r2, r9 a000badc: e083300a add r3, r3, sl a000bae0: e1a01005 mov r1, r5 a000bae4: ebffff28 bl a000b78c <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { a000bae8: e5943030 ldr r3, [r4, #48] ; 0x30 a000baec: e5942034 ldr r2, [r4, #52] ; 0x34 } _Heap_Protection_block_initialize( heap, block ); return block; } a000baf0: e1a00005 mov r0, r5 alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { a000baf4: e1520003 cmp r2, r3 stats->min_free_size = stats->free_size; a000baf8: 85843034 strhi r3, [r4, #52] ; 0x34 } _Heap_Protection_block_initialize( heap, block ); return block; } a000bafc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000bb00: e1a00002 mov r0, r2 a000bb04: eb003c00 bl a001ab0c <__umodsi3> _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; a000bb08: e5943030 ldr r3, [r4, #48] ; 0x30 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000bb0c: e0606006 rsb r6, r0, r6 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; a000bb10: e0651006 rsb r1, r5, r6 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; a000bb14: e0833001 add r3, r3, r1 if ( _Heap_Is_prev_used( block ) ) { a000bb18: e3170001 tst r7, #1 uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; a000bb1c: e0668008 rsb r8, r6, r8 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; a000bb20: e5843030 str r3, [r4, #48] ; 0x30 if ( _Heap_Is_prev_used( block ) ) { a000bb24: 1a000014 bne a000bb7c <_Heap_Block_allocate+0x11c> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); a000bb28: e5953000 ldr r3, [r5] <== NOT EXECUTED } else { Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_size += prev_block_size; a000bb2c: e1a02009 mov r2, r9 <== NOT EXECUTED a000bb30: e0635005 rsb r5, r3, r5 <== NOT EXECUTED - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000bb34: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED a000bb38: e3c33001 bic r3, r3, #1 <== NOT EXECUTED a000bb3c: e0811003 add r1, r1, r3 <== NOT EXECUTED } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; a000bb40: e3813001 orr r3, r1, #1 a000bb44: e5853004 str r3, [r5, #4] new_block->prev_size = block_size; a000bb48: e5861000 str r1, [r6] new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); a000bb4c: e1a00004 mov r0, r4 a000bb50: e1a0300a mov r3, sl } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; a000bb54: e5868004 str r8, [r6, #4] _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); a000bb58: e1a01006 mov r1, r6 a000bb5c: ebffff0a bl a000b78c <_Heap_Block_split> alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { a000bb60: e5943030 ldr r3, [r4, #48] ; 0x30 a000bb64: e5942034 ldr r2, [r4, #52] ; 0x34 block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); a000bb68: e1a05006 mov r5, r6 } _Heap_Protection_block_initialize( heap, block ); return block; } a000bb6c: e1a00005 mov r0, r5 alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { a000bb70: e1520003 cmp r2, r3 stats->min_free_size = stats->free_size; a000bb74: 85843034 strhi r3, [r4, #52] ; 0x34 } _Heap_Protection_block_initialize( heap, block ); return block; } a000bb78: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; a000bb7c: e5940038 ldr r0, [r4, #56] ; 0x38 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; a000bb80: e5993008 ldr r3, [r9, #8] new_block->next = next; new_block->prev = block_before; a000bb84: e585900c str r9, [r5, #12] a000bb88: e2800001 add r0, r0, #1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; a000bb8c: e5853008 str r3, [r5, #8] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; a000bb90: e583500c str r5, [r3, #12] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; a000bb94: e5895008 str r5, [r9, #8] a000bb98: e1a02005 mov r2, r5 a000bb9c: e5840038 str r0, [r4, #56] ; 0x38 a000bba0: eaffffe6 b a000bb40 <_Heap_Block_allocate+0xe0> =============================================================================== a000b78c <_Heap_Block_split>: Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { a000b78c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000b790: e5906014 ldr r6, [r0, #20] uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; a000b794: e5907010 ldr r7, [r0, #16] Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { a000b798: e1a05001 mov r5, r1 Heap_Statistics *const stats = &heap->stats; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE; a000b79c: e2468008 sub r8, r6, #8 return heap->stats.size; } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b ) { return a > b ? a : b; a000b7a0: e1530008 cmp r3, r8 a000b7a4: 21a08003 movcs r8, r3 uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const used_size = a000b7a8: e2888008 add r8, r8, #8 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; a000b7ac: e1a01007 mov r1, r7 Heap_Control *heap, Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { a000b7b0: e1a04000 mov r4, r0 a000b7b4: e1a00008 mov r0, r8 a000b7b8: e1a0a002 mov sl, r2 a000b7bc: eb003cd2 bl a001ab0c <__umodsi3> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000b7c0: e5953004 ldr r3, [r5, #4] if ( remainder != 0 ) { a000b7c4: e3500000 cmp r0, #0 return value - remainder + alignment; a000b7c8: 10887007 addne r7, r8, r7 a000b7cc: e3c31001 bic r1, r3, #1 uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; a000b7d0: e2812004 add r2, r1, #4 } else { return value; a000b7d4: 01a07008 moveq r7, r8 uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS; a000b7d8: e2866004 add r6, r6, #4 uintptr_t const used_size = _Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE; uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size ); uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size; a000b7dc: e0688002 rsb r8, r8, r2 ) { uintptr_t remainder = value % alignment; if ( remainder != 0 ) { return value - remainder + alignment; a000b7e0: 10607007 rsbne r7, r0, r7 Heap_Block *next_block = _Heap_Block_at( block, block_size ); _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { a000b7e4: e1580006 cmp r8, r6 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000b7e8: e0852001 add r2, r5, r1 a000b7ec: 3a00001c bcc a000b864 <_Heap_Block_split+0xd8> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b7f0: e2033001 and r3, r3, #1 block->size_and_flag = size | flag; a000b7f4: e1873003 orr r3, r7, r3 a000b7f8: e5853004 str r3, [r5, #4] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000b7fc: e5923004 ldr r3, [r2, #4] _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; a000b800: e5940030 ldr r0, [r4, #48] ; 0x30 _HAssert( used_size <= block_size + HEAP_ALLOC_BONUS ); _HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS ); if ( free_size >= free_size_limit ) { Heap_Block *const free_block = _Heap_Block_at( block, used_block_size ); uintptr_t free_block_size = block_size - used_block_size; a000b804: e0671001 rsb r1, r7, r1 a000b808: e3c33001 bic r3, r3, #1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000b80c: e082c003 add ip, r2, r3 a000b810: e59cc004 ldr ip, [ip, #4] _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; a000b814: e0800001 add r0, r0, r1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000b818: e0875005 add r5, r7, r5 if ( _Heap_Is_used( next_block ) ) { a000b81c: e31c0001 tst ip, #1 _HAssert( used_block_size + free_block_size == block_size ); _Heap_Block_set_size( block, used_block_size ); /* Statistics */ stats->free_size += free_block_size; a000b820: e5840030 str r0, [r4, #48] ; 0x30 if ( _Heap_Is_used( next_block ) ) { a000b824: 1a000012 bne a000b874 <_Heap_Block_split+0xe8> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; a000b828: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED Heap_Block *prev = old_block->prev; a000b82c: e592200c ldr r2, [r2, #12] <== NOT EXECUTED } else { uintptr_t const next_block_size = _Heap_Block_size( next_block ); _Heap_Free_list_replace( next_block, free_block ); free_block_size += next_block_size; a000b830: e0811003 add r1, r1, r3 <== NOT EXECUTED new_block->next = next; a000b834: e5850008 str r0, [r5, #8] <== NOT EXECUTED new_block->prev = prev; a000b838: e585200c str r2, [r5, #12] <== NOT EXECUTED next->prev = new_block; prev->next = new_block; a000b83c: e5825008 str r5, [r2, #8] <== NOT EXECUTED Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; a000b840: e580500c str r5, [r0, #12] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000b844: e0812005 add r2, r1, r5 <== NOT EXECUTED next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; a000b848: e3813001 orr r3, r1, #1 a000b84c: e5853004 str r3, [r5, #4] next_block->prev_size = free_block_size; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b850: e5923004 ldr r3, [r2, #4] next_block = _Heap_Block_at( free_block, free_block_size ); } free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED; next_block->prev_size = free_block_size; a000b854: e5821000 str r1, [r2] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a000b858: e3c33001 bic r3, r3, #1 a000b85c: e5823004 str r3, [r2, #4] a000b860: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} _Heap_Protection_block_initialize( heap, free_block ); } else { next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; a000b864: e5923004 ldr r3, [r2, #4] a000b868: e3833001 orr r3, r3, #1 a000b86c: e5823004 str r3, [r2, #4] a000b870: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} if ( _Heap_Is_used( next_block ) ) { _Heap_Free_list_insert_after( free_list_anchor, free_block ); /* Statistics */ ++stats->free_blocks; a000b874: e5940038 ldr r0, [r4, #56] ; 0x38 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; a000b878: e59a3008 ldr r3, [sl, #8] new_block->next = next; new_block->prev = block_before; a000b87c: e585a00c str sl, [r5, #12] a000b880: e2800001 add r0, r0, #1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; a000b884: e5853008 str r3, [r5, #8] new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; a000b888: e583500c str r5, [r3, #12] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; a000b88c: e58a5008 str r5, [sl, #8] a000b890: e5840038 str r0, [r4, #56] ; 0x38 a000b894: eaffffeb b a000b848 <_Heap_Block_split+0xbc> =============================================================================== a000ff40 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { a000ff40: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000ff44: e1a05000 mov r5, r0 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { a000ff48: e0916002 adds r6, r1, r2 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { a000ff4c: e1a04001 mov r4, r1 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; a000ff50: e5908020 ldr r8, [r0, #32] Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; a000ff54: e5951030 ldr r1, [r5, #48] ; 0x30 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; a000ff58: e5900010 ldr r0, [r0, #16] Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t unused __attribute__((unused)) ) { a000ff5c: e24dd020 sub sp, sp, #32 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; a000ff60: e3a07000 mov r7, #0 Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; a000ff64: e58d0008 str r0, [sp, #8] Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; a000ff68: e58d7018 str r7, [sp, #24] Heap_Block *extend_last_block = NULL; a000ff6c: e58d701c str r7, [sp, #28] uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000ff70: e5953014 ldr r3, [r5, #20] uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; a000ff74: e58d1014 str r1, [sp, #20] uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return 0; a000ff78: 21a00007 movcs r0, r7 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { a000ff7c: 3a000001 bcc a000ff88 <_Heap_Extend+0x48> /* Statistics */ stats->size += extended_size; return extended_size; } a000ff80: e28dd020 add sp, sp, #32 a000ff84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} if ( extend_area_end < extend_area_begin ) { return 0; } extend_area_ok = _Heap_Get_first_and_last_block( a000ff88: e28dc018 add ip, sp, #24 a000ff8c: e1a01002 mov r1, r2 a000ff90: e58dc000 str ip, [sp] a000ff94: e1a00004 mov r0, r4 a000ff98: e28dc01c add ip, sp, #28 a000ff9c: e59d2008 ldr r2, [sp, #8] a000ffa0: e58dc004 str ip, [sp, #4] a000ffa4: ebffee50 bl a000b8ec <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { a000ffa8: e3500000 cmp r0, #0 a000ffac: 0afffff3 beq a000ff80 <_Heap_Extend+0x40> a000ffb0: e1a09008 mov r9, r8 a000ffb4: e1a0b007 mov fp, r7 a000ffb8: e58d700c str r7, [sp, #12] a000ffbc: e58d7010 str r7, [sp, #16] return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; a000ffc0: e1590008 cmp r9, r8 a000ffc4: 05953018 ldreq r3, [r5, #24] uintptr_t const sub_area_end = start_block->prev_size; a000ffc8: e599a000 ldr sl, [r9] return 0; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; a000ffcc: 11a03009 movne r3, r9 uintptr_t const sub_area_end = start_block->prev_size; Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( a000ffd0: e1530006 cmp r3, r6 a000ffd4: 3154000a cmpcc r4, sl a000ffd8: 3a000067 bcc a001017c <_Heap_Extend+0x23c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return 0; } if ( extend_area_end == sub_area_begin ) { a000ffdc: e1530006 cmp r3, r6 a000ffe0: 058d9010 streq r9, [sp, #16] a000ffe4: 0a000001 beq a000fff0 <_Heap_Extend+0xb0> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { a000ffe8: e156000a cmp r6, sl a000ffec: 31a0b009 movcc fp, r9 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000fff0: e1a0000a mov r0, sl a000fff4: e59d1008 ldr r1, [sp, #8] a000fff8: eb002b86 bl a001ae18 <__umodsi3> a000fffc: e24a3008 sub r3, sl, #8 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { a0010000: e15a0004 cmp sl, r4 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a0010004: e0603003 rsb r3, r0, r3 start_block->prev_size = extend_area_end; a0010008: 05896000 streq r6, [r9] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) a001000c: 058d300c streq r3, [sp, #12] merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { a0010010: 0a000001 beq a001001c <_Heap_Extend+0xdc> a0010014: e154000a cmp r4, sl a0010018: 81a07003 movhi r7, r3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a001001c: e5939004 ldr r9, [r3, #4] a0010020: e3c99001 bic r9, r9, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0010024: e0839009 add r9, r3, r9 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); a0010028: e1580009 cmp r8, r9 a001002c: 1affffe3 bne a000ffc0 <_Heap_Extend+0x80> if ( extend_area_begin < heap->area_begin ) { a0010030: e5953018 ldr r3, [r5, #24] a0010034: e1540003 cmp r4, r3 heap->area_begin = extend_area_begin; a0010038: 35854018 strcc r4, [r5, #24] } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { a001003c: 3a000002 bcc a001004c <_Heap_Extend+0x10c> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { a0010040: e595301c ldr r3, [r5, #28] <== NOT EXECUTED a0010044: e1560003 cmp r6, r3 <== NOT EXECUTED heap->area_end = extend_area_end; a0010048: 8585601c strhi r6, [r5, #28] <== NOT EXECUTED } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; a001004c: e59d3018 ldr r3, [sp, #24] a0010050: e59d201c ldr r2, [sp, #28] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a0010054: e595c020 ldr ip, [r5, #32] } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; a0010058: e5836000 str r6, [r3] heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = a001005c: e0631002 rsb r1, r3, r2 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; a0010060: e3810001 orr r0, r1, #1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; a0010064: e5821000 str r1, [r2] extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a0010068: e15c0003 cmp ip, r3 extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; a001006c: e3a01000 mov r1, #0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = a0010070: e5830004 str r0, [r3, #4] extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; a0010074: e5821004 str r1, [r2, #4] _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { heap->first_block = extend_first_block; a0010078: 85853020 strhi r3, [r5, #32] extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { a001007c: 8a000002 bhi a001008c <_Heap_Extend+0x14c> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { a0010080: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED a0010084: e1530002 cmp r3, r2 <== NOT EXECUTED heap->last_block = extend_last_block; a0010088: 35852024 strcc r2, [r5, #36] ; 0x24 <== NOT EXECUTED } if ( merge_below_block != NULL ) { a001008c: e59d3010 ldr r3, [sp, #16] a0010090: e3530000 cmp r3, #0 a0010094: 0a00004b beq a00101c8 <_Heap_Extend+0x288> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; a0010098: e5958010 ldr r8, [r5, #16] <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); a001009c: e2844008 add r4, r4, #8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; a00100a0: e1a00004 mov r0, r4 <== NOT EXECUTED a00100a4: e1a01008 mov r1, r8 <== NOT EXECUTED a00100a8: eb002b5a bl a001ae18 <__umodsi3> <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a00100ac: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED if ( remainder != 0 ) { a00100b0: e3500000 cmp r0, #0 <== NOT EXECUTED return value - remainder + alignment; a00100b4: 10844008 addne r4, r4, r8 <== NOT EXECUTED a00100b8: 10604004 rsbne r4, r0, r4 <== NOT EXECUTED ) { uintptr_t const page_size = heap->page_size; uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = a00100bc: e2441008 sub r1, r4, #8 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a00100c0: e5932000 ldr r2, [r3] <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = a00100c4: e0613003 rsb r3, r1, r3 <== NOT EXECUTED first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; a00100c8: e3833001 orr r3, r3, #1 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; a00100cc: e5042008 str r2, [r4, #-8] <== NOT EXECUTED new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; a00100d0: e5813004 str r3, [r1, #4] <== NOT EXECUTED _Heap_Free_block( heap, new_first_block ); a00100d4: e1a00005 mov r0, r5 <== NOT EXECUTED a00100d8: ebffff83 bl a000feec <_Heap_Free_block> <== NOT EXECUTED link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { a00100dc: e59d400c ldr r4, [sp, #12] a00100e0: e3540000 cmp r4, #0 a00100e4: 0a000026 beq a0010184 <_Heap_Extend+0x244> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, a00100e8: e2466008 sub r6, r6, #8 <== NOT EXECUTED uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( a00100ec: e0646006 rsb r6, r4, r6 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a00100f0: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED a00100f4: e1a00006 mov r0, r6 <== NOT EXECUTED a00100f8: eb002b46 bl a001ae18 <__umodsi3> <== NOT EXECUTED ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) a00100fc: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED a0010100: e0606006 rsb r6, r0, r6 <== NOT EXECUTED page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = a0010104: e0862004 add r2, r6, r4 <== NOT EXECUTED (last_block->size_and_flag - last_block_new_size) a0010108: e0663003 rsb r3, r6, r3 <== NOT EXECUTED | HEAP_PREV_BLOCK_USED; a001010c: e3833001 orr r3, r3, #1 <== NOT EXECUTED page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = a0010110: e5823004 str r3, [r2, #4] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010114: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); a0010118: e1a00005 mov r0, r5 <== NOT EXECUTED a001011c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED a0010120: e2033001 and r3, r3, #1 <== NOT EXECUTED block->size_and_flag = size | flag; a0010124: e1866003 orr r6, r6, r3 <== NOT EXECUTED a0010128: e5846004 str r6, [r4, #4] <== NOT EXECUTED a001012c: ebffff6e bl a000feec <_Heap_Free_block> <== NOT EXECUTED extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { a0010130: e59d200c ldr r2, [sp, #12] a0010134: e59d3010 ldr r3, [sp, #16] a0010138: e3520000 cmp r2, #0 a001013c: 03530000 cmpeq r3, #0 a0010140: 0a00001c beq a00101b8 <_Heap_Extend+0x278> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block a0010144: e5953024 ldr r3, [r5, #36] ; 0x24 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( a0010148: e595c020 ldr ip, [r5, #32] _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; a001014c: e5950030 ldr r0, [r5, #48] ; 0x30 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010150: e5931004 ldr r1, [r3, #4] a0010154: e59d4014 ldr r4, [sp, #20] /* Statistics */ stats->size += extended_size; a0010158: e595202c ldr r2, [r5, #44] ; 0x2c * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( a001015c: e063c00c rsb ip, r3, ip RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010160: e2011001 and r1, r1, #1 _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; a0010164: e0640000 rsb r0, r4, r0 block->size_and_flag = size | flag; a0010168: e18c1001 orr r1, ip, r1 /* Statistics */ stats->size += extended_size; a001016c: e0822000 add r2, r2, r0 a0010170: e5831004 str r1, [r3, #4] a0010174: e585202c str r2, [r5, #44] ; 0x2c return extended_size; a0010178: eaffff80 b a000ff80 <_Heap_Extend+0x40> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return 0; a001017c: e3a00000 mov r0, #0 <== NOT EXECUTED a0010180: eaffff7e b a000ff80 <_Heap_Extend+0x40> <== NOT EXECUTED ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { a0010184: e3570000 cmp r7, #0 a0010188: 0affffe8 beq a0010130 <_Heap_Extend+0x1f0> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a001018c: e5971004 ldr r1, [r7, #4] <== NOT EXECUTED ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); a0010190: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( a0010194: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED a0010198: e2011001 and r1, r1, #1 <== NOT EXECUTED ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); a001019c: e0672002 rsb r2, r7, r2 <== NOT EXECUTED block->size_and_flag = size | flag; a00101a0: e1822001 orr r2, r2, r1 <== NOT EXECUTED a00101a4: e5872004 str r2, [r7, #4] <== NOT EXECUTED last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; a00101a8: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED a00101ac: e3822001 orr r2, r2, #1 <== NOT EXECUTED a00101b0: e5832004 str r2, [r3, #4] <== NOT EXECUTED a00101b4: eaffffdd b a0010130 <_Heap_Extend+0x1f0> <== NOT EXECUTED extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { _Heap_Free_block( heap, extend_first_block ); a00101b8: e1a00005 mov r0, r5 a00101bc: e59d1018 ldr r1, [sp, #24] a00101c0: ebffff49 bl a000feec <_Heap_Free_block> a00101c4: eaffffde b a0010144 <_Heap_Extend+0x204> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { a00101c8: e35b0000 cmp fp, #0 { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; a00101cc: 1062b00b rsbne fp, r2, fp a00101d0: 138bb001 orrne fp, fp, #1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = a00101d4: 1582b004 strne fp, [r2, #4] a00101d8: eaffffbf b a00100dc <_Heap_Extend+0x19c> =============================================================================== a000fed0 <_Heap_Free>: /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { a000fed0: e2513000 subs r3, r1, #0 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { a000fed4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a000fed8: e1a04000 mov r4, r0 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { a000fedc: 0a000052 beq a001002c <_Heap_Free+0x15c> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000fee0: e1a00003 mov r0, r3 a000fee4: e5941010 ldr r1, [r4, #16] a000fee8: e2435008 sub r5, r3, #8 a000feec: eb002b06 bl a001ab0c <__umodsi3> RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block a000fef0: e5942020 ldr r2, [r4, #32] uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000fef4: e0605005 rsb r5, r0, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000fef8: e1550002 cmp r5, r2 a000fefc: 3a000030 bcc a000ffc4 <_Heap_Free+0xf4> a000ff00: e5941024 ldr r1, [r4, #36] ; 0x24 a000ff04: e1550001 cmp r5, r1 a000ff08: 8a00002d bhi a000ffc4 <_Heap_Free+0xf4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ff0c: e595c004 ldr ip, [r5, #4] a000ff10: e3cc6001 bic r6, ip, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000ff14: e0853006 add r3, r5, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000ff18: e1520003 cmp r2, r3 a000ff1c: 8a000028 bhi a000ffc4 <_Heap_Free+0xf4> a000ff20: e1510003 cmp r1, r3 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { return false; a000ff24: 33a00000 movcc r0, #0 a000ff28: 3a000027 bcc a000ffcc <_Heap_Free+0xfc> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ff2c: e5937004 ldr r7, [r3, #4] } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { a000ff30: e2170001 ands r0, r7, #1 a000ff34: 0a000024 beq a000ffcc <_Heap_Free+0xfc> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); a000ff38: e1510003 cmp r1, r3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ff3c: e3c77001 bic r7, r7, #1 a000ff40: 03a08000 moveq r8, #0 a000ff44: 0a000004 beq a000ff5c <_Heap_Free+0x8c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ff48: e0830007 add r0, r3, r7 a000ff4c: e5900004 ldr r0, [r0, #4] return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) a000ff50: e3100001 tst r0, #1 a000ff54: 13a08000 movne r8, #0 a000ff58: 03a08001 moveq r8, #1 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { a000ff5c: e21c0001 ands r0, ip, #1 a000ff60: 1a00001a bne a000ffd0 <_Heap_Free+0x100> uintptr_t const prev_size = block->prev_size; a000ff64: e595c000 ldr ip, [r5] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000ff68: e06ca005 rsb sl, ip, r5 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000ff6c: e152000a cmp r2, sl a000ff70: 8a000015 bhi a000ffcc <_Heap_Free+0xfc> a000ff74: e151000a cmp r1, sl a000ff78: 3a000013 bcc a000ffcc <_Heap_Free+0xfc> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ff7c: e59a0004 ldr r0, [sl, #4] return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { a000ff80: e2100001 ands r0, r0, #1 a000ff84: 0a000010 beq a000ffcc <_Heap_Free+0xfc> _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ a000ff88: e3580000 cmp r8, #0 a000ff8c: 0a00003a beq a001007c <_Heap_Free+0x1ac> uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000ff90: e5940038 ldr r0, [r4, #56] ; 0x38 return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; a000ff94: e5932008 ldr r2, [r3, #8] _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; a000ff98: e0867007 add r7, r6, r7 Heap_Block *prev = block->prev; a000ff9c: e593300c ldr r3, [r3, #12] a000ffa0: e087c00c add ip, r7, ip _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000ffa4: e2400001 sub r0, r0, #1 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ffa8: e38c1001 orr r1, ip, #1 prev->next = next; a000ffac: e5832008 str r2, [r3, #8] next->prev = prev; a000ffb0: e582300c str r3, [r2, #12] } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; a000ffb4: e5840038 str r0, [r4, #56] ; 0x38 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ffb8: e58a1004 str r1, [sl, #4] next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; a000ffbc: e78ac00c str ip, [sl, ip] a000ffc0: ea00000e b a0010000 <_Heap_Free+0x130> block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { return false; a000ffc4: e3a00000 mov r0, #0 a000ffc8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } a000ffcc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ a000ffd0: e3580000 cmp r8, #0 a000ffd4: 0a000016 beq a0010034 <_Heap_Free+0x164> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; a000ffd8: e5932008 ldr r2, [r3, #8] Heap_Block *prev = old_block->prev; a000ffdc: e593300c ldr r3, [r3, #12] uintptr_t const size = block_size + next_block_size; a000ffe0: e0877006 add r7, r7, r6 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a000ffe4: e3871001 orr r1, r7, #1 new_block->next = next; a000ffe8: e5852008 str r2, [r5, #8] new_block->prev = prev; a000ffec: e585300c str r3, [r5, #12] next->prev = new_block; prev->next = new_block; a000fff0: e5835008 str r5, [r3, #8] Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; a000fff4: e582500c str r5, [r2, #12] a000fff8: e5851004 str r1, [r5, #4] next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; a000fffc: e7857007 str r7, [r5, r7] stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a0010000: e5942040 ldr r2, [r4, #64] ; 0x40 ++stats->frees; a0010004: e5943050 ldr r3, [r4, #80] ; 0x50 stats->free_size += block_size; a0010008: e5941030 ldr r1, [r4, #48] ; 0x30 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a001000c: e2422001 sub r2, r2, #1 ++stats->frees; a0010010: e2833001 add r3, r3, #1 stats->free_size += block_size; a0010014: e0816006 add r6, r1, r6 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; a0010018: e5842040 str r2, [r4, #64] ; 0x40 ++stats->frees; a001001c: e5843050 str r3, [r4, #80] ; 0x50 stats->free_size += block_size; a0010020: e5846030 str r6, [r4, #48] ; 0x30 return( true ); a0010024: e3a00001 mov r0, #1 a0010028: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; a001002c: e3a00001 mov r0, #1 a0010030: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; a0010034: e3862001 orr r2, r6, #1 a0010038: e5852004 str r2, [r5, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a001003c: e5942038 ldr r2, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { a0010040: e594c03c ldr ip, [r4, #60] ; 0x3c } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a0010044: e5930004 ldr r0, [r3, #4] RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; a0010048: e5941008 ldr r1, [r4, #8] next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; a001004c: e2822001 add r2, r2, #1 } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a0010050: e3c00001 bic r0, r0, #1 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { a0010054: e152000c cmp r2, ip new_block->next = next; a0010058: e5851008 str r1, [r5, #8] new_block->prev = block_before; a001005c: e585400c str r4, [r5, #12] } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a0010060: e5830004 str r0, [r3, #4] block_before->next = new_block; next->prev = new_block; a0010064: e581500c str r5, [r1, #12] next_block->prev_size = block_size; a0010068: e7856006 str r6, [r5, r6] { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; a001006c: e5845008 str r5, [r4, #8] /* Statistics */ ++stats->free_blocks; a0010070: e5842038 str r2, [r4, #56] ; 0x38 if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; a0010074: 8584203c strhi r2, [r4, #60] ; 0x3c a0010078: eaffffe0 b a0010000 <_Heap_Free+0x130> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; a001007c: e086c00c add ip, r6, ip prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; a0010080: e38c2001 orr r2, ip, #1 a0010084: e58a2004 str r2, [sl, #4] next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a0010088: e5932004 ldr r2, [r3, #4] next_block->prev_size = size; a001008c: e785c006 str ip, [r5, r6] _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; a0010090: e3c22001 bic r2, r2, #1 a0010094: e5832004 str r2, [r3, #4] a0010098: eaffffd8 b a0010000 <_Heap_Free+0x130> =============================================================================== a000d648 <_Heap_Greedy_allocate>: Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { a000d648: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { a000d64c: e2528000 subs r8, r2, #0 Heap_Block *_Heap_Greedy_allocate( Heap_Control *heap, const uintptr_t *block_sizes, size_t block_count ) { a000d650: e1a04000 mov r4, r0 Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; a000d654: 01a05008 moveq r5, r8 Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { a000d658: 0a000012 beq a000d6a8 <_Heap_Greedy_allocate+0x60> a000d65c: e3a06000 mov r6, #0 a000d660: e1a07001 mov r7, r1 const uintptr_t *block_sizes, size_t block_count ) { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); Heap_Block *allocated_blocks = NULL; a000d664: e1a05006 mov r5, r6 * @brief See _Heap_Allocate_aligned_with_boundary() with alignment and * boundary equals zero. */ RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); a000d668: e3a02000 mov r2, #0 a000d66c: e4971004 ldr r1, [r7], #4 a000d670: e1a03002 mov r3, r2 a000d674: e1a00004 mov r0, r4 a000d678: eb001c05 bl a0014694 <_Heap_Allocate_aligned_with_boundary> size_t i; for (i = 0; i < block_count; ++i) { void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { a000d67c: e250a000 subs sl, r0, #0 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { a000d680: e2866001 add r6, r6, #1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a000d684: e24aa008 sub sl, sl, #8 void *next = _Heap_Allocate( heap, block_sizes [i] ); if ( next != NULL ) { a000d688: 0a000004 beq a000d6a0 <_Heap_Greedy_allocate+0x58> a000d68c: e5941010 ldr r1, [r4, #16] a000d690: eb004796 bl a001f4f0 <__umodsi3> uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a000d694: e060000a rsb r0, r0, sl Heap_Block *next_block = _Heap_Block_of_alloc_area( (uintptr_t) next, heap->page_size ); next_block->next = allocated_blocks; a000d698: e5805008 str r5, [r0, #8] a000d69c: e1a05000 mov r5, r0 Heap_Block *allocated_blocks = NULL; Heap_Block *blocks = NULL; Heap_Block *current; size_t i; for (i = 0; i < block_count; ++i) { a000d6a0: e1560008 cmp r6, r8 a000d6a4: 1affffef bne a000d668 <_Heap_Greedy_allocate+0x20> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a000d6a8: e5946008 ldr r6, [r4, #8] next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { a000d6ac: e1540006 cmp r4, r6 a000d6b0: 13a07000 movne r7, #0 a000d6b4: 1a000001 bne a000d6c0 <_Heap_Greedy_allocate+0x78> a000d6b8: ea000018 b a000d720 <_Heap_Greedy_allocate+0xd8> <== NOT EXECUTED a000d6bc: e1a06003 mov r6, r3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000d6c0: e5963004 ldr r3, [r6, #4] _Heap_Block_allocate( a000d6c4: e1a01006 mov r1, r6 a000d6c8: e2862008 add r2, r6, #8 a000d6cc: e3c33001 bic r3, r3, #1 a000d6d0: e2433008 sub r3, r3, #8 a000d6d4: e1a00004 mov r0, r4 a000d6d8: eb0000d2 bl a000da28 <_Heap_Block_allocate> current, _Heap_Alloc_area_of_block( current ), _Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE ); current->next = blocks; a000d6dc: e5867008 str r7, [r6, #8] return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a000d6e0: e5943008 ldr r3, [r4, #8] next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { a000d6e4: e1a07006 mov r7, r6 a000d6e8: e1540003 cmp r4, r3 a000d6ec: 1afffff2 bne a000d6bc <_Heap_Greedy_allocate+0x74> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { a000d6f0: e3550000 cmp r5, #0 a000d6f4: 1a000001 bne a000d700 <_Heap_Greedy_allocate+0xb8> a000d6f8: ea000006 b a000d718 <_Heap_Greedy_allocate+0xd0> current = allocated_blocks; allocated_blocks = allocated_blocks->next; a000d6fc: e1a05007 mov r5, r7 <== NOT EXECUTED a000d700: e1a01005 mov r1, r5 a000d704: e5b17008 ldr r7, [r1, #8]! _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); a000d708: e1a00004 mov r0, r4 a000d70c: eb001c74 bl a00148e4 <_Heap_Free> current->next = blocks; blocks = current; } while ( allocated_blocks != NULL ) { a000d710: e3570000 cmp r7, #0 a000d714: 1afffff8 bne a000d6fc <_Heap_Greedy_allocate+0xb4> allocated_blocks = allocated_blocks->next; _Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) ); } return blocks; } a000d718: e1a00006 mov r0, r6 a000d71c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} next_block->next = allocated_blocks; allocated_blocks = next_block; } } while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) { a000d720: e3a06000 mov r6, #0 <== NOT EXECUTED a000d724: eafffff1 b a000d6f0 <_Heap_Greedy_allocate+0xa8> <== NOT EXECUTED =============================================================================== a0015548 <_Heap_Iterate>: void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { a0015548: e92d40f0 push {r4, r5, r6, r7, lr} Heap_Block *current = heap->first_block; a001554c: e590c020 ldr ip, [r0, #32] Heap_Block *end = heap->last_block; a0015550: e5904024 ldr r4, [r0, #36] ; 0x24 void _Heap_Iterate( Heap_Control *heap, Heap_Block_visitor visitor, void *visitor_arg ) { a0015554: e1a06001 mov r6, r1 a0015558: e1a05002 mov r5, r2 Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { a001555c: e15c0004 cmp ip, r4 a0015560: 1a000003 bne a0015574 <_Heap_Iterate+0x2c> a0015564: ea00000d b a00155a0 <_Heap_Iterate+0x58> <== NOT EXECUTED a0015568: e1540007 cmp r4, r7 a001556c: 0a00000a beq a001559c <_Heap_Iterate+0x54> a0015570: e1a0c007 mov ip, r7 a0015574: e59c1004 ldr r1, [ip, #4] uintptr_t size = _Heap_Block_size( current ); Heap_Block *next = _Heap_Block_at( current, size ); bool used = _Heap_Is_prev_used( next ); stop = (*visitor)( current, size, used, visitor_arg ); a0015578: e1a0000c mov r0, ip a001557c: e1a03005 mov r3, r5 a0015580: e3c11001 bic r1, r1, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0015584: e08c7001 add r7, ip, r1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0015588: e5972004 ldr r2, [r7, #4] a001558c: e2022001 and r2, r2, #1 a0015590: e12fff36 blx r6 { Heap_Block *current = heap->first_block; Heap_Block *end = heap->last_block; bool stop = false; while ( !stop && current != end ) { a0015594: e3500000 cmp r0, #0 a0015598: 0afffff2 beq a0015568 <_Heap_Iterate+0x20> a001559c: e8bd80f0 pop {r4, r5, r6, r7, pc} a00155a0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a0010314 <_Heap_No_extend>: uintptr_t unused_2 __attribute__((unused)), uintptr_t unused_3 __attribute__((unused)) ) { return 0; } a0010314: e3a00000 mov r0, #0 <== NOT EXECUTED a0010318: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a001009c <_Heap_Resize_block>: void *alloc_begin_ptr, uintptr_t new_alloc_size, uintptr_t *old_size, uintptr_t *new_size ) { a001009c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a00100a0: e1a04000 mov r4, r0 a00100a4: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a00100a8: e1a00001 mov r0, r1 a00100ac: e5941010 ldr r1, [r4, #16] a00100b0: e1a07003 mov r7, r3 a00100b4: e1a08002 mov r8, r2 a00100b8: eb002a93 bl a001ab0c <__umodsi3> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a00100bc: e5943020 ldr r3, [r4, #32] a00100c0: e59d601c ldr r6, [sp, #28] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a00100c4: e2451008 sub r1, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a00100c8: e0601001 rsb r1, r0, r1 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); *old_size = 0; a00100cc: e3a02000 mov r2, #0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a00100d0: e1530001 cmp r3, r1 a00100d4: e5872000 str r2, [r7] *new_size = 0; a00100d8: e5862000 str r2, [r6] a00100dc: 8a000038 bhi a00101c4 <_Heap_Resize_block+0x128> a00100e0: e5943024 ldr r3, [r4, #36] ; 0x24 a00100e4: e1530001 cmp r3, r1 a00100e8: 3a000037 bcc a00101cc <_Heap_Resize_block+0x130> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a00100ec: e5910004 ldr r0, [r1, #4] uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; a00100f0: e2652004 rsb r2, r5, #4 a00100f4: e3c00001 bic r0, r0, #1 { Heap_Statistics *const stats = &heap->stats; uintptr_t const block_begin = (uintptr_t) block; uintptr_t block_size = _Heap_Block_size( block ); uintptr_t block_end = block_begin + block_size; a00100f8: e0813000 add r3, r1, r0 a00100fc: e593c004 ldr ip, [r3, #4] uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS; a0010100: e0822003 add r2, r2, r3 a0010104: e3ccc001 bic ip, ip, #1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010108: e083a00c add sl, r3, ip a001010c: e59aa004 ldr sl, [sl, #4] bool next_block_is_free = _Heap_Is_free( next_block ); _HAssert( _Heap_Is_block_in_heap( heap, next_block ) ); _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; a0010110: e5872000 str r2, [r7] RTEMS_INLINE_ROUTINE bool _Heap_Is_free( const Heap_Block *block ) { return !_Heap_Is_used( block ); a0010114: e31a0001 tst sl, #1 a0010118: 13a07000 movne r7, #0 a001011c: 03a07001 moveq r7, #1 if ( next_block_is_free ) { a0010120: e3570000 cmp r7, #0 block_size += next_block_size; alloc_size += next_block_size; a0010124: 1082200c addne r2, r2, ip _HAssert( _Heap_Is_prev_used( next_block ) ); *old_size = alloc_size; if ( next_block_is_free ) { block_size += next_block_size; a0010128: 1080000c addne r0, r0, ip alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { a001012c: e1580002 cmp r8, r2 a0010130: 8a000027 bhi a00101d4 <_Heap_Resize_block+0x138> return HEAP_RESIZE_UNSATISFIED; } if ( next_block_is_free ) { a0010134: e3570000 cmp r7, #0 a0010138: 0a000011 beq a0010184 <_Heap_Resize_block+0xe8> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a001013c: e5917004 ldr r7, [r1, #4] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0010140: e0802001 add r2, r0, r1 next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; /* Statistics */ --stats->free_blocks; a0010144: e594e038 ldr lr, [r4, #56] ; 0x38 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010148: e2077001 and r7, r7, #1 block->size_and_flag = size | flag; a001014c: e1800007 orr r0, r0, r7 a0010150: e5810004 str r0, [r1, #4] stats->free_size -= next_block_size; a0010154: e594a030 ldr sl, [r4, #48] ; 0x30 _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; a0010158: e5927004 ldr r7, [r2, #4] return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; a001015c: e5930008 ldr r0, [r3, #8] Heap_Block *prev = block->prev; a0010160: e593300c ldr r3, [r3, #12] a0010164: e3877001 orr r7, r7, #1 /* Statistics */ --stats->free_blocks; a0010168: e24ee001 sub lr, lr, #1 stats->free_size -= next_block_size; a001016c: e06cc00a rsb ip, ip, sl prev->next = next; a0010170: e5830008 str r0, [r3, #8] next->prev = prev; a0010174: e580300c str r3, [r0, #12] _Heap_Block_set_size( block, block_size ); _Heap_Free_list_remove( next_block ); next_block = _Heap_Block_at( block, block_size ); next_block->size_and_flag |= HEAP_PREV_BLOCK_USED; a0010178: e5827004 str r7, [r2, #4] /* Statistics */ --stats->free_blocks; a001017c: e584e038 str lr, [r4, #56] ; 0x38 stats->free_size -= next_block_size; a0010180: e584c030 str ip, [r4, #48] ; 0x30 } block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); a0010184: e1a02005 mov r2, r5 a0010188: e1a03008 mov r3, r8 a001018c: e1a00004 mov r0, r4 a0010190: ebffee32 bl a000ba60 <_Heap_Block_allocate> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a0010194: e5902004 ldr r2, [r0, #4] a0010198: e1a03000 mov r3, r0 *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; /* Statistics */ ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; a001019c: e3a00000 mov r0, #0 a00101a0: e3c22001 bic r2, r2, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a00101a4: e2822004 add r2, r2, #4 block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size ); block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); *new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS; a00101a8: e0655002 rsb r5, r5, r2 a00101ac: e0833005 add r3, r3, r5 a00101b0: e5863000 str r3, [r6] /* Statistics */ ++stats->resizes; a00101b4: e5943054 ldr r3, [r4, #84] ; 0x54 a00101b8: e2833001 add r3, r3, #1 a00101bc: e5843054 str r3, [r4, #84] ; 0x54 a00101c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} new_alloc_size, old_size, new_size ); } return HEAP_RESIZE_FATAL_ERROR; a00101c4: e3a00002 mov r0, #2 <== NOT EXECUTED a00101c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED a00101cc: e3a00002 mov r0, #2 <== NOT EXECUTED } a00101d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED block_size += next_block_size; alloc_size += next_block_size; } if ( new_alloc_size > alloc_size ) { return HEAP_RESIZE_UNSATISFIED; a00101d4: e3a00001 mov r0, #1 *old_size = 0; *new_size = 0; if ( _Heap_Is_block_in_heap( heap, block ) ) { _Heap_Protection_block_check( heap, block ); return _Heap_Resize_block_checked( a00101d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a00101dc <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { a00101dc: e92d4070 push {r4, r5, r6, lr} a00101e0: e1a04000 mov r4, r0 a00101e4: e1a05001 mov r5, r1 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a00101e8: e1a00001 mov r0, r1 a00101ec: e5941010 ldr r1, [r4, #16] a00101f0: e1a06002 mov r6, r2 a00101f4: eb002a44 bl a001ab0c <__umodsi3> RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block a00101f8: e5943020 ldr r3, [r4, #32] RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); a00101fc: e2452008 sub r2, r5, #8 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); a0010200: e0602002 rsb r2, r0, r2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a0010204: e1520003 cmp r2, r3 a0010208: 3a000012 bcc a0010258 <_Heap_Size_of_alloc_area+0x7c> a001020c: e5941024 ldr r1, [r4, #36] ; 0x24 a0010210: e1520001 cmp r2, r1 a0010214: 8a00000f bhi a0010258 <_Heap_Size_of_alloc_area+0x7c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a0010218: e5920004 ldr r0, [r2, #4] a001021c: e3c00001 bic r0, r0, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a0010220: e0822000 add r2, r2, r0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a0010224: e1530002 cmp r3, r2 a0010228: 8a00000a bhi a0010258 <_Heap_Size_of_alloc_area+0x7c> a001022c: e1510002 cmp r1, r2 if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a0010230: 33a00000 movcc r0, #0 a0010234: 3a000009 bcc a0010260 <_Heap_Size_of_alloc_area+0x84> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a0010238: e5920004 ldr r0, [r2, #4] block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) a001023c: e2100001 ands r0, r0, #1 a0010240: 0a000006 beq a0010260 <_Heap_Size_of_alloc_area+0x84> ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; a0010244: e2655004 rsb r5, r5, #4 a0010248: e0852002 add r2, r5, r2 a001024c: e5862000 str r2, [r6] return true; a0010250: e3a00001 mov r0, #1 a0010254: e8bd8070 pop {r4, r5, r6, pc} if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; a0010258: e3a00000 mov r0, #0 <== NOT EXECUTED a001025c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } a0010260: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a000c59c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000c59c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; a000c5a0: e590c010 ldr ip, [r0, #16] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000c5a4: e24dd038 sub sp, sp, #56 ; 0x38 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { a000c5a8: e59f3560 ldr r3, [pc, #1376] ; a000cb10 <_Heap_Walk+0x574> Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; a000c5ac: e58dc024 str ip, [sp, #36] ; 0x24 uintptr_t const min_block_size = heap->min_block_size; a000c5b0: e590c014 ldr ip, [r0, #20] Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a000c5b4: e31200ff tst r2, #255 ; 0xff if ( !_System_state_Is_up( _System_state_Get() ) ) { a000c5b8: e5933000 ldr r3, [r3] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a000c5bc: e59f2550 ldr r2, [pc, #1360] ; a000cb14 <_Heap_Walk+0x578> a000c5c0: e59f9550 ldr r9, [pc, #1360] ; a000cb18 <_Heap_Walk+0x57c> int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a000c5c4: e58dc028 str ip, [sp, #40] ; 0x28 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a000c5c8: e590c024 ldr ip, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a000c5cc: 11a09002 movne r9, r2 if ( !_System_state_Is_up( _System_state_Get() ) ) { a000c5d0: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a000c5d4: e1a04000 mov r4, r0 a000c5d8: e1a0a001 mov sl, r1 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; a000c5dc: e5908020 ldr r8, [r0, #32] Heap_Block *const last_block = heap->last_block; a000c5e0: e58dc02c str ip, [sp, #44] ; 0x2c Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { a000c5e4: 0a000002 beq a000c5f4 <_Heap_Walk+0x58> } block = next_block; } while ( block != first_block ); return true; a000c5e8: e3a00001 mov r0, #1 } a000c5ec: e28dd038 add sp, sp, #56 ; 0x38 a000c5f0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( a000c5f4: e59dc028 ldr ip, [sp, #40] ; 0x28 a000c5f8: e5900018 ldr r0, [r0, #24] a000c5fc: e594101c ldr r1, [r4, #28] a000c600: e5942008 ldr r2, [r4, #8] a000c604: e594300c ldr r3, [r4, #12] a000c608: e58dc000 str ip, [sp] a000c60c: e59dc02c ldr ip, [sp, #44] ; 0x2c a000c610: e98d0103 stmib sp, {r0, r1, r8} a000c614: e58dc010 str ip, [sp, #16] a000c618: e58d2014 str r2, [sp, #20] a000c61c: e58d3018 str r3, [sp, #24] a000c620: e1a0000a mov r0, sl a000c624: e3a01000 mov r1, #0 a000c628: e59f24ec ldr r2, [pc, #1260] ; a000cb1c <_Heap_Walk+0x580> a000c62c: e59d3024 ldr r3, [sp, #36] ; 0x24 a000c630: e12fff39 blx r9 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a000c634: e59dc024 ldr ip, [sp, #36] ; 0x24 a000c638: e35c0000 cmp ip, #0 a000c63c: 0a000024 beq a000c6d4 <_Heap_Walk+0x138> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a000c640: e59dc024 ldr ip, [sp, #36] ; 0x24 a000c644: e21c5007 ands r5, ip, #7 a000c648: 1a000027 bne a000c6ec <_Heap_Walk+0x150> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000c64c: e59d0028 ldr r0, [sp, #40] ; 0x28 a000c650: e59d1024 ldr r1, [sp, #36] ; 0x24 a000c654: ebffe269 bl a0005000 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a000c658: e2506000 subs r6, r0, #0 a000c65c: 1a000029 bne a000c708 <_Heap_Walk+0x16c> a000c660: e2880008 add r0, r8, #8 a000c664: e59d1024 ldr r1, [sp, #36] ; 0x24 a000c668: ebffe264 bl a0005000 <__umodsi3> ); return false; } if ( a000c66c: e2507000 subs r7, r0, #0 a000c670: 1a00002b bne a000c724 <_Heap_Walk+0x188> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000c674: e598b004 ldr fp, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a000c678: e21b5001 ands r5, fp, #1 a000c67c: 0a00002f beq a000c740 <_Heap_Walk+0x1a4> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000c680: e59dc02c ldr ip, [sp, #44] ; 0x2c a000c684: e59c3004 ldr r3, [ip, #4] a000c688: e3c33001 bic r3, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000c68c: e08c3003 add r3, ip, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000c690: e5935004 ldr r5, [r3, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a000c694: e2155001 ands r5, r5, #1 a000c698: 0a000007 beq a000c6bc <_Heap_Walk+0x120> ); return false; } if ( a000c69c: e1580003 cmp r8, r3 a000c6a0: 0a00002c beq a000c758 <_Heap_Walk+0x1bc> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a000c6a4: e1a0000a mov r0, sl <== NOT EXECUTED a000c6a8: e3a01001 mov r1, #1 <== NOT EXECUTED a000c6ac: e59f246c ldr r2, [pc, #1132] ; a000cb20 <_Heap_Walk+0x584> <== NOT EXECUTED a000c6b0: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c6b4: e1a00007 mov r0, r7 <== NOT EXECUTED a000c6b8: eaffffcb b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( a000c6bc: e1a0000a mov r0, sl <== NOT EXECUTED a000c6c0: e3a01001 mov r1, #1 <== NOT EXECUTED a000c6c4: e59f2458 ldr r2, [pc, #1112] ; a000cb24 <_Heap_Walk+0x588> <== NOT EXECUTED a000c6c8: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c6cc: e1a00005 mov r0, r5 <== NOT EXECUTED a000c6d0: eaffffc5 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); a000c6d4: e1a0000a mov r0, sl a000c6d8: e3a01001 mov r1, #1 a000c6dc: e59f2444 ldr r2, [pc, #1092] ; a000cb28 <_Heap_Walk+0x58c> a000c6e0: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c6e4: e59d0024 ldr r0, [sp, #36] ; 0x24 a000c6e8: eaffffbf b a000c5ec <_Heap_Walk+0x50> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( a000c6ec: e1a0000a mov r0, sl a000c6f0: e3a01001 mov r1, #1 a000c6f4: e59f2430 ldr r2, [pc, #1072] ; a000cb2c <_Heap_Walk+0x590> a000c6f8: e1a0300c mov r3, ip a000c6fc: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c700: e3a00000 mov r0, #0 a000c704: eaffffb8 b a000c5ec <_Heap_Walk+0x50> return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( a000c708: e1a0000a mov r0, sl a000c70c: e3a01001 mov r1, #1 a000c710: e59f2418 ldr r2, [pc, #1048] ; a000cb30 <_Heap_Walk+0x594> a000c714: e59d3028 ldr r3, [sp, #40] ; 0x28 a000c718: e12fff39 blx r9 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c71c: e1a00005 mov r0, r5 a000c720: eaffffb1 b a000c5ec <_Heap_Walk+0x50> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a000c724: e1a0000a mov r0, sl <== NOT EXECUTED a000c728: e3a01001 mov r1, #1 <== NOT EXECUTED a000c72c: e59f2400 ldr r2, [pc, #1024] ; a000cb34 <_Heap_Walk+0x598> <== NOT EXECUTED a000c730: e1a03008 mov r3, r8 <== NOT EXECUTED a000c734: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c738: e1a00006 mov r0, r6 <== NOT EXECUTED a000c73c: eaffffaa b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( a000c740: e1a0000a mov r0, sl <== NOT EXECUTED a000c744: e3a01001 mov r1, #1 <== NOT EXECUTED a000c748: e59f23e8 ldr r2, [pc, #1000] ; a000cb38 <_Heap_Walk+0x59c> <== NOT EXECUTED a000c74c: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c750: e1a00005 mov r0, r5 <== NOT EXECUTED a000c754: eaffffa4 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a000c758: e5945008 ldr r5, [r4, #8] int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a000c75c: e5947010 ldr r7, [r4, #16] RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block a000c760: e5943020 ldr r3, [r4, #32] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { a000c764: e1540005 cmp r4, r5 a000c768: 0a00000b beq a000c79c <_Heap_Walk+0x200> && (uintptr_t) block <= (uintptr_t) heap->last_block; a000c76c: e1530005 cmp r3, r5 a000c770: 9a0000a0 bls a000c9f8 <_Heap_Walk+0x45c> if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( a000c774: e1a0000a mov r0, sl <== NOT EXECUTED a000c778: e3a01001 mov r1, #1 <== NOT EXECUTED a000c77c: e59f23b8 ldr r2, [pc, #952] ; a000cb3c <_Heap_Walk+0x5a0> <== NOT EXECUTED a000c780: e1a03005 mov r3, r5 <== NOT EXECUTED a000c784: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000c788: e3a00000 mov r0, #0 <== NOT EXECUTED a000c78c: eaffff96 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED a000c790: e1a03008 mov r3, r8 a000c794: e59db034 ldr fp, [sp, #52] ; 0x34 a000c798: e59d8030 ldr r8, [sp, #48] ; 0x30 ); return false; } if ( _Heap_Is_used( free_block ) ) { a000c79c: e1a06008 mov r6, r8 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000c7a0: e3cb7001 bic r7, fp, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); a000c7a4: e0875006 add r5, r7, r6 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000c7a8: e1530005 cmp r3, r5 a000c7ac: 9a000007 bls a000c7d0 <_Heap_Walk+0x234> Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( a000c7b0: e1a0000a mov r0, sl <== NOT EXECUTED a000c7b4: e58d5000 str r5, [sp] <== NOT EXECUTED a000c7b8: e3a01001 mov r1, #1 <== NOT EXECUTED a000c7bc: e59f237c ldr r2, [pc, #892] ; a000cb40 <_Heap_Walk+0x5a4> <== NOT EXECUTED a000c7c0: e1a03006 mov r3, r6 <== NOT EXECUTED a000c7c4: e12fff39 blx r9 <== NOT EXECUTED "block 0x%08x: next block 0x%08x not in heap\n", block, next_block ); return false; a000c7c8: e3a00000 mov r0, #0 <== NOT EXECUTED a000c7cc: eaffff86 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED a000c7d0: e5943024 ldr r3, [r4, #36] ; 0x24 a000c7d4: e1530005 cmp r3, r5 a000c7d8: 3afffff4 bcc a000c7b0 <_Heap_Walk+0x214> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000c7dc: e1a00007 mov r0, r7 a000c7e0: e59d1024 ldr r1, [sp, #36] ; 0x24 a000c7e4: ebffe205 bl a0005000 <__umodsi3> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; a000c7e8: e59dc02c ldr ip, [sp, #44] ; 0x2c a000c7ec: e056300c subs r3, r6, ip a000c7f0: 13a03001 movne r3, #1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a000c7f4: e3500000 cmp r0, #0 a000c7f8: 0a000001 beq a000c804 <_Heap_Walk+0x268> a000c7fc: e3530000 cmp r3, #0 <== NOT EXECUTED a000c800: 1a000063 bne a000c994 <_Heap_Walk+0x3f8> <== NOT EXECUTED ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a000c804: e59dc028 ldr ip, [sp, #40] ; 0x28 a000c808: e15c0007 cmp ip, r7 a000c80c: 9a000001 bls a000c818 <_Heap_Walk+0x27c> a000c810: e3530000 cmp r3, #0 <== NOT EXECUTED a000c814: 1a000066 bne a000c9b4 <_Heap_Walk+0x418> <== NOT EXECUTED ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a000c818: e1560005 cmp r6, r5 a000c81c: 3a000001 bcc a000c828 <_Heap_Walk+0x28c> a000c820: e3530000 cmp r3, #0 a000c824: 1a00006b bne a000c9d8 <_Heap_Walk+0x43c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000c828: e5953004 ldr r3, [r5, #4] a000c82c: e20bb001 and fp, fp, #1 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a000c830: e3130001 tst r3, #1 a000c834: 0a000015 beq a000c890 <_Heap_Walk+0x2f4> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a000c838: e35b0000 cmp fp, #0 (*printer)( a000c83c: e58d7000 str r7, [sp] if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a000c840: 0a00000a beq a000c870 <_Heap_Walk+0x2d4> (*printer)( a000c844: e1a0000a mov r0, sl a000c848: e3a01000 mov r1, #0 a000c84c: e59f22f0 ldr r2, [pc, #752] ; a000cb44 <_Heap_Walk+0x5a8> a000c850: e1a03006 mov r3, r6 a000c854: e12fff39 blx r9 block->prev_size ); } block = next_block; } while ( block != first_block ); a000c858: e1580005 cmp r8, r5 a000c85c: 0affff61 beq a000c5e8 <_Heap_Walk+0x4c> a000c860: e595b004 ldr fp, [r5, #4] a000c864: e5943020 ldr r3, [r4, #32] a000c868: e1a06005 mov r6, r5 a000c86c: eaffffcb b a000c7a0 <_Heap_Walk+0x204> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a000c870: e5963000 ldr r3, [r6] a000c874: e1a0000a mov r0, sl a000c878: e1a0100b mov r1, fp a000c87c: e58d3004 str r3, [sp, #4] a000c880: e59f22c0 ldr r2, [pc, #704] ; a000cb48 <_Heap_Walk+0x5ac> a000c884: e1a03006 mov r3, r6 a000c888: e12fff39 blx r9 a000c88c: eafffff1 b a000c858 <_Heap_Walk+0x2bc> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? a000c890: e596200c ldr r2, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a000c894: e5943008 ldr r3, [r4, #8] return _Heap_Free_list_head(heap)->next; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap ) { return _Heap_Free_list_tail(heap)->prev; a000c898: e594100c ldr r1, [r4, #12] a000c89c: e1530002 cmp r3, r2 a000c8a0: 059f02a4 ldreq r0, [pc, #676] ; a000cb4c <_Heap_Walk+0x5b0> a000c8a4: 0a000003 beq a000c8b8 <_Heap_Walk+0x31c> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a000c8a8: e59f32a0 ldr r3, [pc, #672] ; a000cb50 <_Heap_Walk+0x5b4> a000c8ac: e1540002 cmp r4, r2 a000c8b0: e59f029c ldr r0, [pc, #668] ; a000cb54 <_Heap_Walk+0x5b8> a000c8b4: 11a00003 movne r0, r3 block->next, block->next == last_free_block ? a000c8b8: e5963008 ldr r3, [r6, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a000c8bc: e1510003 cmp r1, r3 a000c8c0: 059f1290 ldreq r1, [pc, #656] ; a000cb58 <_Heap_Walk+0x5bc> a000c8c4: 0a000003 beq a000c8d8 <_Heap_Walk+0x33c> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a000c8c8: e59fc28c ldr ip, [pc, #652] ; a000cb5c <_Heap_Walk+0x5c0> a000c8cc: e1540003 cmp r4, r3 a000c8d0: e59f1278 ldr r1, [pc, #632] ; a000cb50 <_Heap_Walk+0x5b4> a000c8d4: 01a0100c moveq r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( a000c8d8: e58d2004 str r2, [sp, #4] a000c8dc: e58d0008 str r0, [sp, #8] a000c8e0: e58d300c str r3, [sp, #12] a000c8e4: e58d1010 str r1, [sp, #16] a000c8e8: e1a03006 mov r3, r6 a000c8ec: e58d7000 str r7, [sp] a000c8f0: e1a0000a mov r0, sl a000c8f4: e3a01000 mov r1, #0 a000c8f8: e59f2260 ldr r2, [pc, #608] ; a000cb60 <_Heap_Walk+0x5c4> a000c8fc: e12fff39 blx r9 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a000c900: e5953000 ldr r3, [r5] a000c904: e1570003 cmp r7, r3 a000c908: 1a000010 bne a000c950 <_Heap_Walk+0x3b4> ); return false; } if ( !prev_used ) { a000c90c: e35b0000 cmp fp, #0 a000c910: 0a000018 beq a000c978 <_Heap_Walk+0x3dc> return &heap->free_list; } RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap ) { return _Heap_Free_list_head(heap)->next; a000c914: e5943008 ldr r3, [r4, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { a000c918: e1540003 cmp r4, r3 a000c91c: 0a000004 beq a000c934 <_Heap_Walk+0x398> if ( free_block == block ) { a000c920: e1560003 cmp r6, r3 a000c924: 0affffcb beq a000c858 <_Heap_Walk+0x2bc> return true; } free_block = free_block->next; a000c928: e5933008 ldr r3, [r3, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { a000c92c: e1540003 cmp r4, r3 a000c930: 1afffffa bne a000c920 <_Heap_Walk+0x384> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a000c934: e1a0000a mov r0, sl <== NOT EXECUTED a000c938: e3a01001 mov r1, #1 <== NOT EXECUTED a000c93c: e59f2220 ldr r2, [pc, #544] ; a000cb64 <_Heap_Walk+0x5c8> <== NOT EXECUTED a000c940: e1a03006 mov r3, r6 <== NOT EXECUTED a000c944: e12fff39 blx r9 <== NOT EXECUTED return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a000c948: e3a00000 mov r0, #0 <== NOT EXECUTED a000c94c: eaffff26 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( a000c950: e58d3004 str r3, [sp, #4] <== NOT EXECUTED a000c954: e1a0000a mov r0, sl <== NOT EXECUTED a000c958: e58d7000 str r7, [sp] <== NOT EXECUTED a000c95c: e58d5008 str r5, [sp, #8] <== NOT EXECUTED a000c960: e3a01001 mov r1, #1 <== NOT EXECUTED a000c964: e59f21fc ldr r2, [pc, #508] ; a000cb68 <_Heap_Walk+0x5cc> <== NOT EXECUTED a000c968: e1a03006 mov r3, r6 <== NOT EXECUTED a000c96c: e12fff39 blx r9 <== NOT EXECUTED return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a000c970: e3a00000 mov r0, #0 <== NOT EXECUTED a000c974: eaffff1c b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( !prev_used ) { (*printer)( a000c978: e1a0000a mov r0, sl <== NOT EXECUTED a000c97c: e3a01001 mov r1, #1 <== NOT EXECUTED a000c980: e59f21e4 ldr r2, [pc, #484] ; a000cb6c <_Heap_Walk+0x5d0> <== NOT EXECUTED a000c984: e1a03006 mov r3, r6 <== NOT EXECUTED a000c988: e12fff39 blx r9 <== NOT EXECUTED return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a000c98c: e1a0000b mov r0, fp <== NOT EXECUTED a000c990: eaffff15 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( a000c994: e1a0000a mov r0, sl <== NOT EXECUTED a000c998: e58d7000 str r7, [sp] <== NOT EXECUTED a000c99c: e3a01001 mov r1, #1 <== NOT EXECUTED a000c9a0: e59f21c8 ldr r2, [pc, #456] ; a000cb70 <_Heap_Walk+0x5d4> <== NOT EXECUTED a000c9a4: e1a03006 mov r3, r6 <== NOT EXECUTED a000c9a8: e12fff39 blx r9 <== NOT EXECUTED "block 0x%08x: block size %u not page aligned\n", block, block_size ); return false; a000c9ac: e3a00000 mov r0, #0 <== NOT EXECUTED a000c9b0: eaffff0d b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( a000c9b4: e1a0000a mov r0, sl <== NOT EXECUTED a000c9b8: e58d7000 str r7, [sp] <== NOT EXECUTED a000c9bc: e58dc004 str ip, [sp, #4] <== NOT EXECUTED a000c9c0: e3a01001 mov r1, #1 <== NOT EXECUTED a000c9c4: e59f21a8 ldr r2, [pc, #424] ; a000cb74 <_Heap_Walk+0x5d8> <== NOT EXECUTED a000c9c8: e1a03006 mov r3, r6 <== NOT EXECUTED a000c9cc: e12fff39 blx r9 <== NOT EXECUTED block, block_size, min_block_size ); return false; a000c9d0: e3a00000 mov r0, #0 <== NOT EXECUTED a000c9d4: eaffff04 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( a000c9d8: e1a0000a mov r0, sl <== NOT EXECUTED a000c9dc: e58d5000 str r5, [sp] <== NOT EXECUTED a000c9e0: e3a01001 mov r1, #1 <== NOT EXECUTED a000c9e4: e59f218c ldr r2, [pc, #396] ; a000cb78 <_Heap_Walk+0x5dc> <== NOT EXECUTED a000c9e8: e1a03006 mov r3, r6 <== NOT EXECUTED a000c9ec: e12fff39 blx r9 <== NOT EXECUTED "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; a000c9f0: e3a00000 mov r0, #0 <== NOT EXECUTED a000c9f4: eafffefc b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000c9f8: e594c024 ldr ip, [r4, #36] ; 0x24 a000c9fc: e15c0005 cmp ip, r5 a000ca00: 3affff5b bcc a000c774 <_Heap_Walk+0x1d8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000ca04: e2850008 add r0, r5, #8 a000ca08: e1a01007 mov r1, r7 a000ca0c: e58d3020 str r3, [sp, #32] a000ca10: e58dc01c str ip, [sp, #28] a000ca14: ebffe179 bl a0005000 <__umodsi3> ); return false; } if ( a000ca18: e3500000 cmp r0, #0 a000ca1c: e59d3020 ldr r3, [sp, #32] a000ca20: e59dc01c ldr ip, [sp, #28] a000ca24: 1a000032 bne a000caf4 <_Heap_Walk+0x558> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ca28: e5952004 ldr r2, [r5, #4] a000ca2c: e3c22001 bic r2, r2, #1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ca30: e0852002 add r2, r5, r2 a000ca34: e5922004 ldr r2, [r2, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a000ca38: e3120001 tst r2, #1 a000ca3c: 1a000025 bne a000cad8 <_Heap_Walk+0x53c> a000ca40: e58d8030 str r8, [sp, #48] ; 0x30 a000ca44: e58db034 str fp, [sp, #52] ; 0x34 a000ca48: e1a01004 mov r1, r4 a000ca4c: e1a06005 mov r6, r5 a000ca50: e1a08003 mov r8, r3 a000ca54: e1a0b00c mov fp, ip a000ca58: ea000013 b a000caac <_Heap_Walk+0x510> return false; } prev_block = free_block; free_block = free_block->next; a000ca5c: e5955008 ldr r5, [r5, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { a000ca60: e1540005 cmp r4, r5 a000ca64: 0affff49 beq a000c790 <_Heap_Walk+0x1f4> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000ca68: e1550008 cmp r5, r8 a000ca6c: 3affff40 bcc a000c774 <_Heap_Walk+0x1d8> a000ca70: e155000b cmp r5, fp RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000ca74: e2850008 add r0, r5, #8 a000ca78: e1a01007 mov r1, r7 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; a000ca7c: 8affff3c bhi a000c774 <_Heap_Walk+0x1d8> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a000ca80: ebffe15e bl a0005000 <__umodsi3> ); return false; } if ( a000ca84: e3500000 cmp r0, #0 a000ca88: 1a000019 bne a000caf4 <_Heap_Walk+0x558> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; a000ca8c: e5953004 ldr r3, [r5, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a000ca90: e1a01006 mov r1, r6 a000ca94: e1a06005 mov r6, r5 a000ca98: e3c33001 bic r3, r3, #1 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; a000ca9c: e0833005 add r3, r3, r5 a000caa0: e5933004 ldr r3, [r3, #4] a000caa4: e3130001 tst r3, #1 a000caa8: 1a00000a bne a000cad8 <_Heap_Walk+0x53c> ); return false; } if ( free_block->prev != prev_block ) { a000caac: e595200c ldr r2, [r5, #12] a000cab0: e1520001 cmp r2, r1 a000cab4: 0affffe8 beq a000ca5c <_Heap_Walk+0x4c0> (*printer)( a000cab8: e58d2000 str r2, [sp] <== NOT EXECUTED a000cabc: e1a0000a mov r0, sl <== NOT EXECUTED a000cac0: e3a01001 mov r1, #1 <== NOT EXECUTED a000cac4: e59f20b0 ldr r2, [pc, #176] ; a000cb7c <_Heap_Walk+0x5e0> <== NOT EXECUTED a000cac8: e1a03005 mov r3, r5 <== NOT EXECUTED a000cacc: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000cad0: e3a00000 mov r0, #0 <== NOT EXECUTED a000cad4: eafffec4 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED return false; } if ( _Heap_Is_used( free_block ) ) { (*printer)( a000cad8: e1a0000a mov r0, sl <== NOT EXECUTED a000cadc: e3a01001 mov r1, #1 <== NOT EXECUTED a000cae0: e59f2098 ldr r2, [pc, #152] ; a000cb80 <_Heap_Walk+0x5e4> <== NOT EXECUTED a000cae4: e1a03005 mov r3, r5 <== NOT EXECUTED a000cae8: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000caec: e3a00000 mov r0, #0 <== NOT EXECUTED a000caf0: eafffebd b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a000caf4: e1a0000a mov r0, sl <== NOT EXECUTED a000caf8: e3a01001 mov r1, #1 <== NOT EXECUTED a000cafc: e59f2080 ldr r2, [pc, #128] ; a000cb84 <_Heap_Walk+0x5e8> <== NOT EXECUTED a000cb00: e1a03005 mov r3, r5 <== NOT EXECUTED a000cb04: e12fff39 blx r9 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a000cb08: e3a00000 mov r0, #0 <== NOT EXECUTED a000cb0c: eafffeb6 b a000c5ec <_Heap_Walk+0x50> <== NOT EXECUTED =============================================================================== a000c550 <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { a000c550: e92d000c push {r2, r3} <== NOT EXECUTED a000c554: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED va_list ap; if ( error ) { a000c558: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { a000c55c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a000c560: e1a01000 mov r1, r0 <== NOT EXECUTED va_list ap; if ( error ) { printk( "FAIL[%d]: ", source ); a000c564: 159f0028 ldrne r0, [pc, #40] ; a000c594 <_Heap_Walk_print+0x44><== NOT EXECUTED } else { printk( "PASS[%d]: ", source ); a000c568: 059f0028 ldreq r0, [pc, #40] ; a000c598 <_Heap_Walk_print+0x48><== NOT EXECUTED a000c56c: ebffed28 bl a0007a14 <== NOT EXECUTED } va_start( ap, fmt ); a000c570: e28d300c add r3, sp, #12 <== NOT EXECUTED vprintk( fmt, ap ); a000c574: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED a000c578: e1a01003 mov r1, r3 <== NOT EXECUTED printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); a000c57c: e58d3000 str r3, [sp] <== NOT EXECUTED vprintk( fmt, ap ); a000c580: ebfff772 bl a000a350 <== NOT EXECUTED va_end( ap ); } a000c584: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000c588: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED a000c58c: e28dd008 add sp, sp, #8 <== NOT EXECUTED a000c590: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000bba4 <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { a000bba4: e52de004 push {lr} ; (str lr, [sp, #-4]!) a000bba8: e24dd00c sub sp, sp, #12 a000bbac: e1a04000 mov r4, r0 a000bbb0: e20160ff and r6, r1, #255 ; 0xff Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); a000bbb4: e1a0000d mov r0, sp a000bbb8: e59f1040 ldr r1, [pc, #64] ; a000bc00 <_Internal_error_Occurred+0x5c> a000bbbc: e1a05002 mov r5, r2 Internal_errors_Source source, bool is_internal, Internal_errors_t error ) { User_extensions_Fatal_context ctx = { source, is_internal, error }; a000bbc0: e58d2008 str r2, [sp, #8] a000bbc4: e58d4000 str r4, [sp] a000bbc8: e5cd6004 strb r6, [sp, #4] _User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor ); a000bbcc: eb0007c5 bl a000dae8 <_User_extensions_Iterate> _User_extensions_Fatal( the_source, is_internal, the_error ); _Internal_errors_What_happened.the_source = the_source; a000bbd0: e59f302c ldr r3, [pc, #44] ; a000bc04 <_Internal_error_Occurred+0x60><== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; a000bbd4: e3a02005 mov r2, #5 <== NOT EXECUTED a000bbd8: e5834000 str r4, [r3] <== NOT EXECUTED _Internal_errors_What_happened.is_internal = is_internal; a000bbdc: e5c36004 strb r6, [r3, #4] <== NOT EXECUTED _Internal_errors_What_happened.the_error = the_error; a000bbe0: e5835008 str r5, [r3, #8] <== NOT EXECUTED a000bbe4: e59f301c ldr r3, [pc, #28] ; a000bc08 <_Internal_error_Occurred+0x64><== NOT EXECUTED a000bbe8: e5832000 str r2, [r3] <== NOT EXECUTED uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000bbec: e10f2000 mrs r2, CPSR <== NOT EXECUTED a000bbf0: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED a000bbf4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); a000bbf8: e1a00005 mov r0, r5 <== NOT EXECUTED a000bbfc: eafffffe b a000bbfc <_Internal_error_Occurred+0x58> <== NOT EXECUTED =============================================================================== a000bcc0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { a000bcc0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000bcc4: e5904034 ldr r4, [r0, #52] ; 0x34 */ void _Objects_Extend_information( Objects_Information *information ) { a000bcc8: e24dd014 sub sp, sp, #20 a000bccc: e1a05000 mov r5, r0 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000bcd0: e3540000 cmp r4, #0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000bcd4: e1d070b8 ldrh r7, [r0, #8] index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000bcd8: e1d081b0 ldrh r8, [r0, #16] a000bcdc: 0a0000a0 beq a000bf64 <_Objects_Extend_information+0x2a4> block_count = 0; else { block_count = information->maximum / information->allocation_size; a000bce0: e1d0a1b4 ldrh sl, [r0, #20] a000bce4: e1a00008 mov r0, r8 a000bce8: e1a0100a mov r1, sl a000bcec: eb003b40 bl a001a9f4 <__aeabi_uidiv> a000bcf0: e1a0b800 lsl fp, r0, #16 for ( ; block < block_count; block++ ) { a000bcf4: e1b0b82b lsrs fp, fp, #16 a000bcf8: 0a0000a1 beq a000bf84 <_Objects_Extend_information+0x2c4> if ( information->object_blocks[ block ] == NULL ) { a000bcfc: e5949000 ldr r9, [r4] a000bd00: e1a0200a mov r2, sl a000bd04: e3590000 cmp r9, #0 a000bd08: 11a03004 movne r3, r4 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000bd0c: 11a06007 movne r6, r7 index_base = minimum_index; block = 0; a000bd10: 13a04000 movne r4, #0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000bd14: 01a06007 moveq r6, r7 index_base = minimum_index; block = 0; a000bd18: 01a04009 moveq r4, r9 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { a000bd1c: 1a000003 bne a000bd30 <_Objects_Extend_information+0x70> a000bd20: ea000007 b a000bd44 <_Objects_Extend_information+0x84> <== NOT EXECUTED a000bd24: e5b39004 ldr r9, [r3, #4]! a000bd28: e3590000 cmp r9, #0 a000bd2c: 0a000004 beq a000bd44 <_Objects_Extend_information+0x84> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a000bd30: e2844001 add r4, r4, #1 a000bd34: e15b0004 cmp fp, r4 if ( information->object_blocks[ block ] == NULL ) { do_extend = false; break; } else index_base += information->allocation_size; a000bd38: e086600a add r6, r6, sl if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a000bd3c: 8afffff8 bhi a000bd24 <_Objects_Extend_information+0x64> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a000bd40: e3a09001 mov r9, #1 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; a000bd44: e0888002 add r8, r8, r2 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { a000bd48: e3580801 cmp r8, #65536 ; 0x10000 a000bd4c: 2a000063 bcs a000bee0 <_Objects_Extend_information+0x220> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { a000bd50: e5d53012 ldrb r3, [r5, #18] /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; a000bd54: e5950018 ldr r0, [r5, #24] if ( information->auto_extend ) { a000bd58: e3530000 cmp r3, #0 /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; a000bd5c: e0000092 mul r0, r2, r0 if ( information->auto_extend ) { a000bd60: 1a000060 bne a000bee8 <_Objects_Extend_information+0x228> new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); a000bd64: eb0008b8 bl a000e04c <_Workspace_Allocate_or_fatal_error> a000bd68: e58d0004 str r0, [sp, #4] } /* * Do we need to grow the tables? */ if ( do_extend ) { a000bd6c: e3590000 cmp r9, #0 a000bd70: 0a000039 beq a000be5c <_Objects_Extend_information+0x19c> */ /* * Up the block count and maximum */ block_count++; a000bd74: e28b9001 add r9, fp, #1 * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { a000bd78: e5d53012 ldrb r3, [r5, #18] /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a000bd7c: e0890089 add r0, r9, r9, lsl #1 ((maximum + minimum_index) * sizeof(Objects_Control *)); a000bd80: e0880000 add r0, r8, r0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + a000bd84: e0800007 add r0, r0, r7 ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { a000bd88: e3530000 cmp r3, #0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * a000bd8c: e1a00100 lsl r0, r0, #2 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { a000bd90: 0a000059 beq a000befc <_Objects_Extend_information+0x23c> object_blocks = _Workspace_Allocate( block_size ); a000bd94: eb0008a2 bl a000e024 <_Workspace_Allocate> if ( !object_blocks ) { a000bd98: e250a000 subs sl, r0, #0 a000bd9c: 0a000075 beq a000bf78 <_Objects_Extend_information+0x2b8> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a000bda0: e1d521b0 ldrh r2, [r5, #16] RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); a000bda4: e08a3109 add r3, sl, r9, lsl #2 a000bda8: e08a9189 add r9, sl, r9, lsl #3 a000bdac: e1570002 cmp r7, r2 a000bdb0: 3a000058 bcc a000bf18 <_Objects_Extend_information+0x258> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a000bdb4: e3570000 cmp r7, #0 a000bdb8: 13a02000 movne r2, #0 a000bdbc: 11a01009 movne r1, r9 local_table[ index ] = NULL; a000bdc0: 11a00002 movne r0, r2 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a000bdc4: 0a000003 beq a000bdd8 <_Objects_Extend_information+0x118> a000bdc8: e2822001 add r2, r2, #1 a000bdcc: e1570002 cmp r7, r2 local_table[ index ] = NULL; a000bdd0: e4810004 str r0, [r1], #4 } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { a000bdd4: 8afffffb bhi a000bdc8 <_Objects_Extend_information+0x108> a000bdd8: e1a0b10b lsl fp, fp, #2 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); a000bddc: e1d501b4 ldrh r0, [r5, #20] } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; a000bde0: e3a0c000 mov ip, #0 a000bde4: e78ac00b str ip, [sl, fp] inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); a000bde8: e0860000 add r0, r6, r0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; a000bdec: e1560000 cmp r6, r0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; a000bdf0: e783c00b str ip, [r3, fp] for ( index=index_base ; a000bdf4: 2a000005 bcs a000be10 <_Objects_Extend_information+0x150> a000bdf8: e0891106 add r1, r9, r6, lsl #2 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( a000bdfc: e1a02006 mov r2, r6 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { a000be00: e2822001 add r2, r2, #1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; a000be04: e1500002 cmp r0, r2 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; a000be08: e481c004 str ip, [r1], #4 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; a000be0c: 8afffffb bhi a000be00 <_Objects_Extend_information+0x140> a000be10: e10f2000 mrs r2, CPSR a000be14: e3821080 orr r1, r2, #128 ; 0x80 a000be18: e129f001 msr CPSR_fc, r1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a000be1c: e5951000 ldr r1, [r5] information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( a000be20: e1d500b4 ldrh r0, [r5, #4] old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; a000be24: e1a08808 lsl r8, r8, #16 a000be28: e1a01c01 lsl r1, r1, #24 a000be2c: e3811801 orr r1, r1, #65536 ; 0x10000 a000be30: e1a08828 lsr r8, r8, #16 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a000be34: e1811d80 orr r1, r1, r0, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a000be38: e1811008 orr r1, r1, r8 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; a000be3c: e5950034 ldr r0, [r5, #52] ; 0x34 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; a000be40: e5853030 str r3, [r5, #48] ; 0x30 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; a000be44: e585a034 str sl, [r5, #52] ; 0x34 information->inactive_per_block = inactive_per_block; information->local_table = local_table; a000be48: e585901c str r9, [r5, #28] information->maximum = (Objects_Maximum) maximum; a000be4c: e1c581b0 strh r8, [r5, #16] information->maximum_id = _Objects_Build_id( a000be50: e585100c str r1, [r5, #12] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000be54: e129f002 msr CPSR_fc, r2 information->maximum ); _ISR_Enable( level ); _Workspace_Free( old_tables ); a000be58: eb000877 bl a000e03c <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a000be5c: e5953034 ldr r3, [r5, #52] ; 0x34 a000be60: e59d2004 ldr r2, [sp, #4] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a000be64: e28d0008 add r0, sp, #8 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a000be68: e2857020 add r7, r5, #32 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a000be6c: e7832104 str r2, [r3, r4, lsl #2] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( a000be70: e5951034 ldr r1, [r5, #52] ; 0x34 a000be74: e1d521b4 ldrh r2, [r5, #20] a000be78: e5953018 ldr r3, [r5, #24] a000be7c: e7911104 ldr r1, [r1, r4, lsl #2] a000be80: ebfffceb bl a000b234 <_Chain_Initialize> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; a000be84: e1a04104 lsl r4, r4, #2 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { a000be88: ea000008 b a000beb0 <_Objects_Extend_information+0x1f0> a000be8c: e5952000 ldr r2, [r5] the_object->id = _Objects_Build_id( a000be90: e1d5c0b4 ldrh ip, [r5, #4] a000be94: e1a02c02 lsl r2, r2, #24 a000be98: e3822801 orr r2, r2, #65536 ; 0x10000 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a000be9c: e1822d8c orr r2, r2, ip, lsl #27 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a000bea0: e1822006 orr r2, r2, r6 a000bea4: e5832008 str r2, [r3, #8] information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a000bea8: ebfffcc9 bl a000b1d4 <_Chain_Append> index++; a000beac: e2866001 add r6, r6, #1 /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { a000beb0: e28d0008 add r0, sp, #8 a000beb4: ebfffcd1 bl a000b200 <_Chain_Get> a000beb8: e2503000 subs r3, r0, #0 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); a000bebc: e1a01003 mov r1, r3 a000bec0: 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 ) { a000bec4: 1afffff0 bne a000be8c <_Objects_Extend_information+0x1cc> index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a000bec8: e1d522bc ldrh r2, [r5, #44] ; 0x2c _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a000becc: e1d531b4 ldrh r3, [r5, #20] a000bed0: e5951030 ldr r1, [r5, #48] ; 0x30 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); a000bed4: e0832002 add r2, r3, r2 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; a000bed8: e7813004 str r3, [r1, r4] information->inactive = a000bedc: e1c522bc strh r2, [r5, #44] ; 0x2c (Objects_Maximum)(information->inactive + information->allocation_size); } a000bee0: e28dd014 add sp, sp, #20 a000bee4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); a000bee8: eb00084d bl a000e024 <_Workspace_Allocate> if ( !new_object_block ) a000beec: e3500000 cmp r0, #0 a000bef0: e58d0004 str r0, [sp, #4] a000bef4: 1affff9c bne a000bd6c <_Objects_Extend_information+0xac> a000bef8: eafffff8 b a000bee0 <_Objects_Extend_information+0x220> if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); a000befc: eb000852 bl a000e04c <_Workspace_Allocate_or_fatal_error> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a000bf00: e1d521b0 ldrh r2, [r5, #16] if ( !object_blocks ) { _Workspace_Free( new_object_block ); return; } } else { object_blocks = _Workspace_Allocate_or_fatal_error( block_size ); a000bf04: e1a0a000 mov sl, r0 a000bf08: e08a3109 add r3, sl, r9, lsl #2 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { a000bf0c: e1570002 cmp r7, r2 a000bf10: e08a9189 add r9, sl, r9, lsl #3 a000bf14: 2affffa6 bcs a000bdb4 <_Objects_Extend_information+0xf4> /* * 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, a000bf18: e1a0b10b lsl fp, fp, #2 a000bf1c: e5951034 ldr r1, [r5, #52] ; 0x34 a000bf20: e1a0200b mov r2, fp a000bf24: e1a0000a mov r0, sl a000bf28: e58d3000 str r3, [sp] a000bf2c: eb0018f9 bl a0012318 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, a000bf30: e59d3000 ldr r3, [sp] a000bf34: e5951030 ldr r1, [r5, #48] ; 0x30 a000bf38: e1a0200b mov r2, fp a000bf3c: e1a00003 mov r0, r3 a000bf40: eb0018f4 bl a0012318 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a000bf44: e1d521b0 ldrh r2, [r5, #16] information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, a000bf48: e1a00009 mov r0, r9 a000bf4c: e595101c ldr r1, [r5, #28] information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); a000bf50: e0872002 add r2, r7, r2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, a000bf54: e1a02102 lsl r2, r2, #2 a000bf58: eb0018ee bl a0012318 a000bf5c: e59d3000 ldr r3, [sp] a000bf60: eaffff9d b a000bddc <_Objects_Extend_information+0x11c> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) a000bf64: e1d021b4 ldrh r2, [r0, #20] /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000bf68: e1a06007 mov r6, r7 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a000bf6c: e3a09001 mov r9, #1 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; a000bf70: e1a0b004 mov fp, r4 a000bf74: eaffff72 b a000bd44 <_Objects_Extend_information+0x84> (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); if ( information->auto_extend ) { object_blocks = _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); a000bf78: e59d0004 ldr r0, [sp, #4] a000bf7c: eb00082e bl a000e03c <_Workspace_Free> return; a000bf80: eaffffd6 b a000bee0 <_Objects_Extend_information+0x220> if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { a000bf84: e1a0200a mov r2, sl <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); a000bf88: e1a06007 mov r6, r7 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; a000bf8c: e3a09001 mov r9, #1 <== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; a000bf90: e1a0400b mov r4, fp <== NOT EXECUTED a000bf94: eaffff6a b a000bd44 <_Objects_Extend_information+0x84> <== NOT EXECUTED =============================================================================== a000c024 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { a000c024: e1a01801 lsl r1, r1, #16 a000c028: e92d4030 push {r4, r5, lr} Objects_Information *info; int the_class_api_maximum; if ( !the_class ) a000c02c: e1b04821 lsrs r4, r1, #16 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { a000c030: e1a05000 mov r5, r0 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) a000c034: 0a000011 beq a000c080 <_Objects_Get_information+0x5c> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); a000c038: eb001089 bl a0010264 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) a000c03c: e3500000 cmp r0, #0 a000c040: 0a00000d beq a000c07c <_Objects_Get_information+0x58> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) a000c044: e1500004 cmp r0, r4 a000c048: 3a00000a bcc a000c078 <_Objects_Get_information+0x54> return NULL; if ( !_Objects_Information_table[ the_api ] ) a000c04c: e59f3034 ldr r3, [pc, #52] ; a000c088 <_Objects_Get_information+0x64> a000c050: e7930105 ldr r0, [r3, r5, lsl #2] a000c054: e3500000 cmp r0, #0 a000c058: 0a000007 beq a000c07c <_Objects_Get_information+0x58> return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; a000c05c: e7900104 ldr r0, [r0, r4, lsl #2] if ( !info ) a000c060: e3500000 cmp r0, #0 a000c064: 0a000004 beq a000c07c <_Objects_Get_information+0x58> * In a multprocessing configuration, we may access remote objects. * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) a000c068: e1d031b0 ldrh r3, [r0, #16] return NULL; a000c06c: e3530000 cmp r3, #0 a000c070: 03a00000 moveq r0, #0 a000c074: e8bd8030 pop {r4, r5, pc} the_class_api_maximum = _Objects_API_maximum_class( the_api ); if ( the_class_api_maximum == 0 ) return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; a000c078: e3a00000 mov r0, #0 <== NOT EXECUTED if ( info->maximum == 0 ) return NULL; #endif return info; } a000c07c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; a000c080: e1a00004 mov r0, r4 <== NOT EXECUTED a000c084: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000c08c <_Objects_Get_isr_disable>: { Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; a000c08c: e590c008 ldr ip, [r0, #8] Objects_Information *information, Objects_Id id, Objects_Locations *location, ISR_Level *level_p ) { a000c090: e52d4004 push {r4} ; (str r4, [sp, #-4]!) Objects_Control *the_object; uint32_t index; ISR_Level level; index = id - information->minimum_id + 1; a000c094: e26cc001 rsb ip, ip, #1 a000c098: e08cc001 add ip, ip, r1 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000c09c: e10f4000 mrs r4, CPSR a000c0a0: e3841080 orr r1, r4, #128 ; 0x80 a000c0a4: e129f001 msr CPSR_fc, r1 _ISR_Disable( level ); if ( information->maximum >= index ) { a000c0a8: e1d011b0 ldrh r1, [r0, #16] a000c0ac: e15c0001 cmp ip, r1 a000c0b0: 8a000008 bhi a000c0d8 <_Objects_Get_isr_disable+0x4c> if ( (the_object = information->local_table[ index ]) != NULL ) { a000c0b4: e590101c ldr r1, [r0, #28] a000c0b8: e791010c ldr r0, [r1, ip, lsl #2] a000c0bc: e3500000 cmp r0, #0 *location = OBJECTS_LOCAL; a000c0c0: 13a01000 movne r1, #0 a000c0c4: 15821000 strne r1, [r2] *level_p = level; a000c0c8: 15834000 strne r4, [r3] index = id - information->minimum_id + 1; _ISR_Disable( level ); if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { a000c0cc: 0a000006 beq a000c0ec <_Objects_Get_isr_disable+0x60> _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; #endif } a000c0d0: e8bd0010 pop {r4} a000c0d4: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000c0d8: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED _ISR_Enable( level ); *location = OBJECTS_ERROR; return NULL; } _ISR_Enable( level ); *location = OBJECTS_ERROR; a000c0dc: e3a03001 mov r3, #1 <== NOT EXECUTED a000c0e0: e5823000 str r3, [r2] <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) _Objects_MP_Is_remote( information, id, location, &the_object ); return the_object; #else return NULL; a000c0e4: e3a00000 mov r0, #0 <== NOT EXECUTED a000c0e8: eafffff8 b a000c0d0 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED a000c0ec: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED *location = OBJECTS_LOCAL; *level_p = level; return the_object; } _ISR_Enable( level ); *location = OBJECTS_ERROR; a000c0f0: e3a03001 mov r3, #1 <== NOT EXECUTED a000c0f4: e5823000 str r3, [r2] <== NOT EXECUTED return NULL; a000c0f8: eafffff4 b a000c0d0 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED =============================================================================== a0018c94 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { a0018c94: e92d4070 push {r4, r5, r6, lr} char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) a0018c98: e2515000 subs r5, r1, #0 char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { a0018c9c: e1a04002 mov r4, r2 a0018ca0: e24dd00c sub sp, sp, #12 Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) return NULL; a0018ca4: 01a04005 moveq r4, r5 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) a0018ca8: 0a000034 beq a0018d80 <_Objects_Get_name_as_string+0xec> return NULL; if ( name == NULL ) a0018cac: e3540000 cmp r4, #0 a0018cb0: 0a000032 beq a0018d80 <_Objects_Get_name_as_string+0xec> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; a0018cb4: e3500000 cmp r0, #0 a0018cb8: 059f30d4 ldreq r3, [pc, #212] ; a0018d94 <_Objects_Get_name_as_string+0x100> a0018cbc: 11a06000 movne r6, r0 a0018cc0: 05933008 ldreq r3, [r3, #8] a0018cc4: 05936008 ldreq r6, [r3, #8] information = _Objects_Get_information_id( tmpId ); a0018cc8: e1a00006 mov r0, r6 a0018ccc: ebffe390 bl a0011b14 <_Objects_Get_information_id> if ( !information ) a0018cd0: e2503000 subs r3, r0, #0 return NULL; a0018cd4: 01a04003 moveq r4, r3 return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); if ( !information ) a0018cd8: 0a000028 beq a0018d80 <_Objects_Get_name_as_string+0xec> return NULL; the_object = _Objects_Get( information, tmpId, &location ); a0018cdc: e1a01006 mov r1, r6 a0018ce0: e28d2008 add r2, sp, #8 a0018ce4: ebffe3c5 bl a0011c00 <_Objects_Get> switch ( location ) { a0018ce8: e59d3008 ldr r3, [sp, #8] a0018cec: e3530000 cmp r3, #0 #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; a0018cf0: 13a04000 movne r4, #0 information = _Objects_Get_information_id( tmpId ); if ( !information ) return NULL; the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { a0018cf4: 1a000021 bne a0018d80 <_Objects_Get_name_as_string+0xec> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; a0018cf8: e590200c ldr r2, [r0, #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'; a0018cfc: e5cd3004 strb r3, [sp, #4] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d00: e3550001 cmp r5, #1 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; a0018d04: e1a03c22 lsr r3, r2, #24 lname[ 1 ] = (u32_name >> 16) & 0xff; a0018d08: e1a00822 lsr r0, r2, #16 lname[ 2 ] = (u32_name >> 8) & 0xff; a0018d0c: e1a01422 lsr r1, r2, #8 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; a0018d10: e5cd3000 strb r3, [sp] lname[ 1 ] = (u32_name >> 16) & 0xff; a0018d14: e5cd0001 strb r0, [sp, #1] lname[ 2 ] = (u32_name >> 8) & 0xff; a0018d18: e5cd1002 strb r1, [sp, #2] lname[ 3 ] = (u32_name >> 0) & 0xff; a0018d1c: e5cd2003 strb r2, [sp, #3] s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d20: 0a000019 beq a0018d8c <_Objects_Get_name_as_string+0xf8> a0018d24: e3530000 cmp r3, #0 a0018d28: 0a000017 beq a0018d8c <_Objects_Get_name_as_string+0xf8> * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( a0018d2c: e24d0002 sub r0, sp, #2 a0018d30: e59fc060 ldr ip, [pc, #96] ; a0018d98 <_Objects_Get_name_as_string+0x104> 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'; s = lname; a0018d34: e1a0100d mov r1, sp } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d38: e1a02004 mov r2, r4 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( a0018d3c: e0805005 add r5, r0, r5 a0018d40: ea000002 b a0018d50 <_Objects_Get_name_as_string+0xbc> s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d44: e5f13001 ldrb r3, [r1, #1]! a0018d48: e3530000 cmp r3, #0 a0018d4c: 0a000008 beq a0018d74 <_Objects_Get_name_as_string+0xe0> *d = (isprint((unsigned char)*s)) ? *s : '*'; a0018d50: e59c0000 ldr r0, [ip] a0018d54: e0800003 add r0, r0, r3 a0018d58: e5d00001 ldrb r0, [r0, #1] a0018d5c: e3100097 tst r0, #151 ; 0x97 a0018d60: 03a0302a moveq r3, #42 ; 0x2a a0018d64: e4c23001 strb r3, [r2], #1 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d68: e1510005 cmp r1, r5 a0018d6c: e1a00002 mov r0, r2 a0018d70: 1afffff3 bne a0018d44 <_Objects_Get_name_as_string+0xb0> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; a0018d74: e3a03000 mov r3, #0 a0018d78: e5c03000 strb r3, [r0] _Thread_Enable_dispatch(); a0018d7c: ebffe786 bl a0012b9c <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } a0018d80: e1a00004 mov r0, r4 a0018d84: e28dd00c add sp, sp, #12 a0018d88: e8bd8070 pop {r4, r5, r6, pc} s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { a0018d8c: e1a00004 mov r0, r4 <== NOT EXECUTED a0018d90: eafffff7 b a0018d74 <_Objects_Get_name_as_string+0xe0> <== NOT EXECUTED =============================================================================== a000e1e0 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000e1e0: e1d033b8 ldrh r3, [r0, #56] ; 0x38 <== NOT EXECUTED bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a000e1e4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000e1e8: e1a00002 mov r0, r2 <== NOT EXECUTED bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a000e1ec: e1a05001 mov r5, r1 <== NOT EXECUTED size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000e1f0: e1a01003 mov r1, r3 <== NOT EXECUTED bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { a000e1f4: e1a04002 mov r4, r2 <== NOT EXECUTED size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); a000e1f8: eb001c0a bl a0015228 <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a000e1fc: e5d42000 ldrb r2, [r4] <== NOT EXECUTED a000e200: e3500001 cmp r0, #1 <== NOT EXECUTED a000e204: e1a02c02 lsl r2, r2, #24 <== NOT EXECUTED a000e208: 9a00000c bls a000e240 <_Objects_Set_name+0x60> <== NOT EXECUTED a000e20c: e5d43001 ldrb r3, [r4, #1] <== NOT EXECUTED a000e210: e3500002 cmp r0, #2 <== NOT EXECUTED a000e214: e1822803 orr r2, r2, r3, lsl #16 <== NOT EXECUTED a000e218: 0a000009 beq a000e244 <_Objects_Set_name+0x64> <== NOT EXECUTED a000e21c: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED a000e220: e3500003 cmp r0, #3 <== NOT EXECUTED ); } return true; } a000e224: e3a00001 mov r0, #1 <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a000e228: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED a000e22c: 15d43003 ldrbne r3, [r4, #3] <== NOT EXECUTED a000e230: 03a03020 moveq r3, #32 <== NOT EXECUTED a000e234: e1823003 orr r3, r2, r3 <== NOT EXECUTED a000e238: e585300c str r3, [r5, #12] <== NOT EXECUTED ); } return true; } a000e23c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( a000e240: e3822602 orr r2, r2, #2097152 ; 0x200000 <== NOT EXECUTED a000e244: e3822a02 orr r2, r2, #8192 ; 0x2000 <== NOT EXECUTED a000e248: e3a03020 mov r3, #32 <== NOT EXECUTED a000e24c: e1823003 orr r3, r2, r3 <== NOT EXECUTED a000e250: e585300c str r3, [r5, #12] <== NOT EXECUTED ); } return true; } a000e254: e3a00001 mov r0, #1 <== NOT EXECUTED a000e258: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000c2d8 <_Objects_Shrink_information>: #include void _Objects_Shrink_information( Objects_Information *information ) { a000c2d8: e92d40f0 push {r4, r5, r6, r7, lr} /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); a000c2dc: e1d040b8 ldrh r4, [r0, #8] block_count = (information->maximum - index_base) / a000c2e0: e1d051b4 ldrh r5, [r0, #20] #include void _Objects_Shrink_information( Objects_Information *information ) { a000c2e4: e1a06000 mov r6, r0 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / a000c2e8: e1d001b0 ldrh r0, [r0, #16] a000c2ec: e1a01005 mov r1, r5 a000c2f0: e0640000 rsb r0, r4, r0 a000c2f4: eb0039be bl a001a9f4 <__aeabi_uidiv> information->allocation_size; for ( block = 0; block < block_count; block++ ) { a000c2f8: e3500000 cmp r0, #0 a000c2fc: 0a00000d beq a000c338 <_Objects_Shrink_information+0x60> if ( information->inactive_per_block[ block ] == a000c300: e5962030 ldr r2, [r6, #48] ; 0x30 a000c304: e5923000 ldr r3, [r2] a000c308: e1550003 cmp r5, r3 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { a000c30c: 13a03000 movne r3, #0 if ( information->inactive_per_block[ block ] == a000c310: 1a000005 bne a000c32c <_Objects_Shrink_information+0x54> a000c314: ea000008 b a000c33c <_Objects_Shrink_information+0x64> <== NOT EXECUTED a000c318: e5b21004 ldr r1, [r2, #4]! information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; a000c31c: e0844005 add r4, r4, r5 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == a000c320: e1a07103 lsl r7, r3, #2 a000c324: e1550001 cmp r5, r1 a000c328: 0a000004 beq a000c340 <_Objects_Shrink_information+0x68> index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { a000c32c: e2833001 add r3, r3, #1 a000c330: e1530000 cmp r3, r0 a000c334: 1afffff7 bne a000c318 <_Objects_Shrink_information+0x40> a000c338: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->inactive_per_block[ block ] == a000c33c: e3a07000 mov r7, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000c340: e5960020 ldr r0, [r6, #32] a000c344: ea000002 b a000c354 <_Objects_Shrink_information+0x7c> if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); a000c348: e3550000 cmp r5, #0 a000c34c: 0a00000b beq a000c380 <_Objects_Shrink_information+0xa8> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; a000c350: e1a00005 mov r0, r5 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); a000c354: e1d030b8 ldrh r3, [r0, #8] /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; a000c358: e5905000 ldr r5, [r0] if ((index >= index_base) && a000c35c: e1530004 cmp r3, r4 a000c360: 3afffff8 bcc a000c348 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { a000c364: e1d621b4 ldrh r2, [r6, #20] a000c368: e0842002 add r2, r4, r2 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && a000c36c: e1530002 cmp r3, r2 a000c370: 2afffff4 bcs a000c348 <_Objects_Shrink_information+0x70> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); a000c374: eb000deb bl a000fb28 <_Chain_Extract> } } while ( the_object ); a000c378: e3550000 cmp r5, #0 a000c37c: 1afffff3 bne a000c350 <_Objects_Shrink_information+0x78> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); a000c380: e5963034 ldr r3, [r6, #52] ; 0x34 a000c384: e7930007 ldr r0, [r3, r7] a000c388: eb00072b bl a000e03c <_Workspace_Free> information->object_blocks[ block ] = NULL; a000c38c: e5962034 ldr r2, [r6, #52] ; 0x34 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; a000c390: e1d612bc ldrh r1, [r6, #44] ; 0x2c a000c394: e1d631b4 ldrh r3, [r6, #20] /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; a000c398: e7825007 str r5, [r2, r7] information->inactive_per_block[ block ] = 0; a000c39c: e5962030 ldr r2, [r6, #48] ; 0x30 information->inactive -= information->allocation_size; a000c3a0: e0633001 rsb r3, r3, r1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; a000c3a4: e7825007 str r5, [r2, r7] information->inactive -= information->allocation_size; a000c3a8: e1c632bc strh r3, [r6, #44] ; 0x2c return; a000c3ac: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0011814 <_Protected_heap_Get_information>: bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { a0011814: e92d4070 push {r4, r5, r6, lr} if ( !the_heap ) a0011818: e2505000 subs r5, r0, #0 bool _Protected_heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { a001181c: e1a06001 mov r6, r1 if ( !the_heap ) a0011820: 0a00000d beq a001185c <_Protected_heap_Get_information+0x48> return false; if ( !the_info ) a0011824: e3510000 cmp r1, #0 a0011828: 0a000009 beq a0011854 <_Protected_heap_Get_information+0x40> return false; _RTEMS_Lock_allocator(); a001182c: e59f4030 ldr r4, [pc, #48] ; a0011864 <_Protected_heap_Get_information+0x50> a0011830: e5940000 ldr r0, [r4] a0011834: ebfff7ab bl a000f6e8 <_API_Mutex_Lock> _Heap_Get_information( the_heap, the_info ); a0011838: e1a00005 mov r0, r5 a001183c: e1a01006 mov r1, r6 a0011840: eb000f33 bl a0015514 <_Heap_Get_information> _RTEMS_Unlock_allocator(); a0011844: e5940000 ldr r0, [r4] a0011848: ebfff7c2 bl a000f758 <_API_Mutex_Unlock> return true; a001184c: e3a00001 mov r0, #1 a0011850: e8bd8070 pop {r4, r5, r6, pc} { if ( !the_heap ) return false; if ( !the_info ) return false; a0011854: e1a00001 mov r0, r1 <== NOT EXECUTED _RTEMS_Lock_allocator(); _Heap_Get_information( the_heap, the_info ); _RTEMS_Unlock_allocator(); return true; } a0011858: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED Heap_Control *the_heap, Heap_Information_block *the_info ) { if ( !the_heap ) return false; a001185c: e1a00005 mov r0, r5 <== NOT EXECUTED a0011860: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a00118cc <_Protected_heap_Walk>: * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) a00118cc: e59f3054 ldr r3, [pc, #84] ; a0011928 <_Protected_heap_Walk+0x5c><== NOT EXECUTED bool _Protected_heap_Walk( Heap_Control *the_heap, int source, bool do_dump ) { a00118d0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED a00118d4: e5933000 ldr r3, [r3] <== NOT EXECUTED a00118d8: e1a07000 mov r7, r0 <== NOT EXECUTED a00118dc: e1a06001 mov r6, r1 <== NOT EXECUTED a00118e0: e3530000 cmp r3, #0 <== NOT EXECUTED a00118e4: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED a00118e8: 1a00000b bne a001191c <_Protected_heap_Walk+0x50> <== NOT EXECUTED * a critical section, it should be safe to walk it unlocked. * * NOTE: Dispatching is also disabled during initialization. */ if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); a00118ec: e59f4038 ldr r4, [pc, #56] ; a001192c <_Protected_heap_Walk+0x60><== NOT EXECUTED a00118f0: e5940000 ldr r0, [r4] <== NOT EXECUTED a00118f4: ebfff77b bl a000f6e8 <_API_Mutex_Lock> <== NOT EXECUTED status = _Heap_Walk( the_heap, source, do_dump ); a00118f8: e1a02005 mov r2, r5 <== NOT EXECUTED a00118fc: e1a01006 mov r1, r6 <== NOT EXECUTED a0011900: e1a00007 mov r0, r7 <== NOT EXECUTED a0011904: ebfffbf0 bl a00108cc <_Heap_Walk> <== NOT EXECUTED a0011908: e1a05000 mov r5, r0 <== NOT EXECUTED _RTEMS_Unlock_allocator(); a001190c: e5940000 ldr r0, [r4] <== NOT EXECUTED a0011910: ebfff790 bl a000f758 <_API_Mutex_Unlock> <== NOT EXECUTED } else { status = _Heap_Walk( the_heap, source, do_dump ); } return status; } a0011914: e1a00005 mov r0, r5 <== NOT EXECUTED a0011918: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); a001191c: e1a02005 mov r2, r5 <== NOT EXECUTED } return status; } a0011920: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED if ( _Thread_Dispatch_in_critical_section() == false ) { _RTEMS_Lock_allocator(); status = _Heap_Walk( the_heap, source, do_dump ); _RTEMS_Unlock_allocator(); } else { status = _Heap_Walk( the_heap, source, do_dump ); a0011924: eafffbe8 b a00108cc <_Heap_Walk> <== NOT EXECUTED =============================================================================== a000d054 <_RBTree_Extract_validate_unprotected>: ) { RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; a000d054: e5903000 ldr r3, [r0] * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( RBTree_Node *the_node ) { a000d058: e92d05f0 push {r4, r5, r6, r7, r8, sl} RBTree_Node *parent, *sibling; RBTree_Direction dir; parent = the_node->parent; if(!parent->parent) return; a000d05c: e5932000 ldr r2, [r3] a000d060: e3520000 cmp r2, #0 a000d064: 0a00002f beq a000d128 <_RBTree_Extract_validate_unprotected+0xd4> { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) a000d068: e5932004 ldr r2, [r3, #4] * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; a000d06c: e3a06000 mov r6, #0 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d070: e3a05001 mov r5, #1 { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; if(!(the_node->parent->parent)) return NULL; if(the_node == the_node->parent->child[RBT_LEFT]) a000d074: e1500002 cmp r0, r2 return the_node->parent->child[RBT_RIGHT]; a000d078: 05932008 ldreq r2, [r3, #8] a000d07c: ea000022 b a000d10c <_RBTree_Extract_validate_unprotected+0xb8> if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { a000d080: e5931000 ldr r1, [r3] a000d084: e3510000 cmp r1, #0 a000d088: 0a000022 beq a000d118 <_RBTree_Extract_validate_unprotected+0xc4> */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); a000d08c: e3520000 cmp r2, #0 a000d090: 0a000002 beq a000d0a0 <_RBTree_Extract_validate_unprotected+0x4c> a000d094: e592c00c ldr ip, [r2, #12] a000d098: e35c0001 cmp ip, #1 a000d09c: 0a000023 beq a000d130 <_RBTree_Extract_validate_unprotected+0xdc> _RBTree_Rotate(parent, dir); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && a000d0a0: e5921008 ldr r1, [r2, #8] a000d0a4: e3510000 cmp r1, #0 a000d0a8: 0a000002 beq a000d0b8 <_RBTree_Extract_validate_unprotected+0x64> a000d0ac: e591c00c ldr ip, [r1, #12] a000d0b0: e35c0001 cmp ip, #1 a000d0b4: 0a000042 beq a000d1c4 <_RBTree_Extract_validate_unprotected+0x170> !_RBTree_Is_red(sibling->child[RBT_LEFT])) { a000d0b8: e592c004 ldr ip, [r2, #4] a000d0bc: e35c0000 cmp ip, #0 a000d0c0: 0a000002 beq a000d0d0 <_RBTree_Extract_validate_unprotected+0x7c> a000d0c4: e59cc00c ldr ip, [ip, #12] a000d0c8: e35c0001 cmp ip, #1 a000d0cc: 0a00003c beq a000d1c4 <_RBTree_Extract_validate_unprotected+0x170> sibling->color = RBT_RED; a000d0d0: e582500c str r5, [r2, #12] a000d0d4: e593200c ldr r2, [r3, #12] a000d0d8: e3520001 cmp r2, #1 a000d0dc: 0a000033 beq a000d1b0 <_RBTree_Extract_validate_unprotected+0x15c> if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; break; } the_node = parent; /* done if parent is red */ parent = the_node->parent; a000d0e0: e5931000 ldr r1, [r3] RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; a000d0e4: e3510000 cmp r1, #0 a000d0e8: 0a000033 beq a000d1bc <_RBTree_Extract_validate_unprotected+0x168> if(!(the_node->parent->parent)) return NULL; a000d0ec: e5912000 ldr r2, [r1] a000d0f0: e3520000 cmp r2, #0 a000d0f4: 0a000002 beq a000d104 <_RBTree_Extract_validate_unprotected+0xb0> if(the_node == the_node->parent->child[RBT_LEFT]) a000d0f8: e5912004 ldr r2, [r1, #4] a000d0fc: e1530002 cmp r3, r2 return the_node->parent->child[RBT_RIGHT]; a000d100: 05912008 ldreq r2, [r1, #8] c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; c->parent = the_node->parent; the_node->parent = c; a000d104: e1a00003 mov r0, r3 RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; a000d108: e1a03001 mov r3, r1 */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); a000d10c: e590100c ldr r1, [r0, #12] a000d110: e3510001 cmp r1, #1 a000d114: 1affffd9 bne a000d080 <_RBTree_Extract_validate_unprotected+0x2c> sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; _RBTree_Rotate(parent, dir); break; /* done */ } } /* while */ if(!the_node->parent->parent) the_node->color = RBT_BLACK; a000d118: e5903000 ldr r3, [r0] a000d11c: e5933000 ldr r3, [r3] a000d120: e3530000 cmp r3, #0 a000d124: 0580300c streq r3, [r0, #12] } a000d128: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} a000d12c: e12fff1e bx lr * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; sibling->color = RBT_BLACK; dir = the_node != parent->child[0]; a000d130: e5934004 ldr r4, [r3, #4] * then rotate parent left, making the sibling be the_node's grandparent. * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { parent->color = RBT_RED; a000d134: e583c00c str ip, [r3, #12] sibling->color = RBT_BLACK; a000d138: e582600c str r6, [r2, #12] dir = the_node != parent->child[0]; a000d13c: e0542000 subs r2, r4, r0 a000d140: 13a02001 movne r2, #1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( a000d144: e2227001 eor r7, r2, #1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; a000d148: e2878001 add r8, r7, #1 a000d14c: e793a108 ldr sl, [r3, r8, lsl #2] a000d150: e35a0000 cmp sl, #0 a000d154: 01a0200a moveq r2, sl a000d158: 0affffd0 beq a000d0a0 <_RBTree_Extract_validate_unprotected+0x4c> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d15c: e3570000 cmp r7, #0 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; a000d160: 15934008 ldrne r4, [r3, #8] the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; a000d164: e2822001 add r2, r2, #1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d168: 01a0c007 moveq ip, r7 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; a000d16c: e794a102 ldr sl, [r4, r2, lsl #2] a000d170: e28cc001 add ip, ip, #1 a000d174: e783a10c str sl, [r3, ip, lsl #2] if (c->child[dir]) a000d178: e794c102 ldr ip, [r4, r2, lsl #2] c->child[dir]->parent = the_node; c->child[dir] = the_node; a000d17c: e7843102 str r3, [r4, r2, lsl #2] if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) a000d180: e35c0000 cmp ip, #0 c->child[dir]->parent = the_node; a000d184: 158c3000 strne r3, [ip] a000d188: 15931000 ldrne r1, [r3] c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d18c: e5912004 ldr r2, [r1, #4] c->parent = the_node->parent; a000d190: e5841000 str r1, [r4] the_node->parent = c; a000d194: e5834000 str r4, [r3] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d198: e1530002 cmp r3, r2 a000d19c: 13a02008 movne r2, #8 a000d1a0: 03a02004 moveq r2, #4 a000d1a4: e7824001 str r4, [r2, r1] c->parent = the_node->parent; the_node->parent = c; a000d1a8: e7932108 ldr r2, [r3, r8, lsl #2] a000d1ac: eaffffbb b a000d0a0 <_RBTree_Extract_validate_unprotected+0x4c> /* sibling is black, see if both of its children are also black. */ if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { parent->color = RBT_BLACK; a000d1b0: e3a02000 mov r2, #0 a000d1b4: e583200c str r2, [r3, #12] break; a000d1b8: eaffffd6 b a000d118 <_RBTree_Extract_validate_unprotected+0xc4> RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling( const RBTree_Node *the_node ) { if(!the_node) return NULL; if(!(the_node->parent)) return NULL; a000d1bc: e1a02001 mov r2, r1 <== NOT EXECUTED a000d1c0: eaffffcf b a000d104 <_RBTree_Extract_validate_unprotected+0xb0><== NOT EXECUTED * cases, either the_node is to the left or the right of the parent. * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; a000d1c4: e5936004 ldr r6, [r3, #4] a000d1c8: e0566000 subs r6, r6, r0 a000d1cc: 13a06001 movne r6, #1 * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( a000d1d0: e2265001 eor r5, r6, #1 * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { a000d1d4: e285c001 add ip, r5, #1 a000d1d8: e792410c ldr r4, [r2, ip, lsl #2] */ RTEMS_INLINE_ROUTINE bool _RBTree_Is_red( const RBTree_Node *the_node ) { return (the_node && the_node->color == RBT_RED); a000d1dc: e3540000 cmp r4, #0 a000d1e0: 0a000003 beq a000d1f4 <_RBTree_Extract_validate_unprotected+0x1a0> a000d1e4: e594700c ldr r7, [r4, #12] a000d1e8: e3570001 cmp r7, #1 a000d1ec: 0793710c ldreq r7, [r3, ip, lsl #2] a000d1f0: 0a00001f beq a000d274 <_RBTree_Extract_validate_unprotected+0x220> * This function maintains the properties of the red-black tree. * * @note It does NOT disable interrupts to ensure the atomicity * of the extract operation. */ static void _RBTree_Extract_validate_unprotected( a000d1f4: e2254001 eor r4, r5, #1 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; a000d1f8: e2848001 add r8, r4, #1 a000d1fc: e792a108 ldr sl, [r2, r8, lsl #2] * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; a000d200: e2867001 add r7, r6, #1 a000d204: e7928107 ldr r8, [r2, r7, lsl #2] a000d208: e35a0000 cmp sl, #0 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; a000d20c: e3a07001 mov r7, #1 sibling->child[dir]->color = RBT_BLACK; a000d210: e3a0a000 mov sl, #0 * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ dir = the_node != parent->child[0]; if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) { sibling->color = RBT_RED; a000d214: e582700c str r7, [r2, #12] sibling->child[dir]->color = RBT_BLACK; a000d218: e588a00c str sl, [r8, #12] a000d21c: 0a000011 beq a000d268 <_RBTree_Extract_validate_unprotected+0x214> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d220: e3540000 cmp r4, #0 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; a000d224: 05921004 ldreq r1, [r2, #4] */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d228: 11a04007 movne r4, r7 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; a000d22c: e2844001 add r4, r4, #1 a000d230: e791810c ldr r8, [r1, ip, lsl #2] a000d234: e7828104 str r8, [r2, r4, lsl #2] if (c->child[dir]) a000d238: e791410c ldr r4, [r1, ip, lsl #2] c->child[dir]->parent = the_node; c->child[dir] = the_node; a000d23c: e781210c str r2, [r1, ip, lsl #2] if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) a000d240: e3540000 cmp r4, #0 c->child[dir]->parent = the_node; a000d244: 15842000 strne r2, [r4] c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d248: e5924000 ldr r4, [r2] a000d24c: e5947004 ldr r7, [r4, #4] c->parent = the_node->parent; a000d250: e5814000 str r4, [r1] the_node->parent = c; a000d254: e5821000 str r1, [r2] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d258: e1520007 cmp r2, r7 a000d25c: 13a02008 movne r2, #8 a000d260: 03a02004 moveq r2, #4 a000d264: e7821004 str r1, [r2, r4] _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; a000d268: e793210c ldr r2, [r3, ip, lsl #2] a000d26c: e792410c ldr r4, [r2, ip, lsl #2] a000d270: e1a07002 mov r7, r2 } sibling->color = parent->color; a000d274: e593c00c ldr ip, [r3, #12] parent->color = RBT_BLACK; a000d278: e3a01000 mov r1, #0 RBTree_Direction dir ) { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; a000d27c: e1570001 cmp r7, r1 sibling->color = RBT_RED; sibling->child[dir]->color = RBT_BLACK; _RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir)); sibling = parent->child[_RBTree_Opposite_direction(dir)]; } sibling->color = parent->color; a000d280: e582c00c str ip, [r2, #12] parent->color = RBT_BLACK; a000d284: e583100c str r1, [r3, #12] sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK; a000d288: e584100c str r1, [r4, #12] a000d28c: 0affffa1 beq a000d118 <_RBTree_Extract_validate_unprotected+0xc4> */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d290: e1550001 cmp r5, r1 { RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; a000d294: 05932004 ldreq r2, [r3, #4] a000d298: 15932008 ldrne r2, [r3, #8] the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; a000d29c: e2866001 add r6, r6, #1 */ RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction( RBTree_Direction the_dir ) { return (RBTree_Direction) !((int) the_dir); a000d2a0: 13a05001 movne r5, #1 RBTree_Node *c; if (the_node == NULL) return; if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; a000d2a4: e7921106 ldr r1, [r2, r6, lsl #2] a000d2a8: e2855001 add r5, r5, #1 a000d2ac: e7831105 str r1, [r3, r5, lsl #2] if (c->child[dir]) a000d2b0: e7921106 ldr r1, [r2, r6, lsl #2] c->child[dir]->parent = the_node; c->child[dir] = the_node; a000d2b4: e7823106 str r3, [r2, r6, lsl #2] if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return; c = the_node->child[_RBTree_Opposite_direction(dir)]; the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir]; if (c->child[dir]) a000d2b8: e3510000 cmp r1, #0 c->child[dir]->parent = the_node; a000d2bc: 15813000 strne r3, [r1] c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d2c0: e5931000 ldr r1, [r3] a000d2c4: e591c004 ldr ip, [r1, #4] c->parent = the_node->parent; a000d2c8: e5821000 str r1, [r2] the_node->parent = c; a000d2cc: e5832000 str r2, [r3] if (c->child[dir]) c->child[dir]->parent = the_node; c->child[dir] = the_node; the_node->parent->child[the_node != the_node->parent->child[0]] = c; a000d2d0: e153000c cmp r3, ip a000d2d4: 13a03008 movne r3, #8 a000d2d8: 03a03004 moveq r3, #4 a000d2dc: e7832001 str r2, [r3, r1] a000d2e0: eaffff8c b a000d118 <_RBTree_Extract_validate_unprotected+0xc4> =============================================================================== a000f8fc <_RTEMS_tasks_Delete_extension>: static void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { a000f8fc: e92d4030 push {r4, r5, lr} a000f900: e1a05001 mov r5, r1 /* * Free per task variable memory */ tvp = deleted->task_variables; a000f904: e59110f8 ldr r1, [r1, #248] ; 0xf8 deleted->task_variables = NULL; a000f908: e3a03000 mov r3, #0 a000f90c: e58530f8 str r3, [r5, #248] ; 0xf8 while (tvp) { a000f910: e1510003 cmp r1, r3 a000f914: 1a000001 bne a000f920 <_RTEMS_tasks_Delete_extension+0x24> a000f918: ea000005 b a000f934 <_RTEMS_tasks_Delete_extension+0x38> next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; a000f91c: e1a01004 mov r1, r4 <== NOT EXECUTED */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; a000f920: e5914000 ldr r4, [r1] <== NOT EXECUTED _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); a000f924: e1a00005 mov r0, r5 <== NOT EXECUTED a000f928: eb000040 bl a000fa30 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { a000f92c: e3540000 cmp r4, #0 <== NOT EXECUTED a000f930: 1afffff9 bne a000f91c <_RTEMS_tasks_Delete_extension+0x20> <== NOT EXECUTED /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); a000f934: e59500ec ldr r0, [r5, #236] ; 0xec a000f938: ebfff9bf bl a000e03c <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; a000f93c: e3a03000 mov r3, #0 a000f940: e58530ec str r3, [r5, #236] ; 0xec } a000f944: e8bd8030 pop {r4, r5, pc} =============================================================================== a000f880 <_RTEMS_tasks_Switch_extension>: /* * Per Task Variables */ tvp = executing->task_variables; a000f880: e59030f8 ldr r3, [r0, #248] ; 0xf8 while (tvp) { a000f884: e3530000 cmp r3, #0 a000f888: 0a000007 beq a000f8ac <_RTEMS_tasks_Switch_extension+0x2c> tvp->tval = *tvp->ptr; a000f88c: e5932004 ldr r2, [r3, #4] *tvp->ptr = tvp->gval; a000f890: e5930008 ldr r0, [r3, #8] * Per Task Variables */ tvp = executing->task_variables; while (tvp) { tvp->tval = *tvp->ptr; a000f894: e592c000 ldr ip, [r2] a000f898: e583c00c str ip, [r3, #12] *tvp->ptr = tvp->gval; a000f89c: e5820000 str r0, [r2] tvp = (rtems_task_variable_t *)tvp->next; a000f8a0: e5933000 ldr r3, [r3] /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { a000f8a4: e3530000 cmp r3, #0 a000f8a8: 1afffff7 bne a000f88c <_RTEMS_tasks_Switch_extension+0xc> tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; a000f8ac: e59130f8 ldr r3, [r1, #248] ; 0xf8 while (tvp) { a000f8b0: e3530000 cmp r3, #0 a000f8b4: 012fff1e bxeq lr tvp->gval = *tvp->ptr; a000f8b8: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED *tvp->ptr = tvp->tval; a000f8bc: e593100c ldr r1, [r3, #12] <== NOT EXECUTED tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { tvp->gval = *tvp->ptr; a000f8c0: e5920000 ldr r0, [r2] <== NOT EXECUTED a000f8c4: e5830008 str r0, [r3, #8] <== NOT EXECUTED *tvp->ptr = tvp->tval; a000f8c8: e5821000 str r1, [r2] <== NOT EXECUTED tvp = (rtems_task_variable_t *)tvp->next; a000f8cc: e5933000 ldr r3, [r3] <== NOT EXECUTED *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { a000f8d0: e3530000 cmp r3, #0 <== NOT EXECUTED a000f8d4: 1afffff7 bne a000f8b8 <_RTEMS_tasks_Switch_extension+0x38> <== NOT EXECUTED a000f8d8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a00368dc <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { a00368dc: e92d4010 push {r4, lr} <== NOT EXECUTED a00368e0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a00368e4: e1a01000 mov r1, r0 <== NOT EXECUTED a00368e8: e1a0200d mov r2, sp <== NOT EXECUTED a00368ec: e59f0094 ldr r0, [pc, #148] ; a0036988 <_Rate_monotonic_Timeout+0xac><== NOT EXECUTED a00368f0: ebff5814 bl a000c948 <_Objects_Get> <== NOT EXECUTED /* * 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 ) { a00368f4: e59d3000 ldr r3, [sp] <== NOT EXECUTED a00368f8: e1a04000 mov r4, r0 <== NOT EXECUTED a00368fc: e3530000 cmp r3, #0 <== NOT EXECUTED a0036900: 1a000010 bne a0036948 <_Rate_monotonic_Timeout+0x6c> <== NOT EXECUTED case OBJECTS_LOCAL: the_thread = the_period->owner; a0036904: e5900040 ldr r0, [r0, #64] ; 0x40 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); a0036908: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED if ( _States_Is_waiting_for_period( the_thread->current_state ) && a003690c: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED a0036910: 0a000003 beq a0036924 <_Rate_monotonic_Timeout+0x48> <== NOT EXECUTED a0036914: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED a0036918: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a003691c: e1520003 cmp r2, r3 <== NOT EXECUTED a0036920: 0a000014 beq a0036978 <_Rate_monotonic_Timeout+0x9c> <== NOT EXECUTED _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 ) { a0036924: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED a0036928: e3530001 cmp r3, #1 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; a003692c: 13a03004 movne r3, #4 <== NOT EXECUTED a0036930: 15843038 strne r3, [r4, #56] ; 0x38 <== NOT EXECUTED _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 ) { a0036934: 0a000005 beq a0036950 <_Rate_monotonic_Timeout+0x74> <== NOT EXECUTED * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a0036938: e59f304c ldr r3, [pc, #76] ; a003698c <_Rate_monotonic_Timeout+0xb0><== NOT EXECUTED a003693c: e5932000 ldr r2, [r3] <== NOT EXECUTED --level; a0036940: e2422001 sub r2, r2, #1 <== NOT EXECUTED _Thread_Dispatch_disable_level = level; a0036944: e5832000 str r2, [r3] <== NOT EXECUTED case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } a0036948: e28dd004 add sp, sp, #4 <== NOT EXECUTED a003694c: e8bd8010 pop {r4, pc} <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; a0036950: e3a03003 mov r3, #3 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); a0036954: e1a00004 mov r0, r4 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; a0036958: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED _Rate_monotonic_Initiate_statistics( the_period ); a003695c: ebffff49 bl a0036688 <_Rate_monotonic_Initiate_statistics> <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a0036960: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0036964: e59f0024 ldr r0, [pc, #36] ; a0036990 <_Rate_monotonic_Timeout+0xb4><== NOT EXECUTED a0036968: e2841010 add r1, r4, #16 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a003696c: e584301c str r3, [r4, #28] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0036970: ebff5e93 bl a000e3c4 <_Watchdog_Insert> <== NOT EXECUTED a0036974: eaffffef b a0036938 <_Rate_monotonic_Timeout+0x5c> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a0036978: e59f1014 ldr r1, [pc, #20] ; a0036994 <_Rate_monotonic_Timeout+0xb8><== NOT EXECUTED a003697c: ebff5a9e bl a000d3fc <_Thread_Clear_state> <== NOT EXECUTED the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); a0036980: e1a00004 mov r0, r4 <== NOT EXECUTED a0036984: eafffff4 b a003695c <_Rate_monotonic_Timeout+0x80> <== NOT EXECUTED =============================================================================== a000e2c4 <_Scheduler_CBS_Budget_callout>: Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; a000e2c4: e59010ac ldr r1, [r0, #172] ; 0xac <== NOT EXECUTED if ( the_thread->real_priority != new_priority ) a000e2c8: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { a000e2cc: e92d4010 push {r4, lr} <== NOT EXECUTED Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) a000e2d0: e1530001 cmp r3, r1 <== NOT EXECUTED the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) a000e2d4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED Scheduler_CBS_Server_id server_id; /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) the_thread->real_priority = new_priority; a000e2d8: 15801018 strne r1, [r0, #24] <== NOT EXECUTED Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { a000e2dc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) a000e2e0: e1530001 cmp r3, r1 <== NOT EXECUTED Scheduler_CBS_Server **_Scheduler_CBS_Server_list; void _Scheduler_CBS_Budget_callout( Thread_Control *the_thread ) { a000e2e4: e1a04000 mov r4, r0 <== NOT EXECUTED /* Put violating task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) a000e2e8: 0a000001 beq a000e2f4 <_Scheduler_CBS_Budget_callout+0x30> <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); a000e2ec: e3a02001 mov r2, #1 <== NOT EXECUTED a000e2f0: eb000171 bl a000e8bc <_Thread_Change_priority> <== NOT EXECUTED /* Invoke callback function if any. */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; a000e2f4: e5944088 ldr r4, [r4, #136] ; 0x88 <== NOT EXECUTED if ( sched_info->cbs_server->cbs_budget_overrun ) { a000e2f8: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a000e2fc: e593200c ldr r2, [r3, #12] <== NOT EXECUTED a000e300: e3520000 cmp r2, #0 <== NOT EXECUTED a000e304: 0a000006 beq a000e324 <_Scheduler_CBS_Budget_callout+0x60> <== NOT EXECUTED _Scheduler_CBS_Get_server_id( a000e308: e5930000 ldr r0, [r3] <== NOT EXECUTED a000e30c: e1a0100d mov r1, sp <== NOT EXECUTED a000e310: ebffffd2 bl a000e260 <_Scheduler_CBS_Get_server_id> <== NOT EXECUTED sched_info->cbs_server->task_id, &server_id ); sched_info->cbs_server->cbs_budget_overrun( server_id ); a000e314: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a000e318: e59d0000 ldr r0, [sp] <== NOT EXECUTED a000e31c: e593300c ldr r3, [r3, #12] <== NOT EXECUTED a000e320: e12fff33 blx r3 <== NOT EXECUTED } } a000e324: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000e328: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a000de38 <_Scheduler_CBS_Cleanup>: #include #include #include int _Scheduler_CBS_Cleanup (void) { a000de38: e92d4070 push {r4, r5, r6, lr} unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000de3c: e59f5058 ldr r5, [pc, #88] ; a000de9c <_Scheduler_CBS_Cleanup+0x64> a000de40: e5953000 ldr r3, [r5] a000de44: e3530000 cmp r3, #0 a000de48: 0a000010 beq a000de90 <_Scheduler_CBS_Cleanup+0x58> a000de4c: e59f604c ldr r6, [pc, #76] ; a000dea0 <_Scheduler_CBS_Cleanup+0x68> a000de50: e3a04000 mov r4, #0 a000de54: e5962000 ldr r2, [r6] if ( _Scheduler_CBS_Server_list[ i ] ) a000de58: e7923104 ldr r3, [r2, r4, lsl #2] _Scheduler_CBS_Destroy_server( i ); a000de5c: e1a00004 mov r0, r4 int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000de60: e2844001 add r4, r4, #1 if ( _Scheduler_CBS_Server_list[ i ] ) a000de64: e3530000 cmp r3, #0 a000de68: 0a000001 beq a000de74 <_Scheduler_CBS_Cleanup+0x3c> _Scheduler_CBS_Destroy_server( i ); a000de6c: eb000043 bl a000df80 <_Scheduler_CBS_Destroy_server> a000de70: e5962000 ldr r2, [r6] int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000de74: e5953000 ldr r3, [r5] a000de78: e1530004 cmp r3, r4 a000de7c: 8afffff5 bhi a000de58 <_Scheduler_CBS_Cleanup+0x20> if ( _Scheduler_CBS_Server_list[ i ] ) _Scheduler_CBS_Destroy_server( i ); } _Workspace_Free( _Scheduler_CBS_Server_list ); a000de80: e1a00002 mov r0, r2 a000de84: eb0007cb bl a000fdb8 <_Workspace_Free> return SCHEDULER_CBS_OK; } a000de88: e3a00000 mov r0, #0 a000de8c: e8bd8070 pop {r4, r5, r6, pc} int _Scheduler_CBS_Cleanup (void) { unsigned int i; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000de90: e59f3008 ldr r3, [pc, #8] ; a000dea0 <_Scheduler_CBS_Cleanup+0x68><== NOT EXECUTED a000de94: e5932000 ldr r2, [r3] <== NOT EXECUTED a000de98: eafffff8 b a000de80 <_Scheduler_CBS_Cleanup+0x48> <== NOT EXECUTED =============================================================================== a000dea4 <_Scheduler_CBS_Create_server>: ) { unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || a000dea4: e5903004 ldr r3, [r0, #4] int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { a000dea8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || a000deac: e3530000 cmp r3, #0 int _Scheduler_CBS_Create_server ( Scheduler_CBS_Parameters *params, Scheduler_CBS_Budget_overrun budget_overrun_callback, rtems_id *server_id ) { a000deb0: e1a04000 mov r4, r0 a000deb4: e1a05001 mov r5, r1 a000deb8: e1a07002 mov r7, r2 unsigned int i; Scheduler_CBS_Server *the_server; if ( params->budget <= 0 || a000debc: da000029 ble a000df68 <_Scheduler_CBS_Create_server+0xc4> a000dec0: e5903000 ldr r3, [r0] a000dec4: e3530000 cmp r3, #0 a000dec8: da000026 ble a000df68 <_Scheduler_CBS_Create_server+0xc4> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000decc: e59f30a4 ldr r3, [pc, #164] ; a000df78 <_Scheduler_CBS_Create_server+0xd4> a000ded0: e5930000 ldr r0, [r3] a000ded4: e3500000 cmp r0, #0 a000ded8: 0a00000d beq a000df14 <_Scheduler_CBS_Create_server+0x70> if ( !_Scheduler_CBS_Server_list[i] ) a000dedc: e59f8098 ldr r8, [pc, #152] ; a000df7c <_Scheduler_CBS_Create_server+0xd8> a000dee0: e5986000 ldr r6, [r8] a000dee4: e596a000 ldr sl, [r6] a000dee8: e35a0000 cmp sl, #0 a000deec: 11a02006 movne r2, r6 a000def0: 13a03000 movne r3, #0 a000def4: 1a000003 bne a000df08 <_Scheduler_CBS_Create_server+0x64> a000def8: ea000018 b a000df60 <_Scheduler_CBS_Create_server+0xbc> a000defc: e5b21004 ldr r1, [r2, #4]! a000df00: e3510000 cmp r1, #0 a000df04: 0a000004 beq a000df1c <_Scheduler_CBS_Create_server+0x78> params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000df08: e2833001 add r3, r3, #1 a000df0c: e1530000 cmp r3, r0 a000df10: 1afffff9 bne a000defc <_Scheduler_CBS_Create_server+0x58> if ( !_Scheduler_CBS_Server_list[i] ) break; } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; a000df14: e3e00019 mvn r0, #25 a000df18: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { a000df1c: e1a0a103 lsl sl, r3, #2 } if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; a000df20: e5873000 str r3, [r7] _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); a000df24: e3a00010 mov r0, #16 a000df28: eb00079c bl a000fda0 <_Workspace_Allocate> if ( i == _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_FULL; *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) a000df2c: e786000a str r0, [r6, sl] _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; a000df30: e5972000 ldr r2, [r7] a000df34: e5983000 ldr r3, [r8] a000df38: e7933102 ldr r3, [r3, r2, lsl #2] if ( !the_server ) a000df3c: e3530000 cmp r3, #0 a000df40: 0a00000a beq a000df70 <_Scheduler_CBS_Create_server+0xcc> return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; the_server->task_id = -1; a000df44: e3e02000 mvn r2, #0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; a000df48: e89400c0 ldm r4, {r6, r7} the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; a000df4c: e3a00000 mov r0, #0 _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; the_server->parameters = *params; a000df50: e98300c0 stmib r3, {r6, r7} the_server->task_id = -1; a000df54: e5832000 str r2, [r3] the_server->cbs_budget_overrun = budget_overrun_callback; a000df58: e583500c str r5, [r3, #12] return SCHEDULER_CBS_OK; a000df5c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) { if ( !_Scheduler_CBS_Server_list[i] ) a000df60: e1a0300a mov r3, sl a000df64: eaffffed b a000df20 <_Scheduler_CBS_Create_server+0x7c> if ( params->budget <= 0 || params->deadline <= 0 || params->budget >= SCHEDULER_EDF_PRIO_MSB || params->deadline >= SCHEDULER_EDF_PRIO_MSB ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; a000df68: e3e00011 mvn r0, #17 a000df6c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} *server_id = i; _Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *) _Workspace_Allocate( sizeof(Scheduler_CBS_Server) ); the_server = _Scheduler_CBS_Server_list[*server_id]; if ( !the_server ) return SCHEDULER_CBS_ERROR_NO_MEMORY; a000df70: e3e00010 mvn r0, #16 <== NOT EXECUTED the_server->parameters = *params; the_server->task_id = -1; the_server->cbs_budget_overrun = budget_overrun_callback; return SCHEDULER_CBS_OK; } a000df74: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000e0e4 <_Scheduler_CBS_Get_execution_time>: ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e0e4: e59f3098 ldr r3, [pc, #152] ; a000e184 <_Scheduler_CBS_Get_execution_time+0xa0> int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { a000e0e8: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e0ec: e5933000 ldr r3, [r3] int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { a000e0f0: e1a04000 mov r4, r0 a000e0f4: e24dd004 sub sp, sp, #4 Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e0f8: e1530000 cmp r3, r0 int _Scheduler_CBS_Get_execution_time ( Scheduler_CBS_Server_id server_id, time_t *exec_time, time_t *abs_time ) { a000e0fc: e1a06001 mov r6, r1 Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; a000e100: 93e00011 mvnls r0, #17 ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e104: 9a000016 bls a000e164 <_Scheduler_CBS_Get_execution_time+0x80> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) a000e108: e59f5078 ldr r5, [pc, #120] ; a000e188 <_Scheduler_CBS_Get_execution_time+0xa4> a000e10c: e5953000 ldr r3, [r5] a000e110: e7933104 ldr r3, [r3, r4, lsl #2] a000e114: e3530000 cmp r3, #0 return SCHEDULER_CBS_ERROR_NOSERVER; a000e118: 03e00018 mvneq r0, #24 Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) a000e11c: 0a000010 beq a000e164 <_Scheduler_CBS_Get_execution_time+0x80> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { a000e120: e5930000 ldr r0, [r3] a000e124: e3700001 cmn r0, #1 *exec_time = 0; a000e128: 03a00000 moveq r0, #0 a000e12c: 05810000 streq r0, [r1] if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { a000e130: 0a00000b beq a000e164 <_Scheduler_CBS_Get_execution_time+0x80> *exec_time = 0; return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( a000e134: e1a0100d mov r1, sp <== NOT EXECUTED a000e138: eb00031a bl a000eda8 <_Thread_Get> <== NOT EXECUTED _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { a000e13c: e2507000 subs r7, r0, #0 <== NOT EXECUTED a000e140: 0a000009 beq a000e16c <_Scheduler_CBS_Get_execution_time+0x88><== NOT EXECUTED _Thread_Enable_dispatch(); a000e144: eb00030f bl a000ed88 <_Thread_Enable_dispatch> <== NOT EXECUTED *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - a000e148: e5952000 ldr r2, [r5] <== NOT EXECUTED a000e14c: e5973074 ldr r3, [r7, #116] ; 0x74 <== NOT EXECUTED the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; } return SCHEDULER_CBS_OK; a000e150: e3a00000 mov r0, #0 <== NOT EXECUTED &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { _Thread_Enable_dispatch(); *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - a000e154: e7922104 ldr r2, [r2, r4, lsl #2] <== NOT EXECUTED a000e158: e5922008 ldr r2, [r2, #8] <== NOT EXECUTED a000e15c: e0633002 rsb r3, r3, r2 <== NOT EXECUTED a000e160: e5863000 str r3, [r6] <== NOT EXECUTED } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; } return SCHEDULER_CBS_OK; } a000e164: e28dd004 add sp, sp, #4 a000e168: e8bd80f0 pop {r4, r5, r6, r7, pc} _Thread_Enable_dispatch(); *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; a000e16c: e5953000 ldr r3, [r5] <== NOT EXECUTED } return SCHEDULER_CBS_OK; a000e170: e1a00007 mov r0, r7 <== NOT EXECUTED _Thread_Enable_dispatch(); *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget - the_thread->cpu_time_budget; } else { *exec_time = _Scheduler_CBS_Server_list[server_id]->parameters.budget; a000e174: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED a000e178: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a000e17c: e5863000 str r3, [r6] <== NOT EXECUTED a000e180: eafffff7 b a000e164 <_Scheduler_CBS_Get_execution_time+0x80><== NOT EXECUTED =============================================================================== a000e1d4 <_Scheduler_CBS_Get_remaining_budget>: ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e1d4: e59f307c ldr r3, [pc, #124] ; a000e258 <_Scheduler_CBS_Get_remaining_budget+0x84> int _Scheduler_CBS_Get_remaining_budget ( Scheduler_CBS_Server_id server_id, time_t *remaining_budget ) { a000e1d8: e92d4030 push {r4, r5, lr} Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e1dc: e5933000 ldr r3, [r3] int _Scheduler_CBS_Get_remaining_budget ( Scheduler_CBS_Server_id server_id, time_t *remaining_budget ) { a000e1e0: e24dd004 sub sp, sp, #4 a000e1e4: e1a04001 mov r4, r1 Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e1e8: e1530000 cmp r3, r0 return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; a000e1ec: 93e00011 mvnls r0, #17 ) { Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) a000e1f0: 9a000012 bls a000e240 <_Scheduler_CBS_Get_remaining_budget+0x6c> return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) a000e1f4: e59f3060 ldr r3, [pc, #96] ; a000e25c <_Scheduler_CBS_Get_remaining_budget+0x88> a000e1f8: e5933000 ldr r3, [r3] a000e1fc: e7933100 ldr r3, [r3, r0, lsl #2] a000e200: e3530000 cmp r3, #0 return SCHEDULER_CBS_ERROR_NOSERVER; a000e204: 03e00018 mvneq r0, #24 Objects_Locations location; Thread_Control *the_thread; if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) a000e208: 0a00000c beq a000e240 <_Scheduler_CBS_Get_remaining_budget+0x6c> return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { a000e20c: e5930000 ldr r0, [r3] a000e210: e3700001 cmn r0, #1 a000e214: 0a00000b beq a000e248 <_Scheduler_CBS_Get_remaining_budget+0x74> *remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget; return SCHEDULER_CBS_OK; } the_thread = _Thread_Get( a000e218: e1a0100d mov r1, sp <== NOT EXECUTED a000e21c: eb0002e1 bl a000eda8 <_Thread_Get> <== NOT EXECUTED _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { a000e220: e2505000 subs r5, r0, #0 <== NOT EXECUTED _Thread_Enable_dispatch(); *remaining_budget = the_thread->cpu_time_budget; } else { *remaining_budget = 0; a000e224: 05845000 streq r5, [r4] <== NOT EXECUTED } return SCHEDULER_CBS_OK; a000e228: 01a00005 moveq r0, r5 <== NOT EXECUTED the_thread = _Thread_Get( _Scheduler_CBS_Server_list[server_id]->task_id, &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { a000e22c: 0a000003 beq a000e240 <_Scheduler_CBS_Get_remaining_budget+0x6c><== NOT EXECUTED _Thread_Enable_dispatch(); a000e230: eb0002d4 bl a000ed88 <_Thread_Enable_dispatch> <== NOT EXECUTED *remaining_budget = the_thread->cpu_time_budget; a000e234: e5953074 ldr r3, [r5, #116] ; 0x74 <== NOT EXECUTED } else { *remaining_budget = 0; } return SCHEDULER_CBS_OK; a000e238: e3a00000 mov r0, #0 <== NOT EXECUTED &location ); /* The routine _Thread_Get may disable dispatch and not enable again. */ if ( the_thread ) { _Thread_Enable_dispatch(); *remaining_budget = the_thread->cpu_time_budget; a000e23c: e5843000 str r3, [r4] <== NOT EXECUTED else { *remaining_budget = 0; } return SCHEDULER_CBS_OK; } a000e240: e28dd004 add sp, sp, #4 a000e244: e8bd8030 pop {r4, r5, pc} if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { *remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget; a000e248: e5933008 ldr r3, [r3, #8] return SCHEDULER_CBS_OK; a000e24c: e3a00000 mov r0, #0 if ( server_id >= _Scheduler_CBS_Maximum_servers ) return SCHEDULER_CBS_ERROR_INVALID_PARAMETER; if ( !_Scheduler_CBS_Server_list[server_id] ) return SCHEDULER_CBS_ERROR_NOSERVER; if ( _Scheduler_CBS_Server_list[server_id]->task_id == -1 ) { *remaining_budget = _Scheduler_CBS_Server_list[server_id]->parameters.budget; a000e250: e5813000 str r3, [r1] return SCHEDULER_CBS_OK; a000e254: eafffff9 b a000e240 <_Scheduler_CBS_Get_remaining_budget+0x6c> =============================================================================== a000e32c <_Scheduler_CBS_Initialize>: int _Scheduler_CBS_Initialize(void) { a000e32c: e92d4010 push {r4, lr} unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( a000e330: e59f405c ldr r4, [pc, #92] ; a000e394 <_Scheduler_CBS_Initialize+0x68> a000e334: e5940000 ldr r0, [r4] a000e338: e1a00100 lsl r0, r0, #2 a000e33c: eb000697 bl a000fda0 <_Workspace_Allocate> a000e340: e59f1050 ldr r1, [pc, #80] ; a000e398 <_Scheduler_CBS_Initialize+0x6c> _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) a000e344: e3500000 cmp r0, #0 } int _Scheduler_CBS_Initialize(void) { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( a000e348: e5810000 str r0, [r1] _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) a000e34c: 0a00000e beq a000e38c <_Scheduler_CBS_Initialize+0x60> return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { a000e350: e5942000 ldr r2, [r4] a000e354: e3520000 cmp r2, #0 a000e358: 0a000009 beq a000e384 <_Scheduler_CBS_Initialize+0x58> a000e35c: e3a03000 mov r3, #0 _Scheduler_CBS_Server_list[i] = NULL; a000e360: e1a0c003 mov ip, r3 a000e364: ea000000 b a000e36c <_Scheduler_CBS_Initialize+0x40> unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { a000e368: e5910000 ldr r0, [r1] _Scheduler_CBS_Server_list[i] = NULL; a000e36c: e780c103 str ip, [r0, r3, lsl #2] unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { a000e370: e2833001 add r3, r3, #1 a000e374: e1530002 cmp r3, r2 a000e378: 1afffffa bne a000e368 <_Scheduler_CBS_Initialize+0x3c> _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; a000e37c: e3a00000 mov r0, #0 } a000e380: e8bd8010 pop {r4, pc} if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) { _Scheduler_CBS_Server_list[i] = NULL; } return SCHEDULER_CBS_OK; a000e384: e1a00002 mov r0, r2 <== NOT EXECUTED a000e388: e8bd8010 pop {r4, pc} <== NOT EXECUTED { unsigned int i; _Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate( _Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) ); if ( !_Scheduler_CBS_Server_list ) return SCHEDULER_CBS_ERROR_NO_MEMORY; a000e38c: e3e00010 mvn r0, #16 <== NOT EXECUTED a000e390: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a000ce94 <_Scheduler_CBS_Release_job>: { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; a000ce94: e5903088 ldr r3, [r0, #136] ; 0x88 <== NOT EXECUTED if (deadline) { a000ce98: e3510000 cmp r1, #0 <== NOT EXECUTED ) { Priority_Control new_priority; Scheduler_CBS_Per_thread *sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; Scheduler_CBS_Server *serv_info = a000ce9c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED (Scheduler_CBS_Server *) sched_info->cbs_server; if (deadline) { a000cea0: 0a00000b beq a000ced4 <_Scheduler_CBS_Release_job+0x40> <== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) a000cea4: e3530000 cmp r3, #0 <== NOT EXECUTED a000cea8: 0a00000d beq a000cee4 <_Scheduler_CBS_Release_job+0x50> <== NOT EXECUTED new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) a000ceac: e59f1044 ldr r1, [pc, #68] ; a000cef8 <_Scheduler_CBS_Release_job+0x64><== NOT EXECUTED a000ceb0: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED a000ceb4: e5911000 ldr r1, [r1] <== NOT EXECUTED a000ceb8: e0811002 add r1, r1, r2 <== NOT EXECUTED a000cebc: e3c11102 bic r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; a000cec0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a000cec4: e5803074 str r3, [r0, #116] ; 0x74 <== NOT EXECUTED the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); a000cec8: e3a02001 mov r2, #1 <== NOT EXECUTED /* Budget replenishment for the next job. */ if (serv_info) the_thread->cpu_time_budget = serv_info->parameters.budget; the_thread->real_priority = new_priority; a000cecc: e5801018 str r1, [r0, #24] <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); a000ced0: ea00011d b a000d34c <_Thread_Change_priority> <== NOT EXECUTED /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } /* Budget replenishment for the next job. */ if (serv_info) a000ced4: e3530000 cmp r3, #0 <== NOT EXECUTED new_priority = (_Watchdog_Ticks_since_boot + deadline) & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; a000ced8: e59010ac ldr r1, [r0, #172] ; 0xac <== NOT EXECUTED } /* Budget replenishment for the next job. */ if (serv_info) a000cedc: 1afffff7 bne a000cec0 <_Scheduler_CBS_Release_job+0x2c> <== NOT EXECUTED a000cee0: eafffff8 b a000cec8 <_Scheduler_CBS_Release_job+0x34> <== NOT EXECUTED /* Initializing or shifting deadline. */ if (serv_info) new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline) & ~SCHEDULER_EDF_PRIO_MSB; else new_priority = (_Watchdog_Ticks_since_boot + deadline) a000cee4: e59f300c ldr r3, [pc, #12] ; a000cef8 <_Scheduler_CBS_Release_job+0x64><== NOT EXECUTED a000cee8: e5933000 ldr r3, [r3] <== NOT EXECUTED a000ceec: e0811003 add r1, r1, r3 <== NOT EXECUTED a000cef0: e3c11102 bic r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED a000cef4: eafffff3 b a000cec8 <_Scheduler_CBS_Release_job+0x34> <== NOT EXECUTED =============================================================================== a000cefc <_Scheduler_CBS_Unblock>: #include void _Scheduler_CBS_Unblock( Thread_Control *the_thread ) { a000cefc: e92d4030 push {r4, r5, lr} a000cf00: e1a04000 mov r4, r0 Scheduler_CBS_Per_thread *sched_info; Scheduler_CBS_Server *serv_info; Priority_Control new_priority; _Scheduler_EDF_Enqueue(the_thread); a000cf04: eb000041 bl a000d010 <_Scheduler_EDF_Enqueue> /* TODO: flash critical section? */ sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info; serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server; a000cf08: e5943088 ldr r3, [r4, #136] ; 0x88 a000cf0c: e5933018 ldr r3, [r3, #24] * Late unblock rule for deadline-driven tasks. The remaining time to * deadline must be sufficient to serve the remaining computation time * without increased utilization of this task. It might cause a deadline * miss of another task. */ if (serv_info) { a000cf10: e3530000 cmp r3, #0 a000cf14: 0a00000a beq a000cf44 <_Scheduler_CBS_Unblock+0x48> time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - a000cf18: e59f10a0 ldr r1, [pc, #160] ; a000cfc0 <_Scheduler_CBS_Unblock+0xc4><== NOT EXECUTED a000cf1c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { a000cf20: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - a000cf24: e5911000 ldr r1, [r1] <== NOT EXECUTED _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { a000cf28: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED a000cf2c: e5940074 ldr r0, [r4, #116] ; 0x74 <== NOT EXECUTED */ if (serv_info) { time_t deadline = serv_info->parameters.deadline; time_t budget = serv_info->parameters.budget; time_t deadline_left = the_thread->cpu_time_budget; time_t budget_left = the_thread->real_priority - a000cf30: e0611002 rsb r1, r1, r2 <== NOT EXECUTED _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { a000cf34: e001019c mul r1, ip, r1 <== NOT EXECUTED a000cf38: e0030390 mul r3, r0, r3 <== NOT EXECUTED a000cf3c: e1510003 cmp r1, r3 <== NOT EXECUTED a000cf40: ca000010 bgt a000cf88 <_Scheduler_CBS_Unblock+0x8c> <== NOT EXECUTED /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) _Thread_Change_priority(the_thread, new_priority, true); a000cf44: e5940014 ldr r0, [r4, #20] * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, a000cf48: e59f5074 ldr r5, [pc, #116] ; a000cfc4 <_Scheduler_CBS_Unblock+0xc8> a000cf4c: e59f3074 ldr r3, [pc, #116] ; a000cfc8 <_Scheduler_CBS_Unblock+0xcc> a000cf50: e595200c ldr r2, [r5, #12] a000cf54: e5933030 ldr r3, [r3, #48] ; 0x30 a000cf58: e5921014 ldr r1, [r2, #20] a000cf5c: e12fff33 blx r3 a000cf60: e3500000 cmp r0, #0 a000cf64: da000006 ble a000cf84 <_Scheduler_CBS_Unblock+0x88> _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || a000cf68: e5953008 ldr r3, [r5, #8] * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; a000cf6c: e585400c str r4, [r5, #12] if ( _Thread_Executing->is_preemptible || a000cf70: e5d33070 ldrb r3, [r3, #112] ; 0x70 a000cf74: e3530000 cmp r3, #0 a000cf78: 0a00000c beq a000cfb0 <_Scheduler_CBS_Unblock+0xb4> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; a000cf7c: e3a03001 mov r3, #1 a000cf80: e5c53004 strb r3, [r5, #4] a000cf84: e8bd8030 pop {r4, r5, pc} time_t budget_left = the_thread->real_priority - _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; a000cf88: e59410ac ldr r1, [r4, #172] ; 0xac <== NOT EXECUTED if ( the_thread->real_priority != new_priority ) the_thread->real_priority = new_priority; if ( the_thread->current_priority != new_priority ) a000cf8c: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED _Watchdog_Ticks_since_boot; if ( deadline*budget_left > budget*deadline_left ) { /* Put late unblocked task to background until the end of period. */ new_priority = the_thread->Start.initial_priority; if ( the_thread->real_priority != new_priority ) a000cf90: e1520001 cmp r2, r1 <== NOT EXECUTED the_thread->real_priority = new_priority; a000cf94: 15841018 strne r1, [r4, #24] <== NOT EXECUTED if ( the_thread->current_priority != new_priority ) a000cf98: e1500001 cmp r0, r1 <== NOT EXECUTED a000cf9c: 0affffe9 beq a000cf48 <_Scheduler_CBS_Unblock+0x4c> <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); a000cfa0: e1a00004 mov r0, r4 <== NOT EXECUTED a000cfa4: e3a02001 mov r2, #1 <== NOT EXECUTED a000cfa8: eb0000e7 bl a000d34c <_Thread_Change_priority> <== NOT EXECUTED a000cfac: eaffffe4 b a000cf44 <_Scheduler_CBS_Unblock+0x48> <== NOT EXECUTED * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority, _Thread_Heir->current_priority)) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || a000cfb0: e5943014 ldr r3, [r4, #20] a000cfb4: e3530000 cmp r3, #0 a000cfb8: 0affffef beq a000cf7c <_Scheduler_CBS_Unblock+0x80> a000cfbc: e8bd8030 pop {r4, r5, pc} =============================================================================== a000d00c <_Scheduler_EDF_Enqueue_first>: void _Scheduler_EDF_Enqueue_first( Thread_Control *the_thread ) { _Scheduler_EDF_Enqueue(the_thread); a000d00c: eaffffff b a000d010 <_Scheduler_EDF_Enqueue> <== NOT EXECUTED =============================================================================== a000cfb0 <_Scheduler_EDF_Release_job>: uint32_t deadline ) { Priority_Control new_priority; if (deadline) { a000cfb0: e3510000 cmp r1, #0 <== NOT EXECUTED /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) a000cfb4: 159f3018 ldrne r3, [pc, #24] ; a000cfd4 <_Scheduler_EDF_Release_job+0x24><== NOT EXECUTED & ~SCHEDULER_EDF_PRIO_MSB; } else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; a000cfb8: 059010ac ldreq r1, [r0, #172] ; 0xac <== NOT EXECUTED } the_thread->real_priority = new_priority; _Thread_Change_priority(the_thread, new_priority, true); a000cfbc: e3a02001 mov r2, #1 <== NOT EXECUTED { Priority_Control new_priority; if (deadline) { /* Initializing or shifting deadline. */ new_priority = (_Watchdog_Ticks_since_boot + deadline) a000cfc0: 15933000 ldrne r3, [r3] <== NOT EXECUTED a000cfc4: 10811003 addne r1, r1, r3 <== NOT EXECUTED a000cfc8: 13c11102 bicne r1, r1, #-2147483648 ; 0x80000000 <== NOT EXECUTED else { /* Switch back to background priority. */ new_priority = the_thread->Start.initial_priority; } the_thread->real_priority = new_priority; a000cfcc: e5801018 str r1, [r0, #24] <== NOT EXECUTED _Thread_Change_priority(the_thread, new_priority, true); a000cfd0: ea0000b3 b a000d2a4 <_Thread_Change_priority> <== NOT EXECUTED =============================================================================== a000cff8 <_Scheduler_EDF_Unblock>: #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { a000cff8: e92d4030 push {r4, r5, lr} * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( a000cffc: e59f4060 ldr r4, [pc, #96] ; a000d064 <_Scheduler_EDF_Unblock+0x6c> #include void _Scheduler_EDF_Unblock( Thread_Control *the_thread ) { a000d000: e1a05000 mov r5, r0 _Scheduler_EDF_Enqueue(the_thread); a000d004: ebffffb0 bl a000cecc <_Scheduler_EDF_Enqueue> * a context switch. * Pseudo-ISR case: * Even if the thread isn't preemptible, if the new heir is * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( a000d008: e594300c ldr r3, [r4, #12] a000d00c: e5951014 ldr r1, [r5, #20] a000d010: e5930014 ldr r0, [r3, #20] a000d014: e59f304c ldr r3, [pc, #76] ; a000d068 <_Scheduler_EDF_Unblock+0x70> a000d018: e5933030 ldr r3, [r3, #48] ; 0x30 a000d01c: e12fff33 blx r3 a000d020: e3500000 cmp r0, #0 a000d024: ba000000 blt a000d02c <_Scheduler_EDF_Unblock+0x34> a000d028: e8bd8030 pop {r4, r5, pc} _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || a000d02c: e5943008 ldr r3, [r4, #8] * a pseudo-ISR system task, we need to do a context switch. */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; a000d030: e584500c str r5, [r4, #12] if ( _Thread_Executing->is_preemptible || a000d034: e5d33070 ldrb r3, [r3, #112] ; 0x70 a000d038: e3530000 cmp r3, #0 a000d03c: 0a000002 beq a000d04c <_Scheduler_EDF_Unblock+0x54> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; a000d040: e3a03001 mov r3, #1 a000d044: e5c43004 strb r3, [r4, #4] a000d048: e8bd8030 pop {r4, r5, pc} */ if ( _Scheduler_Is_priority_lower_than( _Thread_Heir->current_priority, the_thread->current_priority )) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || a000d04c: e5953014 ldr r3, [r5, #20] a000d050: e3530000 cmp r3, #0 a000d054: 1afffff3 bne a000d028 <_Scheduler_EDF_Unblock+0x30> the_thread->current_priority == 0 ) _Thread_Dispatch_necessary = true; a000d058: e3a03001 mov r3, #1 <== NOT EXECUTED a000d05c: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED a000d060: eafffff8 b a000d048 <_Scheduler_EDF_Unblock+0x50> <== NOT EXECUTED =============================================================================== a000c88c <_Scheduler_priority_Tick>: void _Scheduler_priority_Tick( void ) { Thread_Control *executing; executing = _Thread_Executing; a000c88c: e59f3088 ldr r3, [pc, #136] ; a000c91c <_Scheduler_priority_Tick+0x90> #include #include void _Scheduler_priority_Tick( void ) { a000c890: e92d4010 push {r4, lr} Thread_Control *executing; executing = _Thread_Executing; a000c894: e5934008 ldr r4, [r3, #8] /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) a000c898: e5d43070 ldrb r3, [r4, #112] ; 0x70 a000c89c: e3530000 cmp r3, #0 a000c8a0: 0a000007 beq a000c8c4 <_Scheduler_priority_Tick+0x38> return; if ( !_States_Is_ready( executing->current_state ) ) a000c8a4: e5943010 ldr r3, [r4, #16] a000c8a8: e3530000 cmp r3, #0 a000c8ac: 1a000004 bne a000c8c4 <_Scheduler_priority_Tick+0x38> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { a000c8b0: e5943078 ldr r3, [r4, #120] ; 0x78 a000c8b4: e3530001 cmp r3, #1 a000c8b8: 0a00000b beq a000c8ec <_Scheduler_priority_Tick+0x60> a000c8bc: e3530002 cmp r3, #2 a000c8c0: 0a000000 beq a000c8c8 <_Scheduler_priority_Tick+0x3c> a000c8c4: e8bd8010 pop {r4, pc} } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) a000c8c8: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED a000c8cc: e2433001 sub r3, r3, #1 <== NOT EXECUTED a000c8d0: e3530000 cmp r3, #0 <== NOT EXECUTED a000c8d4: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED a000c8d8: 1afffff9 bne a000c8c4 <_Scheduler_priority_Tick+0x38> <== NOT EXECUTED (*executing->budget_callout)( executing ); a000c8dc: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED a000c8e0: e1a00004 mov r0, r4 <== NOT EXECUTED a000c8e4: e12fff33 blx r3 <== NOT EXECUTED a000c8e8: eafffff5 b a000c8c4 <_Scheduler_priority_Tick+0x38> <== NOT EXECUTED case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { a000c8ec: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED a000c8f0: e2433001 sub r3, r3, #1 <== NOT EXECUTED a000c8f4: e3530000 cmp r3, #0 <== NOT EXECUTED a000c8f8: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED a000c8fc: cafffff0 bgt a000c8c4 <_Scheduler_priority_Tick+0x38> <== NOT EXECUTED * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); a000c900: e59f3018 ldr r3, [pc, #24] ; a000c920 <_Scheduler_priority_Tick+0x94><== NOT EXECUTED a000c904: e593300c ldr r3, [r3, #12] <== NOT EXECUTED a000c908: e12fff33 blx r3 <== NOT EXECUTED * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield(); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a000c90c: e59f3010 ldr r3, [pc, #16] ; a000c924 <_Scheduler_priority_Tick+0x98><== NOT EXECUTED a000c910: e5933000 ldr r3, [r3] <== NOT EXECUTED a000c914: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED a000c918: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0029d80 <_TOD_Get_uptime_as_timespec>: #include void _TOD_Get_uptime_as_timespec( struct timespec *uptime ) { a0029d80: e92d40d0 push {r4, r6, r7, lr} <== NOT EXECUTED a0029d84: e24dd008 sub sp, sp, #8 <== NOT EXECUTED a0029d88: e1a04000 mov r4, r0 <== NOT EXECUTED a0029d8c: e59f1040 ldr r1, [pc, #64] ; a0029dd4 <_TOD_Get_uptime_as_timespec+0x54><== NOT EXECUTED a0029d90: e1a0000d mov r0, sp <== NOT EXECUTED a0029d94: ebff8848 bl a000bebc <_TOD_Get_with_nanoseconds> <== NOT EXECUTED Timestamp_Control uptime_ts; /* assume time checked for NULL by caller */ _TOD_Get_uptime( &uptime_ts ); _Timestamp_To_timespec( &uptime_ts, uptime ); a0029d98: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0029d9c: e59f2034 ldr r2, [pc, #52] ; a0029dd8 <_TOD_Get_uptime_as_timespec+0x58><== NOT EXECUTED a0029da0: e3a03000 mov r3, #0 <== NOT EXECUTED a0029da4: e1a00006 mov r0, r6 <== NOT EXECUTED a0029da8: e1a01007 mov r1, r7 <== NOT EXECUTED a0029dac: eb00a84b bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0029db0: e59f2020 ldr r2, [pc, #32] ; a0029dd8 <_TOD_Get_uptime_as_timespec+0x58><== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0029db4: e5840000 str r0, [r4] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0029db8: e3a03000 mov r3, #0 <== NOT EXECUTED a0029dbc: e1a00006 mov r0, r6 <== NOT EXECUTED a0029dc0: e1a01007 mov r1, r7 <== NOT EXECUTED a0029dc4: eb00a980 bl a00543cc <__moddi3> <== NOT EXECUTED a0029dc8: e5840004 str r0, [r4, #4] <== NOT EXECUTED } a0029dcc: e28dd008 add sp, sp, #8 <== NOT EXECUTED a0029dd0: e8bd80d0 pop {r4, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000b6ec <_TOD_Tickle_ticks>: void _TOD_Tickle_ticks( void ) { Timestamp_Control tick; uint32_t nanoseconds_per_tick; nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); a000b6ec: e59f2084 ldr r2, [pc, #132] ; a000b778 <_TOD_Tickle_ticks+0x8c> static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; a000b6f0: e59f3084 ldr r3, [pc, #132] ; a000b77c <_TOD_Tickle_ticks+0x90> /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, nanoseconds_per_tick ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; a000b6f4: e59fc084 ldr ip, [pc, #132] ; a000b780 <_TOD_Tickle_ticks+0x94> void _TOD_Tickle_ticks( void ) { Timestamp_Control tick; uint32_t nanoseconds_per_tick; nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); a000b6f8: e5922010 ldr r2, [r2, #16] #include #include #include void _TOD_Tickle_ticks( void ) { a000b6fc: e92d03f0 push {r4, r5, r6, r7, r8, r9} a000b700: e2837008 add r7, r3, #8 a000b704: e89700c0 ldm r7, {r6, r7} a000b708: e8930300 ldm r3, {r8, r9} uint32_t nanoseconds_per_tick; nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, nanoseconds_per_tick ); a000b70c: e1a00002 mov r0, r2 a000b710: e3a01000 mov r1, #0 a000b714: e0966000 adds r6, r6, r0 a000b718: e0a77001 adc r7, r7, r1 /* we do not care how much the uptime changed */ /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; a000b71c: e5935010 ldr r5, [r3, #16] a000b720: e0988000 adds r8, r8, r0 a000b724: e0a99001 adc r9, r9, r1 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, nanoseconds_per_tick ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; a000b728: e59c4000 ldr r4, [ip] /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; if ( _TOD.seconds_trigger >= 1000000000UL ) { a000b72c: e59f1050 ldr r1, [pc, #80] ; a000b784 <_TOD_Tickle_ticks+0x98> /* we do not care how much the uptime changed */ /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; a000b730: e0822005 add r2, r2, r5 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, nanoseconds_per_tick ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; a000b734: e2844001 add r4, r4, #1 /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; if ( _TOD.seconds_trigger >= 1000000000UL ) { a000b738: e1520001 cmp r2, r1 /* Convert the tick quantum to a timestamp */ _Timestamp_Set( &tick, 0, nanoseconds_per_tick ); /* Update the counter of ticks since boot */ _Watchdog_Ticks_since_boot += 1; a000b73c: e58c4000 str r4, [ip] a000b740: e5836008 str r6, [r3, #8] a000b744: e583700c str r7, [r3, #12] a000b748: e8830300 stm r3, {r8, r9} /* we do not care how much the uptime changed */ /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; a000b74c: e5832010 str r2, [r3, #16] if ( _TOD.seconds_trigger >= 1000000000UL ) { a000b750: 8a000001 bhi a000b75c <_TOD_Tickle_ticks+0x70> _TOD.seconds_trigger -= 1000000000UL; _Watchdog_Tickle_seconds(); } } a000b754: e8bd03f0 pop {r4, r5, r6, r7, r8, r9} a000b758: e12fff1e bx lr /* Update the current TOD */ _Timestamp_Add_to( &_TOD.now, &tick ); _TOD.seconds_trigger += nanoseconds_per_tick; if ( _TOD.seconds_trigger >= 1000000000UL ) { _TOD.seconds_trigger -= 1000000000UL; a000b75c: e2822331 add r2, r2, #-1006632960 ; 0xc4000000 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void ) { _Watchdog_Tickle( &_Watchdog_Seconds_chain ); a000b760: e59f0020 ldr r0, [pc, #32] ; a000b788 <_TOD_Tickle_ticks+0x9c><== NOT EXECUTED a000b764: e2822865 add r2, r2, #6619136 ; 0x650000 <== NOT EXECUTED a000b768: e2822c36 add r2, r2, #13824 ; 0x3600 <== NOT EXECUTED a000b76c: e5832010 str r2, [r3, #16] <== NOT EXECUTED _Watchdog_Tickle_seconds(); } } a000b770: e8bd03f0 pop {r4, r5, r6, r7, r8, r9} <== NOT EXECUTED a000b774: ea0009b8 b a000de5c <_Watchdog_Tickle> <== NOT EXECUTED =============================================================================== a000b3d0 <_TOD_Validate>: }; bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a000b3d0: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a000b3d4: e2504000 subs r4, r0, #0 a000b3d8: 0a000029 beq a000b484 <_TOD_Validate+0xb4> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a000b3dc: e59f30a8 ldr r3, [pc, #168] ; a000b48c <_TOD_Validate+0xbc> a000b3e0: e3a0093d mov r0, #999424 ; 0xf4000 a000b3e4: e2800d09 add r0, r0, #576 ; 0x240 a000b3e8: e593100c ldr r1, [r3, #12] a000b3ec: eb004587 bl a001ca10 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a000b3f0: e5943018 ldr r3, [r4, #24] a000b3f4: e1500003 cmp r0, r3 a000b3f8: 9a00001d bls a000b474 <_TOD_Validate+0xa4> (the_tod->ticks >= ticks_per_second) || a000b3fc: e5943014 ldr r3, [r4, #20] a000b400: e353003b cmp r3, #59 ; 0x3b a000b404: 8a00001a bhi a000b474 <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a000b408: e5943010 ldr r3, [r4, #16] a000b40c: e353003b cmp r3, #59 ; 0x3b a000b410: 8a000017 bhi a000b474 <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a000b414: e594300c ldr r3, [r4, #12] a000b418: e3530017 cmp r3, #23 a000b41c: 8a000014 bhi a000b474 <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a000b420: e5940004 ldr r0, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || a000b424: e3500000 cmp r0, #0 a000b428: 0a000014 beq a000b480 <_TOD_Validate+0xb0> (the_tod->month == 0) || a000b42c: e350000c cmp r0, #12 a000b430: 8a00000f bhi a000b474 <_TOD_Validate+0xa4> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a000b434: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a000b438: e3a03d1f mov r3, #1984 ; 0x7c0 a000b43c: e2833003 add r3, r3, #3 a000b440: e1520003 cmp r2, r3 a000b444: 9a00000a bls a000b474 <_TOD_Validate+0xa4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a000b448: e5944008 ldr r4, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a000b44c: e3540000 cmp r4, #0 a000b450: 0a000009 beq a000b47c <_TOD_Validate+0xac> return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a000b454: e59f3034 ldr r3, [pc, #52] ; a000b490 <_TOD_Validate+0xc0> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a000b458: e3120003 tst r2, #3 days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a000b45c: 0280000d addeq r0, r0, #13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a000b460: e7930100 ldr r0, [r3, r0, lsl #2] const uint32_t _TOD_Days_per_month[ 2 ][ 13 ] = { { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, { 0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } }; bool _TOD_Validate( a000b464: e1500004 cmp r0, r4 a000b468: 33a00000 movcc r0, #0 a000b46c: 23a00001 movcs r0, #1 a000b470: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a000b474: e3a00000 mov r0, #0 <== NOT EXECUTED a000b478: e8bd8010 pop {r4, pc} <== NOT EXECUTED a000b47c: e1a00004 mov r0, r4 <== NOT EXECUTED if ( the_tod->day > days_in_month ) return false; return true; } a000b480: e8bd8010 pop {r4, pc} <== NOT EXECUTED (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a000b484: e1a00004 mov r0, r4 <== NOT EXECUTED a000b488: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a000cc80 <_Thread_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( a000cc80: e1d120b8 ldrh r2, [r1, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000cc84: e590301c ldr r3, [r0, #28] void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { a000cc88: e92d4070 push {r4, r5, r6, lr} a000cc8c: e1a04001 mov r4, r1 a000cc90: e3a01000 mov r1, #0 a000cc94: e7831102 str r1, [r3, r2, lsl #2] a000cc98: e1a06000 mov r6, r0 * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000cc9c: e59f5090 ldr r5, [pc, #144] ; a000cd34 <_Thread_Close+0xb4> return ctx.ok; } static inline void _User_extensions_Thread_delete( Thread_Control *deleted ) { _User_extensions_Iterate( a000cca0: e1a00004 mov r0, r4 a000cca4: e59f108c ldr r1, [pc, #140] ; a000cd38 <_Thread_Close+0xb8> a000cca8: e5953000 ldr r3, [r5] --level; a000ccac: e2433001 sub r3, r3, #1 _Thread_Dispatch_disable_level = level; a000ccb0: e5853000 str r3, [r5] a000ccb4: eb00038b bl a000dae8 <_User_extensions_Iterate> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000ccb8: e5953000 ldr r3, [r5] ++level; a000ccbc: e2833001 add r3, r3, #1 _Thread_Dispatch_disable_level = level; a000ccc0: e5853000 str r3, [r5] /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); a000ccc4: e1a01004 mov r1, r4 a000ccc8: e1a00006 mov r0, r6 a000cccc: ebfffbf6 bl a000bcac <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); a000ccd0: e1a00004 mov r0, r4 a000ccd4: e3a01001 mov r1, #1 a000ccd8: eb0002ed bl a000d894 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { a000ccdc: e1a00004 mov r0, r4 a000cce0: eb000288 bl a000d708 <_Thread_queue_Extract_with_proxy> a000cce4: e3500000 cmp r0, #0 a000cce8: 1a000002 bne a000ccf8 <_Thread_Close+0x78> if ( _Watchdog_Is_active( &the_thread->Timer ) ) a000ccec: e5943050 ldr r3, [r4, #80] ; 0x50 a000ccf0: e3530002 cmp r3, #2 a000ccf4: 0a00000b beq a000cd28 <_Thread_Close+0xa8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); a000ccf8: e59f303c ldr r3, [pc, #60] ; a000cd3c <_Thread_Close+0xbc> a000ccfc: e1a00004 mov r0, r4 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; a000cd00: e3a05000 mov r5, #0 a000cd04: e593301c ldr r3, [r3, #28] a000cd08: e12fff33 blx r3 /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); a000cd0c: e1a00004 mov r0, r4 a000cd10: eb000311 bl a000d95c <_Thread_Stack_Free> the_thread->Start.stack = NULL; a000cd14: e58450b8 str r5, [r4, #184] ; 0xb8 _Workspace_Free( the_thread->extensions ); a000cd18: e59400f4 ldr r0, [r4, #244] ; 0xf4 a000cd1c: eb0004c6 bl a000e03c <_Workspace_Free> the_thread->extensions = NULL; a000cd20: e58450f4 str r5, [r4, #244] ; 0xf4 } a000cd24: e8bd8070 pop {r4, r5, r6, pc} */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); a000cd28: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a000cd2c: eb00041f bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a000cd30: eafffff0 b a000ccf8 <_Thread_Close+0x78> <== NOT EXECUTED =============================================================================== a000ce5c <_Thread_Dispatch>: #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { a000ce5c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; a000ce60: e59f7188 ldr r7, [pc, #392] ; a000cff0 <_Thread_Dispatch+0x194> #if defined(RTEMS_SMP) #include #endif void _Thread_Dispatch( void ) { a000ce64: e24dd018 sub sp, sp, #24 #endif /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; a000ce68: e5975008 ldr r5, [r7, #8] uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000ce6c: e10f3000 mrs r3, CPSR a000ce70: e3832080 orr r2, r3, #128 ; 0x80 a000ce74: e129f002 msr CPSR_fc, r2 _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { a000ce78: e5d72004 ldrb r2, [r7, #4] a000ce7c: e3520000 cmp r2, #0 a000ce80: 059f916c ldreq r9, [pc, #364] ; a000cff4 <_Thread_Dispatch+0x198> a000ce84: 0a00004a beq a000cfb4 <_Thread_Dispatch+0x158> heir = _Thread_Heir; a000ce88: e597400c ldr r4, [r7, #12] * This routine sets thread dispatch level to the * value passed in. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value) { _Thread_Dispatch_disable_level = value; a000ce8c: e59f9160 ldr r9, [pc, #352] ; a000cff4 <_Thread_Dispatch+0x198> a000ce90: e3a02001 mov r2, #1 #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; a000ce94: e3a01000 mov r1, #0 /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) a000ce98: e1550004 cmp r5, r4 a000ce9c: e5892000 str r2, [r9] heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; _Thread_Executing = heir; a000cea0: e5874008 str r4, [r7, #8] while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; a000cea4: e5c71004 strb r1, [r7, #4] /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) a000cea8: 0a000041 beq a000cfb4 <_Thread_Dispatch+0x158> a000ceac: e59f0144 ldr r0, [pc, #324] ; a000cff8 <_Thread_Dispatch+0x19c> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; a000ceb0: e1a08007 mov r8, r7 a000ceb4: e2806004 add r6, r0, #4 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) a000ceb8: e5942078 ldr r2, [r4, #120] ; 0x78 a000cebc: e3520001 cmp r2, #1 heir->cpu_time_budget = _Thread_Ticks_per_timeslice; a000cec0: 059fa134 ldreq sl, [pc, #308] ; a000cffc <_Thread_Dispatch+0x1a0> a000cec4: 059a2000 ldreq r2, [sl] a000cec8: 05842074 streq r2, [r4, #116] ; 0x74 static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000cecc: e129f003 msr CPSR_fc, r3 */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); a000ced0: e59f1128 ldr r1, [pc, #296] ; a000d000 <_Thread_Dispatch+0x1a4> a000ced4: e28d0010 add r0, sp, #16 a000ced8: ebfff9e4 bl a000b670 <_TOD_Get_with_nanoseconds> a000cedc: e2851080 add r1, r5, #128 ; 0x80 a000cee0: e8910003 ldm r1, {r0, r1} const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; a000cee4: e28db010 add fp, sp, #16 a000cee8: e89b0c00 ldm fp, {sl, fp} #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { a000ceec: e59f2110 ldr r2, [pc, #272] ; a000d004 <_Thread_Dispatch+0x1a8> static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; a000cef0: e88d0003 stm sp, {r0, r1} a000cef4: e5921000 ldr r1, [r2] const Timestamp64_Control *_start, const Timestamp64_Control *_end, Timestamp64_Control *_result ) { *_result = *_end - *_start; a000cef8: e2873014 add r3, r7, #20 a000cefc: e893000c ldm r3, {r2, r3} a000cf00: e05aa002 subs sl, sl, r2 a000cf04: e0cbb003 sbc fp, fp, r3 static inline void _Timestamp64_implementation_Add_to( Timestamp64_Control *_time, const Timestamp64_Control *_add ) { *_time += *_add; a000cf08: e89d000c ldm sp, {r2, r3} a000cf0c: e092200a adds r2, r2, sl a000cf10: e0a3300b adc r3, r3, fp a000cf14: e3510000 cmp r1, #0 a000cf18: e5852080 str r2, [r5, #128] ; 0x80 a000cf1c: e5853084 str r3, [r5, #132] ; 0x84 &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; a000cf20: e28db010 add fp, sp, #16 a000cf24: e89b0c00 ldm fp, {sl, fp} /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; a000cf28: 15913000 ldrne r3, [r1] &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; a000cf2c: e587a014 str sl, [r7, #20] a000cf30: e587b018 str fp, [r7, #24] /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { executing->libc_reent = *_Thread_libc_reent; a000cf34: 158530e8 strne r3, [r5, #232] ; 0xe8 *_Thread_libc_reent = heir->libc_reent; a000cf38: 159430e8 ldrne r3, [r4, #232] ; 0xe8 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000cf3c: e59fb0b4 ldr fp, [pc, #180] ; a000cff8 <_Thread_Dispatch+0x19c> a000cf40: 15813000 strne r3, [r1] a000cf44: e59ba000 ldr sl, [fp] { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { a000cf48: e15a0006 cmp sl, r6 a000cf4c: 0a000006 beq a000cf6c <_Thread_Dispatch+0x110> const User_extensions_Switch_control *extension = (const User_extensions_Switch_control *) node; (*extension->thread_switch)( executing, heir ); a000cf50: e59a3008 ldr r3, [sl, #8] a000cf54: e1a00005 mov r0, r5 a000cf58: e1a01004 mov r1, r4 a000cf5c: e12fff33 blx r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next( const Chain_Node *the_node ) { return the_node->next; a000cf60: e59aa000 ldr sl, [sl] { const Chain_Control *chain = &_User_extensions_Switches_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { a000cf64: e15a0006 cmp sl, r6 a000cf68: 1afffff8 bne a000cf50 <_Thread_Dispatch+0xf4> if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); a000cf6c: e28500bc add r0, r5, #188 ; 0xbc a000cf70: e28410bc add r1, r4, #188 ; 0xbc a000cf74: eb000510 bl a000e3bc <_CPU_Context_switch> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; a000cf78: e5975008 ldr r5, [r7, #8] uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000cf7c: e10f3000 mrs r3, CPSR a000cf80: e3832080 orr r2, r3, #128 ; 0x80 a000cf84: e129f002 msr CPSR_fc, r2 /* * Now determine if we need to perform a dispatch on the current CPU. */ executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { a000cf88: e5d72004 ldrb r2, [r7, #4] a000cf8c: e3520000 cmp r2, #0 a000cf90: 0a000007 beq a000cfb4 <_Thread_Dispatch+0x158> heir = _Thread_Heir; a000cf94: e598400c ldr r4, [r8, #12] <== NOT EXECUTED a000cf98: e3a01001 mov r1, #1 <== NOT EXECUTED #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; a000cf9c: e3a02000 mov r2, #0 <== NOT EXECUTED /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) a000cfa0: e1540005 cmp r4, r5 <== NOT EXECUTED a000cfa4: e5891000 str r1, [r9] <== NOT EXECUTED while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; #ifndef RTEMS_SMP _Thread_Dispatch_set_disable_level( 1 ); #endif _Thread_Dispatch_necessary = false; a000cfa8: e5c82004 strb r2, [r8, #4] <== NOT EXECUTED _Thread_Executing = heir; a000cfac: e5884008 str r4, [r8, #8] <== NOT EXECUTED /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) a000cfb0: 1affffc0 bne a000ceb8 <_Thread_Dispatch+0x5c> <== NOT EXECUTED a000cfb4: e3a02000 mov r2, #0 a000cfb8: e5892000 str r2, [r9] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000cfbc: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000cfc0: e59f6040 ldr r6, [pc, #64] ; a000d008 <_Thread_Dispatch+0x1ac> a000cfc4: e4964004 ldr r4, [r6], #4 { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { a000cfc8: e1540006 cmp r4, r6 a000cfcc: 0a000005 beq a000cfe8 <_Thread_Dispatch+0x18c> const API_extensions_Post_switch_control *post_switch = (const API_extensions_Post_switch_control *) node; (*post_switch->hook)( executing ); a000cfd0: e5943008 ldr r3, [r4, #8] a000cfd4: e1a00005 mov r0, r5 a000cfd8: e12fff33 blx r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next( const Chain_Node *the_node ) { return the_node->next; a000cfdc: e5944000 ldr r4, [r4] { const Chain_Control *chain = &_API_extensions_Post_switch_list; const Chain_Node *tail = _Chain_Immutable_tail( chain ); const Chain_Node *node = _Chain_Immutable_first( chain ); while ( node != tail ) { a000cfe0: e1540006 cmp r4, r6 a000cfe4: 1afffff9 bne a000cfd0 <_Thread_Dispatch+0x174> #ifdef RTEMS_SMP _Thread_Unnest_dispatch(); #endif _API_extensions_Run_post_switch( executing ); } a000cfe8: e28dd018 add sp, sp, #24 a000cfec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000d02c <_Thread_Get>: uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { a000d02c: e2503000 subs r3, r0, #0 Thread_Control *_Thread_Get ( Objects_Id id, Objects_Locations *location ) { a000d030: e1a02001 mov r2, r1 uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { a000d034: 0a000014 beq a000d08c <_Thread_Get+0x60> */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); a000d038: e1a01c23 lsr r1, r3, #24 a000d03c: e2011007 and r1, r1, #7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) a000d040: e2410001 sub r0, r1, #1 a000d044: e3500002 cmp r0, #2 a000d048: 8a00000b bhi a000d07c <_Thread_Get+0x50> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) a000d04c: e1a0cda3 lsr ip, r3, #27 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ a000d050: e35c0001 cmp ip, #1 a000d054: 1a000008 bne a000d07c <_Thread_Get+0x50> *location = OBJECTS_ERROR; goto done; } api_information = _Objects_Information_table[ the_api ]; a000d058: e59f0054 ldr r0, [pc, #84] ; a000d0b4 <_Thread_Get+0x88> a000d05c: e7900101 ldr r0, [r0, r1, lsl #2] * There is no way for this to happen if POSIX is enabled. But there * is actually a test case in sp43 for this which trips it whether or * not POSIX is enabled. So in the interest of safety, this is left * on in all configurations. */ if ( !api_information ) { a000d060: e3500000 cmp r0, #0 a000d064: 0a000010 beq a000d0ac <_Thread_Get+0x80> *location = OBJECTS_ERROR; goto done; } information = api_information[ the_class ]; a000d068: e5900004 ldr r0, [r0, #4] if ( !information ) { a000d06c: e3500000 cmp r0, #0 a000d070: 0a00000d beq a000d0ac <_Thread_Get+0x80> *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); a000d074: e1a01003 mov r1, r3 a000d078: eafffc1f b a000c0fc <_Objects_Get> goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; a000d07c: e3a03001 mov r3, #1 a000d080: e5823000 str r3, [r2] { uint32_t the_api; uint32_t the_class; Objects_Information **api_information; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; a000d084: e3a00000 mov r0, #0 } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ *location = OBJECTS_ERROR; goto done; a000d088: e12fff1e bx lr * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000d08c: e59f1024 ldr r1, [pc, #36] ; a000d0b8 <_Thread_Get+0x8c> a000d090: e5910000 ldr r0, [r1] ++level; a000d094: e2800001 add r0, r0, #1 _Thread_Dispatch_disable_level = level; a000d098: e5810000 str r0, [r1] Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; a000d09c: e5823000 str r3, [r2] tp = _Thread_Executing; a000d0a0: e59f3014 ldr r3, [pc, #20] ; a000d0bc <_Thread_Get+0x90> a000d0a4: e5930008 ldr r0, [r3, #8] goto done; a000d0a8: e12fff1e bx lr goto done; } information = api_information[ the_class ]; if ( !information ) { *location = OBJECTS_ERROR; a000d0ac: e582c000 str ip, [r2] <== NOT EXECUTED goto done; a000d0b0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0010e34 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { a0010e34: e92d4030 push {r4, r5, lr} the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; a0010e38: e590c0a0 ldr ip, [r0, #160] ; 0xa0 void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; a0010e3c: e5d0e09c ldrb lr, [r0, #156] ; 0x9c the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; a0010e40: e59030a4 ldr r3, [r0, #164] ; 0xa4 Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; a0010e44: e3a05000 mov r5, #0 a0010e48: e580501c str r5, [r0, #28] the_thread->is_preemptible = the_thread->Start.is_preemptible; a0010e4c: e5c0e070 strb lr, [r0, #112] ; 0x70 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; a0010e50: e580c078 str ip, [r0, #120] ; 0x78 the_thread->budget_callout = the_thread->Start.budget_callout; a0010e54: e580307c str r3, [r0, #124] ; 0x7c the_thread->Start.pointer_argument = pointer_argument; a0010e58: e5801094 str r1, [r0, #148] ; 0x94 the_thread->Start.numeric_argument = numeric_argument; a0010e5c: e5802098 str r2, [r0, #152] ; 0x98 void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { a0010e60: e1a04000 mov r4, r0 the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { a0010e64: ebfff445 bl a000df80 <_Thread_queue_Extract_with_proxy> a0010e68: e1500005 cmp r0, r5 a0010e6c: 1a000002 bne a0010e7c <_Thread_Reset+0x48> if ( _Watchdog_Is_active( &the_thread->Timer ) ) a0010e70: e5943050 ldr r3, [r4, #80] ; 0x50 a0010e74: e3530002 cmp r3, #2 a0010e78: 0a000008 beq a0010ea0 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { a0010e7c: e59410ac ldr r1, [r4, #172] ; 0xac a0010e80: e5943014 ldr r3, [r4, #20] a0010e84: e1530001 cmp r3, r1 a0010e88: 0a000003 beq a0010e9c <_Thread_Reset+0x68> the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); a0010e8c: e1a00004 mov r0, r4 if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; a0010e90: e5841018 str r1, [r4, #24] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } } a0010e94: e8bd4030 pop {r4, r5, lr} (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); a0010e98: eafff4b3 b a000e16c <_Thread_Set_priority> a0010e9c: e8bd8030 pop {r4, r5, pc} the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); a0010ea0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a0010ea4: ebfff5fe bl a000e6a4 <_Watchdog_Remove> <== NOT EXECUTED a0010ea8: eafffff3 b a0010e7c <_Thread_Reset+0x48> <== NOT EXECUTED =============================================================================== a000d9b8 <_Thread_Start>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); a000d9b8: e590c010 ldr ip, [r0, #16] Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { a000d9bc: e92d4010 push {r4, lr} if ( _States_Is_dormant( the_thread->current_state ) ) { a000d9c0: e21cc001 ands ip, ip, #1 Thread_Start_types the_prototype, void *entry_point, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { a000d9c4: e1a04000 mov r4, r0 if ( _States_Is_dormant( the_thread->current_state ) ) { a000d9c8: 1a000001 bne a000d9d4 <_Thread_Start+0x1c> _User_extensions_Thread_start( the_thread ); return true; } return false; a000d9cc: e1a0000c mov r0, ip <== NOT EXECUTED } a000d9d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; the_thread->Start.prototype = the_prototype; the_thread->Start.pointer_argument = pointer_argument; a000d9d4: e5803094 str r3, [r0, #148] ; 0x94 the_thread->Start.numeric_argument = numeric_argument; a000d9d8: e59d3008 ldr r3, [sp, #8] Thread_Entry_numeric_type numeric_argument ) { if ( _States_Is_dormant( the_thread->current_state ) ) { the_thread->Start.entry_point = (Thread_Entry) entry_point; a000d9dc: e580208c str r2, [r0, #140] ; 0x8c the_thread->Start.prototype = the_prototype; a000d9e0: e5801090 str r1, [r0, #144] ; 0x90 the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; a000d9e4: e5803098 str r3, [r0, #152] ; 0x98 _Thread_Load_environment( the_thread ); a000d9e8: eb000a24 bl a0010280 <_Thread_Load_environment> _Thread_Ready( the_thread ); a000d9ec: e1a00004 mov r0, r4 a000d9f0: eb000ac6 bl a0010510 <_Thread_Ready> ); } static inline void _User_extensions_Thread_start( Thread_Control *started ) { _User_extensions_Iterate( a000d9f4: e1a00004 mov r0, r4 a000d9f8: e59f1008 ldr r1, [pc, #8] ; a000da08 <_Thread_Start+0x50> a000d9fc: eb000039 bl a000dae8 <_User_extensions_Iterate> _User_extensions_Thread_start( the_thread ); return true; a000da00: e3a00001 mov r0, #1 a000da04: e8bd8010 pop {r4, pc} =============================================================================== a000cae8 <_Thread_blocking_operation_Cancel>: Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { a000cae8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { a000caec: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { a000caf0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { a000caf4: e3530002 cmp r3, #2 <== NOT EXECUTED #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; a000caf8: e3a03000 mov r3, #0 <== NOT EXECUTED a000cafc: e5813044 str r3, [r1, #68] ; 0x44 <== NOT EXECUTED /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { a000cb00: 0a000005 beq a000cb1c <_Thread_blocking_operation_Cancel+0x34><== NOT EXECUTED a000cb04: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a000cb08: e1a00001 mov r0, r1 <== NOT EXECUTED a000cb0c: e59f1028 ldr r1, [pc, #40] ; a000cb3c <_Thread_blocking_operation_Cancel+0x54><== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a000cb10: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000cb14: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED a000cb18: ea000045 b a000cc34 <_Thread_Clear_state> <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; a000cb1c: e3a03003 mov r3, #3 <== NOT EXECUTED a000cb20: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED a000cb24: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a000cb28: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED a000cb2c: e58d1000 str r1, [sp] <== NOT EXECUTED a000cb30: eb00049e bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a000cb34: e59d1000 ldr r1, [sp] <== NOT EXECUTED a000cb38: eafffff2 b a000cb08 <_Thread_blocking_operation_Cancel+0x20><== NOT EXECUTED =============================================================================== a00102d0 <_Thread_queue_Dequeue_fifo>: #include Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { a00102d0: e92d4010 push {r4, lr} uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a00102d4: e10f2000 mrs r2, CPSR a00102d8: e3823080 orr r3, r2, #128 ; 0x80 a00102dc: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a00102e0: e1a03000 mov r3, r0 a00102e4: e4934004 ldr r4, [r3], #4 ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { a00102e8: e1540003 cmp r4, r3 a00102ec: 0a000017 beq a0010350 <_Thread_queue_Dequeue_fifo+0x80> the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a00102f0: e5941050 ldr r1, [r4, #80] ; 0x50 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; a00102f4: e5943000 ldr r3, [r4] a00102f8: e3510002 cmp r1, #2 head->next = new_first; a00102fc: e5803000 str r3, [r0] new_first->previous = head; a0010300: e5830004 str r0, [r3, #4] if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; a0010304: e3a03000 mov r3, #0 a0010308: e5843044 str r3, [r4, #68] ; 0x44 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a001030c: 0a000005 beq a0010328 <_Thread_queue_Dequeue_fifo+0x58> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0010310: e129f002 msr CPSR_fc, r2 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a0010314: e59f1040 ldr r1, [pc, #64] ; a001035c <_Thread_queue_Dequeue_fifo+0x8c> a0010318: e1a00004 mov r0, r4 a001031c: ebfff244 bl a000cc34 <_Thread_Clear_state> return the_thread; } _ISR_Enable( level ); return NULL; } a0010320: e1a00004 mov r0, r4 a0010324: e8bd8010 pop {r4, pc} RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; a0010328: e3a03003 mov r3, #3 <== NOT EXECUTED a001032c: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED a0010330: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a0010334: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a0010338: ebfff69c bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a001033c: e1a00004 mov r0, r4 <== NOT EXECUTED a0010340: e59f1014 ldr r1, [pc, #20] ; a001035c <_Thread_queue_Dequeue_fifo+0x8c><== NOT EXECUTED a0010344: ebfff23a bl a000cc34 <_Thread_Clear_state> <== NOT EXECUTED return the_thread; } _ISR_Enable( level ); return NULL; } a0010348: e1a00004 mov r0, r4 <== NOT EXECUTED a001034c: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0010350: e129f002 msr CPSR_fc, r2 return the_thread; } _ISR_Enable( level ); return NULL; a0010354: e3a04000 mov r4, #0 a0010358: eafffff0 b a0010320 <_Thread_queue_Dequeue_fifo+0x50> =============================================================================== a000d3ac <_Thread_queue_Dequeue_priority>: #include Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { a000d3ac: e92d4010 push {r4, lr} uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000d3b0: e10fc000 mrs ip, CPSR a000d3b4: e38c3080 orr r3, ip, #128 ; 0x80 a000d3b8: e129f003 msr CPSR_fc, r3 Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; a000d3bc: e3a03000 mov r3, #0 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { a000d3c0: e3a0100c mov r1, #12 a000d3c4: e0020391 mul r2, r1, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000d3c8: e7904002 ldr r4, [r0, r2] a000d3cc: e0802002 add r2, r0, r2 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000d3d0: e2822004 add r2, r2, #4 a000d3d4: e1540002 cmp r4, r2 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { a000d3d8: e2833001 add r3, r3, #1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { a000d3dc: 1a000005 bne a000d3f8 <_Thread_queue_Dequeue_priority+0x4c> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; a000d3e0: e3530004 cmp r3, #4 a000d3e4: 1afffff6 bne a000d3c4 <_Thread_queue_Dequeue_priority+0x18> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000d3e8: e129f00c msr CPSR_fc, ip /* * We did not find a thread to unblock. */ _ISR_Enable( level ); return NULL; a000d3ec: e3a04000 mov r4, #0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } a000d3f0: e1a00004 mov r0, r4 a000d3f4: e8bd8010 pop {r4, pc} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000d3f8: e5943038 ldr r3, [r4, #56] ; 0x38 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000d3fc: e284203c add r2, r4, #60 ; 0x3c dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; a000d400: e5941004 ldr r1, [r4, #4] if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a000d404: e1530002 cmp r3, r2 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; a000d408: e3a02000 mov r2, #0 a000d40c: e5842044 str r2, [r4, #68] ; 0x44 new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; a000d410: e5942000 ldr r2, [r4] previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a000d414: 0a000020 beq a000d49c <_Thread_queue_Dequeue_priority+0xf0> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; a000d418: e5940040 ldr r0, [r4, #64] ; 0x40 <== NOT EXECUTED last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; a000d41c: e593e000 ldr lr, [r3] <== NOT EXECUTED previous_node->next = new_first_node; next_node->previous = new_first_node; a000d420: e5823004 str r3, [r2, #4] <== NOT EXECUTED if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; a000d424: e5813000 str r3, [r1] <== NOT EXECUTED next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a000d428: e5831004 str r1, [r3, #4] <== NOT EXECUTED last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; a000d42c: e5832000 str r2, [r3] <== NOT EXECUTED new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a000d430: e5941038 ldr r1, [r4, #56] ; 0x38 <== NOT EXECUTED a000d434: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED a000d438: e1510002 cmp r1, r2 <== NOT EXECUTED a000d43c: 0a000005 beq a000d458 <_Thread_queue_Dequeue_priority+0xac><== NOT EXECUTED /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); a000d440: e2831038 add r1, r3, #56 ; 0x38 <== NOT EXECUTED tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); a000d444: e283203c add r2, r3, #60 ; 0x3c <== NOT EXECUTED new_second_node->previous = head; a000d448: e58e1004 str r1, [lr, #4] <== NOT EXECUTED head->next = new_second_node; a000d44c: e583e038 str lr, [r3, #56] ; 0x38 <== NOT EXECUTED tail->previous = last_node; a000d450: e5830040 str r0, [r3, #64] ; 0x40 <== NOT EXECUTED last_node->next = tail; a000d454: e5802000 str r2, [r0] <== NOT EXECUTED } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a000d458: e5943050 ldr r3, [r4, #80] ; 0x50 a000d45c: e3530002 cmp r3, #2 a000d460: 0a000004 beq a000d478 <_Thread_queue_Dequeue_priority+0xcc> a000d464: e129f00c msr CPSR_fc, ip RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a000d468: e59f1038 ldr r1, [pc, #56] ; a000d4a8 <_Thread_queue_Dequeue_priority+0xfc> a000d46c: e1a00004 mov r0, r4 a000d470: ebfffdef bl a000cc34 <_Thread_Clear_state> a000d474: eaffffdd b a000d3f0 <_Thread_queue_Dequeue_priority+0x44> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; a000d478: e3a03003 mov r3, #3 <== NOT EXECUTED a000d47c: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED a000d480: e129f00c msr CPSR_fc, ip <== NOT EXECUTED _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a000d484: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a000d488: eb000248 bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a000d48c: e1a00004 mov r0, r4 <== NOT EXECUTED a000d490: e59f1010 ldr r1, [pc, #16] ; a000d4a8 <_Thread_queue_Dequeue_priority+0xfc><== NOT EXECUTED a000d494: ebfffde6 bl a000cc34 <_Thread_Clear_state> <== NOT EXECUTED a000d498: eaffffd4 b a000d3f0 <_Thread_queue_Dequeue_priority+0x44> <== NOT EXECUTED head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; a000d49c: e5812000 str r2, [r1] next_node->previous = previous_node; a000d4a0: e5821004 str r1, [r2, #4] a000d4a4: eaffffeb b a000d458 <_Thread_queue_Dequeue_priority+0xac> =============================================================================== a000d558 <_Thread_queue_Enqueue_priority>: Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; a000d558: e5913014 ldr r3, [r1, #20] Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { a000d55c: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl} RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a000d560: e2814038 add r4, r1, #56 ; 0x38 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); a000d564: e1a0c323 lsr ip, r3, #6 head->next = tail; head->previous = NULL; tail->previous = head; a000d568: e5814040 str r4, [r1, #64] ; 0x40 _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 ]; a000d56c: e3a0400c mov r4, #12 a000d570: e02c0c94 mla ip, r4, ip, r0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); a000d574: e281503c add r5, r1, #60 ; 0x3c block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) a000d578: e3130020 tst r3, #32 head->next = tail; a000d57c: e5815038 str r5, [r1, #56] ; 0x38 head->previous = NULL; a000d580: e3a05000 mov r5, #0 a000d584: e581503c str r5, [r1, #60] ; 0x3c _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; a000d588: e5906038 ldr r6, [r0, #56] ; 0x38 a000d58c: 028c9004 addeq r9, ip, #4 a000d590: 159f916c ldrne r9, [pc, #364] ; a000d704 <_Thread_queue_Enqueue_priority+0x1ac> if ( _Thread_queue_Is_reverse_search( priority ) ) a000d594: 1a00001b bne a000d608 <_Thread_queue_Enqueue_priority+0xb0> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000d598: e10fa000 mrs sl, CPSR a000d59c: e38a4080 orr r4, sl, #128 ; 0x80 a000d5a0: e129f004 msr CPSR_fc, r4 a000d5a4: e1a0800a mov r8, sl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000d5a8: e59c4000 ldr r4, [ip] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a000d5ac: e1540009 cmp r4, r9 a000d5b0: 1a000009 bne a000d5dc <_Thread_queue_Enqueue_priority+0x84> a000d5b4: ea000050 b a000d6fc <_Thread_queue_Enqueue_priority+0x1a4> static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000d5b8: e10f7000 mrs r7, CPSR a000d5bc: e129f00a msr CPSR_fc, sl a000d5c0: e129f007 msr CPSR_fc, r7 RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); a000d5c4: e5947010 ldr r7, [r4, #16] search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { a000d5c8: e1160007 tst r6, r7 a000d5cc: 0a000032 beq a000d69c <_Thread_queue_Enqueue_priority+0x144> _ISR_Enable( level ); goto restart_forward_search; } search_thread = a000d5d0: e5944000 ldr r4, [r4] restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { a000d5d4: e1540009 cmp r4, r9 a000d5d8: 0a000002 beq a000d5e8 <_Thread_queue_Enqueue_priority+0x90> search_priority = search_thread->current_priority; a000d5dc: e5945014 ldr r5, [r4, #20] if ( priority <= search_priority ) a000d5e0: e1530005 cmp r3, r5 a000d5e4: 8afffff3 bhi a000d5b8 <_Thread_queue_Enqueue_priority+0x60> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != a000d5e8: e590c030 ldr ip, [r0, #48] ; 0x30 a000d5ec: e35c0001 cmp ip, #1 a000d5f0: 0a00002b beq a000d6a4 <_Thread_queue_Enqueue_priority+0x14c> * 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; a000d5f4: e5828000 str r8, [r2] <== NOT EXECUTED return the_thread_queue->sync_state; } a000d5f8: e1a0000c mov r0, ip a000d5fc: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl} a000d600: e12fff1e bx lr static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000d604: e129f00a msr CPSR_fc, sl <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; a000d608: e5d95000 ldrb r5, [r9] a000d60c: e2855001 add r5, r5, #1 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000d610: e10fa000 mrs sl, CPSR a000d614: e38a4080 orr r4, sl, #128 ; 0x80 a000d618: e129f004 msr CPSR_fc, r4 a000d61c: e1a0800a mov r8, sl */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; a000d620: e59c4008 ldr r4, [ip, #8] _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a000d624: e154000c cmp r4, ip a000d628: 1a000009 bne a000d654 <_Thread_queue_Enqueue_priority+0xfc> a000d62c: ea00000b b a000d660 <_Thread_queue_Enqueue_priority+0x108> static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000d630: e10f7000 mrs r7, CPSR <== NOT EXECUTED a000d634: e129f00a msr CPSR_fc, sl <== NOT EXECUTED a000d638: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED a000d63c: e5947010 ldr r7, [r4, #16] <== NOT EXECUTED search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { a000d640: e1160007 tst r6, r7 <== NOT EXECUTED a000d644: 0affffee beq a000d604 <_Thread_queue_Enqueue_priority+0xac><== NOT EXECUTED _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) a000d648: e5944004 ldr r4, [r4, #4] <== NOT EXECUTED restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { a000d64c: e154000c cmp r4, ip <== NOT EXECUTED a000d650: 0a000002 beq a000d660 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED search_priority = search_thread->current_priority; a000d654: e5945014 ldr r5, [r4, #20] if ( priority >= search_priority ) a000d658: e1530005 cmp r3, r5 a000d65c: 3afffff3 bcc a000d630 <_Thread_queue_Enqueue_priority+0xd8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != a000d660: e590c030 ldr ip, [r0, #48] ; 0x30 a000d664: e35c0001 cmp ip, #1 a000d668: 1affffe1 bne a000d5f4 <_Thread_queue_Enqueue_priority+0x9c> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a000d66c: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a000d670: e3a03000 mov r3, #0 a000d674: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a000d678: 0a000015 beq a000d6d4 <_Thread_queue_Enqueue_priority+0x17c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; a000d67c: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; a000d680: e5814004 str r4, [r1, #4] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; a000d684: e5813000 str r3, [r1] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; a000d688: e5831004 str r1, [r3, #4] 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; a000d68c: e5841000 str r1, [r4] next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; a000d690: e5810044 str r0, [r1, #68] ; 0x44 static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000d694: e129f00a msr CPSR_fc, sl _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000d698: eaffffd6 b a000d5f8 <_Thread_queue_Enqueue_priority+0xa0> a000d69c: e129f00a msr CPSR_fc, sl <== NOT EXECUTED a000d6a0: eaffffbc b a000d598 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( priority == search_priority ) a000d6a4: e1530005 cmp r3, r5 if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; a000d6a8: e3a03000 mov r3, #0 a000d6ac: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) a000d6b0: 0a000007 beq a000d6d4 <_Thread_queue_Enqueue_priority+0x17c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; a000d6b4: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; a000d6b8: e5814000 str r4, [r1] the_node->previous = previous_node; a000d6bc: e5813004 str r3, [r1, #4] previous_node->next = the_node; a000d6c0: e5831000 str r1, [r3] search_node->previous = the_node; a000d6c4: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; a000d6c8: e5810044 str r0, [r1, #68] ; 0x44 a000d6cc: e129f00a msr CPSR_fc, sl _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000d6d0: eaffffc8 b a000d5f8 <_Thread_queue_Enqueue_priority+0xa0> _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; a000d6d4: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); a000d6d8: e284203c add r2, r4, #60 ; 0x3c <== NOT EXECUTED previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; a000d6dc: e5812000 str r2, [r1] <== NOT EXECUTED the_node->previous = previous_node; a000d6e0: e5813004 str r3, [r1, #4] <== NOT EXECUTED previous_node->next = the_node; a000d6e4: e5831000 str r1, [r3] <== NOT EXECUTED search_node->previous = the_node; a000d6e8: e5841040 str r1, [r4, #64] ; 0x40 <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; a000d6ec: e5810044 str r0, [r1, #68] ; 0x44 <== NOT EXECUTED a000d6f0: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000d6f4: e3a0c001 mov ip, #1 <== NOT EXECUTED a000d6f8: eaffffbe b a000d5f8 <_Thread_queue_Enqueue_priority+0xa0> <== NOT EXECUTED if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; a000d6fc: e3e05000 mvn r5, #0 a000d700: eaffffb8 b a000d5e8 <_Thread_queue_Enqueue_priority+0x90> =============================================================================== a000d4ac <_Thread_queue_Enqueue_with_handler>: Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; a000d4ac: e59f3094 ldr r3, [pc, #148] ; a000d548 <_Thread_queue_Enqueue_with_handler+0x9c> void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { a000d4b0: e92d40f0 push {r4, r5, r6, r7, lr} Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing; a000d4b4: e5934008 ldr r4, [r3, #8] void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { a000d4b8: e1a06001 mov r6, r1 a000d4bc: e24dd004 sub sp, sp, #4 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); a000d4c0: e5901038 ldr r1, [r0, #56] ; 0x38 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { a000d4c4: e1a05000 mov r5, r0 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); a000d4c8: e1a00004 mov r0, r4 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { a000d4cc: e1a07002 mov r7, r2 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); a000d4d0: eb0000ef bl a000d894 <_Thread_Set_state> /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { a000d4d4: e3560000 cmp r6, #0 a000d4d8: 1a00000f bne a000d51c <_Thread_queue_Enqueue_with_handler+0x70> } /* * Now enqueue the thread per the discipline for this thread queue. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) a000d4dc: e595c034 ldr ip, [r5, #52] ; 0x34 enqueue_p = _Thread_queue_Enqueue_priority; a000d4e0: e59f2064 ldr r2, [pc, #100] ; a000d54c <_Thread_queue_Enqueue_with_handler+0xa0> a000d4e4: e59f3064 ldr r3, [pc, #100] ; a000d550 <_Thread_queue_Enqueue_with_handler+0xa4> a000d4e8: e35c0001 cmp ip, #1 a000d4ec: 01a03002 moveq r3, r2 else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ enqueue_p = _Thread_queue_Enqueue_fifo; sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level ); a000d4f0: e1a00005 mov r0, r5 a000d4f4: e1a01004 mov r1, r4 a000d4f8: e1a0200d mov r2, sp a000d4fc: e12fff33 blx r3 if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) a000d500: e3500001 cmp r0, #1 a000d504: 0a000002 beq a000d514 <_Thread_queue_Enqueue_with_handler+0x68> _Thread_blocking_operation_Cancel( sync_state, the_thread, level ); a000d508: e1a01004 mov r1, r4 <== NOT EXECUTED a000d50c: e59d2000 ldr r2, [sp] <== NOT EXECUTED a000d510: ebfffd74 bl a000cae8 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED } a000d514: e28dd004 add sp, sp, #4 a000d518: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize( a000d51c: e5942008 ldr r2, [r4, #8] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000d520: e3a03000 mov r3, #0 a000d524: e5843050 str r3, [r4, #80] ; 0x50 the_watchdog->routine = routine; a000d528: e5847064 str r7, [r4, #100] ; 0x64 the_watchdog->id = id; a000d52c: e5842068 str r2, [r4, #104] ; 0x68 the_watchdog->user_data = user_data; a000d530: e584306c str r3, [r4, #108] ; 0x6c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a000d534: e5846054 str r6, [r4, #84] ; 0x54 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a000d538: e59f0014 ldr r0, [pc, #20] ; a000d554 <_Thread_queue_Enqueue_with_handler+0xa8> a000d53c: e2841048 add r1, r4, #72 ; 0x48 a000d540: eb0001ad bl a000dbfc <_Watchdog_Insert> a000d544: eaffffe4 b a000d4dc <_Thread_queue_Enqueue_with_handler+0x30> =============================================================================== a0011938 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { a0011938: e52de004 push {lr} ; (str lr, [sp, #-4]!) a001193c: e24dd004 sub sp, sp, #4 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0011940: e10f0000 mrs r0, CPSR a0011944: e3803080 orr r3, r0, #128 ; 0x80 a0011948: e129f003 msr CPSR_fc, r3 a001194c: e5912010 ldr r2, [r1, #16] a0011950: e3a03bef mov r3, #244736 ; 0x3bc00 a0011954: e2833e2e add r3, r3, #736 ; 0x2e0 a0011958: e0023003 and r3, r2, r3 ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a001195c: e3530000 cmp r3, #0 a0011960: 0a00000e beq a00119a0 <_Thread_queue_Extract_fifo+0x68> _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a0011964: e591c050 ldr ip, [r1, #80] ; 0x50 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; a0011968: e5913004 ldr r3, [r1, #4] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a001196c: e5912000 ldr r2, [r1] a0011970: e35c0002 cmp ip, #2 previous = the_node->previous; next->previous = previous; a0011974: e5823004 str r3, [r2, #4] previous->next = next; a0011978: e5832000 str r2, [r3] return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; a001197c: e3a03000 mov r3, #0 a0011980: e5813044 str r3, [r1, #68] ; 0x44 if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a0011984: 0a000008 beq a00119ac <_Thread_queue_Extract_fifo+0x74> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0011988: e129f000 msr CPSR_fc, r0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); a001198c: e1a00001 mov r0, r1 a0011990: e59f1034 ldr r1, [pc, #52] ; a00119cc <_Thread_queue_Extract_fifo+0x94> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a0011994: e28dd004 add sp, sp, #4 a0011998: e49de004 pop {lr} ; (ldr lr, [sp], #4) a001199c: eaffeca4 b a000cc34 <_Thread_Clear_state> a00119a0: e129f000 msr CPSR_fc, r0 a00119a4: e28dd004 add sp, sp, #4 a00119a8: e8bd8000 pop {pc} a00119ac: e3a03003 mov r3, #3 <== NOT EXECUTED a00119b0: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED a00119b4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a00119b8: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED a00119bc: e58d1000 str r1, [sp] <== NOT EXECUTED a00119c0: ebfff0fa bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a00119c4: e59d1000 ldr r1, [sp] <== NOT EXECUTED a00119c8: eaffffef b a001198c <_Thread_queue_Extract_fifo+0x54> <== NOT EXECUTED =============================================================================== a00103d0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { a00103d0: e92d4070 push {r4, r5, r6, lr} a00103d4: e20220ff and r2, r2, #255 ; 0xff a00103d8: e24dd004 sub sp, sp, #4 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a00103dc: e10fc000 mrs ip, CPSR a00103e0: e38c3080 orr r3, ip, #128 ; 0x80 a00103e4: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); a00103e8: e5910010 ldr r0, [r1, #16] a00103ec: e3a03bef mov r3, #244736 ; 0x3bc00 a00103f0: e2833e2e add r3, r3, #736 ; 0x2e0 a00103f4: e0003003 and r3, r0, r3 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { a00103f8: e3530000 cmp r3, #0 a00103fc: 0a000022 beq a001048c <_Thread_queue_Extract_priority_helper+0xbc> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a0010400: e5913038 ldr r3, [r1, #56] ; 0x38 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a0010404: e281403c add r4, r1, #60 ; 0x3c /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; a0010408: e5910000 ldr r0, [r1] previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a001040c: e1530004 cmp r3, r4 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; previous_node = the_node->previous; a0010410: e5914004 ldr r4, [r1, #4] head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; a0010414: 05840000 streq r0, [r4] next_node->previous = previous_node; a0010418: 05804004 streq r4, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a001041c: 0a00000f beq a0010460 <_Thread_queue_Extract_priority_helper+0x90> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last( Chain_Control *the_chain ) { return _Chain_Tail( the_chain )->previous; a0010420: e5915040 ldr r5, [r1, #64] ; 0x40 <== NOT EXECUTED new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; a0010424: e5936000 ldr r6, [r3] <== NOT EXECUTED previous_node->next = new_first_node; next_node->previous = new_first_node; a0010428: e5803004 str r3, [r0, #4] <== NOT EXECUTED new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; a001042c: e5843000 str r3, [r4] <== NOT EXECUTED next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a0010430: e5834004 str r4, [r3, #4] <== NOT EXECUTED last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; a0010434: e5830000 str r0, [r3] <== NOT EXECUTED new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a0010438: e5914038 ldr r4, [r1, #56] ; 0x38 <== NOT EXECUTED a001043c: e5910040 ldr r0, [r1, #64] ; 0x40 <== NOT EXECUTED a0010440: e1540000 cmp r4, r0 <== NOT EXECUTED a0010444: 0a000005 beq a0010460 <_Thread_queue_Extract_priority_helper+0x90><== NOT EXECUTED /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); a0010448: e2834038 add r4, r3, #56 ; 0x38 <== NOT EXECUTED tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); a001044c: e283003c add r0, r3, #60 ; 0x3c <== NOT EXECUTED new_second_node->previous = head; a0010450: e5864004 str r4, [r6, #4] <== NOT EXECUTED head->next = new_second_node; a0010454: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED tail->previous = last_node; a0010458: e5835040 str r5, [r3, #64] ; 0x40 <== NOT EXECUTED last_node->next = tail; a001045c: e5850000 str r0, [r5] <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a0010460: e3520000 cmp r2, #0 a0010464: 1a000008 bne a001048c <_Thread_queue_Extract_priority_helper+0xbc> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a0010468: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED a001046c: e3530002 cmp r3, #2 <== NOT EXECUTED a0010470: 0a000008 beq a0010498 <_Thread_queue_Extract_priority_helper+0xc8><== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0010474: e129f00c msr CPSR_fc, ip <== NOT EXECUTED a0010478: e1a00001 mov r0, r1 <== NOT EXECUTED a001047c: e59f1034 ldr r1, [pc, #52] ; a00104b8 <_Thread_queue_Extract_priority_helper+0xe8><== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a0010480: e28dd004 add sp, sp, #4 <== NOT EXECUTED a0010484: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED a0010488: eafff1e9 b a000cc34 <_Thread_Clear_state> <== NOT EXECUTED a001048c: e129f00c msr CPSR_fc, ip a0010490: e28dd004 add sp, sp, #4 a0010494: e8bd8070 pop {r4, r5, r6, pc} a0010498: e3a03003 mov r3, #3 <== NOT EXECUTED a001049c: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED a00104a0: e129f00c msr CPSR_fc, ip <== NOT EXECUTED if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); a00104a4: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED a00104a8: e58d1000 str r1, [sp] <== NOT EXECUTED a00104ac: ebfff63f bl a000ddb0 <_Watchdog_Remove> <== NOT EXECUTED a00104b0: e59d1000 ldr r1, [sp] <== NOT EXECUTED a00104b4: eaffffef b a0010478 <_Thread_queue_Extract_priority_helper+0xa8><== NOT EXECUTED =============================================================================== a002185c <_Thread_queue_First_priority>: Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; a002185c: e3a03000 mov r3, #0 <== NOT EXECUTED index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) a0021860: e3a0c00c mov ip, #12 <== NOT EXECUTED a0021864: e002039c mul r2, ip, r3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a0021868: e7901002 ldr r1, [r0, r2] <== NOT EXECUTED a002186c: e0802002 add r2, r0, r2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a0021870: e2822004 add r2, r2, #4 <== NOT EXECUTED a0021874: e1510002 cmp r1, r2 <== NOT EXECUTED { uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { a0021878: e2833001 add r3, r3, #1 <== NOT EXECUTED if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) a002187c: 1a000002 bne a002188c <_Thread_queue_First_priority+0x30> <== NOT EXECUTED Thread_queue_Control *the_thread_queue ) { uint32_t index; for( index=0 ; a0021880: e3530004 cmp r3, #4 <== NOT EXECUTED a0021884: 1afffff6 bne a0021864 <_Thread_queue_First_priority+0x8> <== NOT EXECUTED if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Priority[ index ] ); } return NULL; a0021888: e3a01000 mov r1, #0 <== NOT EXECUTED } a002188c: e1a00001 mov r0, r1 <== NOT EXECUTED a0021890: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a00104bc <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { a00104bc: e1a03000 mov r3, r0 <== NOT EXECUTED Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; a00104c0: e5900044 ldr r0, [r0, #68] ; 0x44 <== NOT EXECUTED * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && a00104c4: e5902030 ldr r2, [r0, #48] ; 0x30 <== NOT EXECUTED a00104c8: e3520000 cmp r2, #0 <== NOT EXECUTED a00104cc: 0a000003 beq a00104e0 <_Thread_queue_Process_timeout+0x24> <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); a00104d0: e59f1034 ldr r1, [pc, #52] ; a001050c <_Thread_queue_Process_timeout+0x50><== NOT EXECUTED a00104d4: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED a00104d8: e1530001 cmp r3, r1 <== NOT EXECUTED a00104dc: 0a000003 beq a00104f0 <_Thread_queue_Process_timeout+0x34> <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a00104e0: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a00104e4: e1a01003 mov r1, r3 <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a00104e8: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); a00104ec: eaffffb1 b a00103b8 <_Thread_queue_Extract> <== NOT EXECUTED * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { a00104f0: e3520003 cmp r2, #3 <== NOT EXECUTED a00104f4: 012fff1e bxeq lr <== NOT EXECUTED the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; a00104f8: e590203c ldr r2, [r0, #60] ; 0x3c <== NOT EXECUTED a00104fc: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; a0010500: e3a03002 mov r3, #2 <== NOT EXECUTED a0010504: e5803030 str r3, [r0, #48] ; 0x30 <== NOT EXECUTED a0010508: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000d83c <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { a000d83c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED a000d840: e24dd004 sub sp, sp, #4 <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a000d844: e1a0100d mov r1, sp <== NOT EXECUTED a000d848: ebfffdf7 bl a000d02c <_Thread_Get> <== NOT EXECUTED switch ( location ) { a000d84c: e59d3000 ldr r3, [sp] <== NOT EXECUTED a000d850: e3530000 cmp r3, #0 <== NOT EXECUTED a000d854: 1a000004 bne a000d86c <_Thread_queue_Timeout+0x30> <== NOT EXECUTED #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); a000d858: eb000b17 bl a00104bc <_Thread_queue_Process_timeout> <== NOT EXECUTED * * This routine decrements the thread dispatch level. */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000d85c: e59f3010 ldr r3, [pc, #16] ; a000d874 <_Thread_queue_Timeout+0x38><== NOT EXECUTED a000d860: e5932000 ldr r2, [r3] <== NOT EXECUTED --level; a000d864: e2422001 sub r2, r2, #1 <== NOT EXECUTED _Thread_Dispatch_disable_level = level; a000d868: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Unnest_dispatch(); break; } } a000d86c: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000d870: e8bd8000 pop {pc} <== NOT EXECUTED =============================================================================== a001ae64 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a001ae64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a001ae68: e24dd024 sub sp, sp, #36 ; 0x24 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; a001ae6c: e28d6018 add r6, sp, #24 a001ae70: e28d1010 add r1, sp, #16 a001ae74: e2862004 add r2, r6, #4 a001ae78: e58d100c str r1, [sp, #12] a001ae7c: e58d2018 str r2, [sp, #24] head->previous = NULL; tail->previous = head; a001ae80: e28d100c add r1, sp, #12 a001ae84: e28d201c add r2, sp, #28 a001ae88: e59f81e0 ldr r8, [pc, #480] ; a001b070 <_Timer_server_Body+0x20c> a001ae8c: e59f91e0 ldr r9, [pc, #480] ; a001b074 <_Timer_server_Body+0x210> { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; a001ae90: e3a03000 mov r3, #0 a001ae94: e2807068 add r7, r0, #104 ; 0x68 tail->previous = head; a001ae98: e58d1014 str r1, [sp, #20] a001ae9c: e2805030 add r5, r0, #48 ; 0x30 a001aea0: e58d2000 str r2, [sp] a001aea4: e2801008 add r1, r0, #8 a001aea8: e2802040 add r2, r0, #64 ; 0x40 * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; a001aeac: e1a0a007 mov sl, r7 * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a001aeb0: e1a04000 mov r4, r0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; a001aeb4: e58d3010 str r3, [sp, #16] a001aeb8: e58d301c str r3, [sp, #28] tail->previous = head; a001aebc: e58d6020 str r6, [sp, #32] a001aec0: e28db010 add fp, sp, #16 a001aec4: e58d1004 str r1, [sp, #4] a001aec8: e58d2008 str r2, [sp, #8] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; a001aecc: e1a07005 mov r7, r5 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; a001aed0: e28d300c add r3, sp, #12 a001aed4: e5843078 str r3, [r4, #120] ; 0x78 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a001aed8: e5983000 ldr r3, [r8] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a001aedc: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001aee0: e1a00007 mov r0, r7 a001aee4: e1a02006 mov r2, r6 a001aee8: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a001aeec: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001aef0: eb00115b bl a001f464 <_Watchdog_Adjust_to_chain> a001aef4: e8990003 ldm r9, {r0, r1} a001aef8: e59f2178 ldr r2, [pc, #376] ; a001b078 <_Timer_server_Body+0x214> a001aefc: e3a03000 mov r3, #0 a001af00: eb004d6e bl a002e4c0 <__divdi3> Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a001af04: e5942074 ldr r2, [r4, #116] ; 0x74 a001af08: e1a05000 mov r5, r0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { a001af0c: e1500002 cmp r0, r2 a001af10: 8a000022 bhi a001afa0 <_Timer_server_Body+0x13c> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { a001af14: 3a000018 bcc a001af7c <_Timer_server_Body+0x118> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; a001af18: e5845074 str r5, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); a001af1c: e5940078 ldr r0, [r4, #120] ; 0x78 a001af20: eb0002d8 bl a001ba88 <_Chain_Get> if ( timer == NULL ) { a001af24: e2501000 subs r1, r0, #0 a001af28: 0a00000b beq a001af5c <_Timer_server_Body+0xf8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a001af2c: e5913038 ldr r3, [r1, #56] ; 0x38 <== NOT EXECUTED a001af30: e3530001 cmp r3, #1 <== NOT EXECUTED a001af34: 0a000015 beq a001af90 <_Timer_server_Body+0x12c> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a001af38: e3530003 cmp r3, #3 <== NOT EXECUTED a001af3c: 1afffff6 bne a001af1c <_Timer_server_Body+0xb8> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a001af40: e2811010 add r1, r1, #16 <== NOT EXECUTED a001af44: e1a0000a mov r0, sl <== NOT EXECUTED a001af48: eb00116e bl a001f508 <_Watchdog_Insert> <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); a001af4c: e5940078 ldr r0, [r4, #120] ; 0x78 <== NOT EXECUTED a001af50: eb0002cc bl a001ba88 <_Chain_Get> <== NOT EXECUTED if ( timer == NULL ) { a001af54: e2501000 subs r1, r0, #0 <== NOT EXECUTED a001af58: 1afffff3 bne a001af2c <_Timer_server_Body+0xc8> <== NOT EXECUTED uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001af5c: e10f2000 mrs r2, CPSR a001af60: e3823080 orr r3, r2, #128 ; 0x80 a001af64: e129f003 msr CPSR_fc, r3 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { a001af68: e59d300c ldr r3, [sp, #12] a001af6c: e153000b cmp r3, fp a001af70: 0a00000f beq a001afb4 <_Timer_server_Body+0x150> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001af74: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED a001af78: eaffffd6 b a001aed8 <_Timer_server_Body+0x74> <== NOT EXECUTED /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); a001af7c: e1a0000a mov r0, sl <== NOT EXECUTED a001af80: e3a01001 mov r1, #1 <== NOT EXECUTED a001af84: e0652002 rsb r2, r5, r2 <== NOT EXECUTED a001af88: eb001107 bl a001f3ac <_Watchdog_Adjust> <== NOT EXECUTED a001af8c: eaffffe1 b a001af18 <_Timer_server_Body+0xb4> <== NOT EXECUTED Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a001af90: e1a00007 mov r0, r7 <== NOT EXECUTED a001af94: e2811010 add r1, r1, #16 <== NOT EXECUTED a001af98: eb00115a bl a001f508 <_Watchdog_Insert> <== NOT EXECUTED a001af9c: eaffffde b a001af1c <_Timer_server_Body+0xb8> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a001afa0: e0621005 rsb r1, r2, r5 a001afa4: e1a0000a mov r0, sl a001afa8: e1a02006 mov r2, r6 a001afac: eb00112c bl a001f464 <_Watchdog_Adjust_to_chain> a001afb0: eaffffd8 b a001af18 <_Timer_server_Body+0xb4> */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; a001afb4: e5841078 str r1, [r4, #120] ; 0x78 a001afb8: e129f002 msr CPSR_fc, r2 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { a001afbc: e59d3018 ldr r3, [sp, #24] a001afc0: e59d1000 ldr r1, [sp] a001afc4: e1530001 cmp r3, r1 a001afc8: 1a00000a bne a001aff8 <_Timer_server_Body+0x194> a001afcc: ea000012 b a001b01c <_Timer_server_Body+0x1b8> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; a001afd0: e5923000 ldr r3, [r2] head->next = new_first; new_first->previous = head; a001afd4: e5836004 str r6, [r3, #4] { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; a001afd8: e58d3018 str r3, [sp, #24] * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; a001afdc: e3a03000 mov r3, #0 a001afe0: e5823008 str r3, [r2, #8] a001afe4: e129f001 msr CPSR_fc, r1 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); a001afe8: e592301c ldr r3, [r2, #28] a001afec: e5920020 ldr r0, [r2, #32] a001aff0: e5921024 ldr r1, [r2, #36] ; 0x24 a001aff4: e12fff33 blx r3 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001aff8: e10f1000 mrs r1, CPSR a001affc: e3813080 orr r3, r1, #128 ; 0x80 a001b000: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a001b004: e59d2018 ldr r2, [sp, #24] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a001b008: e59d3000 ldr r3, [sp] a001b00c: e1520003 cmp r2, r3 a001b010: 1affffee bne a001afd0 <_Timer_server_Body+0x16c> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001b014: e129f001 msr CPSR_fc, r1 a001b018: eaffffac b a001aed0 <_Timer_server_Body+0x6c> * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a001b01c: e59f2058 ldr r2, [pc, #88] ; a001b07c <_Timer_server_Body+0x218> } } else { ts->active = false; a001b020: e3a01000 mov r1, #0 a001b024: e5c4107c strb r1, [r4, #124] ; 0x7c a001b028: e5923000 ldr r3, [r2] ++level; a001b02c: e2833001 add r3, r3, #1 _Thread_Dispatch_disable_level = level; a001b030: e5823000 str r3, [r2] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); a001b034: e3a01008 mov r1, #8 a001b038: e5940000 ldr r0, [r4] a001b03c: eb001000 bl a001f044 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a001b040: e1a00004 mov r0, r4 a001b044: ebffff5a bl a001adb4 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a001b048: e1a00004 mov r0, r4 a001b04c: ebffff6e bl a001ae0c <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a001b050: eb000dba bl a001e740 <_Thread_Enable_dispatch> ts->active = true; a001b054: e3a03001 mov r3, #1 a001b058: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); a001b05c: e59d0004 ldr r0, [sp, #4] a001b060: eb001195 bl a001f6bc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a001b064: e59d0008 ldr r0, [sp, #8] a001b068: eb001193 bl a001f6bc <_Watchdog_Remove> a001b06c: eaffff97 b a001aed0 <_Timer_server_Body+0x6c> =============================================================================== a001b080 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { a001b080: e92d40f0 push {r4, r5, r6, r7, lr} if ( ts->insert_chain == NULL ) { a001b084: e5905078 ldr r5, [r0, #120] ; 0x78 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { a001b088: e1a04000 mov r4, r0 a001b08c: e1a06001 mov r6, r1 if ( ts->insert_chain == NULL ) { a001b090: e3550000 cmp r5, #0 a001b094: 0a000002 beq a001b0a4 <_Timer_server_Schedule_operation_method+0x24> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); a001b098: e5900078 ldr r0, [r0, #120] ; 0x78 <== NOT EXECUTED } } a001b09c: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); a001b0a0: ea00026d b a001ba5c <_Chain_Append> <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a001b0a4: e59f3110 ldr r3, [pc, #272] ; a001b1bc <_Timer_server_Schedule_operation_method+0x13c> a001b0a8: e5932000 ldr r2, [r3] ++level; a001b0ac: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a001b0b0: e5832000 str r2, [r3] * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a001b0b4: e5913038 ldr r3, [r1, #56] ; 0x38 a001b0b8: e3530001 cmp r3, #1 a001b0bc: 0a000024 beq a001b154 <_Timer_server_Schedule_operation_method+0xd4> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a001b0c0: e3530003 cmp r3, #3 a001b0c4: 0a000001 beq a001b0d0 <_Timer_server_Schedule_operation_method+0x50> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } a001b0c8: e8bd40f0 pop {r4, r5, r6, r7, lr} if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); a001b0cc: ea000d9b b a001e740 <_Thread_Enable_dispatch> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001b0d0: e10f7000 mrs r7, CPSR a001b0d4: e3873080 orr r3, r7, #128 ; 0x80 a001b0d8: e129f003 msr CPSR_fc, r3 a001b0dc: e59f10dc ldr r1, [pc, #220] ; a001b1c0 <_Timer_server_Schedule_operation_method+0x140> a001b0e0: e59f20dc ldr r2, [pc, #220] ; a001b1c4 <_Timer_server_Schedule_operation_method+0x144> a001b0e4: e3a03000 mov r3, #0 a001b0e8: e8910003 ldm r1, {r0, r1} a001b0ec: eb004cf3 bl a002e4c0 <__divdi3> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a001b0f0: e5943068 ldr r3, [r4, #104] ; 0x68 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a001b0f4: e284106c add r1, r4, #108 ; 0x6c * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; a001b0f8: e5942074 ldr r2, [r4, #116] ; 0x74 if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { a001b0fc: e1530001 cmp r3, r1 a001b100: 0a000008 beq a001b128 <_Timer_server_Schedule_operation_method+0xa8> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; a001b104: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED if ( snapshot > last_snapshot ) { a001b108: e1500002 cmp r0, r2 <== NOT EXECUTED } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; a001b10c: 90812002 addls r2, r1, r2 <== NOT EXECUTED delta_interval += delta; a001b110: 90605002 rsbls r5, r0, r2 <== NOT EXECUTED snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { a001b114: 9a000002 bls a001b124 <_Timer_server_Schedule_operation_method+0xa4><== NOT EXECUTED /* * We advanced in time. */ delta = snapshot - last_snapshot; a001b118: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (delta_interval > delta) { a001b11c: e1510002 cmp r1, r2 <== NOT EXECUTED delta_interval -= delta; a001b120: 80625001 rsbhi r5, r2, r1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; a001b124: e5835010 str r5, [r3, #16] <== NOT EXECUTED } ts->TOD_watchdogs.last_snapshot = snapshot; a001b128: e5840074 str r0, [r4, #116] ; 0x74 static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001b12c: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a001b130: e2840068 add r0, r4, #104 ; 0x68 a001b134: e2861010 add r1, r6, #16 a001b138: eb0010f2 bl a001f508 <_Watchdog_Insert> if ( !ts->active ) { a001b13c: e5d4307c ldrb r3, [r4, #124] ; 0x7c a001b140: e3530000 cmp r3, #0 a001b144: 1affffdf bne a001b0c8 <_Timer_server_Schedule_operation_method+0x48> _Timer_server_Reset_tod_system_watchdog( ts ); a001b148: e1a00004 mov r0, r4 a001b14c: ebffff2e bl a001ae0c <_Timer_server_Reset_tod_system_watchdog> a001b150: eaffffdc b a001b0c8 <_Timer_server_Schedule_operation_method+0x48> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001b154: e10fc000 mrs ip, CPSR a001b158: e38c3080 orr r3, ip, #128 ; 0x80 a001b15c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a001b160: e5903030 ldr r3, [r0, #48] ; 0x30 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a001b164: e2802034 add r2, r0, #52 ; 0x34 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { a001b168: e1530002 cmp r3, r2 /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; a001b16c: e59f2054 ldr r2, [pc, #84] ; a001b1c8 <_Timer_server_Schedule_operation_method+0x148> a001b170: e5922000 ldr r2, [r2] last_snapshot = ts->Interval_watchdogs.last_snapshot; a001b174: e590103c ldr r1, [r0, #60] ; 0x3c if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { a001b178: 0a000004 beq a001b190 <_Timer_server_Schedule_operation_method+0x110> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; a001b17c: e5930010 ldr r0, [r3, #16] first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; a001b180: e0611002 rsb r1, r1, r2 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { a001b184: e1510000 cmp r1, r0 delta_interval -= delta; a001b188: 30615000 rsbcc r5, r1, r0 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; a001b18c: e5835010 str r5, [r3, #16] } ts->Interval_watchdogs.last_snapshot = snapshot; a001b190: e584203c str r2, [r4, #60] ; 0x3c static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001b194: e129f00c msr CPSR_fc, ip _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a001b198: e2840030 add r0, r4, #48 ; 0x30 a001b19c: e2861010 add r1, r6, #16 a001b1a0: eb0010d8 bl a001f508 <_Watchdog_Insert> if ( !ts->active ) { a001b1a4: e5d4307c ldrb r3, [r4, #124] ; 0x7c a001b1a8: e3530000 cmp r3, #0 a001b1ac: 1affffc5 bne a001b0c8 <_Timer_server_Schedule_operation_method+0x48> _Timer_server_Reset_interval_system_watchdog( ts ); a001b1b0: e1a00004 mov r0, r4 a001b1b4: ebfffefe bl a001adb4 <_Timer_server_Reset_interval_system_watchdog> a001b1b8: eaffffc2 b a001b0c8 <_Timer_server_Schedule_operation_method+0x48> =============================================================================== a002c158 <_Timespec_From_ticks>: struct timespec *time ) { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); a002c158: e59f2034 ldr r2, [pc, #52] ; a002c194 <_Timespec_From_ticks+0x3c><== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; a002c15c: e59fc034 ldr ip, [pc, #52] ; a002c198 <_Timespec_From_ticks+0x40><== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * a002c160: e3a0393d mov r3, #999424 ; 0xf4000 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); a002c164: e592200c ldr r2, [r2, #12] <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * a002c168: e2833d09 add r3, r3, #576 ; 0x240 <== NOT EXECUTED struct timespec *time ) { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); a002c16c: e0020290 mul r2, r0, r2 <== NOT EXECUTED time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; a002c170: e08c0c92 umull r0, ip, r2, ip <== NOT EXECUTED a002c174: e1a0c92c lsr ip, ip, #18 <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * a002c178: e003039c mul r3, ip, r3 <== NOT EXECUTED a002c17c: e0632002 rsb r2, r3, r2 <== NOT EXECUTED a002c180: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED a002c184: e0020293 mul r2, r3, r2 <== NOT EXECUTED { uint32_t usecs; usecs = ticks * rtems_configuration_get_microseconds_per_tick(); time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND; a002c188: e581c000 str ip, [r1] <== NOT EXECUTED time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) * a002c18c: e5812004 str r2, [r1, #4] <== NOT EXECUTED TOD_NANOSECONDS_PER_MICROSECOND; } a002c190: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000e858 <_Timespec_Subtract>: const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { a000e858: e591c004 ldr ip, [r1, #4] <== NOT EXECUTED a000e85c: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED void _Timespec_Subtract( const struct timespec *start, const struct timespec *end, struct timespec *result ) { a000e860: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED if (end->tv_nsec < start->tv_nsec) { a000e864: e15c0003 cmp ip, r3 <== NOT EXECUTED result->tv_sec = end->tv_sec - start->tv_sec - 1; a000e868: e5914000 ldr r4, [r1] <== NOT EXECUTED a000e86c: e5901000 ldr r1, [r0] <== NOT EXECUTED const struct timespec *end, struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { a000e870: ba000005 blt a000e88c <_Timespec_Subtract+0x34> <== NOT EXECUTED result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; result->tv_nsec = end->tv_nsec - start->tv_nsec; a000e874: e063300c rsb r3, r3, ip <== NOT EXECUTED a000e878: e5823004 str r3, [r2, #4] <== NOT EXECUTED if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; } else { result->tv_sec = end->tv_sec - start->tv_sec; a000e87c: e0613004 rsb r3, r1, r4 <== NOT EXECUTED a000e880: e5823000 str r3, [r2] <== NOT EXECUTED result->tv_nsec = end->tv_nsec - start->tv_nsec; } } a000e884: e8bd0010 pop {r4} <== NOT EXECUTED a000e888: e12fff1e bx lr <== NOT EXECUTED { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; a000e88c: e28cc5ee add ip, ip, #998244352 ; 0x3b800000 <== NOT EXECUTED a000e890: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; a000e894: e0611004 rsb r1, r1, r4 <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; a000e898: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; a000e89c: e2411001 sub r1, r1, #1 <== NOT EXECUTED result->tv_nsec = (TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec; a000e8a0: e063300c rsb r3, r3, ip <== NOT EXECUTED struct timespec *result ) { if (end->tv_nsec < start->tv_nsec) { result->tv_sec = end->tv_sec - start->tv_sec - 1; a000e8a4: e5821000 str r1, [r2] <== NOT EXECUTED result->tv_nsec = a000e8a8: e5823004 str r3, [r2, #4] <== NOT EXECUTED a000e8ac: eafffff4 b a000e884 <_Timespec_Subtract+0x2c> <== NOT EXECUTED =============================================================================== a002c1e0 <_Timespec_To_ticks>: */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { a002c1e0: e92d4070 push {r4, r5, r6, lr} uint32_t ticks; uint32_t nanoseconds_per_tick; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) a002c1e4: e5906000 ldr r6, [r0] */ uint32_t _Timespec_To_ticks( const struct timespec *time ) { a002c1e8: e1a05000 mov r5, r0 uint32_t ticks; uint32_t nanoseconds_per_tick; if ( (time->tv_sec == 0) && (time->tv_nsec == 0) ) a002c1ec: e3560000 cmp r6, #0 a002c1f0: 1a000002 bne a002c200 <_Timespec_To_ticks+0x20> a002c1f4: e5904004 ldr r4, [r0, #4] <== NOT EXECUTED a002c1f8: e3540000 cmp r4, #0 <== NOT EXECUTED a002c1fc: 0a00000d beq a002c238 <_Timespec_To_ticks+0x58> <== NOT EXECUTED /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ ticks = time->tv_sec * TOD_TICKS_PER_SECOND; a002c200: eb000034 bl a002c2d8 nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); a002c204: e59f3034 ldr r3, [pc, #52] ; a002c240 <_Timespec_To_ticks+0x60> /** * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ ticks = time->tv_sec * TOD_TICKS_PER_SECOND; a002c208: e0040096 mul r4, r6, r0 nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); ticks += time->tv_nsec / nanoseconds_per_tick; a002c20c: e5955004 ldr r5, [r5, #4] * We should ensure the ticks not be truncated by integer division. We * need to have it be greater than or equal to the requested time. It * should not be shorter. */ ticks = time->tv_sec * TOD_TICKS_PER_SECOND; nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); a002c210: e5936010 ldr r6, [r3, #16] ticks += time->tv_nsec / nanoseconds_per_tick; a002c214: e1a00005 mov r0, r5 a002c218: e1a01006 mov r1, r6 a002c21c: ebff62e0 bl a0004da4 <__aeabi_uidiv> if ( (time->tv_nsec % nanoseconds_per_tick) != 0 ) a002c220: e1a01006 mov r1, r6 * need to have it be greater than or equal to the requested time. It * should not be shorter. */ ticks = time->tv_sec * TOD_TICKS_PER_SECOND; nanoseconds_per_tick = rtems_configuration_get_nanoseconds_per_tick(); ticks += time->tv_nsec / nanoseconds_per_tick; a002c224: e0844000 add r4, r4, r0 if ( (time->tv_nsec % nanoseconds_per_tick) != 0 ) a002c228: e1a00005 mov r0, r5 a002c22c: ebfff718 bl a0029e94 <__umodsi3> a002c230: e3500000 cmp r0, #0 ticks += 1; a002c234: 12844001 addne r4, r4, #1 return ticks; } a002c238: e1a00004 mov r0, r4 a002c23c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000f158 <_Timestamp64_Divide>: const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { a000f158: e92d43f0 push {r4, r5, r6, r7, r8, r9, lr} <== NOT EXECUTED Timestamp64_Control answer; if ( *_rhs == 0 ) { a000f15c: e8910300 ldm r1, {r8, r9} <== NOT EXECUTED a000f160: e1981009 orrs r1, r8, r9 <== NOT EXECUTED const Timestamp64_Control *_lhs, const Timestamp64_Control *_rhs, uint32_t *_ival_percentage, uint32_t *_fval_percentage ) { a000f164: e1a04002 mov r4, r2 <== NOT EXECUTED a000f168: e1a05003 mov r5, r3 <== NOT EXECUTED Timestamp64_Control answer; if ( *_rhs == 0 ) { a000f16c: 0a000017 beq a000f1d0 <_Timestamp64_Divide+0x78> <== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; a000f170: e5903000 ldr r3, [r0] <== NOT EXECUTED a000f174: e3a01b61 mov r1, #99328 ; 0x18400 <== NOT EXECUTED a000f178: e2811e2a add r1, r1, #672 ; 0x2a0 <== NOT EXECUTED a000f17c: e0876193 umull r6, r7, r3, r1 <== NOT EXECUTED a000f180: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED a000f184: e1a02008 mov r2, r8 <== NOT EXECUTED a000f188: e1a03009 mov r3, r9 <== NOT EXECUTED a000f18c: e0277091 mla r7, r1, r0, r7 <== NOT EXECUTED a000f190: e1a00006 mov r0, r6 <== NOT EXECUTED a000f194: e1a01007 mov r1, r7 <== NOT EXECUTED a000f198: eb00390f bl a001d5dc <__divdi3> <== NOT EXECUTED *_ival_percentage = answer / 1000; a000f19c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED a000f1a0: e3a03000 mov r3, #0 <== NOT EXECUTED * This looks odd but gives the results the proper precision. * * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; a000f1a4: e1a06000 mov r6, r0 <== NOT EXECUTED a000f1a8: e1a07001 mov r7, r1 <== NOT EXECUTED *_ival_percentage = answer / 1000; a000f1ac: eb00390a bl a001d5dc <__divdi3> <== NOT EXECUTED *_fval_percentage = answer % 1000; a000f1b0: e1a01007 mov r1, r7 <== NOT EXECUTED * TODO: Rounding on the last digit of the fval. */ answer = (*_lhs * 100000) / *_rhs; *_ival_percentage = answer / 1000; a000f1b4: e5840000 str r0, [r4] <== NOT EXECUTED *_fval_percentage = answer % 1000; a000f1b8: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED a000f1bc: e3a03000 mov r3, #0 <== NOT EXECUTED a000f1c0: e1a00006 mov r0, r6 <== NOT EXECUTED a000f1c4: eb003a3f bl a001dac8 <__moddi3> <== NOT EXECUTED a000f1c8: e5850000 str r0, [r5] <== NOT EXECUTED a000f1cc: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED ) { Timestamp64_Control answer; if ( *_rhs == 0 ) { *_ival_percentage = 0; a000f1d0: e3a03000 mov r3, #0 <== NOT EXECUTED a000f1d4: e5823000 str r3, [r2] <== NOT EXECUTED *_fval_percentage = 0; a000f1d8: e5853000 str r3, [r5] <== NOT EXECUTED return; a000f1dc: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED =============================================================================== a00137cc <_User_extensions_Remove_set>: #include void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { a00137cc: e92d4010 push {r4, lr} a00137d0: e1a04000 mov r4, r0 _Chain_Extract( &the_extension->Node ); a00137d4: eb0012d3 bl a0018328 <_Chain_Extract> /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) a00137d8: e5943024 ldr r3, [r4, #36] ; 0x24 a00137dc: e3530000 cmp r3, #0 a00137e0: 0a000002 beq a00137f0 <_User_extensions_Remove_set+0x24> _Chain_Extract( &the_extension->Switch.Node ); a00137e4: e2840008 add r0, r4, #8 <== NOT EXECUTED } a00137e8: 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 ); a00137ec: ea0012cd b a0018328 <_Chain_Extract> <== NOT EXECUTED a00137f0: e8bd8010 pop {r4, pc} =============================================================================== a000daa8 <_User_extensions_Thread_exitted_visitor>: Thread_Control *executing, void *arg, const User_extensions_Table *callouts ) { User_extensions_thread_exitted_extension callout = callouts->thread_exitted; a000daa8: e5923018 ldr r3, [r2, #24] void _User_extensions_Thread_exitted_visitor( Thread_Control *executing, void *arg, const User_extensions_Table *callouts ) { a000daac: e52de004 push {lr} ; (str lr, [sp, #-4]!) User_extensions_thread_exitted_extension callout = callouts->thread_exitted; if ( callout != NULL ) { a000dab0: e3530000 cmp r3, #0 a000dab4: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) (*callout)( executing ); a000dab8: e12fff33 blx r3 <== NOT EXECUTED a000dabc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000f410 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { a000f410: e92d41f0 push {r4, r5, r6, r7, r8, lr} a000f414: e1a04000 mov r4, r0 a000f418: e1a05002 mov r5, r2 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000f41c: e10f2000 mrs r2, CPSR a000f420: e3823080 orr r3, r2, #128 ; 0x80 a000f424: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000f428: e1a07000 mov r7, r0 a000f42c: e4973004 ldr r3, [r7], #4 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { a000f430: e1530007 cmp r3, r7 a000f434: 0a000017 beq a000f498 <_Watchdog_Adjust+0x88> switch ( direction ) { a000f438: e3510000 cmp r1, #0 a000f43c: 1a000017 bne a000f4a0 <_Watchdog_Adjust+0x90> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000f440: e3550000 cmp r5, #0 a000f444: 0a000013 beq a000f498 <_Watchdog_Adjust+0x88> if ( units < _Watchdog_First( header )->delta_interval ) { a000f448: e5936010 ldr r6, [r3, #16] a000f44c: e1550006 cmp r5, r6 _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000f450: 23a08001 movcs r8, #1 case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { a000f454: 2a000005 bcs a000f470 <_Watchdog_Adjust+0x60> a000f458: ea000017 b a000f4bc <_Watchdog_Adjust+0xac> <== NOT EXECUTED switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { a000f45c: e0555006 subs r5, r5, r6 <== NOT EXECUTED a000f460: 0a00000c beq a000f498 <_Watchdog_Adjust+0x88> <== NOT EXECUTED if ( units < _Watchdog_First( header )->delta_interval ) { a000f464: e5936010 ldr r6, [r3, #16] <== NOT EXECUTED a000f468: e1560005 cmp r6, r5 <== NOT EXECUTED a000f46c: 8a000012 bhi a000f4bc <_Watchdog_Adjust+0xac> <== NOT EXECUTED _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; a000f470: e5838010 str r8, [r3, #16] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000f474: e129f002 msr CPSR_fc, r2 _ISR_Enable( level ); _Watchdog_Tickle( header ); a000f478: e1a00004 mov r0, r4 a000f47c: eb0000a9 bl a000f728 <_Watchdog_Tickle> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000f480: e10f2000 mrs r2, CPSR a000f484: e3823080 orr r3, r2, #128 ; 0x80 a000f488: e129f003 msr CPSR_fc, r3 a000f48c: e5943000 ldr r3, [r4] _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a000f490: e1570003 cmp r7, r3 a000f494: 1afffff0 bne a000f45c <_Watchdog_Adjust+0x4c> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000f498: e129f002 msr CPSR_fc, r2 } } _ISR_Enable( level ); } a000f49c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { a000f4a0: e3510001 cmp r1, #1 <== NOT EXECUTED a000f4a4: 1afffffb bne a000f498 <_Watchdog_Adjust+0x88> <== NOT EXECUTED case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; a000f4a8: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED a000f4ac: e0815005 add r5, r1, r5 <== NOT EXECUTED a000f4b0: e5835010 str r5, [r3, #16] <== NOT EXECUTED a000f4b4: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED } } _ISR_Enable( level ); } a000f4b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; a000f4bc: e0655006 rsb r5, r5, r6 <== NOT EXECUTED a000f4c0: e5835010 str r5, [r3, #16] <== NOT EXECUTED break; a000f4c4: eafffff3 b a000f498 <_Watchdog_Adjust+0x88> <== NOT EXECUTED =============================================================================== a001f464 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) { a001f464: e92d05f0 push {r4, r5, r6, r7, r8, sl} uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001f468: e10f7000 mrs r7, CPSR a001f46c: e3873080 orr r3, r7, #128 ; 0x80 a001f470: e129f003 msr CPSR_fc, r3 Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; _ISR_Disable( level ); a001f474: e1a06000 mov r6, r0 a001f478: e4963004 ldr r3, [r6], #4 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; a001f47c: e3a0a000 mov sl, #0 a001f480: e2828004 add r8, r2, #4 Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { a001f484: e1560003 cmp r6, r3 a001f488: 0a000018 beq a001f4f0 <_Watchdog_Adjust_to_chain+0x8c> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { a001f48c: e593c010 ldr ip, [r3, #16] a001f490: e151000c cmp r1, ip a001f494: 3a000018 bcc a001f4fc <_Watchdog_Adjust_to_chain+0x98> /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; a001f498: e06c1001 rsb r1, ip, r1 first->delta_interval = 0; a001f49c: e583a010 str sl, [r3, #16] ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a001f4a0: e5935000 ldr r5, [r3] previous = the_node->previous; a001f4a4: e5934004 ldr r4, [r3, #4] next->previous = previous; a001f4a8: e5854004 str r4, [r5, #4] Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; a001f4ac: e592c008 ldr ip, [r2, #8] Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; a001f4b0: e5845000 str r5, [r4] ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; a001f4b4: e5838000 str r8, [r3] tail->previous = the_node; old_last->next = the_node; a001f4b8: e58c3000 str r3, [ip] { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; a001f4bc: e5823008 str r3, [r2, #8] old_last->next = the_node; the_node->previous = old_last; a001f4c0: e583c004 str ip, [r3, #4] static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001f4c4: e10f3000 mrs r3, CPSR a001f4c8: e129f007 msr CPSR_fc, r7 a001f4cc: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a001f4d0: e5903000 ldr r3, [r0] _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) a001f4d4: e1560003 cmp r6, r3 a001f4d8: 0affffe9 beq a001f484 <_Watchdog_Adjust_to_chain+0x20> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) a001f4dc: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED a001f4e0: e35c0000 cmp ip, #0 <== NOT EXECUTED a001f4e4: 0affffed beq a001f4a0 <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED Watchdog_Control *first; _ISR_Disable( level ); while ( 1 ) { if ( _Chain_Is_empty( header ) ) { a001f4e8: e1560003 cmp r6, r3 <== NOT EXECUTED a001f4ec: 1affffe6 bne a001f48c <_Watchdog_Adjust_to_chain+0x28> <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001f4f0: e129f007 msr CPSR_fc, r7 break; } } _ISR_Enable( level ); } a001f4f4: e8bd05f0 pop {r4, r5, r6, r7, r8, sl} a001f4f8: e12fff1e bx lr /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { first->delta_interval -= units; a001f4fc: e061100c rsb r1, r1, ip a001f500: e5831010 str r1, [r3, #16] break; a001f504: eafffff9 b a001f4f0 <_Watchdog_Adjust_to_chain+0x8c> =============================================================================== a000dbfc <_Watchdog_Insert>: Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; a000dbfc: e59f3138 ldr r3, [pc, #312] ; a000dd3c <_Watchdog_Insert+0x140> void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { a000dc00: e92d01f0 push {r4, r5, r6, r7, r8} Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; a000dc04: e5935000 ldr r5, [r3] uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000dc08: e10f4000 mrs r4, CPSR a000dc0c: e3843080 orr r3, r4, #128 ; 0x80 a000dc10: 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 ) { a000dc14: e5913008 ldr r3, [r1, #8] a000dc18: e3530000 cmp r3, #0 a000dc1c: 1a00003e bne a000dd1c <_Watchdog_Insert+0x120> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; a000dc20: e59f7118 ldr r7, [pc, #280] ; a000dd40 <_Watchdog_Insert+0x144> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; a000dc24: e3a02001 mov r2, #1 a000dc28: e59f6114 ldr r6, [pc, #276] ; a000dd44 <_Watchdog_Insert+0x148> _Watchdog_Sync_count++; a000dc2c: e5973000 ldr r3, [r7] if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; a000dc30: e5812008 str r2, [r1, #8] _Watchdog_Sync_count++; a000dc34: e0833002 add r3, r3, r2 a000dc38: e5873000 str r3, [r7] restart: delta_interval = the_watchdog->initial; a000dc3c: e591300c ldr r3, [r1, #12] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000dc40: e5902000 ldr r2, [r0] for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) a000dc44: e3530000 cmp r3, #0 a000dc48: 0a000023 beq a000dcdc <_Watchdog_Insert+0xe0> a000dc4c: e592c000 ldr ip, [r2] a000dc50: e35c0000 cmp ip, #0 a000dc54: 0a000020 beq a000dcdc <_Watchdog_Insert+0xe0> break; if ( delta_interval < after->delta_interval ) { a000dc58: e592c010 ldr ip, [r2, #16] a000dc5c: e153000c cmp r3, ip a000dc60: 3a000030 bcc a000dd28 <_Watchdog_Insert+0x12c> static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000dc64: e10f8000 mrs r8, CPSR a000dc68: e129f004 msr CPSR_fc, r4 a000dc6c: e129f008 msr CPSR_fc, r8 delta_interval -= after->delta_interval; _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { a000dc70: e5918008 ldr r8, [r1, #8] a000dc74: e3580001 cmp r8, #1 a000dc78: 1a000023 bne a000dd0c <_Watchdog_Insert+0x110> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { a000dc7c: e5968000 ldr r8, [r6] a000dc80: e1550008 cmp r5, r8 if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; a000dc84: 206c3003 rsbcs r3, ip, r3 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { a000dc88: 2a000010 bcs a000dcd0 <_Watchdog_Insert+0xd4> a000dc8c: ea000028 b a000dd34 <_Watchdog_Insert+0x138> <== NOT EXECUTED for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) a000dc90: e592c000 ldr ip, [r2] a000dc94: e35c0000 cmp ip, #0 a000dc98: 0a00000f beq a000dcdc <_Watchdog_Insert+0xe0> break; if ( delta_interval < after->delta_interval ) { a000dc9c: e592c010 ldr ip, [r2, #16] a000dca0: e15c0003 cmp ip, r3 a000dca4: 8a00001f bhi a000dd28 <_Watchdog_Insert+0x12c> after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; a000dca8: e06c3003 rsb r3, ip, r3 a000dcac: e10fc000 mrs ip, CPSR a000dcb0: e129f004 msr CPSR_fc, r4 a000dcb4: e129f00c msr CPSR_fc, ip _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { a000dcb8: e591c008 ldr ip, [r1, #8] a000dcbc: e35c0001 cmp ip, #1 a000dcc0: 1a000011 bne a000dd0c <_Watchdog_Insert+0x110> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { a000dcc4: e596c000 ldr ip, [r6] a000dcc8: e155000c cmp r5, ip a000dccc: 3a000018 bcc a000dd34 <_Watchdog_Insert+0x138> for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) a000dcd0: e3530000 cmp r3, #0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); a000dcd4: e5922000 ldr r2, [r2] a000dcd8: 1affffec bne a000dc90 <_Watchdog_Insert+0x94> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); a000dcdc: e5922004 ldr r2, [r2, #4] the_watchdog->start_time = _Watchdog_Ticks_since_boot; a000dce0: e59fc060 ldr ip, [pc, #96] ; a000dd48 <_Watchdog_Insert+0x14c> RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; a000dce4: e3a08002 mov r8, #2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; a000dce8: e5920000 ldr r0, [r2] a000dcec: e59cc000 ldr ip, [ip] a000dcf0: e5818008 str r8, [r1, #8] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; a000dcf4: e5813010 str r3, [r1, #16] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; a000dcf8: e5812004 str r2, [r1, #4] before_node = after_node->next; after_node->next = the_node; a000dcfc: e5821000 str r1, [r2] the_node->next = before_node; before_node->previous = the_node; a000dd00: e5801004 str r1, [r0, #4] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; a000dd04: e5810000 str r0, [r1] _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; a000dd08: e581c014 str ip, [r1, #20] exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; a000dd0c: e5865000 str r5, [r6] _Watchdog_Sync_count--; a000dd10: e5973000 ldr r3, [r7] a000dd14: e2433001 sub r3, r3, #1 a000dd18: e5873000 str r3, [r7] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000dd1c: e129f004 msr CPSR_fc, r4 _ISR_Enable( level ); } a000dd20: e8bd01f0 pop {r4, r5, r6, r7, r8} a000dd24: e12fff1e bx lr if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; a000dd28: e063c00c rsb ip, r3, ip a000dd2c: e582c010 str ip, [r2, #16] break; a000dd30: eaffffe9 b a000dcdc <_Watchdog_Insert+0xe0> if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; a000dd34: e5865000 str r5, [r6] <== NOT EXECUTED goto restart; a000dd38: eaffffbf b a000dc3c <_Watchdog_Insert+0x40> <== NOT EXECUTED =============================================================================== a000eef4 <_Watchdog_Report>: void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { a000eef4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED printk( a000eef8: e2507000 subs r7, r0, #0 <== NOT EXECUTED a000eefc: 059f7048 ldreq r7, [pc, #72] ; a000ef4c <_Watchdog_Report+0x58><== NOT EXECUTED a000ef00: e591600c ldr r6, [r1, #12] <== NOT EXECUTED a000ef04: e591501c ldr r5, [r1, #28] <== NOT EXECUTED a000ef08: e5914020 ldr r4, [r1, #32] <== NOT EXECUTED a000ef0c: e591e024 ldr lr, [r1, #36] ; 0x24 <== NOT EXECUTED a000ef10: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED void _Watchdog_Report( const char *name, Watchdog_Control *watch ) { a000ef14: e24dd014 sub sp, sp, #20 <== NOT EXECUTED a000ef18: e1a0c001 mov ip, r1 <== NOT EXECUTED printk( a000ef1c: 01a02007 moveq r2, r7 <== NOT EXECUTED a000ef20: 159f2028 ldrne r2, [pc, #40] ; a000ef50 <_Watchdog_Report+0x5c><== NOT EXECUTED a000ef24: e59f0028 ldr r0, [pc, #40] ; a000ef54 <_Watchdog_Report+0x60><== NOT EXECUTED a000ef28: e1a01007 mov r1, r7 <== NOT EXECUTED a000ef2c: e58d6000 str r6, [sp] <== NOT EXECUTED a000ef30: e58dc004 str ip, [sp, #4] <== NOT EXECUTED a000ef34: e58d5008 str r5, [sp, #8] <== NOT EXECUTED a000ef38: e58d400c str r4, [sp, #12] <== NOT EXECUTED a000ef3c: e58de010 str lr, [sp, #16] <== NOT EXECUTED a000ef40: ebffe372 bl a0007d10 <== NOT EXECUTED watch, watch->routine, watch->id, watch->user_data ); } a000ef44: e28dd014 add sp, sp, #20 <== NOT EXECUTED a000ef48: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000ee7c <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { a000ee7c: e92d40f0 push {r4, r5, r6, r7, lr} a000ee80: e1a02001 mov r2, r1 a000ee84: e1a05000 mov r5, r0 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000ee88: e10f6000 mrs r6, CPSR a000ee8c: e3863080 orr r3, r6, #128 ; 0x80 a000ee90: e129f003 msr CPSR_fc, r3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); a000ee94: e59f004c ldr r0, [pc, #76] ; a000eee8 <_Watchdog_Report_chain+0x6c> */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000ee98: e1a04001 mov r4, r1 a000ee9c: e1a01005 mov r1, r5 a000eea0: ebffe39a bl a0007d10 a000eea4: e4947004 ldr r7, [r4], #4 if ( !_Chain_Is_empty( header ) ) { a000eea8: e1570004 cmp r7, r4 a000eeac: 0a00000a beq a000eedc <_Watchdog_Report_chain+0x60> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); a000eeb0: e1a01007 mov r1, r7 <== NOT EXECUTED a000eeb4: e3a00000 mov r0, #0 <== NOT EXECUTED a000eeb8: eb00000d bl a000eef4 <_Watchdog_Report> <== NOT EXECUTED _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) a000eebc: e5977000 ldr r7, [r7] <== NOT EXECUTED Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; a000eec0: e1570004 cmp r7, r4 <== NOT EXECUTED a000eec4: 1afffff9 bne a000eeb0 <_Watchdog_Report_chain+0x34> <== NOT EXECUTED { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); a000eec8: e59f001c ldr r0, [pc, #28] ; a000eeec <_Watchdog_Report_chain+0x70><== NOT EXECUTED a000eecc: e1a01005 mov r1, r5 <== NOT EXECUTED a000eed0: ebffe38e bl a0007d10 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000eed4: e129f006 msr CPSR_fc, r6 } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } a000eed8: e8bd80f0 pop {r4, r5, r6, r7, pc} _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); a000eedc: e59f000c ldr r0, [pc, #12] ; a000eef0 <_Watchdog_Report_chain+0x74> a000eee0: ebffe38a bl a0007d10 a000eee4: eafffffa b a000eed4 <_Watchdog_Report_chain+0x58> =============================================================================== a000de5c <_Watchdog_Tickle>: #include void _Watchdog_Tickle( Chain_Control *header ) { a000de5c: e92d40f0 push {r4, r5, r6, r7, lr} a000de60: e1a05000 mov r5, r0 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000de64: e10f7000 mrs r7, CPSR a000de68: e3873080 orr r3, r7, #128 ; 0x80 a000de6c: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000de70: e1a04000 mov r4, r0 a000de74: e4946004 ldr r6, [r4], #4 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) a000de78: e1560004 cmp r6, r4 a000de7c: 0a000006 beq a000de9c <_Watchdog_Tickle+0x40> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { a000de80: e5963010 ldr r3, [r6, #16] a000de84: e3530000 cmp r3, #0 a000de88: 0a000012 beq a000ded8 <_Watchdog_Tickle+0x7c> the_watchdog->delta_interval--; a000de8c: e2433001 sub r3, r3, #1 if ( the_watchdog->delta_interval != 0 ) a000de90: e3530000 cmp r3, #0 * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { the_watchdog->delta_interval--; a000de94: e5863010 str r3, [r6, #16] if ( the_watchdog->delta_interval != 0 ) a000de98: 0a00000e beq a000ded8 <_Watchdog_Tickle+0x7c> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000de9c: e129f007 msr CPSR_fc, r7 } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } a000dea0: e8bd80f0 pop {r4, r5, r6, r7, pc} _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( a000dea4: e596301c ldr r3, [r6, #28] a000dea8: e5960020 ldr r0, [r6, #32] a000deac: e5961024 ldr r1, [r6, #36] ; 0x24 a000deb0: e12fff33 blx r3 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000deb4: e10f7000 mrs r7, CPSR a000deb8: e3873080 orr r3, r7, #128 ; 0x80 a000debc: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000dec0: e5956000 ldr r6, [r5] _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); a000dec4: e1540006 cmp r4, r6 a000dec8: 0afffff3 beq a000de9c <_Watchdog_Tickle+0x40> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && a000decc: e5963010 ldr r3, [r6, #16] <== NOT EXECUTED a000ded0: e3530000 cmp r3, #0 <== NOT EXECUTED a000ded4: 1afffff0 bne a000de9c <_Watchdog_Tickle+0x40> <== NOT EXECUTED if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); a000ded8: e1a00006 mov r0, r6 a000dedc: ebffffb3 bl a000ddb0 <_Watchdog_Remove> static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000dee0: e129f007 msr CPSR_fc, r7 _ISR_Enable( level ); switch( watchdog_state ) { a000dee4: e3500002 cmp r0, #2 a000dee8: 1afffff1 bne a000deb4 <_Watchdog_Tickle+0x58> a000deec: eaffffec b a000dea4 <_Watchdog_Tickle+0x48> =============================================================================== a000def0 <_Workspace_Handler_initialization>: size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); a000def0: e59f3120 ldr r3, [pc, #288] ; a000e018 <_Workspace_Handler_initialization+0x128> void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { a000def4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000def8: e1a08001 mov r8, r1 Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); a000defc: e5d31032 ldrb r1, [r3, #50] ; 0x32 void _Workspace_Handler_initialization( Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { a000df00: e24dd004 sub sp, sp, #4 a000df04: e58d2000 str r2, [sp] Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); a000df08: e3510000 cmp r1, #0 a000df0c: 05937004 ldreq r7, [r3, #4] a000df10: e5932000 ldr r2, [r3] a000df14: 13a07000 movne r7, #0 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000df18: e3580000 cmp r8, #0 size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; uintptr_t remaining = rtems_configuration_get_work_space_size(); a000df1c: e0877002 add r7, r7, r2 bool do_zero = rtems_configuration_get_do_zero_of_workspace(); a000df20: e5d3a030 ldrb sl, [r3, #48] ; 0x30 bool unified = rtems_configuration_get_unified_work_area(); a000df24: e5d3b031 ldrb fp, [r3, #49] ; 0x31 uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000df28: 0a000032 beq a000dff8 <_Workspace_Handler_initialization+0x108> Heap_Area *areas, size_t area_count, Heap_Initialization_or_extend_handler extend ) { Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize; a000df2c: e59f90e8 ldr r9, [pc, #232] ; a000e01c <_Workspace_Handler_initialization+0x12c> bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000df30: e1a04000 mov r4, r0 a000df34: e3a06000 mov r6, #0 a000df38: ea00001d b a000dfb4 <_Workspace_Handler_initialization+0xc4> if ( do_zero ) { memset( area->begin, 0, area->size ); } if ( area->size > overhead ) { a000df3c: e5945004 ldr r5, [r4, #4] a000df40: e3550016 cmp r5, #22 a000df44: 9a000016 bls a000dfa4 <_Workspace_Handler_initialization+0xb4> uintptr_t space_available; uintptr_t size; if ( unified ) { a000df48: e35b0000 cmp fp, #0 a000df4c: 1a000004 bne a000df64 <_Workspace_Handler_initialization+0x74> size = area->size; } else { if ( remaining > 0 ) { a000df50: e3570000 cmp r7, #0 a000df54: 0a00001d beq a000dfd0 <_Workspace_Handler_initialization+0xe0> size = remaining < area->size - overhead ? a000df58: e2453016 sub r3, r5, #22 remaining + overhead : area->size; a000df5c: e1530007 cmp r3, r7 a000df60: 82875016 addhi r5, r7, #22 } else { size = 0; } } space_available = (*init_or_extend)( a000df64: e1a02005 mov r2, r5 a000df68: e3a03008 mov r3, #8 a000df6c: e59f00ac ldr r0, [pc, #172] ; a000e020 <_Workspace_Handler_initialization+0x130> a000df70: e5941000 ldr r1, [r4] a000df74: e12fff39 blx r9 area->begin, size, page_size ); area->begin = (char *) area->begin + size; a000df78: e5943000 ldr r3, [r4] area->size -= size; a000df7c: e5942004 ldr r2, [r4, #4] if ( space_available < remaining ) { a000df80: e1500007 cmp r0, r7 remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; a000df84: 359d9000 ldrcc r9, [sp] a000df88: 259d9000 ldrcs r9, [sp] area->begin, size, page_size ); area->begin = (char *) area->begin + size; a000df8c: e0833005 add r3, r3, r5 area->size -= size; a000df90: e0655002 rsb r5, r5, r2 area->begin, size, page_size ); area->begin = (char *) area->begin + size; a000df94: e5843000 str r3, [r4] area->size -= size; a000df98: e5845004 str r5, [r4, #4] if ( space_available < remaining ) { remaining -= space_available; a000df9c: 30607007 rsbcc r7, r0, r7 } else { remaining = 0; a000dfa0: 23a07000 movcs r7, #0 bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000dfa4: e2866001 add r6, r6, #1 a000dfa8: e1560008 cmp r6, r8 a000dfac: e2844008 add r4, r4, #8 a000dfb0: 0a000010 beq a000dff8 <_Workspace_Handler_initialization+0x108> Heap_Area *area = &areas [i]; if ( do_zero ) { a000dfb4: e35a0000 cmp sl, #0 a000dfb8: 0affffdf beq a000df3c <_Workspace_Handler_initialization+0x4c> memset( area->begin, 0, area->size ); a000dfbc: e5940000 ldr r0, [r4] a000dfc0: e3a01000 mov r1, #0 a000dfc4: e5942004 ldr r2, [r4, #4] a000dfc8: eb001108 bl a00123f0 a000dfcc: eaffffda b a000df3c <_Workspace_Handler_initialization+0x4c> } else { size = 0; } } space_available = (*init_or_extend)( a000dfd0: e5941000 ldr r1, [r4] <== NOT EXECUTED a000dfd4: e59f0044 ldr r0, [pc, #68] ; a000e020 <_Workspace_Handler_initialization+0x130><== NOT EXECUTED a000dfd8: e1a02007 mov r2, r7 <== NOT EXECUTED a000dfdc: e3a03008 mov r3, #8 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000dfe0: e2866001 add r6, r6, #1 <== NOT EXECUTED } else { size = 0; } } space_available = (*init_or_extend)( a000dfe4: e12fff39 blx r9 <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000dfe8: e1560008 cmp r6, r8 <== NOT EXECUTED remaining -= space_available; } else { remaining = 0; } init_or_extend = extend; a000dfec: e59d9000 ldr r9, [sp] <== NOT EXECUTED bool unified = rtems_configuration_get_unified_work_area(); uintptr_t page_size = CPU_HEAP_ALIGNMENT; uintptr_t overhead = _Heap_Area_overhead( page_size ); size_t i; for (i = 0; i < area_count; ++i) { a000dff0: e2844008 add r4, r4, #8 <== NOT EXECUTED a000dff4: 1affffee bne a000dfb4 <_Workspace_Handler_initialization+0xc4><== NOT EXECUTED init_or_extend = extend; } } if ( remaining > 0 ) { a000dff8: e3570000 cmp r7, #0 a000dffc: 1a000001 bne a000e008 <_Workspace_Handler_initialization+0x118> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); } } a000e000: e28dd004 add sp, sp, #4 a000e004: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} init_or_extend = extend; } } if ( remaining > 0 ) { _Internal_error_Occurred( a000e008: e3a00000 mov r0, #0 a000e00c: e3a01001 mov r1, #1 a000e010: e3a02002 mov r2, #2 a000e014: ebfff6e2 bl a000bba4 <_Internal_error_Occurred> =============================================================================== a000c030 : uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | a000c030: e1a00c00 lsl r0, r0, #24 <== NOT EXECUTED a000c034: e1800d81 orr r0, r0, r1, lsl #27 <== NOT EXECUTED (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | a000c038: e1800003 orr r0, r0, r3 <== NOT EXECUTED uint32_t node, uint32_t index ) { return _Objects_Build_id( api, class, node, index ); } a000c03c: e1800802 orr r0, r0, r2, lsl #16 <== NOT EXECUTED a000c040: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c044 : char C1, char C2, char C3, char C4 ) { a000c044: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED a000c048: e1a02402 lsl r2, r2, #8 <== NOT EXECUTED return _Objects_Build_name( C1, C2, C3, C4 ); a000c04c: e20118ff and r1, r1, #16711680 ; 0xff0000 <== NOT EXECUTED a000c050: e1811c00 orr r1, r1, r0, lsl #24 <== NOT EXECUTED a000c054: e2022cff and r2, r2, #65280 ; 0xff00 <== NOT EXECUTED char C1, char C2, char C3, char C4 ) { a000c058: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED return _Objects_Build_name( C1, C2, C3, C4 ); a000c05c: e1811002 orr r1, r1, r2 <== NOT EXECUTED } a000c060: e1810003 orr r0, r1, r3 <== NOT EXECUTED a000c064: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b470 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a000b470: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a000b474: e1a04002 mov r4, r2 <== NOT EXECUTED a000b478: e1a05003 mov r5, r3 <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); a000b47c: eb00015a bl a000b9ec <_Chain_Append_with_empty_check> <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { a000b480: e3500000 cmp r0, #0 <== NOT EXECUTED a000b484: 1a000000 bne a000b48c <== NOT EXECUTED sc = rtems_event_send( task, events ); } return sc; } a000b488: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a000b48c: e1a00004 mov r0, r4 <== NOT EXECUTED a000b490: e1a01005 mov r1, r5 <== NOT EXECUTED } return sc; } a000b494: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); a000b498: eafffd76 b a000aa78 <== NOT EXECUTED =============================================================================== a000b49c : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { a000b49c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a000b4a0: e1a04001 mov r4, r1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); a000b4a4: e1a01003 mov r1, r3 <== NOT EXECUTED a000b4a8: e1a05002 mov r5, r2 <== NOT EXECUTED a000b4ac: eb00016a bl a000ba5c <_Chain_Get_with_empty_check> <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { a000b4b0: e3500000 cmp r0, #0 <== NOT EXECUTED a000b4b4: 1a000000 bne a000b4bc <== NOT EXECUTED sc = rtems_event_send( task, events ); } return sc; } a000b4b8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); a000b4bc: e1a00004 mov r0, r4 <== NOT EXECUTED a000b4c0: e1a01005 mov r1, r5 <== NOT EXECUTED } return sc; } a000b4c4: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); a000b4c8: eafffd6a b a000aa78 <== NOT EXECUTED =============================================================================== a000b4cc : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { a000b4cc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED a000b4d0: e1a07000 mov r7, r0 <== NOT EXECUTED a000b4d4: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a000b4d8: e1a06001 mov r6, r1 <== NOT EXECUTED a000b4dc: e1a05002 mov r5, r2 <== NOT EXECUTED a000b4e0: e1a08003 mov r8, r3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); a000b4e4: e1a00007 mov r0, r7 <== NOT EXECUTED a000b4e8: eb000170 bl a000bab0 <_Chain_Get> <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL a000b4ec: e2504000 subs r4, r0, #0 <== NOT EXECUTED ) { rtems_event_set out; sc = rtems_event_receive( a000b4f0: e1a02005 mov r2, r5 <== NOT EXECUTED a000b4f4: e1a0300d mov r3, sp <== NOT EXECUTED a000b4f8: e1a01004 mov r1, r4 <== NOT EXECUTED a000b4fc: e1a00006 mov r0, r6 <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL a000b500: 1a000005 bne a000b51c <== NOT EXECUTED ) { rtems_event_set out; sc = rtems_event_receive( a000b504: ebfffcf7 bl a000a8e8 <== NOT EXECUTED ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( a000b508: e3500000 cmp r0, #0 <== NOT EXECUTED a000b50c: 0afffff4 beq a000b4e4 <== NOT EXECUTED timeout, &out ); } *node_ptr = node; a000b510: e5884000 str r4, [r8] <== NOT EXECUTED return sc; } a000b514: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000b518: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL a000b51c: e3a00000 mov r0, #0 <== NOT EXECUTED a000b520: eafffffa b a000b510 <== NOT EXECUTED =============================================================================== a000b524 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { a000b524: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a000b528: e1a04002 mov r4, r2 <== NOT EXECUTED a000b52c: e1a05003 mov r5, r3 <== NOT EXECUTED RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); a000b530: eb00018e bl a000bb70 <_Chain_Prepend_with_empty_check> <== NOT EXECUTED rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { a000b534: e3500000 cmp r0, #0 <== NOT EXECUTED a000b538: 1a000000 bne a000b540 <== NOT EXECUTED sc = rtems_event_send( task, events ); } return sc; } a000b53c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a000b540: e1a00004 mov r0, r4 <== NOT EXECUTED a000b544: e1a01005 mov r1, r5 <== NOT EXECUTED } return sc; } a000b548: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); a000b54c: eafffd49 b a000aa78 <== NOT EXECUTED =============================================================================== a000b1c4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { a000b1c4: e92d4010 push {r4, lr} if ( !time_buffer ) a000b1c8: e2514000 subs r4, r1, #0 a000b1cc: 0a00000c beq a000b204 return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) a000b1d0: e3500000 cmp r0, #0 a000b1d4: 0a00000d beq a000b210 return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) a000b1d8: e3500001 cmp r0, #1 a000b1dc: 0a00000e beq a000b21c return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { a000b1e0: e3500002 cmp r0, #2 a000b1e4: 0a00000f beq a000b228 *interval = rtems_clock_get_ticks_since_boot(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { a000b1e8: e3500003 cmp r0, #3 a000b1ec: 0a000011 beq a000b238 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) a000b1f0: e3500004 cmp r0, #4 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; a000b1f4: 13a0300a movne r3, #10 *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) a000b1f8: 0a000012 beq a000b248 return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } a000b1fc: e1a00003 mov r0, r3 a000b200: e8bd8010 pop {r4, pc} rtems_clock_get_options option, void *time_buffer ) { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; a000b204: e3a03009 mov r3, #9 if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } a000b208: e1a00003 mov r0, r3 a000b20c: e8bd8010 pop {r4, pc} { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); a000b210: e1a00004 mov r0, r4 if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } a000b214: e8bd4010 pop {r4, lr} { if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); a000b218: ea00002e b a000b2d8 if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); a000b21c: e1a00004 mov r0, r4 if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); return RTEMS_INVALID_NUMBER; } a000b220: e8bd4010 pop {r4, lr} if ( option == RTEMS_CLOCK_GET_TOD ) return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer ); if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH ) return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); a000b224: ea00000a b a000b254 if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); a000b228: eb000026 bl a000b2c8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000b22c: e3a03000 mov r3, #0 <== NOT EXECUTED return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer); if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_since_boot(); a000b230: e5840000 str r0, [r4] <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000b234: eafffff0 b a000b1fc <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); a000b238: eb00001a bl a000b2a8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000b23c: e3a03000 mov r3, #0 <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = rtems_clock_get_ticks_per_second(); a000b240: e5840000 str r0, [r4] <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000b244: eaffffec b a000b1fc <== NOT EXECUTED } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); a000b248: e1a00004 mov r0, r4 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; } a000b24c: e8bd4010 pop {r4, lr} <== NOT EXECUTED *interval = rtems_clock_get_ticks_per_second(); return RTEMS_SUCCESSFUL; } if ( option == RTEMS_CLOCK_GET_TIME_VALUE ) return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer ); a000b250: ea00005b b a000b3c4 <== NOT EXECUTED =============================================================================== a000b0b4 : #include rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { a000b0b4: e92d4010 push {r4, lr} if ( !the_interval ) a000b0b8: e2504000 subs r4, r0, #0 return RTEMS_INVALID_ADDRESS; a000b0bc: 03a03009 moveq r3, #9 rtems_status_code rtems_clock_get_seconds_since_epoch( rtems_interval *the_interval ) { if ( !the_interval ) a000b0c0: 0a000004 beq a000b0d8 return RTEMS_INVALID_ADDRESS; if ( !_TOD.is_set ) a000b0c4: e59f3034 ldr r3, [pc, #52] ; a000b100 a000b0c8: e5d32014 ldrb r2, [r3, #20] a000b0cc: e3520000 cmp r2, #0 return RTEMS_NOT_DEFINED; a000b0d0: 03a0300b moveq r3, #11 ) { if ( !the_interval ) return RTEMS_INVALID_ADDRESS; if ( !_TOD.is_set ) a000b0d4: 1a000001 bne a000b0e0 return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; } a000b0d8: e1a00003 mov r0, r3 <== NOT EXECUTED a000b0dc: e8bd8010 pop {r4, pc} <== NOT EXECUTED static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); a000b0e0: e8930003 ldm r3, {r0, r1} a000b0e4: e59f2018 ldr r2, [pc, #24] ; a000b104 a000b0e8: e3a03000 mov r3, #0 a000b0ec: eb00493a bl a001d5dc <__divdi3> if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; *the_interval = _TOD_Seconds_since_epoch(); return RTEMS_SUCCESSFUL; a000b0f0: e3a03000 mov r3, #0 a000b0f4: e5840000 str r0, [r4] } a000b0f8: e1a00003 mov r0, r3 a000b0fc: e8bd8010 pop {r4, pc} =============================================================================== a00184f0 : #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { a00184f0: e92d40d0 push {r4, r6, r7, lr} if ( !time ) a00184f4: e2504000 subs r4, r0, #0 #include rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { a00184f8: e24dd008 sub sp, sp, #8 if ( !time ) return RTEMS_INVALID_ADDRESS; a00184fc: 03a03009 moveq r3, #9 rtems_status_code rtems_clock_get_tod_timeval( struct timeval *time ) { if ( !time ) a0018500: 0a000004 beq a0018518 return RTEMS_INVALID_ADDRESS; if ( !_TOD.is_set ) a0018504: e59f1068 ldr r1, [pc, #104] ; a0018574 a0018508: e5d13014 ldrb r3, [r1, #20] a001850c: e3530000 cmp r3, #0 return RTEMS_NOT_DEFINED; a0018510: 03a0300b moveq r3, #11 ) { if ( !time ) return RTEMS_INVALID_ADDRESS; if ( !_TOD.is_set ) a0018514: 1a000002 bne a0018524 return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; } a0018518: e1a00003 mov r0, r3 a001851c: e28dd008 add sp, sp, #8 a0018520: e8bd80d0 pop {r4, r6, r7, pc} ) { Timestamp_Control snapshot_as_timestamp; Timestamp_Control *snapshot_as_timestamp_ptr; snapshot_as_timestamp_ptr = a0018524: e1a0000d mov r0, sp <== NOT EXECUTED a0018528: ebffd4bd bl a000d824 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); a001852c: e59f2044 ldr r2, [pc, #68] ; a0018578 <== NOT EXECUTED a0018530: e89000c0 ldm r0, {r6, r7} <== NOT EXECUTED a0018534: e3a03000 mov r3, #0 <== NOT EXECUTED a0018538: e1a00006 mov r0, r6 <== NOT EXECUTED a001853c: e1a01007 mov r1, r7 <== NOT EXECUTED a0018540: ebffb499 bl a00057ac <__divdi3> <== NOT EXECUTED _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); a0018544: e59f202c ldr r2, [pc, #44] ; a0018578 <== NOT EXECUTED a0018548: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); a001854c: e5840000 str r0, [r4] <== NOT EXECUTED _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); a0018550: e1a01007 mov r1, r7 <== NOT EXECUTED a0018554: e1a00006 mov r0, r6 <== NOT EXECUTED a0018558: eb004e2d bl a002be14 <__moddi3> <== NOT EXECUTED a001855c: e3a03000 mov r3, #0 <== NOT EXECUTED a0018560: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED a0018564: ebffb490 bl a00057ac <__divdi3> <== NOT EXECUTED if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; _TOD_Get_timeval( time ); return RTEMS_SUCCESSFUL; a0018568: e3a03000 mov r3, #0 <== NOT EXECUTED a001856c: e5840004 str r0, [r4, #4] <== NOT EXECUTED a0018570: eaffffe8 b a0018518 <== NOT EXECUTED =============================================================================== a0029424 : */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) a0029424: e3500000 cmp r0, #0 <== NOT EXECUTED * error code - if unsuccessful */ rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { a0029428: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED if ( !uptime ) a002942c: 0a000002 beq a002943c <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _TOD_Get_uptime_as_timespec( uptime ); a0029430: eb000252 bl a0029d80 <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a0029434: e3a00000 mov r0, #0 <== NOT EXECUTED a0029438: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_status_code rtems_clock_get_uptime( struct timespec *uptime ) { if ( !uptime ) return RTEMS_INVALID_ADDRESS; a002943c: e3a00009 mov r0, #9 <== NOT EXECUTED _TOD_Get_uptime_as_timespec( uptime ); return RTEMS_SUCCESSFUL; } a0029440: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a001780c : #endif #include time_t rtems_clock_get_uptime_seconds( void ) { a001780c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0017810: e10f3000 mrs r3, CPSR <== NOT EXECUTED a0017814: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED a0017818: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED Timestamp_Control snapshot_as_timestamp; struct timespec snapshot_as_timespec; ISR_Level level; _ISR_Disable( level ); snapshot_as_timestamp = _TOD.uptime; a001781c: e59f2018 ldr r2, [pc, #24] ; a001783c <== NOT EXECUTED a0017820: e2821008 add r1, r2, #8 <== NOT EXECUTED a0017824: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0017828: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a001782c: e59f200c ldr r2, [pc, #12] ; a0017840 <== NOT EXECUTED a0017830: e3a03000 mov r3, #0 <== NOT EXECUTED a0017834: eb005b21 bl a002e4c0 <__divdi3> <== NOT EXECUTED _ISR_Enable( level ); _Timestamp_To_timespec( &snapshot_as_timestamp, &snapshot_as_timespec ); return snapshot_as_timespec.tv_sec; } a0017838: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0017844 : #endif #include void rtems_clock_get_uptime_timeval( struct timeval *uptime ) { a0017844: e92d40d0 push {r4, r6, r7, lr} <== NOT EXECUTED a0017848: e24dd008 sub sp, sp, #8 <== NOT EXECUTED a001784c: e1a04000 mov r4, r0 <== NOT EXECUTED */ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { _TOD_Get_with_nanoseconds( time, &_TOD.uptime ); a0017850: e59f104c ldr r1, [pc, #76] ; a00178a4 <== NOT EXECUTED a0017854: e1a0000d mov r0, sp <== NOT EXECUTED a0017858: eb001281 bl a001c264 <_TOD_Get_with_nanoseconds> <== NOT EXECUTED Timestamp_Control snapshot_as_timestamp; _TOD_Get_uptime( &snapshot_as_timestamp ); _Timestamp_To_timeval( &snapshot_as_timestamp, uptime ); a001785c: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); a0017860: e59f2040 ldr r2, [pc, #64] ; a00178a8 <== NOT EXECUTED a0017864: e3a03000 mov r3, #0 <== NOT EXECUTED a0017868: e1a00006 mov r0, r6 <== NOT EXECUTED a001786c: e1a01007 mov r1, r7 <== NOT EXECUTED a0017870: eb005b12 bl a002e4c0 <__divdi3> <== NOT EXECUTED _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); a0017874: e59f202c ldr r2, [pc, #44] ; a00178a8 <== NOT EXECUTED a0017878: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timeval( const Timestamp64_Control *_timestamp, struct timeval *_timeval ) { _timeval->tv_sec = (time_t) (*_timestamp / 1000000000U); a001787c: e5840000 str r0, [r4] <== NOT EXECUTED _timeval->tv_usec = (suseconds_t) ((*_timestamp % 1000000000U) / 1000U); a0017880: e1a01007 mov r1, r7 <== NOT EXECUTED a0017884: e1a00006 mov r0, r6 <== NOT EXECUTED a0017888: eb005c47 bl a002e9ac <__moddi3> <== NOT EXECUTED a001788c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED a0017890: e3a03000 mov r3, #0 <== NOT EXECUTED a0017894: eb005b09 bl a002e4c0 <__divdi3> <== NOT EXECUTED a0017898: e5840004 str r0, [r4, #4] <== NOT EXECUTED } a001789c: e28dd008 add sp, sp, #8 <== NOT EXECUTED a00178a0: e8bd80d0 pop {r4, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000a110 : #include #include #include rtems_status_code rtems_clock_tick( void ) { a000a110: e52de004 push {lr} ; (str lr, [sp, #-4]!) _TOD_Tickle_ticks(); a000a114: eb000574 bl a000b6ec <_TOD_Tickle_ticks> */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); a000a118: e59f0038 ldr r0, [pc, #56] ; a000a158 a000a11c: eb000f4e bl a000de5c <_Watchdog_Tickle> * scheduler which support standard RTEMS features, this includes * time-slicing management. */ RTEMS_INLINE_ROUTINE void _Scheduler_Tick( void ) { _Scheduler.Operations.tick(); a000a120: e59f3034 ldr r3, [pc, #52] ; a000a15c a000a124: e5933038 ldr r3, [r3, #56] ; 0x38 a000a128: e12fff33 blx r3 * otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void ) { return ( _Thread_Dispatch_necessary ); a000a12c: e59f302c ldr r3, [pc, #44] ; a000a160 a000a130: e5d33004 ldrb r3, [r3, #4] _Watchdog_Tickle_ticks(); _Scheduler_Tick(); if ( _Thread_Is_context_switch_necessary() && a000a134: e3530000 cmp r3, #0 a000a138: 0a000004 beq a000a150 * This routine returns true if thread dispatch indicates * that we are in a critical section. */ RTEMS_INLINE_ROUTINE bool _Thread_Dispatch_in_critical_section(void) { if ( _Thread_Dispatch_disable_level == 0 ) a000a13c: e59f3020 ldr r3, [pc, #32] ; a000a164 <== NOT EXECUTED a000a140: e5933000 ldr r3, [r3] <== NOT EXECUTED a000a144: e3530000 cmp r3, #0 <== NOT EXECUTED a000a148: 1a000000 bne a000a150 <== NOT EXECUTED _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); a000a14c: eb000b42 bl a000ce5c <_Thread_Dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; } a000a150: e3a00000 mov r0, #0 a000a154: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0013adc : rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { a0013adc: e92d4070 push {r4, r5, r6, lr} rtems_status_code sc; if ( event_out != NULL ) { a0013ae0: e2535000 subs r5, r3, #0 rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { a0013ae4: e1a0c000 mov ip, r0 a0013ae8: e24dd010 sub sp, sp, #16 } else { *event_out = event->pending_events; sc = RTEMS_SUCCESSFUL; } } else { sc = RTEMS_INVALID_ADDRESS; a0013aec: 03a00009 moveq r0, #9 rtems_event_set *event_out ) { rtems_status_code sc; if ( event_out != NULL ) { a0013af0: 0a000007 beq a0013b14 Thread_Control *executing = _Thread_Executing; a0013af4: e59f405c ldr r4, [pc, #92] ; a0013b58 RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { a0013af8: e35c0000 cmp ip, #0 ) { rtems_status_code sc; if ( event_out != NULL ) { Thread_Control *executing = _Thread_Executing; a0013afc: e5944008 ldr r4, [r4, #8] RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; a0013b00: e59460ec ldr r6, [r4, #236] ; 0xec Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { a0013b04: 1a000004 bne a0013b1c ); _Thread_Enable_dispatch(); sc = executing->Wait.return_code; } else { *event_out = event->pending_events; a0013b08: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED sc = RTEMS_SUCCESSFUL; a0013b0c: e1a0000c mov r0, ip <== NOT EXECUTED ); _Thread_Enable_dispatch(); sc = executing->Wait.return_code; } else { *event_out = event->pending_events; a0013b10: e5853000 str r3, [r5] <== NOT EXECUTED } else { sc = RTEMS_INVALID_ADDRESS; } return sc; } a0013b14: e28dd010 add sp, sp, #16 a0013b18: e8bd8070 pop {r4, r5, r6, pc} * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a0013b1c: e59fc038 ldr ip, [pc, #56] ; a0013b5c a0013b20: e59ce000 ldr lr, [ip] ++level; a0013b24: e28ee001 add lr, lr, #1 _Thread_Dispatch_disable_level = level; a0013b28: e58ce000 str lr, [ip] RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; Event_Control *event = &api->System_event; if ( !_Event_sets_Is_empty( event_in ) ) { _Thread_Disable_dispatch(); _Event_Seize( a0013b2c: e59fc02c ldr ip, [pc, #44] ; a0013b60 rtems_status_code sc; if ( event_out != NULL ) { Thread_Control *executing = _Thread_Executing; RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ]; Event_Control *event = &api->System_event; a0013b30: e2866004 add r6, r6, #4 if ( !_Event_sets_Is_empty( event_in ) ) { _Thread_Disable_dispatch(); _Event_Seize( a0013b34: e58d4000 str r4, [sp] a0013b38: e58dc008 str ip, [sp, #8] a0013b3c: e3a0c701 mov ip, #262144 ; 0x40000 a0013b40: e58dc00c str ip, [sp, #12] a0013b44: e58d6004 str r6, [sp, #4] a0013b48: ebffdec2 bl a000b658 <_Event_Seize> executing, event, &_System_event_Sync_state, STATES_WAITING_FOR_SYSTEM_EVENT ); _Thread_Enable_dispatch(); a0013b4c: ebffe9f8 bl a000e334 <_Thread_Enable_dispatch> sc = executing->Wait.return_code; a0013b50: e5940034 ldr r0, [r4, #52] ; 0x34 a0013b54: eaffffee b a0013b14 =============================================================================== a000cf14 : rtems_status_code rtems_extension_ident( rtems_name name, rtems_id *id ) { a000cf14: e1a02000 mov r2, r0 <== NOT EXECUTED a000cf18: e1a03001 mov r3, r1 <== NOT EXECUTED a000cf1c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED Objects_Name_or_id_lookup_errors status; status = _Objects_Name_to_id_u32( a000cf20: e1a01002 mov r1, r2 <== NOT EXECUTED a000cf24: e59f0010 ldr r0, [pc, #16] ; a000cf3c <== NOT EXECUTED a000cf28: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED a000cf2c: eb0004f9 bl a000e318 <_Objects_Name_to_id_u32> <== NOT EXECUTED name, OBJECTS_SEARCH_LOCAL_NODE, id ); return _Status_Object_name_errors_to_status[ status ]; a000cf30: e59f3008 ldr r3, [pc, #8] ; a000cf40 <== NOT EXECUTED } a000cf34: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED a000cf38: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000b158 : uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000b158: e10f0000 mrs r0, CPSR <== NOT EXECUTED a000b15c: e3803080 orr r3, r0, #128 ; 0x80 <== NOT EXECUTED a000b160: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_level previous_level; _ISR_Disable( previous_level ); return previous_level; } a000b164: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b168 : static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000b168: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED void rtems_interrupt_enable( rtems_interrupt_level previous_level ) { _ISR_Enable( previous_level ); } a000b16c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b170 : static inline void arm_interrupt_flash( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000b170: e10f3000 mrs r3, CPSR <== NOT EXECUTED a000b174: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED a000b178: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED void rtems_interrupt_flash( rtems_interrupt_level previous_level ) { _ISR_Flash( previous_level ); } a000b17c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b180 : #undef rtems_interrupt_is_in_progress bool rtems_interrupt_is_in_progress( void ) { return _ISR_Is_in_progress(); a000b180: e59f300c ldr r3, [pc, #12] ; a000b194 <== NOT EXECUTED a000b184: e5930000 ldr r0, [r3] <== NOT EXECUTED } a000b188: e2900000 adds r0, r0, #0 <== NOT EXECUTED a000b18c: 13a00001 movne r0, #1 <== NOT EXECUTED a000b190: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b198 : Modes_Control rtems_interrupt_level_body( uint32_t level ) { return RTEMS_INTERRUPT_LEVEL(level); } a000b198: e2000080 and r0, r0, #128 ; 0x80 <== NOT EXECUTED a000b19c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0011704 : void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011704: e59fc044 ldr ip, [pc, #68] ; a0011750 rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011708: e92d4010 push {r4, lr} rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a001170c: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_close( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011710: e1a03000 mov r3, r0 rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011714: e15c0000 cmp ip, r0 a0011718: 8a000001 bhi a0011724 return RTEMS_INVALID_NUMBER; a001171c: e3a0000a mov r0, #10 <== NOT EXECUTED a0011720: e8bd8010 pop {r4, pc} <== NOT EXECUTED callout = _IO_Driver_address_table[major].close_entry; a0011724: e59fc028 ldr ip, [pc, #40] ; a0011754 a0011728: e3a04018 mov r4, #24 a001172c: e59cc000 ldr ip, [ip] a0011730: e023c394 mla r3, r4, r3, ip a0011734: e5933008 ldr r3, [r3, #8] return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; a0011738: e3530000 cmp r3, #0 a001173c: 0a000001 beq a0011748 a0011740: e12fff33 blx r3 a0011744: e8bd8010 pop {r4, pc} a0011748: e1a00003 mov r0, r3 } a001174c: e8bd8010 pop {r4, pc} =============================================================================== a0011758 : void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011758: e59fc044 ldr ip, [pc, #68] ; a00117a4 rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a001175c: e92d4010 push {r4, lr} rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011760: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_control( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011764: e1a03000 mov r3, r0 rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011768: e15c0000 cmp ip, r0 a001176c: 8a000001 bhi a0011778 return RTEMS_INVALID_NUMBER; a0011770: e3a0000a mov r0, #10 <== NOT EXECUTED a0011774: e8bd8010 pop {r4, pc} <== NOT EXECUTED callout = _IO_Driver_address_table[major].control_entry; a0011778: e59fc028 ldr ip, [pc, #40] ; a00117a8 a001177c: e3a04018 mov r4, #24 a0011780: e59cc000 ldr ip, [ip] a0011784: e023c394 mla r3, r4, r3, ip a0011788: e5933014 ldr r3, [r3, #20] return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; a001178c: e3530000 cmp r3, #0 a0011790: 0a000001 beq a001179c a0011794: e12fff33 blx r3 a0011798: e8bd8010 pop {r4, pc} a001179c: e1a00003 mov r0, r3 <== NOT EXECUTED } a00117a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a00117ac : void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a00117ac: e59fc044 ldr ip, [pc, #68] ; a00117f8 rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a00117b0: e92d4010 push {r4, lr} rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a00117b4: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_open( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a00117b8: e1a03000 mov r3, r0 rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a00117bc: e15c0000 cmp ip, r0 a00117c0: 8a000001 bhi a00117cc return RTEMS_INVALID_NUMBER; a00117c4: e3a0000a mov r0, #10 <== NOT EXECUTED a00117c8: e8bd8010 pop {r4, pc} <== NOT EXECUTED callout = _IO_Driver_address_table[major].open_entry; a00117cc: e59fc028 ldr ip, [pc, #40] ; a00117fc a00117d0: e3a04018 mov r4, #24 a00117d4: e59cc000 ldr ip, [ip] a00117d8: e023c394 mla r3, r4, r3, ip a00117dc: e5933004 ldr r3, [r3, #4] return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; a00117e0: e3530000 cmp r3, #0 a00117e4: 0a000001 beq a00117f0 a00117e8: e12fff33 blx r3 a00117ec: e8bd8010 pop {r4, pc} a00117f0: e1a00003 mov r0, r3 } a00117f4: e8bd8010 pop {r4, pc} =============================================================================== a0011800 : void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011800: e59fc044 ldr ip, [pc, #68] ; a001184c rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011804: e92d4010 push {r4, lr} rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011808: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_read( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a001180c: e1a03000 mov r3, r0 rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011810: e15c0000 cmp ip, r0 a0011814: 8a000001 bhi a0011820 return RTEMS_INVALID_NUMBER; a0011818: e3a0000a mov r0, #10 <== NOT EXECUTED a001181c: e8bd8010 pop {r4, pc} <== NOT EXECUTED callout = _IO_Driver_address_table[major].read_entry; a0011820: e59fc028 ldr ip, [pc, #40] ; a0011850 a0011824: e3a04018 mov r4, #24 a0011828: e59cc000 ldr ip, [ip] a001182c: e023c394 mla r3, r4, r3, ip a0011830: e593300c ldr r3, [r3, #12] return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; a0011834: e3530000 cmp r3, #0 a0011838: 0a000001 beq a0011844 a001183c: e12fff33 blx r3 a0011840: e8bd8010 pop {r4, pc} a0011844: e1a00003 mov r0, r3 } a0011848: e8bd8010 pop {r4, pc} =============================================================================== a000c3e8 : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { a000c3e8: e92d4010 push {r4, lr} a000c3ec: e1a04000 mov r4, r0 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) a000c3f0: e59f0150 ldr r0, [pc, #336] ; a000c548 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; a000c3f4: e59f3150 ldr r3, [pc, #336] ; a000c54c if ( rtems_interrupt_is_in_progress() ) a000c3f8: e5900000 ldr r0, [r0] a000c3fc: e3500000 cmp r0, #0 rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; a000c400: e5930000 ldr r0, [r3] if ( rtems_interrupt_is_in_progress() ) a000c404: 0a000001 beq a000c410 return RTEMS_CALLED_FROM_ISR; a000c408: e3a00012 mov r0, #18 <== NOT EXECUTED a000c40c: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( registered_major == NULL ) a000c410: e3520000 cmp r2, #0 a000c414: 0a00000c beq a000c44c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) a000c418: e3510000 cmp r1, #0 if ( registered_major == NULL ) return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; a000c41c: e5820000 str r0, [r2] if ( driver_table == NULL ) a000c420: 0a000009 beq a000c44c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c424: e591c000 ldr ip, [r1] a000c428: e35c0000 cmp ip, #0 a000c42c: 0a000003 beq a000c440 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) a000c430: e1500004 cmp r0, r4 a000c434: 8a000006 bhi a000c454 return RTEMS_INVALID_NUMBER; a000c438: e3a0000a mov r0, #10 <== NOT EXECUTED _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } a000c43c: e8bd8010 pop {r4, pc} <== NOT EXECUTED static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c440: e591c004 ldr ip, [r1, #4] a000c444: e35c0000 cmp ip, #0 a000c448: 1afffff8 bne a000c430 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; a000c44c: e3a00009 mov r0, #9 <== NOT EXECUTED a000c450: e8bd8010 pop {r4, pc} <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000c454: e59f00f4 ldr r0, [pc, #244] ; a000c550 a000c458: e590c000 ldr ip, [r0] ++level; a000c45c: e28cc001 add ip, ip, #1 _Thread_Dispatch_disable_level = level; a000c460: e580c000 str ip, [r0] if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { a000c464: e3540000 cmp r4, #0 a000c468: 1a000022 bne a000c4f8 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; a000c46c: e593c000 ldr ip, [r3] rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { a000c470: e35c0000 cmp ip, #0 a000c474: 0a00002a beq a000c524 a000c478: e59fe0d4 ldr lr, [pc, #212] ; a000c554 a000c47c: e59e3000 ldr r3, [lr] a000c480: ea000003 b a000c494 a000c484: e2844001 add r4, r4, #1 a000c488: e154000c cmp r4, ip a000c48c: e2833018 add r3, r3, #24 a000c490: 0a000023 beq a000c524 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c494: e5930000 ldr r0, [r3] a000c498: e3500000 cmp r0, #0 a000c49c: 1afffff8 bne a000c484 a000c4a0: e5930004 ldr r0, [r3, #4] a000c4a4: e3500000 cmp r0, #0 a000c4a8: 1afffff5 bne a000c484 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) a000c4ac: e15c0004 cmp ip, r4 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a000c4b0: e5824000 str r4, [r2] if ( m != n ) a000c4b4: 0a00001b beq a000c528 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; a000c4b8: e59e3000 ldr r3, [lr] a000c4bc: e3a0c018 mov ip, #24 a000c4c0: e1a0e001 mov lr, r1 a000c4c4: e02c3c94 mla ip, r4, ip, r3 a000c4c8: e8be000f ldm lr!, {r0, r1, r2, r3} a000c4cc: e8ac000f stmia ip!, {r0, r1, r2, r3} a000c4d0: e59e1004 ldr r1, [lr, #4] a000c4d4: e59e0000 ldr r0, [lr] a000c4d8: e58c1004 str r1, [ip, #4] a000c4dc: e58c0000 str r0, [ip] _Thread_Enable_dispatch(); a000c4e0: eb000793 bl a000e334 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); a000c4e4: e3a01000 mov r1, #0 a000c4e8: e1a00004 mov r0, r4 a000c4ec: e1a02001 mov r2, r1 } a000c4f0: e8bd4010 pop {r4, lr} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); a000c4f4: ea001e9a b a0013f64 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a000c4f8: e59fe054 ldr lr, [pc, #84] ; a000c554 a000c4fc: e3a03018 mov r3, #24 a000c500: e0030394 mul r3, r4, r3 a000c504: e59e0000 ldr r0, [lr] static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c508: e790c003 ldr ip, [r0, r3] _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; a000c50c: e0803003 add r3, r0, r3 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c510: e35c0000 cmp ip, #0 a000c514: 0a000006 beq a000c534 major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); a000c518: eb000785 bl a000e334 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; a000c51c: e3a0000c mov r0, #12 a000c520: e8bd8010 pop {r4, pc} if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; a000c524: e5824000 str r4, [r2] if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); a000c528: eb000781 bl a000e334 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; a000c52c: e3a00005 mov r0, #5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; a000c530: e8bd8010 pop {r4, pc} static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; a000c534: e5933004 ldr r3, [r3, #4] a000c538: e3530000 cmp r3, #0 a000c53c: 1afffff5 bne a000c518 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; a000c540: e5824000 str r4, [r2] <== NOT EXECUTED a000c544: eaffffdb b a000c4b8 <== NOT EXECUTED =============================================================================== a000c558 : rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { if ( rtems_interrupt_is_in_progress() ) a000c558: e59f3064 ldr r3, [pc, #100] ; a000c5c4 #include rtems_status_code rtems_io_unregister_driver( rtems_device_major_number major ) { a000c55c: e92d4010 push {r4, lr} if ( rtems_interrupt_is_in_progress() ) a000c560: e5934000 ldr r4, [r3] a000c564: e3540000 cmp r4, #0 a000c568: 0a000001 beq a000c574 return RTEMS_CALLED_FROM_ISR; a000c56c: e3a00012 mov r0, #18 <== NOT EXECUTED a000c570: e8bd8010 pop {r4, pc} <== NOT EXECUTED if ( major < _IO_Number_of_drivers ) { a000c574: e59f304c ldr r3, [pc, #76] ; a000c5c8 a000c578: e5933000 ldr r3, [r3] a000c57c: e1530000 cmp r3, r0 a000c580: 8a000001 bhi a000c58c _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_UNSATISFIED; a000c584: e3a0000d mov r0, #13 <== NOT EXECUTED } a000c588: e8bd8010 pop {r4, pc} <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000c58c: e59f3038 ldr r3, [pc, #56] ; a000c5cc a000c590: e5932000 ldr r2, [r3] ++level; a000c594: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a000c598: e5832000 str r2, [r3] if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( a000c59c: e59f202c ldr r2, [pc, #44] ; a000c5d0 &_IO_Driver_address_table[major], a000c5a0: e3a03018 mov r3, #24 if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( major < _IO_Number_of_drivers ) { _Thread_Disable_dispatch(); memset( a000c5a4: e1a01004 mov r1, r4 a000c5a8: e592c000 ldr ip, [r2] a000c5ac: e1a02003 mov r2, r3 a000c5b0: e020c093 mla r0, r3, r0, ip a000c5b4: eb0028d6 bl a0016914 &_IO_Driver_address_table[major], 0, sizeof( rtems_driver_address_table ) ); _Thread_Enable_dispatch(); a000c5b8: eb00075d bl a000e334 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000c5bc: e1a00004 mov r0, r4 a000c5c0: e8bd8010 pop {r4, pc} =============================================================================== a0011854 : void *argument ) { rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011854: e59fc044 ldr ip, [pc, #68] ; a00118a0 rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011858: e92d4010 push {r4, lr} rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a001185c: e59cc000 ldr ip, [ip] rtems_status_code rtems_io_write( rtems_device_major_number major, rtems_device_minor_number minor, void *argument ) { a0011860: e1a03000 mov r3, r0 rtems_device_driver_entry callout; if ( major >= _IO_Number_of_drivers ) a0011864: e15c0000 cmp ip, r0 a0011868: 8a000001 bhi a0011874 return RTEMS_INVALID_NUMBER; a001186c: e3a0000a mov r0, #10 <== NOT EXECUTED a0011870: e8bd8010 pop {r4, pc} <== NOT EXECUTED callout = _IO_Driver_address_table[major].write_entry; a0011874: e59fc028 ldr ip, [pc, #40] ; a00118a4 a0011878: e3a04018 mov r4, #24 a001187c: e59cc000 ldr ip, [ip] a0011880: e023c394 mla r3, r4, r3, ip a0011884: e5933010 ldr r3, [r3, #16] return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL; a0011888: e3530000 cmp r3, #0 a001188c: 0a000001 beq a0011898 a0011890: e12fff33 blx r3 a0011894: e8bd8010 pop {r4, pc} a0011898: e1a00003 mov r0, r3 <== NOT EXECUTED } a001189c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a00180d8 : rtems_id id, const void *buffer, size_t size, uint32_t *count ) { a00180d8: e92d40f0 push {r4, r5, r6, r7, lr} register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) a00180dc: e2516000 subs r6, r1, #0 rtems_id id, const void *buffer, size_t size, uint32_t *count ) { a00180e0: e24dd00c sub sp, sp, #12 a00180e4: e1a05000 mov r5, r0 a00180e8: e1a07002 mov r7, r2 a00180ec: e1a04003 mov r4, r3 register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) a00180f0: 0a000015 beq a001814c return RTEMS_INVALID_ADDRESS; if ( !count ) a00180f4: e3530000 cmp r3, #0 a00180f8: 0a000013 beq a001814c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) a00180fc: e59f0054 ldr r0, [pc, #84] ; a0018158 a0018100: e1a01005 mov r1, r5 a0018104: e28d2008 add r2, sp, #8 a0018108: eb0015c8 bl a001d830 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a001810c: e59dc008 ldr ip, [sp, #8] a0018110: e35c0000 cmp ip, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0018114: 13a00004 movne r0, #4 if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a0018118: 1a00000c bne a0018150 case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( a001811c: e1a01006 mov r1, r6 a0018120: e1a02007 mov r2, r7 a0018124: e1a03005 mov r3, r5 a0018128: e2800014 add r0, r0, #20 a001812c: e58dc000 str ip, [sp] a0018130: e58d4004 str r4, [sp, #4] a0018134: eb000e79 bl a001bb20 <_CORE_message_queue_Broadcast> a0018138: e1a04000 mov r4, r0 NULL, #endif count ); _Thread_Enable_dispatch(); a001813c: eb00197f bl a001e740 <_Thread_Enable_dispatch> return a0018140: e1a00004 mov r0, r4 a0018144: eb0000d6 bl a00184a4 <_Message_queue_Translate_core_message_queue_return_code> a0018148: ea000000 b a0018150 if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !count ) return RTEMS_INVALID_ADDRESS; a001814c: e3a00009 mov r0, #9 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0018150: e28dd00c add sp, sp, #12 a0018154: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0012664 : uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { a0012664: e92d41f0 push {r4, r5, r6, r7, r8, lr} #if defined(RTEMS_MULTIPROCESSING) bool is_global; size_t max_packet_payload_size; #endif if ( !rtems_is_name_valid( name ) ) a0012668: e2507000 subs r7, r0, #0 uint32_t count, size_t max_message_size, rtems_attribute attribute_set, rtems_id *id ) { a001266c: e24dd008 sub sp, sp, #8 a0012670: e1a05001 mov r5, r1 a0012674: e1a06002 mov r6, r2 a0012678: e59d4020 ldr r4, [sp, #32] bool is_global; size_t max_packet_payload_size; #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a001267c: 03a00003 moveq r0, #3 #if defined(RTEMS_MULTIPROCESSING) bool is_global; size_t max_packet_payload_size; #endif if ( !rtems_is_name_valid( name ) ) a0012680: 1a000001 bne a001268c ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a0012684: e28dd008 add sp, sp, #8 a0012688: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a001268c: e3540000 cmp r4, #0 return RTEMS_INVALID_ADDRESS; a0012690: 03a00009 moveq r0, #9 #endif if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a0012694: 0afffffa beq a0012684 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) a0012698: e3510000 cmp r1, #0 return RTEMS_INVALID_NUMBER; a001269c: 03a0000a moveq r0, #10 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) a00126a0: 0afffff7 beq a0012684 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) a00126a4: e3520000 cmp r2, #0 return RTEMS_INVALID_SIZE; a00126a8: 03a00008 moveq r0, #8 #endif if ( count == 0 ) return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) a00126ac: 0afffff4 beq a0012684 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a00126b0: e59f2098 ldr r2, [pc, #152] ; a0012750 a00126b4: e5921000 ldr r1, [r2] ++level; a00126b8: e2811001 add r1, r1, #1 _Thread_Dispatch_disable_level = level; a00126bc: e5821000 str r1, [r2] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); a00126c0: e58d3000 str r3, [sp] a00126c4: eb0016dc bl a001823c <_Message_queue_Allocate> if ( !the_message_queue ) { a00126c8: e2508000 subs r8, r0, #0 a00126cc: e59d3000 ldr r3, [sp] a00126d0: 0a00001b beq a0012744 #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; a00126d4: e3130004 tst r3, #4 a00126d8: 03a02000 moveq r2, #0 a00126dc: 13a02001 movne r2, #1 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_message_queue->attribute_set = attribute_set; a00126e0: e28d1008 add r1, sp, #8 a00126e4: e5212004 str r2, [r1, #-4]! a00126e8: e5883010 str r3, [r8, #16] if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( a00126ec: e2880014 add r0, r8, #20 a00126f0: e1a02005 mov r2, r5 a00126f4: e1a03006 mov r3, r6 a00126f8: eb0004de bl a0013a78 <_CORE_message_queue_Initialize> a00126fc: e3500000 cmp r0, #0 a0012700: 1a000005 bne a001271c */ RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); a0012704: e59f0048 ldr r0, [pc, #72] ; a0012754 a0012708: e1a01008 mov r1, r8 a001270c: eb0008ad bl a00149c8 <_Objects_Free> _Objects_MP_Close( &_Message_queue_Information, the_message_queue->Object.id); #endif _Message_queue_Free( the_message_queue ); _Thread_Enable_dispatch(); a0012710: eb000cc9 bl a0015a3c <_Thread_Enable_dispatch> return RTEMS_UNSATISFIED; a0012714: e3a0000d mov r0, #13 a0012718: eaffffd9 b a0012684 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a001271c: e59f2030 ldr r2, [pc, #48] ; a0012754 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a0012720: e5983008 ldr r3, [r8, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0012724: e592201c ldr r2, [r2, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0012728: e1a01803 lsl r1, r3, #16 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a001272c: e7828721 str r8, [r2, r1, lsr #14] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0012730: e588700c str r7, [r8, #12] &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; a0012734: e5843000 str r3, [r4] name, 0 ); #endif _Thread_Enable_dispatch(); a0012738: eb000cbf bl a0015a3c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a001273c: e3a00000 mov r0, #0 a0012740: eaffffcf b a0012684 _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate(); if ( !the_message_queue ) { _Thread_Enable_dispatch(); a0012744: eb000cbc bl a0015a3c <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_TOO_MANY; a0012748: e3a00005 mov r0, #5 <== NOT EXECUTED a001274c: eaffffcc b a0012684 <== NOT EXECUTED =============================================================================== a001830c : rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { a001830c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) a0018310: e2514000 subs r4, r1, #0 <== NOT EXECUTED rtems_status_code rtems_message_queue_get_number_pending( rtems_id id, uint32_t *count ) { a0018314: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a0018318: e1a01000 mov r1, r0 <== NOT EXECUTED register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) return RTEMS_INVALID_ADDRESS; a001831c: 03a00009 moveq r0, #9 <== NOT EXECUTED ) { register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) a0018320: 0a00000a beq a0018350 <== NOT EXECUTED a0018324: e59f002c ldr r0, [pc, #44] ; a0018358 <== NOT EXECUTED a0018328: e1a0200d mov r2, sp <== NOT EXECUTED a001832c: eb00153f bl a001d830 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a0018330: e59d5000 ldr r5, [sp] <== NOT EXECUTED a0018334: e3550000 cmp r5, #0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0018338: 13a00004 movne r0, #4 <== NOT EXECUTED if ( !count ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a001833c: 1a000003 bne a0018350 <== NOT EXECUTED case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; a0018340: e590305c ldr r3, [r0, #92] ; 0x5c <== NOT EXECUTED a0018344: e5843000 str r3, [r4] <== NOT EXECUTED _Thread_Enable_dispatch(); a0018348: eb0018fc bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a001834c: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0018350: e28dd004 add sp, sp, #4 <== NOT EXECUTED a0018354: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a001278c : void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { a001278c: e92d4070 push {r4, r5, r6, lr} register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) a0012790: e2515000 subs r5, r1, #0 void *buffer, size_t *size, rtems_option option_set, rtems_interval timeout ) { a0012794: e24dd00c sub sp, sp, #12 a0012798: e1a01000 mov r1, r0 a001279c: e1a04002 mov r4, r2 a00127a0: e1a06003 mov r6, r3 register Message_queue_Control *the_message_queue; Objects_Locations location; bool wait; if ( !buffer ) a00127a4: 0a000018 beq a001280c return RTEMS_INVALID_ADDRESS; if ( !size ) a00127a8: e3520000 cmp r2, #0 a00127ac: 0a000016 beq a001280c RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) a00127b0: e59f0060 ldr r0, [pc, #96] ; a0012818 a00127b4: e28d2008 add r2, sp, #8 a00127b8: eb0008db bl a0014b2c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a00127bc: e59d3008 ldr r3, [sp, #8] a00127c0: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a00127c4: 13a00004 movne r0, #4 if ( !size ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { a00127c8: 1a000010 bne a0012810 if ( _Options_Is_no_wait( option_set ) ) wait = false; else wait = true; _CORE_message_queue_Seize( a00127cc: e59dc01c ldr ip, [sp, #28] */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; a00127d0: e2066001 and r6, r6, #1 a00127d4: e5901008 ldr r1, [r0, #8] a00127d8: e1a03004 mov r3, r4 a00127dc: e2800014 add r0, r0, #20 a00127e0: e1a02005 mov r2, r5 a00127e4: e2266001 eor r6, r6, #1 a00127e8: e58dc004 str ip, [sp, #4] a00127ec: e58d6000 str r6, [sp] a00127f0: eb0004d2 bl a0013b40 <_CORE_message_queue_Seize> buffer, size, wait, timeout ); _Thread_Enable_dispatch(); a00127f4: eb000c90 bl a0015a3c <_Thread_Enable_dispatch> return _Message_queue_Translate_core_message_queue_return_code( _Thread_Executing->Wait.return_code a00127f8: e59f301c ldr r3, [pc, #28] ; a001281c a00127fc: e5933008 ldr r3, [r3, #8] size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( a0012800: e5930034 ldr r0, [r3, #52] ; 0x34 a0012804: eb000025 bl a00128a0 <_Message_queue_Translate_core_message_queue_return_code> a0012808: ea000000 b a0012810 if ( !buffer ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; a001280c: e3a00009 mov r0, #9 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0012810: e28dd00c add sp, sp, #12 a0012814: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000c068 : int rtems_object_api_maximum_class( int api ) { return _Objects_API_maximum_class(api); a000c068: ea000686 b a000da88 <_Objects_API_maximum_class> <== NOT EXECUTED =============================================================================== a000c06c : */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) a000c06c: e2400001 sub r0, r0, #1 <== NOT EXECUTED int api ) { if ( _Objects_Is_api_valid( api ) ) return 1; return -1; a000c070: e3500003 cmp r0, #3 <== NOT EXECUTED } a000c074: 33a00001 movcc r0, #1 <== NOT EXECUTED a000c078: 23e00000 mvncs r0, #0 <== NOT EXECUTED a000c07c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c080 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) a000c080: e3500001 cmp r0, #1 <== NOT EXECUTED const char *rtems_object_get_api_class_name( int the_api, int the_class ) { a000c084: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) a000c088: 0a000004 beq a000c0a0 <== NOT EXECUTED api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) a000c08c: e3500002 cmp r0, #2 <== NOT EXECUTED api_assoc = rtems_object_api_classic_assoc; a000c090: 059f0024 ldreq r0, [pc, #36] ; a000c0bc <== NOT EXECUTED const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) a000c094: 0a000002 beq a000c0a4 <== NOT EXECUTED #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; a000c098: e59f0020 ldr r0, [pc, #32] ; a000c0c0 <== NOT EXECUTED a000c09c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; a000c0a0: e59f001c ldr r0, [pc, #28] ; a000c0c4 <== NOT EXECUTED else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); a000c0a4: eb0012e4 bl a0010c3c <== NOT EXECUTED if ( class_assoc ) a000c0a8: e3500000 cmp r0, #0 <== NOT EXECUTED return class_assoc->name; a000c0ac: 15900000 ldrne r0, [r0] <== NOT EXECUTED api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) a000c0b0: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED return class_assoc->name; return "BAD CLASS"; a000c0b4: e59f000c ldr r0, [pc, #12] ; a000c0c8 <== NOT EXECUTED } a000c0b8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000c0cc : }; const char *rtems_object_get_api_name( int api ) { a000c0cc: e1a01000 mov r1, r0 <== NOT EXECUTED a000c0d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *api_assoc; api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api ); a000c0d4: e59f0010 ldr r0, [pc, #16] ; a000c0ec <== NOT EXECUTED a000c0d8: eb0012d7 bl a0010c3c <== NOT EXECUTED if ( api_assoc ) a000c0dc: e3500000 cmp r0, #0 <== NOT EXECUTED return api_assoc->name; a000c0e0: 15900000 ldrne r0, [r0] <== NOT EXECUTED return "BAD CLASS"; a000c0e4: 059f0004 ldreq r0, [pc, #4] ; a000c0f0 <== NOT EXECUTED } a000c0e8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000c12c : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { a000c12c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED int i; /* * Validate parameters and look up information structure. */ if ( !info ) a000c130: e2524000 subs r4, r2, #0 <== NOT EXECUTED a000c134: 0a00001d beq a000c1b0 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); a000c138: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED a000c13c: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED a000c140: eb000735 bl a000de1c <_Objects_Get_information> <== NOT EXECUTED if ( !obj_info ) a000c144: e3500000 cmp r0, #0 <== NOT EXECUTED a000c148: 0a00001a beq a000c1b8 <== NOT EXECUTED * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; a000c14c: e1d0c1b0 ldrh ip, [r0, #16] <== NOT EXECUTED return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; a000c150: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED info->maximum_id = obj_info->maximum_id; a000c154: e590200c ldr r2, [r0, #12] <== NOT EXECUTED info->auto_extend = obj_info->auto_extend; a000c158: e5d03012 ldrb r3, [r0, #18] <== NOT EXECUTED info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) a000c15c: e35c0000 cmp ip, #0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; a000c160: e5841000 str r1, [r4] <== NOT EXECUTED info->maximum_id = obj_info->maximum_id; a000c164: e5842004 str r2, [r4, #4] <== NOT EXECUTED info->auto_extend = obj_info->auto_extend; a000c168: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED info->maximum = obj_info->maximum; a000c16c: e584c008 str ip, [r4, #8] <== NOT EXECUTED for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) a000c170: 01a0500c moveq r5, ip <== NOT EXECUTED a000c174: 0a00000a beq a000c1a4 <== NOT EXECUTED a000c178: e590001c ldr r0, [r0, #28] <== NOT EXECUTED a000c17c: e3a02001 mov r2, #1 <== NOT EXECUTED a000c180: e1a03002 mov r3, r2 <== NOT EXECUTED a000c184: e3a05000 mov r5, #0 <== NOT EXECUTED if ( !obj_info->local_table[i] ) a000c188: e7901102 ldr r1, [r0, r2, lsl #2] <== NOT EXECUTED info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) a000c18c: e2833001 add r3, r3, #1 <== NOT EXECUTED a000c190: e1a02003 mov r2, r3 <== NOT EXECUTED if ( !obj_info->local_table[i] ) a000c194: e3510000 cmp r1, #0 <== NOT EXECUTED unallocated++; a000c198: 02855001 addeq r5, r5, #1 <== NOT EXECUTED info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) a000c19c: e15c0003 cmp ip, r3 <== NOT EXECUTED a000c1a0: 2afffff8 bcs a000c188 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; a000c1a4: e5845010 str r5, [r4, #16] <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000c1a8: e3a00000 mov r0, #0 <== NOT EXECUTED a000c1ac: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; a000c1b0: e3a00009 mov r0, #9 <== NOT EXECUTED a000c1b4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; a000c1b8: e3a0000a mov r0, #10 <== NOT EXECUTED unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } a000c1bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000c1c4 : #undef rtems_object_id_api_maximum int rtems_object_id_api_maximum(void) { return OBJECTS_APIS_LAST; } a000c1c4: e3a00003 mov r0, #3 <== NOT EXECUTED a000c1c8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c1cc : #undef rtems_object_id_api_minimum int rtems_object_id_api_minimum(void) { return OBJECTS_INTERNAL_API; } a000c1cc: e3a00001 mov r0, #1 <== NOT EXECUTED a000c1d0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c1d4 : */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); a000c1d4: e1a00c20 lsr r0, r0, #24 <== NOT EXECUTED int rtems_object_id_get_api( rtems_id id ) { return _Objects_Get_API( id ); } a000c1d8: e2000007 and r0, r0, #7 <== NOT EXECUTED a000c1dc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c1e0 : int rtems_object_id_get_class( rtems_id id ) { return _Objects_Get_class( id ); } a000c1e0: e1a00da0 lsr r0, r0, #27 <== NOT EXECUTED a000c1e4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c1e8 : #undef rtems_object_id_get_index int rtems_object_id_get_index( rtems_id id ) { return _Objects_Get_index( id ); a000c1e8: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED } a000c1ec: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED a000c1f0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c1f4 : * be a single processor system. */ #if defined(RTEMS_USE_16_BIT_OBJECT) return 1; #else return (id >> OBJECTS_NODE_START_BIT) & OBJECTS_NODE_VALID_BITS; a000c1f4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED int rtems_object_id_get_node( rtems_id id ) { return _Objects_Get_node( id ); } a000c1f8: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED a000c1fc: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000c200 : */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { a000c200: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) a000c204: e2514000 subs r4, r1, #0 <== NOT EXECUTED */ rtems_status_code rtems_object_set_name( rtems_id id, const char *name ) { a000c208: e24dd004 sub sp, sp, #4 <== NOT EXECUTED Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) return RTEMS_INVALID_ADDRESS; a000c20c: 03a00009 moveq r0, #9 <== NOT EXECUTED Objects_Information *information; Objects_Locations location; Objects_Control *the_object; Objects_Id tmpId; if ( !name ) a000c210: 0a00000f beq a000c254 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; a000c214: e3500000 cmp r0, #0 <== NOT EXECUTED a000c218: 059f3058 ldreq r3, [pc, #88] ; a000c278 <== NOT EXECUTED a000c21c: 11a05000 movne r5, r0 <== NOT EXECUTED a000c220: 05933008 ldreq r3, [r3, #8] <== NOT EXECUTED a000c224: 05935008 ldreq r5, [r3, #8] <== NOT EXECUTED information = _Objects_Get_information_id( tmpId ); a000c228: e1a00005 mov r0, r5 <== NOT EXECUTED a000c22c: eb0006f5 bl a000de08 <_Objects_Get_information_id> <== NOT EXECUTED if ( !information ) a000c230: e2506000 subs r6, r0, #0 <== NOT EXECUTED a000c234: 0a000005 beq a000c250 <== NOT EXECUTED return RTEMS_INVALID_ID; the_object = _Objects_Get( information, tmpId, &location ); a000c238: e1a01005 mov r1, r5 <== NOT EXECUTED a000c23c: e1a0200d mov r2, sp <== NOT EXECUTED a000c240: eb00076d bl a000dffc <_Objects_Get> <== NOT EXECUTED switch ( location ) { a000c244: e59d5000 ldr r5, [sp] <== NOT EXECUTED a000c248: e3550000 cmp r5, #0 <== NOT EXECUTED a000c24c: 0a000002 beq a000c25c <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000c250: e3a00004 mov r0, #4 <== NOT EXECUTED } a000c254: e28dd004 add sp, sp, #4 <== NOT EXECUTED a000c258: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_object = _Objects_Get( information, tmpId, &location ); switch ( location ) { case OBJECTS_LOCAL: _Objects_Set_name( information, the_object, name ); a000c25c: e1a01000 mov r1, r0 <== NOT EXECUTED a000c260: e1a02004 mov r2, r4 <== NOT EXECUTED a000c264: e1a00006 mov r0, r6 <== NOT EXECUTED a000c268: eb0007dc bl a000e1e0 <_Objects_Set_name> <== NOT EXECUTED _Thread_Enable_dispatch(); a000c26c: eb000b47 bl a000ef90 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000c270: e1a00005 mov r0, r5 <== NOT EXECUTED a000c274: eafffff6 b a000c254 <== NOT EXECUTED =============================================================================== a0018534 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { a0018534: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) a0018538: e2506000 subs r6, r0, #0 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { a001853c: e24dd008 sub sp, sp, #8 a0018540: e1a04001 mov r4, r1 a0018544: e59d502c ldr r5, [sp, #44] ; 0x2c register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a0018548: 03a00003 moveq r0, #3 rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) a001854c: 1a000001 bne a0018558 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a0018550: e28dd008 add sp, sp, #8 a0018554: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) a0018558: e3510000 cmp r1, #0 a001855c: 0a000006 beq a001857c return RTEMS_INVALID_ADDRESS; if ( !id ) a0018560: e3550000 cmp r5, #0 a0018564: 0a000004 beq a001857c return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || a0018568: e3520000 cmp r2, #0 a001856c: 13530000 cmpne r3, #0 a0018570: 1a000003 bne a0018584 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; a0018574: e3a00008 mov r0, #8 <== NOT EXECUTED a0018578: eafffff4 b a0018550 <== NOT EXECUTED if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; a001857c: e3a00009 mov r0, #9 <== NOT EXECUTED a0018580: eafffff2 b a0018550 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || a0018584: e1520003 cmp r2, r3 a0018588: 3afffff9 bcc a0018574 a001858c: e3130003 tst r3, #3 a0018590: 1afffff7 bne a0018574 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) a0018594: e2118007 ands r8, r1, #7 a0018598: 1afffff7 bne a001857c * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a001859c: e59f109c ldr r1, [pc, #156] ; a0018640 a00185a0: e5910000 ldr r0, [r1] ++level; a00185a4: e2800001 add r0, r0, #1 _Thread_Dispatch_disable_level = level; a00185a8: e5810000 str r0, [r1] * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); a00185ac: e59fa090 ldr sl, [pc, #144] ; a0018644 a00185b0: e58d2004 str r2, [sp, #4] a00185b4: e58d3000 str r3, [sp] a00185b8: e1a0000a mov r0, sl a00185bc: eb001356 bl a001d31c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { a00185c0: e2507000 subs r7, r0, #0 a00185c4: e59d2004 ldr r2, [sp, #4] a00185c8: e59d3000 ldr r3, [sp] a00185cc: 0a000018 beq a0018634 #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; a00185d0: e59d1028 ldr r1, [sp, #40] ; 0x28 return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; a00185d4: e5872014 str r2, [r7, #20] the_partition->buffer_size = buffer_size; a00185d8: e5873018 str r3, [r7, #24] the_partition->attribute_set = attribute_set; a00185dc: e587101c str r1, [r7, #28] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; a00185e0: e5874010 str r4, [r7, #16] the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, a00185e4: e1a01003 mov r1, r3 the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; a00185e8: e5878020 str r8, [r7, #32] _Chain_Initialize( &the_partition->Memory, starting_address, a00185ec: e1a00002 mov r0, r2 a00185f0: e58d3000 str r3, [sp] a00185f4: eb0054be bl a002d8f4 <__aeabi_uidiv> a00185f8: e2879024 add r9, r7, #36 ; 0x24 a00185fc: e1a02000 mov r2, r0 a0018600: e1a01004 mov r1, r4 a0018604: e1a00009 mov r0, r9 a0018608: e59d3000 ldr r3, [sp] a001860c: eb000d2a bl a001babc <_Chain_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0018610: e59a201c ldr r2, [sl, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0018614: e5973008 ldr r3, [r7, #8] a0018618: e1d710b8 ldrh r1, [r7, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a001861c: e7827101 str r7, [r2, r1, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0018620: e587600c str r6, [r7, #12] &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; a0018624: e5853000 str r3, [r5] name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); a0018628: eb001844 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a001862c: e1a00008 mov r0, r8 a0018630: eaffffc6 b a0018550 _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); a0018634: eb001841 bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_TOO_MANY; a0018638: e3a00005 mov r0, #5 <== NOT EXECUTED a001863c: eaffffc3 b a0018550 <== NOT EXECUTED =============================================================================== a0018648 : #include rtems_status_code rtems_partition_delete( rtems_id id ) { a0018648: e92d4030 push {r4, r5, lr} a001864c: e24dd004 sub sp, sp, #4 a0018650: e1a01000 mov r1, r0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) a0018654: e1a0200d mov r2, sp a0018658: e59f0054 ldr r0, [pc, #84] ; a00186b4 a001865c: eb001473 bl a001d830 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { a0018660: e59d3000 ldr r3, [sp] a0018664: e1a04000 mov r4, r0 a0018668: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001866c: 13a00004 movne r0, #4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { a0018670: 1a000004 bne a0018688 case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { a0018674: e5945020 ldr r5, [r4, #32] a0018678: e3550000 cmp r5, #0 a001867c: 0a000003 beq a0018690 #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a0018680: eb00182e bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_RESOURCE_IN_USE; a0018684: e3a0000c mov r0, #12 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0018688: e28dd004 add sp, sp, #4 a001868c: e8bd8030 pop {r4, r5, pc} the_partition = _Partition_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { _Objects_Close( &_Partition_Information, &the_partition->Object ); a0018690: e59f001c ldr r0, [pc, #28] ; a00186b4 a0018694: e1a01004 mov r1, r4 a0018698: eb001342 bl a001d3a8 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); a001869c: e59f0010 ldr r0, [pc, #16] ; a00186b4 a00186a0: e1a01004 mov r1, r4 a00186a4: eb0013fa bl a001d694 <_Objects_Free> 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); a00186a8: eb001824 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a00186ac: e1a00005 mov r0, r5 a00186b0: eafffff4 b a0018688 =============================================================================== a0018764 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { a0018764: e92d4070 push {r4, r5, r6, lr} a0018768: e1a03000 mov r3, r0 a001876c: e24dd004 sub sp, sp, #4 a0018770: e1a04001 mov r4, r1 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) a0018774: e59f008c ldr r0, [pc, #140] ; a0018808 a0018778: e1a01003 mov r1, r3 a001877c: e1a0200d mov r2, sp a0018780: eb00142a bl a001d830 <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { a0018784: e59d3000 ldr r3, [sp] a0018788: e1a05000 mov r5, r0 a001878c: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0018790: 13a00004 movne r0, #4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { a0018794: 1a000016 bne a00187f4 ) { void *starting; void *ending; starting = the_partition->starting_address; a0018798: e5950010 ldr r0, [r5, #16] a001879c: e5953014 ldr r3, [r5, #20] a00187a0: e0803003 add r3, r0, r3 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); a00187a4: e1540003 cmp r4, r3 a00187a8: 83a03000 movhi r3, #0 a00187ac: 93a03001 movls r3, #1 a00187b0: e1540000 cmp r4, r0 a00187b4: 33a03000 movcc r3, #0 ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && a00187b8: e3530000 cmp r3, #0 a00187bc: 0a00000e beq a00187fc offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); a00187c0: e0600004 rsb r0, r0, r4 a00187c4: e5951018 ldr r1, [r5, #24] a00187c8: eb00548f bl a002da0c <__umodsi3> starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && a00187cc: e2506000 subs r6, r0, #0 a00187d0: 1a000009 bne a00187fc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); a00187d4: e2850024 add r0, r5, #36 ; 0x24 a00187d8: e1a01004 mov r1, r4 a00187dc: eb000c9e bl a001ba5c <_Chain_Append> case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; a00187e0: e5953020 ldr r3, [r5, #32] a00187e4: e2433001 sub r3, r3, #1 a00187e8: e5853020 str r3, [r5, #32] _Thread_Enable_dispatch(); a00187ec: eb0017d3 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a00187f0: e1a00006 mov r0, r6 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a00187f4: e28dd004 add sp, sp, #4 a00187f8: e8bd8070 pop {r4, r5, r6, pc} _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a00187fc: eb0017cf bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; a0018800: e3a00009 mov r0, #9 <== NOT EXECUTED a0018804: eafffffa b a00187f4 <== NOT EXECUTED =============================================================================== a0017b1c : void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { a0017b1c: e92d40f0 push {r4, r5, r6, r7, lr} register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) a0017b20: e2504000 subs r4, r0, #0 void *internal_start, void *external_start, uint32_t length, rtems_id *id ) { a0017b24: e24dd00c sub sp, sp, #12 a0017b28: e59d5020 ldr r5, [sp, #32] register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a0017b2c: 03a00003 moveq r0, #3 rtems_id *id ) { register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) a0017b30: 1a000001 bne a0017b3c ); *id = the_port->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a0017b34: e28dd00c add sp, sp, #12 a0017b38: e8bd80f0 pop {r4, r5, r6, r7, pc} register Dual_ported_memory_Control *the_port; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a0017b3c: e3550000 cmp r5, #0 a0017b40: 0a000002 beq a0017b50 #include #include #include #include rtems_status_code rtems_port_create( a0017b44: e1826001 orr r6, r2, r1 return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( internal_start ) || a0017b48: e2166007 ands r6, r6, #7 a0017b4c: 0a000001 beq a0017b58 !_Addresses_Is_aligned( external_start ) ) return RTEMS_INVALID_ADDRESS; a0017b50: e3a00009 mov r0, #9 <== NOT EXECUTED a0017b54: eafffff6 b a0017b34 <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a0017b58: e59f0074 ldr r0, [pc, #116] ; a0017bd4 a0017b5c: e590c000 ldr ip, [r0] ++level; a0017b60: e28cc001 add ip, ip, #1 _Thread_Dispatch_disable_level = level; a0017b64: e580c000 str ip, [r0] * of free port control blocks. */ RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Allocate ( void ) { return (Dual_ported_memory_Control *) a0017b68: e59f7068 ldr r7, [pc, #104] ; a0017bd8 a0017b6c: e58d1008 str r1, [sp, #8] a0017b70: e58d2004 str r2, [sp, #4] a0017b74: e1a00007 mov r0, r7 a0017b78: e58d3000 str r3, [sp] a0017b7c: eb0015e6 bl a001d31c <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { a0017b80: e3500000 cmp r0, #0 a0017b84: e59d1008 ldr r1, [sp, #8] a0017b88: e59d2004 ldr r2, [sp, #4] a0017b8c: e59d3000 ldr r3, [sp] a0017b90: 0a00000c beq a0017bc8 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a0017b94: e590c008 ldr ip, [r0, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0017b98: e597e01c ldr lr, [r7, #28] return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; the_port->external_base = external_start; the_port->length = length - 1; a0017b9c: e2433001 sub r3, r3, #1 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0017ba0: e1a0780c lsl r7, ip, #16 if ( !the_port ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_port->internal_base = internal_start; a0017ba4: e5801010 str r1, [r0, #16] the_port->external_base = external_start; a0017ba8: e5802014 str r2, [r0, #20] the_port->length = length - 1; a0017bac: e5803018 str r3, [r0, #24] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0017bb0: e78e0727 str r0, [lr, r7, lsr #14] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0017bb4: e580400c str r4, [r0, #12] &_Dual_ported_memory_Information, &the_port->Object, (Objects_Name) name ); *id = the_port->Object.id; a0017bb8: e585c000 str ip, [r5] _Thread_Enable_dispatch(); a0017bbc: eb001adf bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0017bc0: e1a00006 mov r0, r6 a0017bc4: eaffffda b a0017b34 _Thread_Disable_dispatch(); /* to prevent deletion */ the_port = _Dual_ported_memory_Allocate(); if ( !the_port ) { _Thread_Enable_dispatch(); a0017bc8: eb001adc bl a001e740 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; a0017bcc: e3a00005 mov r0, #5 a0017bd0: eaffffd7 b a0017b34 =============================================================================== a001880c : #include rtems_status_code rtems_rate_monotonic_cancel( rtems_id id ) { a001880c: e92d4030 push {r4, r5, lr} a0018810: e24dd004 sub sp, sp, #4 a0018814: e1a01000 mov r1, r0 RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) a0018818: e1a0200d mov r2, sp a001881c: e59f0064 ldr r0, [pc, #100] ; a0018888 a0018820: eb001402 bl a001d830 <_Objects_Get> Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0018824: e59d4000 ldr r4, [sp] a0018828: e1a05000 mov r5, r0 a001882c: e3540000 cmp r4, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0018830: 13a00004 movne r0, #4 { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0018834: 1a000006 bne a0018854 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { a0018838: e59f304c ldr r3, [pc, #76] ; a001888c a001883c: e5952040 ldr r2, [r5, #64] ; 0x40 a0018840: e5933008 ldr r3, [r3, #8] a0018844: e1520003 cmp r2, r3 a0018848: 0a000003 beq a001885c _Thread_Enable_dispatch(); a001884c: eb0017bb bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_OWNER_OF_RESOURCE; a0018850: e3a00017 mov r0, #23 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0018854: e28dd004 add sp, sp, #4 a0018858: e8bd8030 pop {r4, r5, pc} case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } (void) _Watchdog_Remove( &the_period->Timer ); a001885c: e2850010 add r0, r5, #16 a0018860: eb001b95 bl a001f6bc <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Scheduler_Release_job( Thread_Control *the_thread, uint32_t length ) { _Scheduler.Operations.release_job(the_thread, length); a0018864: e59f3024 ldr r3, [pc, #36] ; a0018890 a0018868: e5950040 ldr r0, [r5, #64] ; 0x40 a001886c: e1a01004 mov r1, r4 a0018870: e5933034 ldr r3, [r3, #52] ; 0x34 the_period->state = RATE_MONOTONIC_INACTIVE; a0018874: e5854038 str r4, [r5, #56] ; 0x38 a0018878: e12fff33 blx r3 _Scheduler_Release_job(the_period->owner, 0); _Thread_Enable_dispatch(); a001887c: eb0017af bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0018880: e1a00004 mov r0, r4 a0018884: eafffff2 b a0018854 =============================================================================== a000b08c : rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { a000b08c: e92d41f0 push {r4, r5, r6, r7, r8, lr} Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) a000b090: e2506000 subs r6, r0, #0 rtems_status_code rtems_rate_monotonic_create( rtems_name name, rtems_id *id ) { a000b094: e1a05001 mov r5, r1 Rate_monotonic_Control *the_period; if ( !rtems_is_name_valid( name ) ) a000b098: 1a000001 bne a000b0a4 return RTEMS_INVALID_NAME; a000b09c: e3a00003 mov r0, #3 <== NOT EXECUTED a000b0a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED if ( !id ) a000b0a4: e3510000 cmp r1, #0 a000b0a8: 0a000024 beq a000b140 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000b0ac: e59f30a0 ldr r3, [pc, #160] ; a000b154 a000b0b0: e5932000 ldr r2, [r3] ++level; a000b0b4: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a000b0b8: e5832000 str r2, [r3] * This function allocates a period control block from * the inactive chain of free period control blocks. */ RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void ) { return (Rate_monotonic_Control *) a000b0bc: e59f8094 ldr r8, [pc, #148] ; a000b158 a000b0c0: e1a00008 mov r0, r8 a000b0c4: eb000836 bl a000d1a4 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { a000b0c8: e2504000 subs r4, r0, #0 a000b0cc: 0a00001d beq a000b148 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; a000b0d0: e59f3084 ldr r3, [pc, #132] ; a000b15c the_period->state = RATE_MONOTONIC_INACTIVE; a000b0d4: e3a07000 mov r7, #0 _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); a000b0d8: e1a01007 mov r1, r7 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; a000b0dc: e5933008 ldr r3, [r3, #8] the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); a000b0e0: e3a02038 mov r2, #56 ; 0x38 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; the_period->state = RATE_MONOTONIC_INACTIVE; a000b0e4: e5847038 str r7, [r4, #56] ; 0x38 if ( !the_period ) { _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_period->owner = _Thread_Executing; a000b0e8: e5843040 str r3, [r4, #64] ; 0x40 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000b0ec: e5847018 str r7, [r4, #24] the_watchdog->routine = routine; a000b0f0: e584702c str r7, [r4, #44] ; 0x2c the_watchdog->id = id; a000b0f4: e5847030 str r7, [r4, #48] ; 0x30 the_watchdog->user_data = user_data; a000b0f8: e5847034 str r7, [r4, #52] ; 0x34 the_period->state = RATE_MONOTONIC_INACTIVE; _Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL ); _Rate_monotonic_Reset_statistics( the_period ); a000b0fc: e2840054 add r0, r4, #84 ; 0x54 a000b100: eb002336 bl a0013de0 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a000b104: e5943008 ldr r3, [r4, #8] Timestamp64_Control *_time, Timestamp64_Control _seconds, Timestamp64_Control _nanoseconds ) { *_time = _seconds * 1000000000L + _nanoseconds; a000b108: e59f0050 ldr r0, [pc, #80] ; a000b160 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000b10c: e598201c ldr r2, [r8, #28] a000b110: e59f104c ldr r1, [pc, #76] ; a000b164 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a000b114: e1a0c803 lsl ip, r3, #16 a000b118: e584005c str r0, [r4, #92] ; 0x5c a000b11c: e5841060 str r1, [r4, #96] ; 0x60 a000b120: e5840074 str r0, [r4, #116] ; 0x74 a000b124: e5841078 str r1, [r4, #120] ; 0x78 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000b128: e782472c str r4, [r2, ip, lsr #14] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a000b12c: e584600c str r6, [r4, #12] &_Rate_monotonic_Information, &the_period->Object, (Objects_Name) name ); *id = the_period->Object.id; a000b130: e5853000 str r3, [r5] _Thread_Enable_dispatch(); a000b134: eb000d57 bl a000e698 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000b138: e1a00007 mov r0, r7 a000b13c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; a000b140: e3a00009 mov r0, #9 <== NOT EXECUTED ); *id = the_period->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a000b144: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED _Thread_Disable_dispatch(); /* to prevent deletion */ the_period = _Rate_monotonic_Allocate(); if ( !the_period ) { _Thread_Enable_dispatch(); a000b148: eb000d52 bl a000e698 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_TOO_MANY; a000b14c: e3a00005 mov r0, #5 <== NOT EXECUTED a000b150: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== a003623c : rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { a003623c: e92d4370 push {r4, r5, r6, r8, r9, lr} <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) a0036240: e2514000 subs r4, r1, #0 <== NOT EXECUTED rtems_status_code rtems_rate_monotonic_get_statistics( rtems_id id, rtems_rate_monotonic_period_statistics *statistics ) { a0036244: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a0036248: e1a01000 mov r1, r0 <== NOT EXECUTED Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) return RTEMS_INVALID_ADDRESS; a003624c: 03a00009 moveq r0, #9 <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; rtems_rate_monotonic_period_statistics *dst; Rate_monotonic_Statistics *src; if ( !statistics ) a0036250: 0a000061 beq a00363dc <== NOT EXECUTED a0036254: e59f0188 ldr r0, [pc, #392] ; a00363e4 <== NOT EXECUTED a0036258: e1a0200d mov r2, sp <== NOT EXECUTED a003625c: ebff59b9 bl a000c948 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0036260: e59d6000 ldr r6, [sp] <== NOT EXECUTED a0036264: e1a05000 mov r5, r0 <== NOT EXECUTED a0036268: e3560000 cmp r6, #0 <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a003626c: 13a00004 movne r0, #4 <== NOT EXECUTED if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0036270: 1a000059 bne a00363dc <== NOT EXECUTED case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; a0036274: e5950054 ldr r0, [r5, #84] ; 0x54 <== NOT EXECUTED dst->missed_count = src->missed_count; a0036278: e5951058 ldr r1, [r5, #88] ; 0x58 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a003627c: e285905c add r9, r5, #92 ; 0x5c <== NOT EXECUTED a0036280: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036284: e59f215c ldr r2, [pc, #348] ; a00363e8 <== NOT EXECUTED a0036288: e3a03000 mov r3, #0 <== NOT EXECUTED switch ( location ) { case OBJECTS_LOCAL: dst = statistics; src = &the_period->Statistics; dst->count = src->count; a003628c: e5840000 str r0, [r4] <== NOT EXECUTED dst->missed_count = src->missed_count; a0036290: e5841004 str r1, [r4, #4] <== NOT EXECUTED a0036294: e1a00008 mov r0, r8 <== NOT EXECUTED a0036298: e1a01009 mov r1, r9 <== NOT EXECUTED a003629c: eb00770f bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00362a0: e59f2140 ldr r2, [pc, #320] ; a00363e8 <== NOT EXECUTED a00362a4: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00362a8: e5840008 str r0, [r4, #8] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00362ac: e1a01009 mov r1, r9 <== NOT EXECUTED a00362b0: e1a00008 mov r0, r8 <== NOT EXECUTED a00362b4: eb007844 bl a00543cc <__moddi3> <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a00362b8: e2859064 add r9, r5, #100 ; 0x64 <== NOT EXECUTED a00362bc: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00362c0: e59f2120 ldr r2, [pc, #288] ; a00363e8 <== NOT EXECUTED a00362c4: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00362c8: e584000c str r0, [r4, #12] <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00362cc: e1a01009 mov r1, r9 <== NOT EXECUTED a00362d0: e1a00008 mov r0, r8 <== NOT EXECUTED a00362d4: eb007701 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00362d8: e59f2108 ldr r2, [pc, #264] ; a00363e8 <== NOT EXECUTED a00362dc: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00362e0: e5840010 str r0, [r4, #16] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00362e4: e1a01009 mov r1, r9 <== NOT EXECUTED a00362e8: e1a00008 mov r0, r8 <== NOT EXECUTED a00362ec: eb007836 bl a00543cc <__moddi3> <== NOT EXECUTED a00362f0: e285906c add r9, r5, #108 ; 0x6c <== NOT EXECUTED a00362f4: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00362f8: e59f20e8 ldr r2, [pc, #232] ; a00363e8 <== NOT EXECUTED a00362fc: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036300: e5840014 str r0, [r4, #20] <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036304: e1a01009 mov r1, r9 <== NOT EXECUTED a0036308: e1a00008 mov r0, r8 <== NOT EXECUTED a003630c: eb0076f3 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036310: e59f20d0 ldr r2, [pc, #208] ; a00363e8 <== NOT EXECUTED a0036314: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036318: e5840018 str r0, [r4, #24] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a003631c: e1a01009 mov r1, r9 <== NOT EXECUTED a0036320: e1a00008 mov r0, r8 <== NOT EXECUTED a0036324: eb007828 bl a00543cc <__moddi3> <== NOT EXECUTED a0036328: e2859074 add r9, r5, #116 ; 0x74 <== NOT EXECUTED a003632c: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036330: e59f20b0 ldr r2, [pc, #176] ; a00363e8 <== NOT EXECUTED a0036334: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036338: e584001c str r0, [r4, #28] <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a003633c: e1a01009 mov r1, r9 <== NOT EXECUTED a0036340: e1a00008 mov r0, r8 <== NOT EXECUTED a0036344: eb0076e5 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036348: e59f2098 ldr r2, [pc, #152] ; a00363e8 <== NOT EXECUTED a003634c: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036350: e5840020 str r0, [r4, #32] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036354: e1a01009 mov r1, r9 <== NOT EXECUTED a0036358: e1a00008 mov r0, r8 <== NOT EXECUTED a003635c: eb00781a bl a00543cc <__moddi3> <== NOT EXECUTED a0036360: e285907c add r9, r5, #124 ; 0x7c <== NOT EXECUTED a0036364: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036368: e59f2078 ldr r2, [pc, #120] ; a00363e8 <== NOT EXECUTED a003636c: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036370: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036374: e1a01009 mov r1, r9 <== NOT EXECUTED a0036378: e1a00008 mov r0, r8 <== NOT EXECUTED a003637c: eb0076d7 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036380: e59f2060 ldr r2, [pc, #96] ; a00363e8 <== NOT EXECUTED a0036384: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036388: e5840028 str r0, [r4, #40] ; 0x28 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a003638c: e1a01009 mov r1, r9 <== NOT EXECUTED a0036390: e1a00008 mov r0, r8 <== NOT EXECUTED a0036394: eb00780c bl a00543cc <__moddi3> <== NOT EXECUTED a0036398: e2859084 add r9, r5, #132 ; 0x84 <== NOT EXECUTED a003639c: e8990300 ldm r9, {r8, r9} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00363a0: e59f2040 ldr r2, [pc, #64] ; a00363e8 <== NOT EXECUTED a00363a4: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00363a8: e584002c str r0, [r4, #44] ; 0x2c <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00363ac: e1a01009 mov r1, r9 <== NOT EXECUTED a00363b0: e1a00008 mov r0, r8 <== NOT EXECUTED a00363b4: eb0076c9 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00363b8: e59f2028 ldr r2, [pc, #40] ; a00363e8 <== NOT EXECUTED a00363bc: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00363c0: e5840030 str r0, [r4, #48] ; 0x30 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00363c4: e1a01009 mov r1, r9 <== NOT EXECUTED a00363c8: e1a00008 mov r0, r8 <== NOT EXECUTED a00363cc: eb0077fe bl a00543cc <__moddi3> <== NOT EXECUTED a00363d0: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED dst->min_wall_time = src->min_wall_time; dst->max_wall_time = src->max_wall_time; dst->total_wall_time = src->total_wall_time; #endif _Thread_Enable_dispatch(); a00363d4: ebff5cfe bl a000d7d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a00363d8: e1a00006 mov r0, r6 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a00363dc: e28dd004 add sp, sp, #4 <== NOT EXECUTED a00363e0: e8bd8370 pop {r4, r5, r6, r8, r9, pc} <== NOT EXECUTED =============================================================================== a00363ec : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { a00363ec: e92d40d0 push {r4, r6, r7, lr} Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) a00363f0: e2514000 subs r4, r1, #0 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { a00363f4: e24dd014 sub sp, sp, #20 a00363f8: e1a01000 mov r1, r0 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; a00363fc: 03a00009 moveq r0, #9 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) a0036400: 0a000014 beq a0036458 a0036404: e28d2010 add r2, sp, #16 a0036408: e59f00e0 ldr r0, [pc, #224] ; a00364f0 a003640c: ebff594d bl a000c948 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0036410: e59d3010 ldr r3, [sp, #16] a0036414: e1a02000 mov r2, r0 a0036418: e3530000 cmp r3, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a003641c: 13a00004 movne r0, #4 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a0036420: 1a00000c bne a0036458 case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; a0036424: e5921040 ldr r1, [r2, #64] ; 0x40 status->state = the_period->state; a0036428: e5923038 ldr r3, [r2, #56] ; 0x38 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; a003642c: e5912008 ldr r2, [r1, #8] status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { a0036430: e3530000 cmp r3, #0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; status->state = the_period->state; a0036434: e5843004 str r3, [r4, #4] the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; a0036438: e5842000 str r2, [r4] status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { a003643c: 1a000007 bne a0036460 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); a0036440: e5843008 str r3, [r4, #8] a0036444: e584300c str r3, [r4, #12] _Timespec_Set_to_zero( &status->executed_since_last_period ); a0036448: e5843010 str r3, [r4, #16] a003644c: e5843014 str r3, [r4, #20] status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); a0036450: ebff5cdf bl a000d7d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0036454: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0036458: e28dd014 add sp, sp, #20 a003645c: e8bd80d0 pop {r4, r6, r7, pc} } else { /* * Grab the current status. */ valid_status = a0036460: e28d1008 add r1, sp, #8 <== NOT EXECUTED a0036464: e1a0200d mov r2, sp <== NOT EXECUTED a0036468: eb000022 bl a00364f8 <_Rate_monotonic_Get_status> <== NOT EXECUTED _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { a003646c: e3500000 cmp r0, #0 <== NOT EXECUTED a0036470: 0a00001b beq a00364e4 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( a0036474: e28d7008 add r7, sp, #8 <== NOT EXECUTED a0036478: e89700c0 ldm r7, {r6, r7} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a003647c: e59f2070 ldr r2, [pc, #112] ; a00364f4 <== NOT EXECUTED a0036480: e3a03000 mov r3, #0 <== NOT EXECUTED a0036484: e1a00006 mov r0, r6 <== NOT EXECUTED a0036488: e1a01007 mov r1, r7 <== NOT EXECUTED a003648c: eb007693 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a0036490: e59f205c ldr r2, [pc, #92] ; a00364f4 <== NOT EXECUTED a0036494: e3a03000 mov r3, #0 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a0036498: e5840008 str r0, [r4, #8] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a003649c: e1a01007 mov r1, r7 <== NOT EXECUTED a00364a0: e1a00006 mov r0, r6 <== NOT EXECUTED a00364a4: eb0077c8 bl a00543cc <__moddi3> <== NOT EXECUTED &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( a00364a8: e89d00c0 ldm sp, {r6, r7} <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00364ac: e59f2040 ldr r2, [pc, #64] ; a00364f4 <== NOT EXECUTED a00364b0: e3a03000 mov r3, #0 <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00364b4: e584000c str r0, [r4, #12] <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00364b8: e1a01007 mov r1, r7 <== NOT EXECUTED a00364bc: e1a00006 mov r0, r6 <== NOT EXECUTED a00364c0: eb007686 bl a0053ee0 <__divdi3> <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00364c4: e59f2028 ldr r2, [pc, #40] ; a00364f4 <== NOT EXECUTED static inline void _Timestamp64_implementation_To_timespec( const Timestamp64_Control *_timestamp, struct timespec *_timespec ) { _timespec->tv_sec = (time_t) (*_timestamp / 1000000000L); a00364c8: e5840010 str r0, [r4, #16] <== NOT EXECUTED _timespec->tv_nsec = (long) (*_timestamp % 1000000000L); a00364cc: e3a03000 mov r3, #0 <== NOT EXECUTED a00364d0: e1a00006 mov r0, r6 <== NOT EXECUTED a00364d4: e1a01007 mov r1, r7 <== NOT EXECUTED a00364d8: eb0077bb bl a00543cc <__moddi3> <== NOT EXECUTED a00364dc: e5840014 str r0, [r4, #20] <== NOT EXECUTED a00364e0: eaffffda b a0036450 <== NOT EXECUTED valid_status = _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { _Thread_Enable_dispatch(); a00364e4: ebff5cba bl a000d7d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_DEFINED; a00364e8: e3a0000b mov r0, #11 <== NOT EXECUTED a00364ec: eaffffd9 b a0036458 <== NOT EXECUTED =============================================================================== a003671c : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { a003671c: e92d41f0 push {r4, r5, r6, r7, r8, lr} a0036720: e1a04000 mov r4, r0 a0036724: e24dd008 sub sp, sp, #8 a0036728: e1a05001 mov r5, r1 a003672c: e59f0190 ldr r0, [pc, #400] ; a00368c4 a0036730: e1a01004 mov r1, r4 a0036734: e28d2004 add r2, sp, #4 a0036738: ebff5882 bl a000c948 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a003673c: e59d3004 ldr r3, [sp, #4] a0036740: e1a06000 mov r6, r0 a0036744: e3530000 cmp r3, #0 a0036748: 1a000007 bne a003676c RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); a003674c: e59f7174 ldr r7, [pc, #372] ; a00368c8 case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { a0036750: e5902040 ldr r2, [r0, #64] ; 0x40 a0036754: e5973008 ldr r3, [r7, #8] a0036758: e1520003 cmp r2, r3 a003675c: 0a000005 beq a0036778 _Thread_Enable_dispatch(); a0036760: ebff5c1b bl a000d7d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_OWNER_OF_RESOURCE; a0036764: e3a00017 mov r0, #23 <== NOT EXECUTED a0036768: ea000000 b a0036770 <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a003676c: e3a00004 mov r0, #4 <== NOT EXECUTED } a0036770: e28dd008 add sp, sp, #8 a0036774: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { a0036778: e3550000 cmp r5, #0 a003677c: 0a00001c beq a00367f4 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0036780: e10f8000 mrs r8, CPSR a0036784: e3883080 orr r3, r8, #128 ; 0x80 a0036788: e129f003 msr CPSR_fc, r3 _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { a003678c: e5903038 ldr r3, [r0, #56] ; 0x38 a0036790: e3530000 cmp r3, #0 a0036794: 0a00001c beq a003680c _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { a0036798: e3530002 cmp r3, #2 a003679c: 0a00002d beq a0036858 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { a00367a0: e3530004 cmp r3, #4 <== NOT EXECUTED a00367a4: 1afffff0 bne a003676c <== NOT EXECUTED /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); a00367a8: ebffff7d bl a00365a4 <_Rate_monotonic_Update_statistics> <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a00367ac: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; a00367b0: e3a03002 mov r3, #2 <== NOT EXECUTED a00367b4: e59f0110 ldr r0, [pc, #272] ; a00368cc <== NOT EXECUTED a00367b8: e2861010 add r1, r6, #16 <== NOT EXECUTED a00367bc: e5863038 str r3, [r6, #56] ; 0x38 <== NOT EXECUTED the_period->next_length = length; a00367c0: e586503c str r5, [r6, #60] ; 0x3c <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a00367c4: e586501c str r5, [r6, #28] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a00367c8: ebff5efd bl a000e3c4 <_Watchdog_Insert> <== NOT EXECUTED a00367cc: e59f30fc ldr r3, [pc, #252] ; a00368d0 <== NOT EXECUTED a00367d0: e5960040 ldr r0, [r6, #64] ; 0x40 <== NOT EXECUTED a00367d4: e596103c ldr r1, [r6, #60] ; 0x3c <== NOT EXECUTED a00367d8: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED a00367dc: e12fff33 blx r3 <== NOT EXECUTED _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; a00367e0: e3a00006 mov r0, #6 <== NOT EXECUTED the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Scheduler_Release_job(the_period->owner, the_period->next_length); _Thread_Enable_dispatch(); a00367e4: e58d0000 str r0, [sp] a00367e8: ebff5bf9 bl a000d7d4 <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; a00367ec: e59d0000 ldr r0, [sp] a00367f0: eaffffde b a0036770 _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { a00367f4: e5903038 ldr r3, [r0, #56] ; 0x38 a00367f8: e3530004 cmp r3, #4 a00367fc: 959f20d0 ldrls r2, [pc, #208] ; a00368d4 a0036800: 81a00005 movhi r0, r5 a0036804: 97920103 ldrls r0, [r2, r3, lsl #2] a0036808: eafffff5 b a00367e4 a003680c: e129f008 msr CPSR_fc, r8 _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); the_period->next_length = length; a0036810: e586503c str r5, [r6, #60] ; 0x3c /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); a0036814: ebffff9b bl a0036688 <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; a0036818: e3a03002 mov r3, #2 a003681c: e5863038 str r3, [r6, #56] ; 0x38 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a0036820: e59f30b0 ldr r3, [pc, #176] ; a00368d8 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0036824: e3a07000 mov r7, #0 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0036828: e59f009c ldr r0, [pc, #156] ; a00368cc a003682c: e2861010 add r1, r6, #16 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a0036830: e586302c str r3, [r6, #44] ; 0x2c Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0036834: e5867018 str r7, [r6, #24] the_watchdog->routine = routine; the_watchdog->id = id; a0036838: e5864030 str r4, [r6, #48] ; 0x30 the_watchdog->user_data = user_data; a003683c: e5867034 str r7, [r6, #52] ; 0x34 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a0036840: e586501c str r5, [r6, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a0036844: ebff5ede bl a000e3c4 <_Watchdog_Insert> id, NULL ); _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); a0036848: e58d7000 str r7, [sp] a003684c: ebff5be0 bl a000d7d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0036850: e59d0000 ldr r0, [sp] a0036854: eaffffc5 b a0036770 if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); a0036858: ebffff51 bl a00365a4 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; a003685c: e3a03001 mov r3, #1 a0036860: e5863038 str r3, [r6, #56] ; 0x38 the_period->next_length = length; a0036864: e586503c str r5, [r6, #60] ; 0x3c a0036868: e129f008 msr CPSR_fc, r8 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; a003686c: e5973008 ldr r3, [r7, #8] a0036870: e5962008 ldr r2, [r6, #8] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a0036874: e3a01901 mov r1, #16384 ; 0x4000 a0036878: e1a00003 mov r0, r3 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; a003687c: e5832020 str r2, [r3, #32] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a0036880: ebff5df5 bl a000e05c <_Thread_Set_state> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0036884: e10f2000 mrs r2, CPSR a0036888: e3823080 orr r3, r2, #128 ; 0x80 a003688c: e129f003 msr CPSR_fc, r3 * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; a0036890: e3a01002 mov r1, #2 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; a0036894: e5963038 ldr r3, [r6, #56] ; 0x38 the_period->state = RATE_MONOTONIC_ACTIVE; a0036898: e5861038 str r1, [r6, #56] ; 0x38 static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a003689c: e129f002 msr CPSR_fc, r2 /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) a00368a0: e3530003 cmp r3, #3 a00368a4: 0a000002 beq a00368b4 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); a00368a8: ebff5bc9 bl a000d7d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a00368ac: e3a00000 mov r0, #0 <== NOT EXECUTED a00368b0: eaffffae b a0036770 <== NOT EXECUTED /* * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); a00368b4: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED a00368b8: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED a00368bc: ebff5ace bl a000d3fc <_Thread_Clear_state> <== NOT EXECUTED a00368c0: eafffff8 b a00368a8 <== NOT EXECUTED =============================================================================== a002983c : } } void rtems_rate_monotonic_report_statistics( void ) { rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin ); a002983c: e59f1004 ldr r1, [pc, #4] ; a0029848 <== NOT EXECUTED a0029840: e3a00000 mov r0, #0 <== NOT EXECUTED a0029844: eaffff7d b a0029640 <== NOT EXECUTED =============================================================================== a0029640 : void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { a0029640: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) a0029644: e2515000 subs r5, r1, #0 <== NOT EXECUTED void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { a0029648: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED a002964c: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) a0029650: 0a000039 beq a002973c <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); a0029654: e59f11b4 ldr r1, [pc, #436] ; a0029810 <== NOT EXECUTED a0029658: e12fff35 blx r5 <== NOT EXECUTED #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); a002965c: e59f11b0 ldr r1, [pc, #432] ; a0029814 <== NOT EXECUTED a0029660: e1a00007 mov r0, r7 <== NOT EXECUTED a0029664: e12fff35 blx r5 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a0029668: e59f61a8 ldr r6, [pc, #424] ; a0029818 <== NOT EXECUTED return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); (*print)( context, "--- Wall times are in seconds ---\n" ); a002966c: e59f11a8 ldr r1, [pc, #424] ; a002981c <== NOT EXECUTED a0029670: e1a00007 mov r0, r7 <== NOT EXECUTED a0029674: e12fff35 blx r5 <== NOT EXECUTED Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " a0029678: e59f11a0 ldr r1, [pc, #416] ; a0029820 <== NOT EXECUTED a002967c: e1a00007 mov r0, r7 <== NOT EXECUTED a0029680: e12fff35 blx r5 <== NOT EXECUTED #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " a0029684: e1a00007 mov r0, r7 <== NOT EXECUTED a0029688: e59f1194 ldr r1, [pc, #404] ; a0029824 <== NOT EXECUTED a002968c: e12fff35 blx r5 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a0029690: e5964008 ldr r4, [r6, #8] <== NOT EXECUTED a0029694: e596300c ldr r3, [r6, #12] <== NOT EXECUTED a0029698: e1540003 cmp r4, r3 <== NOT EXECUTED a002969c: 8a000026 bhi a002973c <== NOT EXECUTED struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, a00296a0: e59f8180 ldr r8, [pc, #384] ; a0029828 <== NOT EXECUTED a00296a4: ea000003 b a00296b8 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a00296a8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { a00296ac: e2844001 add r4, r4, #1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a00296b0: e1530004 cmp r3, r4 <== NOT EXECUTED a00296b4: 3a000020 bcc a002973c <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); a00296b8: e1a00004 mov r0, r4 <== NOT EXECUTED a00296bc: e28d1010 add r1, sp, #16 <== NOT EXECUTED a00296c0: eb0032dd bl a003623c <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) a00296c4: e3500000 cmp r0, #0 <== NOT EXECUTED a00296c8: 1afffff6 bne a00296a8 <== NOT EXECUTED #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); a00296cc: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED a00296d0: e1a00004 mov r0, r4 <== NOT EXECUTED a00296d4: eb003344 bl a00363ec <== NOT EXECUTED #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); a00296d8: e28d2068 add r2, sp, #104 ; 0x68 <== NOT EXECUTED a00296dc: e3a01005 mov r1, #5 <== NOT EXECUTED a00296e0: e59d0048 ldr r0, [sp, #72] ; 0x48 <== NOT EXECUTED a00296e4: ebffa3b2 bl a00125b4 <== NOT EXECUTED /* * Print part of report line that is not dependent on granularity */ (*print)( context, a00296e8: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED a00296ec: e1a02004 mov r2, r4 <== NOT EXECUTED a00296f0: e28d3068 add r3, sp, #104 ; 0x68 <== NOT EXECUTED a00296f4: e58d0000 str r0, [sp] <== NOT EXECUTED a00296f8: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED a00296fc: e59f1128 ldr r1, [pc, #296] ; a002982c <== NOT EXECUTED a0029700: e58d0004 str r0, [sp, #4] <== NOT EXECUTED a0029704: e1a00007 mov r0, r7 <== NOT EXECUTED a0029708: e12fff35 blx r5 <== NOT EXECUTED ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { a002970c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); a0029710: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED a0029714: e28d2060 add r2, sp, #96 ; 0x60 <== NOT EXECUTED ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { a0029718: e3530000 cmp r3, #0 <== NOT EXECUTED (*print)( context, "\n" ); a002971c: e59f110c ldr r1, [pc, #268] ; a0029830 <== NOT EXECUTED ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { a0029720: 1a000007 bne a0029744 <== NOT EXECUTED (*print)( context, "\n" ); a0029724: e1a00007 mov r0, r7 <== NOT EXECUTED a0029728: e12fff35 blx r5 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a002972c: e596300c ldr r3, [r6, #12] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { a0029730: e2844001 add r4, r4, #1 <== NOT EXECUTED /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a0029734: e1530004 cmp r3, r4 <== NOT EXECUTED a0029738: 2affffde bcs a00296b8 <== NOT EXECUTED the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } a002973c: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED a0029740: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); a0029744: e1a01003 mov r1, r3 <== NOT EXECUTED a0029748: eb000290 bl a002a190 <_Timespec_Divide_by_integer> <== NOT EXECUTED (*print)( context, a002974c: e59de024 ldr lr, [sp, #36] ; 0x24 <== NOT EXECUTED a0029750: e59d1064 ldr r1, [sp, #100] ; 0x64 <== NOT EXECUTED a0029754: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED a0029758: e0cc0e98 smull r0, ip, r8, lr <== NOT EXECUTED a002975c: e0c03198 smull r3, r0, r8, r1 <== NOT EXECUTED a0029760: e1a0efce asr lr, lr, #31 <== NOT EXECUTED a0029764: e0c3a298 smull sl, r3, r8, r2 <== NOT EXECUTED a0029768: e06ec34c rsb ip, lr, ip, asr #6 <== NOT EXECUTED a002976c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED a0029770: e59de020 ldr lr, [sp, #32] <== NOT EXECUTED a0029774: e59dc060 ldr ip, [sp, #96] ; 0x60 <== NOT EXECUTED a0029778: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED a002977c: e0610340 rsb r0, r1, r0, asr #6 <== NOT EXECUTED a0029780: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED a0029784: e58dc008 str ip, [sp, #8] <== NOT EXECUTED a0029788: e0623343 rsb r3, r2, r3, asr #6 <== NOT EXECUTED a002978c: e58de000 str lr, [sp] <== NOT EXECUTED a0029790: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED a0029794: e58d000c str r0, [sp, #12] <== NOT EXECUTED a0029798: e59f1094 ldr r1, [pc, #148] ; a0029834 <== NOT EXECUTED a002979c: e1a00007 mov r0, r7 <== NOT EXECUTED a00297a0: e12fff35 blx r5 <== NOT EXECUTED struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); a00297a4: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED a00297a8: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED a00297ac: e28d2060 add r2, sp, #96 ; 0x60 <== NOT EXECUTED a00297b0: eb000276 bl a002a190 <_Timespec_Divide_by_integer> <== NOT EXECUTED (*print)( context, a00297b4: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED a00297b8: e59d2064 ldr r2, [sp, #100] ; 0x64 <== NOT EXECUTED a00297bc: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED a00297c0: e0cec198 smull ip, lr, r8, r1 <== NOT EXECUTED a00297c4: e0c0a298 smull sl, r0, r8, r2 <== NOT EXECUTED a00297c8: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED a00297cc: e0cca398 smull sl, ip, r8, r3 <== NOT EXECUTED a00297d0: e061134e rsb r1, r1, lr, asr #6 <== NOT EXECUTED a00297d4: e1a02fc2 asr r2, r2, #31 <== NOT EXECUTED a00297d8: e0622340 rsb r2, r2, r0, asr #6 <== NOT EXECUTED a00297dc: e58d1004 str r1, [sp, #4] <== NOT EXECUTED a00297e0: e59d0038 ldr r0, [sp, #56] ; 0x38 <== NOT EXECUTED a00297e4: e59d1060 ldr r1, [sp, #96] ; 0x60 <== NOT EXECUTED a00297e8: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED a00297ec: e58d0000 str r0, [sp] <== NOT EXECUTED a00297f0: e58d1008 str r1, [sp, #8] <== NOT EXECUTED a00297f4: e58d200c str r2, [sp, #12] <== NOT EXECUTED a00297f8: e1a00007 mov r0, r7 <== NOT EXECUTED a00297fc: e59f1034 ldr r1, [pc, #52] ; a0029838 <== NOT EXECUTED a0029800: e59d2030 ldr r2, [sp, #48] ; 0x30 <== NOT EXECUTED a0029804: e063334c rsb r3, r3, ip, asr #6 <== NOT EXECUTED a0029808: e12fff35 blx r5 <== NOT EXECUTED a002980c: eaffffa5 b a00296a8 <== NOT EXECUTED =============================================================================== a002984c : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a002984c: e59f3040 ldr r3, [pc, #64] ; a0029894 <== NOT EXECUTED /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { a0029850: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a0029854: e5932000 ldr r2, [r3] <== NOT EXECUTED ++level; a0029858: e2822001 add r2, r2, #1 <== NOT EXECUTED _Thread_Dispatch_disable_level = level; a002985c: e5832000 str r2, [r3] <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a0029860: e59f5030 ldr r5, [pc, #48] ; a0029898 <== NOT EXECUTED a0029864: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED a0029868: e595300c ldr r3, [r5, #12] <== NOT EXECUTED a002986c: e1540003 cmp r4, r3 <== NOT EXECUTED a0029870: 8a000005 bhi a002988c <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); a0029874: e1a00004 mov r0, r4 <== NOT EXECUTED a0029878: eb000007 bl a002989c <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a002987c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED id <= _Rate_monotonic_Information.maximum_id ; id++ ) { a0029880: e2844001 add r4, r4, #1 <== NOT EXECUTED /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; a0029884: e1530004 cmp r3, r4 <== NOT EXECUTED a0029888: 2afffff9 bcs a0029874 <== NOT EXECUTED /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } a002988c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); a0029890: eaff8fcf b a000d7d4 <_Thread_Enable_dispatch> <== NOT EXECUTED =============================================================================== a002989c : */ rtems_status_code rtems_rate_monotonic_reset_statistics( rtems_id id ) { a002989c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED a00298a0: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a00298a4: e1a01000 mov r1, r0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) a00298a8: e1a0200d mov r2, sp <== NOT EXECUTED a00298ac: e59f004c ldr r0, [pc, #76] ; a0029900 <== NOT EXECUTED a00298b0: ebff8c24 bl a000c948 <_Objects_Get> <== NOT EXECUTED Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a00298b4: e59d4000 ldr r4, [sp] <== NOT EXECUTED a00298b8: e1a05000 mov r5, r0 <== NOT EXECUTED a00298bc: e3540000 cmp r4, #0 <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a00298c0: 13a00004 movne r0, #4 <== NOT EXECUTED { Objects_Locations location; Rate_monotonic_Control *the_period; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { a00298c4: 1a00000b bne a00298f8 <== NOT EXECUTED case OBJECTS_LOCAL: _Rate_monotonic_Reset_statistics( the_period ); a00298c8: e1a01004 mov r1, r4 <== NOT EXECUTED a00298cc: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED a00298d0: e2850054 add r0, r5, #84 ; 0x54 <== NOT EXECUTED a00298d4: eb004f35 bl a003d5b0 <== NOT EXECUTED a00298d8: e59f2024 ldr r2, [pc, #36] ; a0029904 <== NOT EXECUTED a00298dc: e59f3024 ldr r3, [pc, #36] ; a0029908 <== NOT EXECUTED a00298e0: e585205c str r2, [r5, #92] ; 0x5c <== NOT EXECUTED a00298e4: e5853060 str r3, [r5, #96] ; 0x60 <== NOT EXECUTED a00298e8: e5852074 str r2, [r5, #116] ; 0x74 <== NOT EXECUTED a00298ec: e5853078 str r3, [r5, #120] ; 0x78 <== NOT EXECUTED _Thread_Enable_dispatch(); a00298f0: ebff8fb7 bl a000d7d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a00298f4: e1a00004 mov r0, r4 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a00298f8: e28dd004 add sp, sp, #4 <== NOT EXECUTED a00298fc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000b8b4 : return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { a000b8b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} void *ptr = NULL; rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; a000b8b8: e5906030 ldr r6, [r0, #48] ; 0x30 return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { a000b8bc: e1a05001 mov r5, r1 a000b8c0: e1a04000 mov r4, r0 #include static uintptr_t align_up(uintptr_t alignment, uintptr_t value) { uintptr_t excess = value % alignment; a000b8c4: e1a00001 mov r0, r1 a000b8c8: e1a01006 mov r1, r6 a000b8cc: eb004157 bl a001be30 <__umodsi3> if (excess > 0) { a000b8d0: e3500000 cmp r0, #0 a000b8d4: 01a06005 moveq r6, r5 a000b8d8: 03a03001 moveq r3, #1 a000b8dc: 0a000004 beq a000b8f4 value += alignment - excess; a000b8e0: e0856006 add r6, r5, r6 <== NOT EXECUTED a000b8e4: e0606006 rsb r6, r0, r6 <== NOT EXECUTED a000b8e8: e1550006 cmp r5, r6 <== NOT EXECUTED a000b8ec: 83a03000 movhi r3, #0 <== NOT EXECUTED a000b8f0: 93a03001 movls r3, #1 <== NOT EXECUTED rtems_chain_control *free_chain = &control->free_chunk_chain; rtems_rbtree_control *chunk_tree = &control->chunk_tree; uintptr_t alignment = control->alignment; uintptr_t aligned_size = align_up(alignment, size); if (size > 0 && size <= aligned_size) { a000b8f4: e3550000 cmp r5, #0 a000b8f8: 03a05000 moveq r5, #0 a000b8fc: 12035001 andne r5, r3, #1 a000b900: e3550000 cmp r5, #0 a000b904: 0a000030 beq a000b9cc */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First( Chain_Control *the_chain ) { return _Chain_Head( the_chain )->next; a000b908: e1a02004 mov r2, r4 a000b90c: e4927004 ldr r7, [r2], #4 { rtems_chain_node *current = rtems_chain_first(free_chain); const rtems_chain_node *tail = rtems_chain_tail(free_chain); rtems_rbheap_chunk *big_enough = NULL; while (current != tail && big_enough == NULL) { a000b910: e1570002 cmp r7, r2 a000b914: 0a00002e beq a000b9d4 rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current; if (free_chunk->size >= size) { a000b918: e597801c ldr r8, [r7, #28] a000b91c: e1560008 cmp r6, r8 a000b920: 8a000019 bhi a000b98c uintptr_t aligned_size = align_up(alignment, size); if (size > 0 && size <= aligned_size) { rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size); if (free_chunk != NULL) { a000b924: e3570000 cmp r7, #0 a000b928: 0a000038 beq a000ba10 uintptr_t free_size = free_chunk->size; if (free_size > aligned_size) { a000b92c: e1580006 cmp r8, r6 a000b930: 9a00001c bls a000b9a8 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000b934: e1a0a004 mov sl, r4 a000b938: e5ba500c ldr r5, [sl, #12]! RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); a000b93c: e2843010 add r3, r4, #16 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a000b940: e1550003 cmp r5, r3 a000b944: 0a000024 beq a000b9dc Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; a000b948: e5953000 ldr r3, [r5] head->next = new_first; a000b94c: e584300c str r3, [r4, #12] new_first->previous = head; a000b950: e583a004 str sl, [r3, #4] if (new_chunk != NULL) { uintptr_t new_free_size = free_size - aligned_size; free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; a000b954: e5972018 ldr r2, [r7, #24] if (free_size > aligned_size) { rtems_rbheap_chunk *new_chunk = get_chunk(control); if (new_chunk != NULL) { uintptr_t new_free_size = free_size - aligned_size; a000b958: e0668008 rsb r8, r6, r8 */ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { node->next = node->previous = NULL; a000b95c: e3a03000 mov r3, #0 free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; a000b960: e0882002 add r2, r8, r2 a000b964: e1a01005 mov r1, r5 rtems_rbheap_chunk *new_chunk = get_chunk(control); if (new_chunk != NULL) { uintptr_t new_free_size = free_size - aligned_size; free_chunk->size = new_free_size; a000b968: e587801c str r8, [r7, #28] new_chunk->begin = free_chunk->begin + new_free_size; a000b96c: e5852018 str r2, [r5, #24] new_chunk->size = aligned_size; a000b970: e585601c str r6, [r5, #28] a000b974: e5853004 str r3, [r5, #4] a000b978: e4813008 str r3, [r1], #8 static void insert_into_tree( rtems_rbtree_control *tree, rtems_rbheap_chunk *chunk ) { _RBTree_Insert_unprotected(tree, &chunk->tree_node); a000b97c: e2840018 add r0, r4, #24 a000b980: eb0006be bl a000d480 <_RBTree_Insert_unprotected> free_chunk->size = new_free_size; new_chunk->begin = free_chunk->begin + new_free_size; new_chunk->size = aligned_size; rtems_chain_set_off_chain(&new_chunk->chain_node); insert_into_tree(chunk_tree, new_chunk); ptr = (void *) new_chunk->begin; a000b984: e5950018 ldr r0, [r5, #24] a000b988: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next( Chain_Node *the_node ) { return the_node->next; a000b98c: e5977000 ldr r7, [r7] { rtems_chain_node *current = rtems_chain_first(free_chain); const rtems_chain_node *tail = rtems_chain_tail(free_chain); rtems_rbheap_chunk *big_enough = NULL; while (current != tail && big_enough == NULL) { a000b990: e0523007 subs r3, r2, r7 a000b994: 13a03001 movne r3, #1 a000b998: e3530000 cmp r3, #0 a000b99c: 1affffdd bne a000b918 return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; a000b9a0: e1a00003 mov r0, r3 a000b9a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; a000b9a8: e5971000 ldr r1, [r7] previous = the_node->previous; a000b9ac: e5972004 ldr r2, [r7, #4] */ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { node->next = node->previous = NULL; a000b9b0: e3a03000 mov r3, #0 ptr = (void *) new_chunk->begin; } } else { rtems_chain_extract_unprotected(&free_chunk->chain_node); rtems_chain_set_off_chain(&free_chunk->chain_node); ptr = (void *) free_chunk->begin; a000b9b4: e5970018 ldr r0, [r7, #24] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; a000b9b8: e5812004 str r2, [r1, #4] previous->next = next; a000b9bc: e5821000 str r1, [r2] */ RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain( Chain_Node *node ) { node->next = node->previous = NULL; a000b9c0: e5873004 str r3, [r7, #4] a000b9c4: e5873000 str r3, [r7] a000b9c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; a000b9cc: e1a00005 mov r0, r5 a000b9d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} a000b9d4: e3a00000 mov r0, #0 a000b9d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} { rtems_chain_control *chain = &control->spare_descriptor_chain; rtems_chain_node *chunk = rtems_chain_get_unprotected(chain); if (chunk == NULL) { (*control->extend_descriptors)(control); a000b9dc: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED a000b9e0: e1a00004 mov r0, r4 <== NOT EXECUTED a000b9e4: e12fff33 blx r3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first( const Chain_Control *the_chain ) { return _Chain_Immutable_head( the_chain )->next; a000b9e8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a000b9ec: e1550003 cmp r5, r3 <== NOT EXECUTED a000b9f0: 0a000004 beq a000ba08 <== NOT EXECUTED Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; a000b9f4: e5932000 ldr r2, [r3] <== NOT EXECUTED head->next = new_first; new_first->previous = head; a000b9f8: e1a05003 mov r5, r3 <== NOT EXECUTED { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; a000b9fc: e584200c str r2, [r4, #12] <== NOT EXECUTED new_first->previous = head; a000ba00: e582a004 str sl, [r2, #4] <== NOT EXECUTED a000ba04: eaffffd2 b a000b954 <== NOT EXECUTED return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; a000ba08: e3a00000 mov r0, #0 <== NOT EXECUTED } } } return ptr; } a000ba0c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED return big_enough; } void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size) { void *ptr = NULL; a000ba10: e1a00007 mov r0, r7 <== NOT EXECUTED a000ba14: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000bb9c : void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control) { a000bb9c: e92d4010 push {r4, lr} <== NOT EXECUTED a000bba0: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk)); a000bba4: e3a00020 mov r0, #32 <== NOT EXECUTED a000bba8: ebffed5f bl a000712c <== NOT EXECUTED if (chunk != NULL) { a000bbac: e3500000 cmp r0, #0 <== NOT EXECUTED a000bbb0: 0a000005 beq a000bbcc <== NOT EXECUTED ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; a000bbb4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); a000bbb8: e284200c add r2, r4, #12 <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; a000bbbc: e5802004 str r2, [r0, #4] <== NOT EXECUTED before_node = after_node->next; after_node->next = the_node; a000bbc0: e584000c str r0, [r4, #12] <== NOT EXECUTED the_node->next = before_node; before_node->previous = the_node; a000bbc4: e5830004 str r0, [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; a000bbc8: e5803000 str r3, [r0] <== NOT EXECUTED a000bbcc: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0019178 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { a0019178: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) a001917c: e2508000 subs r8, r0, #0 uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { a0019180: e24dd004 sub sp, sp, #4 a0019184: e1a04001 mov r4, r1 a0019188: e1a06002 mov r6, r2 a001918c: e1a05003 mov r5, r3 a0019190: e59d7028 ldr r7, [sp, #40] ; 0x28 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a0019194: 03a04003 moveq r4, #3 ) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) a0019198: 1a000002 bne a00191a8 } } _RTEMS_Unlock_allocator(); return return_status; } a001919c: e1a00004 mov r0, r4 a00191a0: e28dd004 add sp, sp, #4 a00191a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) a00191a8: e3540000 cmp r4, #0 a00191ac: 0a00001a beq a001921c return RTEMS_INVALID_ADDRESS; if ( !id ) a00191b0: e59d202c ldr r2, [sp, #44] ; 0x2c a00191b4: e3520000 cmp r2, #0 a00191b8: 0a000017 beq a001921c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ a00191bc: e59f90c0 ldr r9, [pc, #192] ; a0019284 * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); a00191c0: e59fb0c0 ldr fp, [pc, #192] ; a0019288 a00191c4: e5990000 ldr r0, [r9] a00191c8: eb0009fb bl a001b9bc <_API_Mutex_Lock> a00191cc: e1a0000b mov r0, fp a00191d0: eb001051 bl a001d31c <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) a00191d4: e250a000 subs sl, r0, #0 return_status = RTEMS_TOO_MANY; a00191d8: 03a04005 moveq r4, #5 _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) a00191dc: 0a00000b beq a0019210 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( a00191e0: e28a0068 add r0, sl, #104 ; 0x68 a00191e4: e1a01004 mov r1, r4 a00191e8: e1a02006 mov r2, r6 a00191ec: e1a03005 mov r3, r5 a00191f0: eb000f1b bl a001ce64 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { a00191f4: e3500000 cmp r0, #0 if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( a00191f8: e58a005c str r0, [sl, #92] ; 0x5c &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { a00191fc: 1a000008 bne a0019224 */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); a0019200: e1a0000b mov r0, fp <== NOT EXECUTED a0019204: e1a0100a mov r1, sl <== NOT EXECUTED a0019208: eb001121 bl a001d694 <_Objects_Free> <== NOT EXECUTED _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; a001920c: e3a04008 mov r4, #8 <== NOT EXECUTED *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); a0019210: e5990000 ldr r0, [r9] a0019214: eb000a04 bl a001ba2c <_API_Mutex_Unlock> return return_status; a0019218: eaffffdf b a001919c if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; a001921c: e3a04009 mov r4, #9 <== NOT EXECUTED a0019220: eaffffdd b a001919c <== NOT EXECUTED the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; a0019224: e3a0c000 mov ip, #0 _Thread_queue_Initialize( a0019228: e3170004 tst r7, #4 return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; a001922c: e58a4050 str r4, [sl, #80] ; 0x50 the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; a0019230: e58ac064 str ip, [sl, #100] ; 0x64 } else { the_region->starting_address = starting_address; the_region->length = length; a0019234: e58a6054 str r6, [sl, #84] ; 0x54 the_region->page_size = page_size; a0019238: e58a5058 str r5, [sl, #88] ; 0x58 the_region->attribute_set = attribute_set; a001923c: e58a7060 str r7, [sl, #96] ; 0x60 the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( a0019240: 03a01000 moveq r1, #0 a0019244: 13a01001 movne r1, #1 a0019248: e3a02040 mov r2, #64 ; 0x40 a001924c: e3a03006 mov r3, #6 a0019250: e28a0010 add r0, sl, #16 a0019254: e58dc000 str ip, [sp] a0019258: eb00170d bl a001ee94 <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a001925c: e59a3008 ldr r3, [sl, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0019260: e59b201c ldr r2, [fp, #28] &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; a0019264: e59dc000 ldr ip, [sp] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a0019268: e1a01803 lsl r1, r3, #16 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a001926c: e782a721 str sl, [r2, r1, lsr #14] &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; a0019270: e59d202c ldr r2, [sp, #44] ; 0x2c information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a0019274: e58a800c str r8, [sl, #12] return_status = RTEMS_SUCCESSFUL; a0019278: e1a0400c mov r4, ip &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; a001927c: e5823000 str r3, [r2] a0019280: eaffffe2 b a0019210 =============================================================================== a0019310 : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { a0019310: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED uintptr_t amount_extended; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) a0019314: e2518000 subs r8, r1, #0 <== NOT EXECUTED rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { a0019318: e1a05000 mov r5, r0 <== NOT EXECUTED a001931c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a0019320: e1a07002 mov r7, r2 <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; a0019324: 03a05009 moveq r5, #9 <== NOT EXECUTED uintptr_t amount_extended; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) a0019328: 0a00001b beq a001939c <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ a001932c: e59f4074 ldr r4, [pc, #116] ; a00193a8 <== NOT EXECUTED a0019330: e5940000 ldr r0, [r4] <== NOT EXECUTED a0019334: eb0009a0 bl a001b9bc <_API_Mutex_Lock> <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) a0019338: e1a01005 mov r1, r5 <== NOT EXECUTED a001933c: e59f0068 ldr r0, [pc, #104] ; a00193ac <== NOT EXECUTED a0019340: e1a0200d mov r2, sp <== NOT EXECUTED a0019344: eb00112b bl a001d7f8 <_Objects_Get_no_protection> <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { a0019348: e59d5000 ldr r5, [sp] <== NOT EXECUTED a001934c: e1a06000 mov r6, r0 <== NOT EXECUTED a0019350: e3550000 cmp r5, #0 <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; a0019354: 13a05004 movne r5, #4 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { a0019358: 1a00000d bne a0019394 <== NOT EXECUTED case OBJECTS_LOCAL: amount_extended = _Heap_Extend( a001935c: e1a03005 mov r3, r5 <== NOT EXECUTED a0019360: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED a0019364: e1a01008 mov r1, r8 <== NOT EXECUTED a0019368: e1a02007 mov r2, r7 <== NOT EXECUTED a001936c: eb000cee bl a001c72c <_Heap_Extend> <== NOT EXECUTED starting_address, length, 0 ); if ( amount_extended > 0 ) { a0019370: e3500000 cmp r0, #0 <== NOT EXECUTED the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; a0019374: 03a05009 moveq r5, #9 <== NOT EXECUTED starting_address, length, 0 ); if ( amount_extended > 0 ) { a0019378: 0a000005 beq a0019394 <== NOT EXECUTED the_region->length += amount_extended; a001937c: e5963054 ldr r3, [r6, #84] ; 0x54 <== NOT EXECUTED the_region->maximum_segment_size += amount_extended; a0019380: e596205c ldr r2, [r6, #92] ; 0x5c <== NOT EXECUTED length, 0 ); if ( amount_extended > 0 ) { the_region->length += amount_extended; a0019384: e0833000 add r3, r3, r0 <== NOT EXECUTED the_region->maximum_segment_size += amount_extended; a0019388: e0820000 add r0, r2, r0 <== NOT EXECUTED length, 0 ); if ( amount_extended > 0 ) { the_region->length += amount_extended; a001938c: e5863054 str r3, [r6, #84] ; 0x54 <== NOT EXECUTED the_region->maximum_segment_size += amount_extended; a0019390: e586005c str r0, [r6, #92] ; 0x5c <== NOT EXECUTED default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a0019394: e5940000 ldr r0, [r4] <== NOT EXECUTED a0019398: eb0009a3 bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; } a001939c: e1a00005 mov r0, r5 <== NOT EXECUTED a00193a0: e28dd004 add sp, sp, #4 <== NOT EXECUTED a00193a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== a00193b0 : rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { a00193b0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) a00193b4: e2514000 subs r4, r1, #0 <== NOT EXECUTED rtems_status_code rtems_region_get_free_information( rtems_id id, Heap_Information_block *the_info ) { a00193b8: e1a06000 mov r6, r0 <== NOT EXECUTED a00193bc: e24dd004 sub sp, sp, #4 <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; a00193c0: 03a06009 moveq r6, #9 <== NOT EXECUTED { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) a00193c4: 0a00000c beq a00193fc <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); a00193c8: e59f5054 ldr r5, [pc, #84] ; a0019424 <== NOT EXECUTED a00193cc: e5950000 ldr r0, [r5] <== NOT EXECUTED a00193d0: eb000979 bl a001b9bc <_API_Mutex_Lock> <== NOT EXECUTED a00193d4: e1a01006 mov r1, r6 <== NOT EXECUTED a00193d8: e59f0048 ldr r0, [pc, #72] ; a0019428 <== NOT EXECUTED a00193dc: e1a0200d mov r2, sp <== NOT EXECUTED a00193e0: eb001104 bl a001d7f8 <_Objects_Get_no_protection> <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { a00193e4: e59d6000 ldr r6, [sp] <== NOT EXECUTED a00193e8: e3560000 cmp r6, #0 <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; a00193ec: 13a06004 movne r6, #4 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { a00193f0: 0a000004 beq a0019408 <== NOT EXECUTED default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a00193f4: e5950000 ldr r0, [r5] <== NOT EXECUTED a00193f8: eb00098b bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; } a00193fc: e1a00006 mov r0, r6 <== NOT EXECUTED a0019400: e28dd004 add sp, sp, #4 <== NOT EXECUTED a0019404: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->Used.number = 0; a0019408: e584600c str r6, [r4, #12] <== NOT EXECUTED the_info->Used.total = 0; a001940c: e5846014 str r6, [r4, #20] <== NOT EXECUTED the_info->Used.largest = 0; a0019410: e5846010 str r6, [r4, #16] <== NOT EXECUTED _Heap_Get_free_information( &the_region->Memory, &the_info->Free ); a0019414: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED a0019418: e1a01004 mov r1, r4 <== NOT EXECUTED a001941c: eb000ddc bl a001cb94 <_Heap_Get_free_information> <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; break; a0019420: eafffff3 b a00193f4 <== NOT EXECUTED =============================================================================== a001942c : rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { a001942c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) a0019430: e2515000 subs r5, r1, #0 <== NOT EXECUTED rtems_status_code rtems_region_get_information( rtems_id id, Heap_Information_block *the_info ) { a0019434: e1a06000 mov r6, r0 <== NOT EXECUTED a0019438: e24dd004 sub sp, sp, #4 <== NOT EXECUTED Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) return RTEMS_INVALID_ADDRESS; a001943c: 03a06009 moveq r6, #9 <== NOT EXECUTED { Objects_Locations location; rtems_status_code return_status; register Region_Control *the_region; if ( !the_info ) a0019440: 0a00000c beq a0019478 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); a0019444: e59f4048 ldr r4, [pc, #72] ; a0019494 <== NOT EXECUTED a0019448: e5940000 ldr r0, [r4] <== NOT EXECUTED a001944c: eb00095a bl a001b9bc <_API_Mutex_Lock> <== NOT EXECUTED a0019450: e1a01006 mov r1, r6 <== NOT EXECUTED a0019454: e59f003c ldr r0, [pc, #60] ; a0019498 <== NOT EXECUTED a0019458: e1a0200d mov r2, sp <== NOT EXECUTED a001945c: eb0010e5 bl a001d7f8 <_Objects_Get_no_protection> <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { a0019460: e59d6000 ldr r6, [sp] <== NOT EXECUTED a0019464: e3560000 cmp r6, #0 <== NOT EXECUTED break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; a0019468: 13a06004 movne r6, #4 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { a001946c: 0a000004 beq a0019484 <== NOT EXECUTED default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a0019470: e5940000 ldr r0, [r4] <== NOT EXECUTED a0019474: eb00096c bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; } a0019478: e1a00006 mov r0, r6 <== NOT EXECUTED a001947c: e28dd004 add sp, sp, #4 <== NOT EXECUTED a0019480: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: _Heap_Get_information( &the_region->Memory, the_info ); a0019484: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED a0019488: e1a01005 mov r1, r5 <== NOT EXECUTED a001948c: eb000de7 bl a001cc30 <_Heap_Get_information> <== NOT EXECUTED return_status = RTEMS_SUCCESSFUL; break; a0019490: eafffff6 b a0019470 <== NOT EXECUTED =============================================================================== a00195e0 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { a00195e0: e92d40f0 push {r4, r5, r6, r7, lr} Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) a00195e4: e2516000 subs r6, r1, #0 rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { a00195e8: e24dd004 sub sp, sp, #4 a00195ec: e1a07000 mov r7, r0 a00195f0: e1a04002 mov r4, r2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) a00195f4: 0a000011 beq a0019640 return RTEMS_INVALID_ADDRESS; if ( !size ) a00195f8: e3520000 cmp r2, #0 a00195fc: 0a00000f beq a0019640 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); a0019600: e59f5068 ldr r5, [pc, #104] ; a0019670 a0019604: e5950000 ldr r0, [r5] a0019608: eb0008eb bl a001b9bc <_API_Mutex_Lock> a001960c: e59f0060 ldr r0, [pc, #96] ; a0019674 a0019610: e1a01007 mov r1, r7 a0019614: e1a0200d mov r2, sp a0019618: eb001076 bl a001d7f8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { a001961c: e59d3000 ldr r3, [sp] a0019620: e3530000 cmp r3, #0 a0019624: 0a000009 beq a0019650 void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; a0019628: e3530001 cmp r3, #1 <== NOT EXECUTED a001962c: 03a04004 moveq r4, #4 <== NOT EXECUTED a0019630: 13a04000 movne r4, #0 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a0019634: e5950000 ldr r0, [r5] a0019638: eb0008fb bl a001ba2c <_API_Mutex_Unlock> return return_status; a001963c: ea000000 b a0019644 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; a0019640: e3a04009 mov r4, #9 <== NOT EXECUTED break; } _RTEMS_Unlock_allocator(); return return_status; } a0019644: e1a00004 mov r0, r4 a0019648: e28dd004 add sp, sp, #4 a001964c: e8bd80f0 pop {r4, r5, r6, r7, pc} the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) a0019650: e1a02004 mov r2, r4 a0019654: e2800068 add r0, r0, #104 ; 0x68 a0019658: e1a01006 mov r1, r6 a001965c: eb000eed bl a001d218 <_Heap_Size_of_alloc_area> void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; a0019660: e3500000 cmp r0, #0 a0019664: 03a04009 moveq r4, #9 a0019668: 13a04000 movne r4, #0 a001966c: eafffff0 b a0019634 =============================================================================== a00196a8 : rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { a00196a8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) a00196ac: e2535000 subs r5, r3, #0 <== NOT EXECUTED rtems_id id, void *segment, uintptr_t size, uintptr_t *old_size ) { a00196b0: e1a06000 mov r6, r0 <== NOT EXECUTED a00196b4: e24dd010 sub sp, sp, #16 <== NOT EXECUTED a00196b8: e1a08001 mov r8, r1 <== NOT EXECUTED a00196bc: e1a07002 mov r7, r2 <== NOT EXECUTED rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) return RTEMS_INVALID_ADDRESS; a00196c0: 03a00009 moveq r0, #9 <== NOT EXECUTED uintptr_t osize; rtems_status_code return_status; Heap_Resize_status status; register Region_Control *the_region; if ( !old_size ) a00196c4: 0a000018 beq a001972c <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); a00196c8: e59f408c ldr r4, [pc, #140] ; a001975c <== NOT EXECUTED a00196cc: e5940000 ldr r0, [r4] <== NOT EXECUTED a00196d0: eb0008b9 bl a001b9bc <_API_Mutex_Lock> <== NOT EXECUTED a00196d4: e1a01006 mov r1, r6 <== NOT EXECUTED a00196d8: e59f0080 ldr r0, [pc, #128] ; a0019760 <== NOT EXECUTED a00196dc: e28d2008 add r2, sp, #8 <== NOT EXECUTED a00196e0: eb001044 bl a001d7f8 <_Objects_Get_no_protection> <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { a00196e4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED a00196e8: e1a06000 mov r6, r0 <== NOT EXECUTED a00196ec: e3530000 cmp r3, #0 <== NOT EXECUTED a00196f0: 1a00000f bne a0019734 <== NOT EXECUTED case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 7 ); status = _Heap_Resize_block( a00196f4: e1a02007 mov r2, r7 <== NOT EXECUTED a00196f8: e28d300c add r3, sp, #12 <== NOT EXECUTED a00196fc: e28dc004 add ip, sp, #4 <== NOT EXECUTED a0019700: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED a0019704: e1a01008 mov r1, r8 <== NOT EXECUTED a0019708: e58dc000 str ip, [sp] <== NOT EXECUTED a001970c: eb000e71 bl a001d0d8 <_Heap_Resize_block> <== NOT EXECUTED segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; a0019710: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) a0019714: e2507000 subs r7, r0, #0 <== NOT EXECUTED segment, (uint32_t) size, &osize, &avail_size ); *old_size = (uint32_t) osize; a0019718: e5853000 str r3, [r5] <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) a001971c: 1a000008 bne a0019744 <== NOT EXECUTED _Region_Process_queue( the_region ); /* unlocks allocator */ a0019720: e1a00006 mov r0, r6 <== NOT EXECUTED a0019724: eb001e6e bl a00210e4 <_Region_Process_queue> <== NOT EXECUTED else _RTEMS_Unlock_allocator(); if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; a0019728: e1a00007 mov r0, r7 <== NOT EXECUTED break; } _RTEMS_Unlock_allocator(); return return_status; } a001972c: e28dd010 add sp, sp, #16 <== NOT EXECUTED a0019730: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a0019734: e5940000 ldr r0, [r4] <== NOT EXECUTED a0019738: eb0008bb bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; a001973c: e3a00004 mov r0, #4 <== NOT EXECUTED a0019740: eafffff9 b a001972c <== NOT EXECUTED _Region_Debug_Walk( the_region, 8 ); if ( status == HEAP_RESIZE_SUCCESSFUL ) _Region_Process_queue( the_region ); /* unlocks allocator */ else _RTEMS_Unlock_allocator(); a0019744: e5940000 ldr r0, [r4] <== NOT EXECUTED a0019748: eb0008b7 bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED if (status == HEAP_RESIZE_SUCCESSFUL) return RTEMS_SUCCESSFUL; if (status == HEAP_RESIZE_UNSATISFIED) return RTEMS_UNSATISFIED; a001974c: e3570001 cmp r7, #1 <== NOT EXECUTED a0019750: 13a00009 movne r0, #9 <== NOT EXECUTED a0019754: 03a0000d moveq r0, #13 <== NOT EXECUTED a0019758: eafffff3 b a001972c <== NOT EXECUTED =============================================================================== a0019764 : rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { a0019764: e92d40f0 push {r4, r5, r6, r7, lr} uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); a0019768: e59f4078 ldr r4, [pc, #120] ; a00197e8 rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { a001976c: e24dd004 sub sp, sp, #4 a0019770: e1a06000 mov r6, r0 uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); a0019774: e5940000 ldr r0, [r4] rtems_status_code rtems_region_return_segment( rtems_id id, void *segment ) { a0019778: e1a05001 mov r5, r1 uint32_t size; #endif int status; register Region_Control *the_region; _RTEMS_Lock_allocator(); a001977c: eb00088e bl a001b9bc <_API_Mutex_Lock> a0019780: e1a01006 mov r1, r6 a0019784: e59f0060 ldr r0, [pc, #96] ; a00197ec a0019788: e1a0200d mov r2, sp a001978c: eb001019 bl a001d7f8 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { a0019790: e59d6000 ldr r6, [sp] a0019794: e1a07000 mov r7, r0 a0019798: e3560000 cmp r6, #0 break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; a001979c: 13a06004 movne r6, #4 register Region_Control *the_region; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { a00197a0: 1a000005 bne a00197bc RTEMS_INLINE_ROUTINE bool _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); a00197a4: e2800068 add r0, r0, #104 ; 0x68 a00197a8: e1a01005 mov r1, r5 a00197ac: eb000c85 bl a001c9c8 <_Heap_Free> #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) a00197b0: e3500000 cmp r0, #0 return_status = RTEMS_INVALID_ADDRESS; a00197b4: 03a06009 moveq r6, #9 #endif status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) a00197b8: 1a000004 bne a00197d0 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); a00197bc: e5940000 ldr r0, [r4] <== NOT EXECUTED a00197c0: eb000899 bl a001ba2c <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; } a00197c4: e1a00006 mov r0, r6 a00197c8: e28dd004 add sp, sp, #4 a00197cc: e8bd80f0 pop {r4, r5, r6, r7, pc} _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; a00197d0: e5973064 ldr r3, [r7, #100] ; 0x64 _Region_Process_queue(the_region); /* unlocks allocator */ a00197d4: e1a00007 mov r0, r7 _Region_Debug_Walk( the_region, 4 ); if ( !status ) return_status = RTEMS_INVALID_ADDRESS; else { the_region->number_of_used_blocks -= 1; a00197d8: e2433001 sub r3, r3, #1 a00197dc: e5873064 str r3, [r7, #100] ; 0x64 _Region_Process_queue(the_region); /* unlocks allocator */ a00197e0: eb001e3f bl a00210e4 <_Region_Process_queue> return RTEMS_SUCCESSFUL; a00197e4: eafffff6 b a00197c4 =============================================================================== a000a4fc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { a000a4fc: e92d41f0 push {r4, r5, r6, r7, r8, lr} register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) a000a500: e2505000 subs r5, r0, #0 uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { a000a504: e24dd020 sub sp, sp, #32 a000a508: e1a04001 mov r4, r1 a000a50c: e59d6038 ldr r6, [sp, #56] ; 0x38 CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a000a510: 03a00003 moveq r0, #3 register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attr; CORE_semaphore_Attributes the_semaphore_attr; CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) a000a514: 1a000001 bne a000a520 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a000a518: e28dd020 add sp, sp, #32 a000a51c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a000a520: e3560000 cmp r6, #0 return RTEMS_INVALID_ADDRESS; a000a524: 03a00009 moveq r0, #9 CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a000a528: 0afffffa beq a000a518 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || a000a52c: e21210c0 ands r1, r2, #192 ; 0xc0 a000a530: 1a000029 bne a000a5dc if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) a000a534: e2128030 ands r8, r2, #48 ; 0x30 a000a538: 0a000002 beq a000a548 a000a53c: e3540001 cmp r4, #1 return RTEMS_INVALID_NUMBER; a000a540: 83a0000a movhi r0, #10 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) a000a544: 8afffff3 bhi a000a518 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000a548: e59f1164 ldr r1, [pc, #356] ; a000a6b4 a000a54c: e5910000 ldr r0, [r1] ++level; a000a550: e2800001 add r0, r0, #1 _Thread_Dispatch_disable_level = level; a000a554: e5810000 str r0, [r1] * 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 ); a000a558: e59f0158 ldr r0, [pc, #344] ; a000a6b8 a000a55c: e58d2004 str r2, [sp, #4] a000a560: e58d3000 str r3, [sp] a000a564: eb0005ad bl a000bc20 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { a000a568: e2507000 subs r7, r0, #0 a000a56c: e59d2004 ldr r2, [sp, #4] a000a570: e59d3000 ldr r3, [sp] a000a574: 0a00003b beq a000a668 the_semaphore->attribute_set = attribute_set; /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { a000a578: e3580000 cmp r8, #0 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set; a000a57c: e5872010 str r2, [r7, #16] /* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { a000a580: 1a000020 bne a000a608 * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; a000a584: e3120004 tst r2, #4 a000a588: 03a03000 moveq r3, #0 a000a58c: 13a03001 movne r3, #1 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; a000a590: e3e0c000 mvn ip, #0 * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( a000a594: e2870014 add r0, r7, #20 a000a598: e28d1018 add r1, sp, #24 a000a59c: e1a02004 mov r2, r4 */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF; a000a5a0: e58dc018 str ip, [sp, #24] a000a5a4: e58d301c str r3, [sp, #28] the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; /* * The following are just to make Purify happy. */ the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; a000a5a8: e58d8008 str r8, [sp, #8] the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM; a000a5ac: e58d8014 str r8, [sp, #20] _CORE_semaphore_Initialize( a000a5b0: eb00040f bl a000b5f4 <_CORE_semaphore_Initialize> #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000a5b4: e59f20fc ldr r2, [pc, #252] ; a000a6b8 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a000a5b8: e5973008 ldr r3, [r7, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000a5bc: e592201c ldr r2, [r2, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a000a5c0: e1a01803 lsl r1, r3, #16 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000a5c4: e7827721 str r7, [r2, r1, lsr #14] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a000a5c8: e587500c str r5, [r7, #12] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; a000a5cc: e5863000 str r3, [r6] the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); a000a5d0: eb000a8d bl a000d00c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000a5d4: e3a00000 mov r0, #0 a000a5d8: eaffffce b a000a518 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); a000a5dc: e2028030 and r8, r2, #48 ; 0x30 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && a000a5e0: e3580010 cmp r8, #16 a000a5e4: 0a000001 beq a000a5f0 } if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; a000a5e8: e3a0000b mov r0, #11 <== NOT EXECUTED a000a5ec: eaffffc9 b a000a518 <== NOT EXECUTED #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) && a000a5f0: e3120004 tst r2, #4 a000a5f4: 0afffffb beq a000a5e8 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && a000a5f8: e35100c0 cmp r1, #192 ; 0xc0 a000a5fc: 1affffce bne a000a53c _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; a000a600: e3a0000b mov r0, #11 <== NOT EXECUTED a000a604: eaffffc3 b a000a518 <== NOT EXECUTED /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; a000a608: e3120004 tst r2, #4 a000a60c: 03a01000 moveq r1, #0 a000a610: 13a01001 movne r1, #1 else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { a000a614: e3580010 cmp r8, #16 /* * It is either simple binary semaphore or a more powerful mutex * style binary semaphore. This is the mutex style. */ if ( _Attributes_Is_priority( attribute_set ) ) the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; a000a618: e58d1010 str r1, [sp, #16] else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { a000a61c: 0a000014 beq a000a674 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; the_mutex_attr.only_owner_release = true; } } } else /* must be simple binary semaphore */ { the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; a000a620: e3a03001 mov r3, #1 a000a624: e58d3008 str r3, [sp, #8] the_mutex_attr.only_owner_release = false; a000a628: e3a03000 mov r3, #0 a000a62c: e5cd300c strb r3, [sp, #12] } mutex_status = _CORE_mutex_Initialize( a000a630: e2443001 sub r3, r4, #1 a000a634: e2732000 rsbs r2, r3, #0 a000a638: e0a22003 adc r2, r2, r3 a000a63c: e2870014 add r0, r7, #20 a000a640: e28d1008 add r1, sp, #8 a000a644: eb000314 bl a000b29c <_CORE_mutex_Initialize> &the_semaphore->Core_control.mutex, &the_mutex_attr, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { a000a648: e3500005 cmp r0, #5 a000a64c: 1affffd8 bne a000a5b4 */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); a000a650: e59f0060 ldr r0, [pc, #96] ; a000a6b8 a000a654: e1a01007 mov r1, r7 a000a658: eb00064e bl a000bf98 <_Objects_Free> _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); a000a65c: eb000a6a bl a000d00c <_Thread_Enable_dispatch> return RTEMS_INVALID_PRIORITY; a000a660: e3a00013 mov r0, #19 a000a664: eaffffab b a000a518 _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); a000a668: eb000a67 bl a000d00c <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; a000a66c: e3a00005 mov r0, #5 a000a670: eaffffa8 b a000a518 else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; a000a674: e3a00000 mov r0, #0 the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { a000a678: e3510001 cmp r1, #1 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attr.priority_ceiling = priority_ceiling; a000a67c: e58d3014 str r3, [sp, #20] the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; a000a680: e58d0008 str r0, [sp, #8] the_mutex_attr.only_owner_release = false; a000a684: e5cd000c strb r0, [sp, #12] if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { a000a688: 1affffe8 bne a000a630 if ( _Attributes_Is_inherit_priority( attribute_set ) ) { a000a68c: e3120040 tst r2, #64 ; 0x40 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; a000a690: 13a03002 movne r3, #2 a000a694: 158d3010 strne r3, [sp, #16] the_mutex_attr.only_owner_release = true; a000a698: 15cd100c strbne r1, [sp, #12] the_mutex_attr.priority_ceiling = priority_ceiling; the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) { if ( _Attributes_Is_inherit_priority( attribute_set ) ) { a000a69c: 1affffe3 bne a000a630 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; the_mutex_attr.only_owner_release = true; } else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) { a000a6a0: e3120080 tst r2, #128 ; 0x80 the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; a000a6a4: 13a03003 movne r3, #3 a000a6a8: 158d3010 strne r3, [sp, #16] the_mutex_attr.only_owner_release = true; a000a6ac: 15cd100c strbne r1, [sp, #12] a000a6b0: eaffffde b a000a630 =============================================================================== a000a6bc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { a000a6bc: e92d4010 push {r4, lr} a000a6c0: e24dd004 sub sp, sp, #4 a000a6c4: e1a01000 mov r1, r0 RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) a000a6c8: e1a0200d mov r2, sp a000a6cc: e59f0088 ldr r0, [pc, #136] ; a000a75c a000a6d0: eb000689 bl a000c0fc <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { a000a6d4: e59d3000 ldr r3, [sp] a000a6d8: e1a04000 mov r4, r0 a000a6dc: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000a6e0: 13a00004 movne r0, #4 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { a000a6e4: 1a000009 bne a000a710 */ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); a000a6e8: e5941010 ldr r1, [r4, #16] case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { a000a6ec: e2111030 ands r1, r1, #48 ; 0x30 a000a6f0: 0a000008 beq a000a718 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && a000a6f4: e5943064 ldr r3, [r4, #100] ; 0x64 a000a6f8: e3530000 cmp r3, #0 a000a6fc: 1a000011 bne a000a748 a000a700: e3510020 cmp r1, #32 a000a704: 0a00000f beq a000a748 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); a000a708: eb000a3f bl a000d00c <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_RESOURCE_IN_USE; a000a70c: e3a0000c mov r0, #12 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000a710: e28dd004 add sp, sp, #4 a000a714: e8bd8010 pop {r4, pc} &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( a000a718: e2840014 add r0, r4, #20 a000a71c: e3a02002 mov r2, #2 a000a720: eb0003b2 bl a000b5f0 <_CORE_semaphore_Flush> SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); a000a724: e59f0030 ldr r0, [pc, #48] ; a000a75c a000a728: e1a01004 mov r1, r4 a000a72c: eb00055e bl a000bcac <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); a000a730: e59f0024 ldr r0, [pc, #36] ; a000a75c a000a734: e1a01004 mov r1, r4 a000a738: eb000616 bl a000bf98 <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); a000a73c: eb000a32 bl a000d00c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000a740: e3a00000 mov r0, #0 a000a744: eafffff1 b a000a710 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( a000a748: e2840014 add r0, r4, #20 a000a74c: e3a01000 mov r1, #0 a000a750: e3a02003 mov r2, #3 a000a754: eb0002cf bl a000b298 <_CORE_mutex_Flush> a000a758: eafffff1 b a000a724 =============================================================================== a0013a2c : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { a0013a2c: e52de004 push {lr} ; (str lr, [sp, #-4]!) a0013a30: e24dd004 sub sp, sp, #4 a0013a34: e1a01000 mov r1, r0 a0013a38: e1a0200d mov r2, sp a0013a3c: e59f0048 ldr r0, [pc, #72] ; a0013a8c a0013a40: ebffe704 bl a000d658 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { a0013a44: e59d3000 ldr r3, [sp] a0013a48: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0013a4c: 13a00004 movne r0, #4 { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { a0013a50: 1a000007 bne a0013a74 a0013a54: e5901010 ldr r1, [r0, #16] case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( a0013a58: e2800014 add r0, r0, #20 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { a0013a5c: e2111030 ands r1, r1, #48 ; 0x30 a0013a60: 1a000005 bne a0013a7c &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( a0013a64: e3a02001 mov r2, #1 <== NOT EXECUTED a0013a68: ebffe45f bl a000cbec <_CORE_semaphore_Flush> <== NOT EXECUTED &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); a0013a6c: ebffea30 bl a000e334 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0013a70: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0013a74: e28dd004 add sp, sp, #4 a0013a78: e8bd8000 pop {pc} the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( a0013a7c: e1a01003 mov r1, r3 a0013a80: e3a02001 mov r2, #1 a0013a84: ebffe382 bl a000c894 <_CORE_mutex_Flush> a0013a88: eafffff7 b a0013a6c =============================================================================== a000a760 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { a000a760: e92d40f0 push {r4, r5, r6, r7, lr} a000a764: e1a04000 mov r4, r0 a000a768: e24dd00c sub sp, sp, #12 Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) a000a76c: e28d3008 add r3, sp, #8 a000a770: e1a05001 mov r5, r1 a000a774: e1a06002 mov r6, r2 a000a778: e59f00f4 ldr r0, [pc, #244] ; a000a874 a000a77c: e1a01004 mov r1, r4 a000a780: e28d2004 add r2, sp, #4 a000a784: eb000640 bl a000c08c <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { a000a788: e59d3004 ldr r3, [sp, #4] a000a78c: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000a790: 13a00004 movne r0, #4 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { a000a794: 1a00000f bne a000a7d8 a000a798: e5903010 ldr r3, [r0, #16] case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { a000a79c: e2133030 ands r3, r3, #48 ; 0x30 a000a7a0: 1a00000e bne a000a7e0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a000a7a4: e59f70cc ldr r7, [pc, #204] ; a000a878 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { a000a7a8: e590105c ldr r1, [r0, #92] ; 0x5c { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a000a7ac: e5972008 ldr r2, [r7, #8] executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { a000a7b0: e3510000 cmp r1, #0 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; a000a7b4: e5823034 str r3, [r2, #52] ; 0x34 if ( the_semaphore->count != 0 ) { a000a7b8: 0a000015 beq a000a814 the_semaphore->count -= 1; a000a7bc: e2411001 sub r1, r1, #1 a000a7c0: e580105c str r1, [r0, #92] ; 0x5c a000a7c4: e59d3008 ldr r3, [sp, #8] a000a7c8: e129f003 msr CPSR_fc, r3 ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); a000a7cc: e5973008 ldr r3, [r7, #8] id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( a000a7d0: e5930034 ldr r0, [r3, #52] ; 0x34 a000a7d4: eb00004e bl a000a914 <_Semaphore_Translate_core_semaphore_return_code> break; } return RTEMS_INVALID_ID; } a000a7d8: e28dd00c add sp, sp, #12 a000a7dc: e8bd80f0 pop {r4, r5, r6, r7, pc} the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( a000a7e0: e59dc008 ldr ip, [sp, #8] */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; a000a7e4: e2052001 and r2, r5, #1 a000a7e8: e1a03006 mov r3, r6 a000a7ec: e2800014 add r0, r0, #20 a000a7f0: e1a01004 mov r1, r4 a000a7f4: e2222001 eor r2, r2, #1 a000a7f8: e58dc000 str ip, [sp] a000a7fc: eb0002f6 bl a000b3dc <_CORE_mutex_Seize> ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( _Thread_Executing->Wait.return_code ); a000a800: e59f3070 ldr r3, [pc, #112] ; a000a878 a000a804: e5933008 ldr r3, [r3, #8] id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( a000a808: e5930034 ldr r0, [r3, #52] ; 0x34 a000a80c: eb00003c bl a000a904 <_Semaphore_Translate_core_mutex_return_code> a000a810: eafffff0 b a000a7d8 _ISR_Enable( *level_p ); return; } if ( !wait ) { a000a814: e3150001 tst r5, #1 a000a818: 0a000004 beq a000a830 a000a81c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED a000a820: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _ISR_Enable( *level_p ); executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; a000a824: e3a03001 mov r3, #1 <== NOT EXECUTED a000a828: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED a000a82c: eaffffe6 b a000a7cc <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000a830: e59f3044 ldr r3, [pc, #68] ; a000a87c a000a834: e5931000 ldr r1, [r3] ++level; a000a838: e2811001 add r1, r1, #1 _Thread_Dispatch_disable_level = level; a000a83c: e5831000 str r1, [r3] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; a000a840: e3a01001 mov r1, #1 return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; a000a844: e2803014 add r3, r0, #20 a000a848: e5801044 str r1, [r0, #68] ; 0x44 a000a84c: e5823044 str r3, [r2, #68] ; 0x44 executing->Wait.id = id; a000a850: e5824020 str r4, [r2, #32] a000a854: e59d2008 ldr r2, [sp, #8] a000a858: e129f002 msr CPSR_fc, r2 _ISR_Enable( *level_p ); _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); a000a85c: e59f201c ldr r2, [pc, #28] ; a000a880 a000a860: e1a00003 mov r0, r3 a000a864: e1a01006 mov r1, r6 a000a868: eb000b0f bl a000d4ac <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); a000a86c: eb0009e6 bl a000d00c <_Thread_Enable_dispatch> a000a870: eaffffd5 b a000a7cc =============================================================================== a0019cb4 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { a0019cb4: e92d4010 push {r4, lr} register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) a0019cb8: e2514000 subs r4, r1, #0 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { a0019cbc: e24dd004 sub sp, sp, #4 Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; a0019cc0: 03a0000a moveq r0, #10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) a0019cc4: 1a000001 bne a0019cd0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0019cc8: e28dd004 add sp, sp, #4 a0019ccc: e8bd8010 pop {r4, pc} ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); a0019cd0: e1a0100d mov r1, sp a0019cd4: eb0012a1 bl a001e760 <_Thread_Get> switch ( location ) { a0019cd8: e59d3000 ldr r3, [sp] a0019cdc: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0019ce0: 13a00004 movne r0, #4 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { a0019ce4: 1afffff7 bne a0019cc8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; a0019ce8: e59030ec ldr r3, [r0, #236] ; 0xec asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { a0019cec: e593200c ldr r2, [r3, #12] a0019cf0: e3520000 cmp r2, #0 a0019cf4: 0a000014 beq a0019d4c if ( asr->is_enabled ) { a0019cf8: e5d32008 ldrb r2, [r3, #8] a0019cfc: e3520000 cmp r2, #0 uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0019d00: e10f2000 mrs r2, CPSR a0019d04: e3821080 orr r1, r2, #128 ; 0x80 a0019d08: e129f001 msr CPSR_fc, r1 a0019d0c: 0a000011 beq a0019d58 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; a0019d10: e5931014 ldr r1, [r3, #20] a0019d14: e1814004 orr r4, r1, r4 a0019d18: e5834014 str r4, [r3, #20] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0019d1c: e129f002 msr CPSR_fc, r2 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) a0019d20: e59f3044 ldr r3, [pc, #68] ; a0019d6c a0019d24: e5932000 ldr r2, [r3] a0019d28: e3520000 cmp r2, #0 a0019d2c: 0a000003 beq a0019d40 a0019d30: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED a0019d34: e1500002 cmp r0, r2 <== NOT EXECUTED _Thread_Dispatch_necessary = true; a0019d38: 03a02001 moveq r2, #1 <== NOT EXECUTED a0019d3c: 05c32004 strbeq r2, [r3, #4] <== NOT EXECUTED } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); a0019d40: eb00127e bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0019d44: e3a00000 mov r0, #0 a0019d48: eaffffde b a0019cc8 } _Thread_Enable_dispatch(); a0019d4c: eb00127b bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_DEFINED; a0019d50: e3a0000b mov r0, #11 <== NOT EXECUTED a0019d54: eaffffdb b a0019cc8 <== NOT EXECUTED a0019d58: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED a0019d5c: e1814004 orr r4, r1, r4 <== NOT EXECUTED a0019d60: e5834018 str r4, [r3, #24] <== NOT EXECUTED a0019d64: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED a0019d68: eafffff4 b a0019d40 <== NOT EXECUTED =============================================================================== a000c860 : rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { a000c860: e92d4030 push {r4, r5, lr} a000c864: e1a04001 mov r4, r1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000c868: e59f10ac ldr r1, [pc, #172] ; a000c91c rtems_status_code rtems_task_get_note( rtems_id id, uint32_t notepad, uint32_t *note ) { a000c86c: e1a03000 mov r3, r0 a000c870: e24dd008 sub sp, sp, #8 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000c874: e5d11004 ldrb r1, [r1, #4] a000c878: e3510000 cmp r1, #0 return RTEMS_NOT_CONFIGURED; a000c87c: 03a00016 moveq r0, #22 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000c880: 1a000001 bne a000c88c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000c884: e28dd008 add sp, sp, #8 a000c888: e8bd8030 pop {r4, r5, pc} RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) a000c88c: e3520000 cmp r2, #0 return RTEMS_INVALID_ADDRESS; a000c890: 03a00009 moveq r0, #9 RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) return RTEMS_NOT_CONFIGURED; if ( !note ) a000c894: 0afffffa beq a000c884 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) a000c898: e354000f cmp r4, #15 return RTEMS_INVALID_NUMBER; a000c89c: 83a0000a movhi r0, #10 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) a000c8a0: 8afffff7 bhi a000c884 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000c8a4: e3530000 cmp r3, #0 a000c8a8: 0a000013 beq a000c8fc _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { a000c8ac: e59f106c ldr r1, [pc, #108] ; a000c920 a000c8b0: e5911008 ldr r1, [r1, #8] /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000c8b4: e591c008 ldr ip, [r1, #8] a000c8b8: e153000c cmp r3, ip a000c8bc: 0a000010 beq a000c904 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); a000c8c0: e28d1004 add r1, sp, #4 a000c8c4: e58d2000 str r2, [sp] a000c8c8: eb000a08 bl a000f0f0 <_Thread_Get> switch ( location ) { a000c8cc: e59d5004 ldr r5, [sp, #4] a000c8d0: e59d2000 ldr r2, [sp] a000c8d4: e3550000 cmp r5, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000c8d8: 13a00004 movne r0, #4 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { a000c8dc: 1affffe8 bne a000c884 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; a000c8e0: e59030ec ldr r3, [r0, #236] ; 0xec a000c8e4: e2844008 add r4, r4, #8 a000c8e8: e7933104 ldr r3, [r3, r4, lsl #2] a000c8ec: e5823000 str r3, [r2] _Thread_Enable_dispatch(); a000c8f0: eb0009f6 bl a000f0d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000c8f4: e1a00005 mov r0, r5 a000c8f8: eaffffe1 b a000c884 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000c8fc: e59f301c ldr r3, [pc, #28] ; a000c920 <== NOT EXECUTED a000c900: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; a000c904: e59130ec ldr r3, [r1, #236] ; 0xec <== NOT EXECUTED a000c908: e2844008 add r4, r4, #8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000c90c: e3a00000 mov r0, #0 <== NOT EXECUTED */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; a000c910: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED a000c914: e5823000 str r3, [r2] <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000c918: eaffffd9 b a000c884 <== NOT EXECUTED =============================================================================== a000ab48 : rtems_id *id ) { Objects_Name_or_id_lookup_errors status; if ( !id ) a000ab48: e2523000 subs r3, r2, #0 rtems_status_code rtems_task_ident( rtems_name name, uint32_t node, rtems_id *id ) { a000ab4c: e52de004 push {lr} ; (str lr, [sp, #-4]!) a000ab50: e1a0c000 mov ip, r0 a000ab54: e1a02001 mov r2, r1 Objects_Name_or_id_lookup_errors status; if ( !id ) a000ab58: 0a00000c beq a000ab90 return RTEMS_INVALID_ADDRESS; if ( name == OBJECTS_ID_OF_SELF ) { a000ab5c: e3500000 cmp r0, #0 a000ab60: 1a000004 bne a000ab78 *id = _Thread_Executing->Object.id; a000ab64: e59f202c ldr r2, [pc, #44] ; a000ab98 a000ab68: e5922008 ldr r2, [r2, #8] a000ab6c: e5922008 ldr r2, [r2, #8] a000ab70: e5832000 str r2, [r3] return RTEMS_SUCCESSFUL; a000ab74: e49df004 pop {pc} ; (ldr pc, [sp], #4) } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); a000ab78: e59f001c ldr r0, [pc, #28] ; a000ab9c a000ab7c: e1a0100c mov r1, ip a000ab80: eb0005b3 bl a000c254 <_Objects_Name_to_id_u32> return _Status_Object_name_errors_to_status[ status ]; a000ab84: e59f3014 ldr r3, [pc, #20] ; a000aba0 a000ab88: e7930100 ldr r0, [r3, r0, lsl #2] a000ab8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) ) { Objects_Name_or_id_lookup_errors status; if ( !id ) return RTEMS_INVALID_ADDRESS; a000ab90: e3a00009 mov r0, #9 <== NOT EXECUTED } status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id ); return _Status_Object_name_errors_to_status[ status ]; } a000ab94: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a001a144 : */ rtems_status_code rtems_task_is_suspended( rtems_id id ) { a001a144: e92d4010 push {r4, lr} a001a148: e24dd004 sub sp, sp, #4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a001a14c: e1a0100d mov r1, sp a001a150: eb001182 bl a001e760 <_Thread_Get> switch ( location ) { a001a154: e59d3000 ldr r3, [sp] a001a158: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001a15c: 13a00004 movne r0, #4 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { a001a160: 1a000004 bne a001a178 */ RTEMS_INLINE_ROUTINE bool _States_Is_suspended ( States_Control the_states ) { return (the_states & STATES_SUSPENDED); a001a164: e5904010 ldr r4, [r0, #16] <== NOT EXECUTED case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { a001a168: e2144002 ands r4, r4, #2 <== NOT EXECUTED a001a16c: 0a000003 beq a001a180 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a001a170: eb001172 bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_ALREADY_SUSPENDED; a001a174: e3a0000f mov r0, #15 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001a178: e28dd004 add sp, sp, #4 a001a17c: e8bd8010 pop {r4, pc} the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Enable_dispatch(); a001a180: eb00116e bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a001a184: e1a00004 mov r0, r4 <== NOT EXECUTED a001a188: eafffffa b a001a178 <== NOT EXECUTED =============================================================================== a0013b64 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a0013b64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a0013b68: e2525000 subs r5, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { a0013b6c: e1a04000 mov r4, r0 a0013b70: e1a06001 mov r6, r1 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) a0013b74: 0a00004e beq a0013cb4 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; a0013b78: e59f9158 ldr r9, [pc, #344] ; a0013cd8 a0013b7c: e5997008 ldr r7, [r9, #8] api = executing->API_Extensions[ THREAD_API_RTEMS ]; a0013b80: e59780ec ldr r8, [r7, #236] ; 0xec asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a0013b84: e5d7a070 ldrb sl, [r7, #112] ; 0x70 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a0013b88: e5973078 ldr r3, [r7, #120] ; 0x78 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a0013b8c: e5d8b008 ldrb fp, [r8, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; a0013b90: e35a0000 cmp sl, #0 a0013b94: 03a0ac01 moveq sl, #256 ; 0x100 a0013b98: 13a0a000 movne sl, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) a0013b9c: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; a0013ba0: 138aac02 orrne sl, sl, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a0013ba4: e35b0000 cmp fp, #0 a0013ba8: 03a0bb01 moveq fp, #1024 ; 0x400 a0013bac: 13a0b000 movne fp, #0 old_mode |= _ISR_Get_level(); a0013bb0: ebffeebc bl a000f6a8 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; a0013bb4: e18bb000 orr fp, fp, r0 old_mode |= _ISR_Get_level(); a0013bb8: e18ba00a orr sl, fp, sl *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a0013bbc: e3160c01 tst r6, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; a0013bc0: e585a000 str sl, [r5] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) a0013bc4: 0a000003 beq a0013bd8 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; a0013bc8: e3140c01 tst r4, #256 ; 0x100 a0013bcc: 13a03000 movne r3, #0 a0013bd0: 03a03001 moveq r3, #1 a0013bd4: e5c73070 strb r3, [r7, #112] ; 0x70 if ( mask & RTEMS_TIMESLICE_MASK ) { a0013bd8: e3160c02 tst r6, #512 ; 0x200 a0013bdc: 1a00001c bne a0013c54 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a0013be0: e3160080 tst r6, #128 ; 0x80 a0013be4: 1a000023 bne a0013c78 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { a0013be8: e2166b01 ands r6, r6, #1024 ; 0x400 a0013bec: 0a000012 beq a0013c3c is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a0013bf0: e5d82008 ldrb r2, [r8, #8] #include #include #include #include rtems_status_code rtems_task_mode( a0013bf4: e3140b01 tst r4, #1024 ; 0x400 a0013bf8: 13a03000 movne r3, #0 a0013bfc: 03a03001 moveq r3, #1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a0013c00: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a0013c04: 03a06000 moveq r6, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { a0013c08: 0a00000b beq a0013c3c asr->is_enabled = is_asr_enabled; a0013c0c: e5c83008 strb r3, [r8, #8] uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a0013c10: e10f3000 mrs r3, CPSR a0013c14: e3832080 orr r2, r3, #128 ; 0x80 a0013c18: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; a0013c1c: e5981018 ldr r1, [r8, #24] information->signals_pending = information->signals_posted; a0013c20: e5982014 ldr r2, [r8, #20] information->signals_posted = _signals; a0013c24: e5881014 str r1, [r8, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; a0013c28: e5882018 str r2, [r8, #24] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a0013c2c: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { a0013c30: e5986014 ldr r6, [r8, #20] a0013c34: e3560000 cmp r6, #0 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; a0013c38: 13a06001 movne r6, #1 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { a0013c3c: e59f3098 ldr r3, [pc, #152] ; a0013cdc a0013c40: e5933000 ldr r3, [r3] a0013c44: e3530003 cmp r3, #3 a0013c48: 0a00000d beq a0013c84 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a0013c4c: e3a00000 mov r0, #0 a0013c50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} */ if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { a0013c54: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; a0013c58: 13a03001 movne r3, #1 a0013c5c: 15873078 strne r3, [r7, #120] ; 0x78 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a0013c60: 159f3078 ldrne r3, [pc, #120] ; a0013ce0 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; a0013c64: 05873078 streq r3, [r7, #120] ; 0x78 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; a0013c68: 15933000 ldrne r3, [r3] a0013c6c: 15873074 strne r3, [r7, #116] ; 0x74 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) a0013c70: e3160080 tst r6, #128 ; 0x80 a0013c74: 0affffdb beq a0013be8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); a0013c78: e2040080 and r0, r4, #128 ; 0x80 a0013c7c: ebffee84 bl a000f694 <_CPU_ISR_Set_level> a0013c80: eaffffd8 b a0013be8 { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || a0013c84: e3560000 cmp r6, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; a0013c88: e5993008 ldr r3, [r9, #8] if ( are_signals_pending || a0013c8c: 1a00000a bne a0013cbc a0013c90: e59f2040 ldr r2, [pc, #64] ; a0013cd8 a0013c94: e592200c ldr r2, [r2, #12] a0013c98: e1530002 cmp r3, r2 a0013c9c: 0a00000b beq a0013cd0 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { a0013ca0: e5d33070 ldrb r3, [r3, #112] ; 0x70 a0013ca4: e3530000 cmp r3, #0 a0013ca8: 1a000003 bne a0013cbc if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; a0013cac: e1a00006 mov r0, r6 <== NOT EXECUTED } a0013cb0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; a0013cb4: e3a00009 mov r0, #9 <== NOT EXECUTED a0013cb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED _Thread_Dispatch_necessary = true; a0013cbc: e3a03001 mov r3, #1 a0013cc0: e5c93004 strb r3, [r9, #4] } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); a0013cc4: eb000290 bl a001470c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; a0013cc8: e3a00000 mov r0, #0 a0013ccc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} a0013cd0: e1a00006 mov r0, r6 a0013cd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000deb4 : #include rtems_status_code rtems_task_resume( rtems_id id ) { a000deb4: e92d4010 push {r4, lr} a000deb8: e24dd004 sub sp, sp, #4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a000debc: e1a0100d mov r1, sp a000dec0: eb0008de bl a0010240 <_Thread_Get> switch ( location ) { a000dec4: e59d4000 ldr r4, [sp] ) { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a000dec8: e1a03000 mov r3, r0 switch ( location ) { a000decc: e3540000 cmp r4, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000ded0: 13a00004 movne r0, #4 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { a000ded4: 1a000004 bne a000deec */ RTEMS_INLINE_ROUTINE bool _States_Is_suspended ( States_Control the_states ) { return (the_states & STATES_SUSPENDED); a000ded8: e5933010 ldr r3, [r3, #16] case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { a000dedc: e3130002 tst r3, #2 a000dee0: 1a000003 bne a000def4 _Thread_Resume( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a000dee4: eb0008cd bl a0010220 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_INCORRECT_STATE; a000dee8: e3a0000e mov r0, #14 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000deec: e28dd004 add sp, sp, #4 a000def0: e8bd8010 pop {r4, pc} the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread ); a000def4: e3a01002 mov r1, #2 a000def8: eb0007d2 bl a000fe48 <_Thread_Clear_state> _Thread_Enable_dispatch(); a000defc: eb0008c7 bl a0010220 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000df00: e1a00004 mov r0, r4 a000df04: eafffff8 b a000deec =============================================================================== a000ca20 : rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { a000ca20: e92d4030 push {r4, r5, lr} a000ca24: e1a04001 mov r4, r1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000ca28: e59f1098 ldr r1, [pc, #152] ; a000cac8 rtems_status_code rtems_task_set_note( rtems_id id, uint32_t notepad, uint32_t note ) { a000ca2c: e1a03000 mov r3, r0 a000ca30: e24dd008 sub sp, sp, #8 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000ca34: e5d11004 ldrb r1, [r1, #4] a000ca38: e3510000 cmp r1, #0 return RTEMS_NOT_CONFIGURED; a000ca3c: 03a00016 moveq r0, #22 { register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !rtems_configuration_get_notepads_enabled() ) a000ca40: 1a000001 bne a000ca4c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000ca44: e28dd008 add sp, sp, #8 a000ca48: e8bd8030 pop {r4, r5, pc} /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) a000ca4c: e354000f cmp r4, #15 return RTEMS_INVALID_NUMBER; a000ca50: 83a0000a movhi r0, #10 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) a000ca54: 8afffffa bhi a000ca44 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000ca58: e3530000 cmp r3, #0 a000ca5c: 0a000012 beq a000caac _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { a000ca60: e59f1064 ldr r1, [pc, #100] ; a000cacc a000ca64: e5911008 ldr r1, [r1, #8] /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000ca68: e591c008 ldr ip, [r1, #8] a000ca6c: e153000c cmp r3, ip a000ca70: 0a00000f beq a000cab4 api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); a000ca74: e28d1004 add r1, sp, #4 a000ca78: e58d2000 str r2, [sp] a000ca7c: eb00099b bl a000f0f0 <_Thread_Get> switch ( location ) { a000ca80: e59d5004 ldr r5, [sp, #4] a000ca84: e59d2000 ldr r2, [sp] a000ca88: e3550000 cmp r5, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000ca8c: 13a00004 movne r0, #4 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { a000ca90: 1affffeb bne a000ca44 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; a000ca94: e59030ec ldr r3, [r0, #236] ; 0xec a000ca98: e2844008 add r4, r4, #8 a000ca9c: e7832104 str r2, [r3, r4, lsl #2] _Thread_Enable_dispatch(); a000caa0: eb00098a bl a000f0d0 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000caa4: e1a00005 mov r0, r5 a000caa8: eaffffe5 b a000ca44 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || a000caac: e59f3018 ldr r3, [pc, #24] ; a000cacc <== NOT EXECUTED a000cab0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; a000cab4: e59130ec ldr r3, [r1, #236] ; 0xec <== NOT EXECUTED a000cab8: e2844008 add r4, r4, #8 <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000cabc: e3a00000 mov r0, #0 <== NOT EXECUTED */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; a000cac0: e7832104 str r2, [r3, r4, lsl #2] <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000cac4: eaffffde b a000ca44 <== NOT EXECUTED =============================================================================== a000ef58 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { a000ef58: e92d4030 push {r4, r5, lr} register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && a000ef5c: e2514000 subs r4, r1, #0 rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { a000ef60: e24dd004 sub sp, sp, #4 a000ef64: e1a05002 mov r5, r2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && a000ef68: 0a000004 beq a000ef80 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); a000ef6c: e59f3078 ldr r3, [pc, #120] ; a000efec a000ef70: e5d33000 ldrb r3, [r3] */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && a000ef74: e1540003 cmp r4, r3 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; a000ef78: 83a00013 movhi r0, #19 a000ef7c: 8a000018 bhi a000efe4 if ( !old_priority ) a000ef80: e3550000 cmp r5, #0 return RTEMS_INVALID_ADDRESS; a000ef84: 03a00009 moveq r0, #9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) a000ef88: 0a000015 beq a000efe4 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); a000ef8c: e1a0100d mov r1, sp a000ef90: eb000963 bl a0011524 <_Thread_Get> switch ( location ) { a000ef94: e59d3000 ldr r3, [sp] a000ef98: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000ef9c: 13a00004 movne r0, #4 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { a000efa0: 1a00000f bne a000efe4 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; a000efa4: e5903014 ldr r3, [r0, #20] if ( new_priority != RTEMS_CURRENT_PRIORITY ) { a000efa8: e3540000 cmp r4, #0 the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; a000efac: e5853000 str r3, [r5] if ( new_priority != RTEMS_CURRENT_PRIORITY ) { a000efb0: 0a000009 beq a000efdc the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || a000efb4: e590301c ldr r3, [r0, #28] case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { the_thread->real_priority = new_priority; a000efb8: e5804018 str r4, [r0, #24] if ( the_thread->resource_count == 0 || a000efbc: e3530000 cmp r3, #0 a000efc0: 0a000002 beq a000efd0 a000efc4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED a000efc8: e1540003 cmp r4, r3 <== NOT EXECUTED a000efcc: 2a000002 bcs a000efdc <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); a000efd0: e1a01004 mov r1, r4 a000efd4: e3a02000 mov r2, #0 a000efd8: eb000816 bl a0011038 <_Thread_Change_priority> } _Thread_Enable_dispatch(); a000efdc: eb000948 bl a0011504 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000efe0: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000efe4: e28dd004 add sp, sp, #4 a000efe8: e8bd8030 pop {r4, r5, pc} =============================================================================== a000ac38 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { a000ac38: e92d4070 push {r4, r5, r6, lr} register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) a000ac3c: e2516000 subs r6, r1, #0 rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { a000ac40: e24dd008 sub sp, sp, #8 a000ac44: e1a05002 mov r5, r2 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; a000ac48: 03a00009 moveq r0, #9 ) { register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) a000ac4c: 0a00000e beq a000ac8c return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); a000ac50: e28d1004 add r1, sp, #4 a000ac54: eb0008f4 bl a000d02c <_Thread_Get> switch ( location ) { a000ac58: e59d4004 ldr r4, [sp, #4] a000ac5c: e3540000 cmp r4, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000ac60: 13a00004 movne r0, #4 if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { a000ac64: 1a000008 bne a000ac8c case OBJECTS_LOCAL: if ( _Thread_Start( a000ac68: e1a01004 mov r1, r4 a000ac6c: e1a02006 mov r2, r6 a000ac70: e1a03004 mov r3, r4 a000ac74: e58d5000 str r5, [sp] a000ac78: eb000b4e bl a000d9b8 <_Thread_Start> a000ac7c: e3500000 cmp r0, #0 a000ac80: 1a000003 bne a000ac94 the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a000ac84: eb0008e0 bl a000d00c <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_INCORRECT_STATE; a000ac88: e3a0000e mov r0, #14 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000ac8c: e28dd008 add sp, sp, #8 a000ac90: e8bd8070 pop {r4, r5, r6, pc} switch ( location ) { case OBJECTS_LOCAL: if ( _Thread_Start( the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) { _Thread_Enable_dispatch(); a000ac94: eb0008dc bl a000d00c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000ac98: e1a00004 mov r0, r4 a000ac9c: eafffffa b a000ac8c =============================================================================== a000e174 : #include rtems_status_code rtems_task_suspend( rtems_id id ) { a000e174: e92d4010 push {r4, lr} a000e178: e24dd004 sub sp, sp, #4 register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a000e17c: e1a0100d mov r1, sp a000e180: eb0008aa bl a0010430 <_Thread_Get> switch ( location ) { a000e184: e59d3000 ldr r3, [sp] ) { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); a000e188: e1a02000 mov r2, r0 switch ( location ) { a000e18c: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000e190: 13a00004 movne r0, #4 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { a000e194: 1a000004 bne a000e1ac */ RTEMS_INLINE_ROUTINE bool _States_Is_suspended ( States_Control the_states ) { return (the_states & STATES_SUSPENDED); a000e198: e5924010 ldr r4, [r2, #16] case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { a000e19c: e2144002 ands r4, r4, #2 a000e1a0: 0a000003 beq a000e1b4 _Thread_Suspend( the_thread ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); a000e1a4: eb000899 bl a0010410 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_ALREADY_SUSPENDED; a000e1a8: e3a0000f mov r0, #15 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000e1ac: e28dd004 add sp, sp, #4 a000e1b0: e8bd8010 pop {r4, pc} the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); a000e1b4: e3a01002 mov r1, #2 a000e1b8: eb000ab6 bl a0010c98 <_Thread_Set_state> _Thread_Enable_dispatch(); a000e1bc: eb000893 bl a0010410 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000e1c0: e1a00004 mov r0, r4 a000e1c4: eafffff8 b a000e1ac =============================================================================== a0009348 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { a0009348: e92d4070 push {r4, r5, r6, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) a000934c: e2514000 subs r4, r1, #0 rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { a0009350: e24dd004 sub sp, sp, #4 a0009354: e1a05002 mov r5, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; a0009358: 03a00009 moveq r0, #9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) a000935c: 0a000013 beq a00093b0 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); a0009360: e1a0100d mov r1, sp a0009364: eb000822 bl a000b3f4 <_Thread_Get> switch (location) { a0009368: e59d3000 ldr r3, [sp] rtems_task_variable_t *tvp, *new; if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); a000936c: e1a06000 mov r6, r0 switch (location) { a0009370: e3530000 cmp r3, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0009374: 13a00004 movne r0, #4 if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { a0009378: 1a00000c bne a00093b0 case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; a000937c: e59630f8 ldr r3, [r6, #248] ; 0xf8 while (tvp) { a0009380: e3530000 cmp r3, #0 a0009384: 1a000003 bne a0009398 a0009388: ea00000a b a00093b8 if (tvp->ptr == ptr) { tvp->dtor = dtor; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; a000938c: e5933000 ldr r3, [r3] <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; while (tvp) { a0009390: e3530000 cmp r3, #0 <== NOT EXECUTED a0009394: 0a000007 beq a00093b8 <== NOT EXECUTED if (tvp->ptr == ptr) { a0009398: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED a000939c: e1520004 cmp r2, r4 <== NOT EXECUTED a00093a0: 1afffff9 bne a000938c <== NOT EXECUTED tvp->dtor = dtor; a00093a4: e5835010 str r5, [r3, #16] <== NOT EXECUTED _Thread_Enable_dispatch(); a00093a8: eb000809 bl a000b3d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a00093ac: e3a00000 mov r0, #0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a00093b0: e28dd004 add sp, sp, #4 a00093b4: e8bd8070 pop {r4, r5, r6, pc} } /* * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) a00093b8: e3a00014 mov r0, #20 a00093bc: eb000bf4 bl a000c394 <_Workspace_Allocate> _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { a00093c0: e3500000 cmp r0, #0 a00093c4: 0a000009 beq a00093f0 _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; a00093c8: e5942000 ldr r2, [r4] new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; a00093cc: e59630f8 ldr r3, [r6, #248] ; 0xf8 if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; new->ptr = ptr; a00093d0: e5804004 str r4, [r0, #4] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; a00093d4: e5802008 str r2, [r0, #8] new->ptr = ptr; new->dtor = dtor; a00093d8: e5805010 str r5, [r0, #16] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; a00093dc: e5803000 str r3, [r0] the_thread->task_variables = new; a00093e0: e58600f8 str r0, [r6, #248] ; 0xf8 _Thread_Enable_dispatch(); a00093e4: eb0007fa bl a000b3d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a00093e8: e3a00000 mov r0, #0 a00093ec: eaffffef b a00093b0 * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); a00093f0: eb0007f7 bl a000b3d4 <_Thread_Enable_dispatch> return RTEMS_NO_MEMORY; a00093f4: e3a0001a mov r0, #26 a00093f8: eaffffec b a00093b0 =============================================================================== a00093fc : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { a00093fc: e92d4010 push {r4, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) a0009400: e2514000 subs r4, r1, #0 rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { a0009404: e24dd004 sub sp, sp, #4 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; a0009408: 03a00009 moveq r0, #9 { Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) a000940c: 0a000015 beq a0009468 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); a0009410: e1a0100d mov r1, sp a0009414: eb0007f6 bl a000b3f4 <_Thread_Get> switch (location) { a0009418: e59d3000 ldr r3, [sp] a000941c: e3530000 cmp r3, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a0009420: 13a00004 movne r0, #4 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { a0009424: 1a00000f bne a0009468 case OBJECTS_LOCAL: tvp = the_thread->task_variables; a0009428: e59030f8 ldr r3, [r0, #248] ; 0xf8 while (tvp) { a000942c: e3530000 cmp r3, #0 a0009430: 0a00000a beq a0009460 if (tvp->ptr == ptr) { a0009434: e5932004 ldr r2, [r3, #4] a0009438: e1520004 cmp r2, r4 a000943c: 1a000004 bne a0009454 a0009440: ea000010 b a0009488 a0009444: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED a0009448: e1520004 cmp r2, r4 <== NOT EXECUTED a000944c: 0a000007 beq a0009470 <== NOT EXECUTED a0009450: e1a03001 mov r3, r1 <== NOT EXECUTED _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; a0009454: e5931000 ldr r1, [r3] <== NOT EXECUTED the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { a0009458: e3510000 cmp r1, #0 <== NOT EXECUTED a000945c: 1afffff8 bne a0009444 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); a0009460: eb0007db bl a000b3d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; a0009464: e3a00009 mov r0, #9 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a0009468: e28dd004 add sp, sp, #4 a000946c: e8bd8010 pop {r4, pc} case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; a0009470: e5912000 ldr r2, [r1] <== NOT EXECUTED a0009474: e5832000 str r2, [r3] <== NOT EXECUTED else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); a0009478: eb000028 bl a0009520 <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); a000947c: eb0007d4 bl a000b3d4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a0009480: e3a00000 mov r0, #0 a0009484: eafffff7 b a0009468 while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; a0009488: e5932000 ldr r2, [r3] a000948c: e1a01003 mov r1, r3 a0009490: e58020f8 str r2, [r0, #248] ; 0xf8 a0009494: eafffff7 b a0009478 =============================================================================== a0009498 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { a0009498: e92d4030 push {r4, r5, lr} Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) a000949c: e2514000 subs r4, r1, #0 rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { a00094a0: e24dd004 sub sp, sp, #4 a00094a4: e1a05002 mov r5, r2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) a00094a8: 0a000016 beq a0009508 return RTEMS_INVALID_ADDRESS; if ( !result ) a00094ac: e3520000 cmp r2, #0 a00094b0: 0a000014 beq a0009508 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); a00094b4: e1a0100d mov r1, sp a00094b8: eb0007cd bl a000b3f4 <_Thread_Get> switch (location) { a00094bc: e59d3000 ldr r3, [sp] a00094c0: e3530000 cmp r3, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a00094c4: 13a00004 movne r0, #4 if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { a00094c8: 1a00000f bne a000950c case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; a00094cc: e59030f8 ldr r3, [r0, #248] ; 0xf8 while (tvp) { a00094d0: e3530000 cmp r3, #0 a00094d4: 1a000003 bne a00094e8 a00094d8: ea00000d b a0009514 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; a00094dc: e5933000 ldr r3, [r3] <== NOT EXECUTED case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { a00094e0: e3530000 cmp r3, #0 <== NOT EXECUTED a00094e4: 0a00000a beq a0009514 <== NOT EXECUTED if (tvp->ptr == ptr) { a00094e8: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED a00094ec: e1520004 cmp r2, r4 <== NOT EXECUTED a00094f0: 1afffff9 bne a00094dc <== NOT EXECUTED /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; a00094f4: e593300c ldr r3, [r3, #12] <== NOT EXECUTED a00094f8: e5853000 str r3, [r5] <== NOT EXECUTED _Thread_Enable_dispatch(); a00094fc: eb0007b4 bl a000b3d4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a0009500: e3a00000 mov r0, #0 <== NOT EXECUTED a0009504: ea000000 b a000950c <== NOT EXECUTED if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; a0009508: e3a00009 mov r0, #9 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000950c: e28dd004 add sp, sp, #4 a0009510: e8bd8030 pop {r4, r5, pc} _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); a0009514: eb0007ae bl a000b3d4 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; a0009518: e3a00009 mov r0, #9 a000951c: eafffffa b a000950c =============================================================================== a000aca0 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000aca0: e59f307c ldr r3, [pc, #124] ; a000ad24 #include rtems_status_code rtems_task_wake_after( rtems_interval ticks ) { a000aca4: e92d4030 push {r4, r5, lr} a000aca8: e5932000 ldr r2, [r3] a000acac: e1a04000 mov r4, r0 ++level; a000acb0: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a000acb4: e5832000 str r2, [r3] _Thread_Disable_dispatch(); if ( ticks == 0 ) { a000acb8: e3500000 cmp r0, #0 a000acbc: 0a000012 beq a000ad0c _Scheduler_Yield(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); a000acc0: e59f5060 ldr r5, [pc, #96] ; a000ad28 a000acc4: e3a01008 mov r1, #8 a000acc8: e5950008 ldr r0, [r5, #8] a000accc: eb000af0 bl a000d894 <_Thread_Set_state> _Watchdog_Initialize( &_Thread_Executing->Timer, a000acd0: e5951008 ldr r1, [r5, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a000acd4: e59f0050 ldr r0, [pc, #80] ; a000ad2c Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000acd8: e3a03000 mov r3, #0 _Thread_Disable_dispatch(); if ( ticks == 0 ) { _Scheduler_Yield(); } else { _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); _Watchdog_Initialize( a000acdc: e5912008 ldr r2, [r1, #8] a000ace0: e5813050 str r3, [r1, #80] ; 0x50 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; a000ace4: e581306c str r3, [r1, #108] ; 0x6c void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; a000ace8: e5812068 str r2, [r1, #104] ; 0x68 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a000acec: e5810064 str r0, [r1, #100] ; 0x64 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a000acf0: e5814054 str r4, [r1, #84] ; 0x54 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a000acf4: e59f0034 ldr r0, [pc, #52] ; a000ad30 a000acf8: e2811048 add r1, r1, #72 ; 0x48 a000acfc: eb000bbe bl a000dbfc <_Watchdog_Insert> _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); a000ad00: eb0008c1 bl a000d00c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } a000ad04: e3a00000 mov r0, #0 <== NOT EXECUTED a000ad08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); a000ad0c: e59f3020 ldr r3, [pc, #32] ; a000ad34 a000ad10: e593300c ldr r3, [r3, #12] a000ad14: e12fff33 blx r3 _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); } _Thread_Enable_dispatch(); a000ad18: eb0008bb bl a000d00c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; } a000ad1c: e3a00000 mov r0, #0 a000ad20: e8bd8030 pop {r4, r5, pc} =============================================================================== a000ba14 : #include rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { a000ba14: e92d40f0 push {r4, r5, r6, r7, lr} Watchdog_Interval seconds; if ( !_TOD.is_set ) a000ba18: e59f40d8 ldr r4, [pc, #216] ; a000baf8 #include rtems_status_code rtems_task_wake_when( rtems_time_of_day *time_buffer ) { a000ba1c: e1a06000 mov r6, r0 Watchdog_Interval seconds; if ( !_TOD.is_set ) a000ba20: e5d43014 ldrb r3, [r4, #20] a000ba24: e3530000 cmp r3, #0 a000ba28: 1a000001 bne a000ba34 return RTEMS_NOT_DEFINED; a000ba2c: e3a0000b mov r0, #11 <== NOT EXECUTED a000ba30: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( !time_buffer ) a000ba34: e3500000 cmp r0, #0 a000ba38: 0a000006 beq a000ba58 return RTEMS_INVALID_ADDRESS; time_buffer->ticks = 0; a000ba3c: e3a05000 mov r5, #0 a000ba40: e5805018 str r5, [r0, #24] if ( !_TOD_Validate( time_buffer ) ) a000ba44: ebfffcd1 bl a000ad90 <_TOD_Validate> a000ba48: e1500005 cmp r0, r5 a000ba4c: 1a000003 bne a000ba60 return RTEMS_INVALID_CLOCK; a000ba50: e3a00014 mov r0, #20 <== NOT EXECUTED a000ba54: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !time_buffer ) return RTEMS_INVALID_ADDRESS; a000ba58: e3a00009 mov r0, #9 <== NOT EXECUTED a000ba5c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED time_buffer->ticks = 0; if ( !_TOD_Validate( time_buffer ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( time_buffer ); a000ba60: e1a00006 mov r0, r6 a000ba64: ebfffc9e bl a000ace4 <_TOD_To_seconds> static inline uint32_t _Timestamp64_implementation_Get_seconds( const Timestamp64_Control *_time ) { return (uint32_t) (*_time / 1000000000L); a000ba68: e59f208c ldr r2, [pc, #140] ; a000bafc a000ba6c: e1a06000 mov r6, r0 a000ba70: e3a03000 mov r3, #0 a000ba74: e8940003 ldm r4, {r0, r1} a000ba78: eb004485 bl a001cc94 <__divdi3> if ( seconds <= _TOD_Seconds_since_epoch() ) a000ba7c: e1560000 cmp r6, r0 a000ba80: 8a000001 bhi a000ba8c return RTEMS_INVALID_CLOCK; a000ba84: e3a00014 mov r0, #20 <== NOT EXECUTED &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a000ba88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000ba8c: e59f306c ldr r3, [pc, #108] ; a000bb00 a000ba90: e5932000 ldr r2, [r3] ++level; a000ba94: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a000ba98: e5832000 str r2, [r3] if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); a000ba9c: e59f7060 ldr r7, [pc, #96] ; a000bb04 a000baa0: e3a01010 mov r1, #16 a000baa4: e5970008 ldr r0, [r7, #8] a000baa8: eb000b1c bl a000e720 <_Thread_Set_state> a000baac: e8940003 ldm r4, {r0, r1} _Watchdog_Initialize( &_Thread_Executing->Timer, a000bab0: e5974008 ldr r4, [r7, #8] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; a000bab4: e59fe04c ldr lr, [pc, #76] ; a000bb08 a000bab8: e59f203c ldr r2, [pc, #60] ; a000bafc if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; _Thread_Disable_dispatch(); _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME ); _Watchdog_Initialize( a000babc: e594c008 ldr ip, [r4, #8] a000bac0: e3a03000 mov r3, #0 a000bac4: e584e064 str lr, [r4, #100] ; 0x64 the_watchdog->id = id; a000bac8: e584c068 str ip, [r4, #104] ; 0x68 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000bacc: e5845050 str r5, [r4, #80] ; 0x50 the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; a000bad0: e584506c str r5, [r4, #108] ; 0x6c a000bad4: eb00446e bl a001cc94 <__divdi3> &_Thread_Executing->Timer, _Thread_Delay_ended, _Thread_Executing->Object.id, NULL ); _Watchdog_Insert_seconds( a000bad8: e0606006 rsb r6, r0, r6 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); a000badc: e2841048 add r1, r4, #72 ; 0x48 a000bae0: e59f0024 ldr r0, [pc, #36] ; a000bb0c Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a000bae4: e5846054 str r6, [r4, #84] ; 0x54 _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); a000bae8: eb000c14 bl a000eb40 <_Watchdog_Insert> &_Thread_Executing->Timer, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); a000baec: eb0008e9 bl a000de98 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000baf0: e1a00005 mov r0, r5 <== NOT EXECUTED a000baf4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a000acc0 : rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { a000acc0: e92d4030 push {r4, r5, lr} Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) a000acc4: e2504000 subs r4, r0, #0 rtems_status_code rtems_timer_create( rtems_name name, rtems_id *id ) { a000acc8: e24dd004 sub sp, sp, #4 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; a000accc: 03a00003 moveq r0, #3 rtems_id *id ) { Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) a000acd0: 1a000001 bne a000acdc ); *id = the_timer->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } a000acd4: e28dd004 add sp, sp, #4 a000acd8: e8bd8030 pop {r4, r5, pc} Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a000acdc: e3510000 cmp r1, #0 return RTEMS_INVALID_ADDRESS; a000ace0: 03a00009 moveq r0, #9 Timer_Control *the_timer; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) a000ace4: 0afffffa beq a000acd4 * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000ace8: e59f3070 ldr r3, [pc, #112] ; a000ad60 a000acec: e5932000 ldr r2, [r3] ++level; a000acf0: e2822001 add r2, r2, #1 _Thread_Dispatch_disable_level = level; a000acf4: e5832000 str r2, [r3] * This function allocates a timer control block from * the inactive chain of free timer control blocks. */ RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void ) { return (Timer_Control *) _Objects_Allocate( &_Timer_Information ); a000acf8: e59f5064 ldr r5, [pc, #100] ; a000ad64 a000acfc: e58d1000 str r1, [sp] a000ad00: e1a00005 mov r0, r5 a000ad04: eb000403 bl a000bd18 <_Objects_Allocate> _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { a000ad08: e3500000 cmp r0, #0 a000ad0c: e59d1000 ldr r1, [sp] a000ad10: 0a00000f beq a000ad54 Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), a000ad14: e5903008 ldr r3, [r0, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000ad18: e595201c ldr r2, [r5, #28] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_timer->the_class = TIMER_DORMANT; a000ad1c: e3a0e004 mov lr, #4 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000ad20: e3a05000 mov r5, #0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a000ad24: e1a0c803 lsl ip, r3, #16 a000ad28: e580e038 str lr, [r0, #56] ; 0x38 a000ad2c: e5805018 str r5, [r0, #24] the_watchdog->routine = routine; a000ad30: e580502c str r5, [r0, #44] ; 0x2c the_watchdog->id = id; a000ad34: e5805030 str r5, [r0, #48] ; 0x30 the_watchdog->user_data = user_data; a000ad38: e5805034 str r5, [r0, #52] ; 0x34 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a000ad3c: e782072c str r0, [r2, ip, lsr #14] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a000ad40: e580400c str r4, [r0, #12] &_Timer_Information, &the_timer->Object, (Objects_Name) name ); *id = the_timer->Object.id; a000ad44: e5813000 str r3, [r1] _Thread_Enable_dispatch(); a000ad48: eb0008cc bl a000d080 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000ad4c: e1a00005 mov r0, r5 a000ad50: eaffffdf b a000acd4 _Thread_Disable_dispatch(); /* to prevent deletion */ the_timer = _Timer_Allocate(); if ( !the_timer ) { _Thread_Enable_dispatch(); a000ad54: eb0008c9 bl a000d080 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_TOO_MANY; a000ad58: e3a00005 mov r0, #5 <== NOT EXECUTED a000ad5c: eaffffdc b a000acd4 <== NOT EXECUTED =============================================================================== a000ad68 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { a000ad68: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) a000ad6c: e2516000 subs r6, r1, #0 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { a000ad70: e1a05000 mov r5, r0 a000ad74: e24dd004 sub sp, sp, #4 a000ad78: e1a04002 mov r4, r2 a000ad7c: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; a000ad80: 03a0000a moveq r0, #10 { Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) a000ad84: 1a000001 bne a000ad90 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a000ad88: e28dd004 add sp, sp, #4 a000ad8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) a000ad90: e3520000 cmp r2, #0 return RTEMS_INVALID_ADDRESS; a000ad94: 03a00009 moveq r0, #9 ISR_Level level; if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; if ( !routine ) a000ad98: 0afffffa beq a000ad88 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) a000ad9c: e59f0084 ldr r0, [pc, #132] ; a000ae28 a000ada0: e1a01005 mov r1, r5 a000ada4: e1a0200d mov r2, sp a000ada8: eb000511 bl a000c1f4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { a000adac: e59d3000 ldr r3, [sp] a000adb0: e1a08000 mov r8, r0 a000adb4: e3530000 cmp r3, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a000adb8: 13a00004 movne r0, #4 if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { a000adbc: 1afffff1 bne a000ad88 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); a000adc0: e288a010 add sl, r8, #16 a000adc4: e1a0000a mov r0, sl a000adc8: eb000c15 bl a000de24 <_Watchdog_Remove> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a000adcc: e10f2000 mrs r2, CPSR a000add0: e3823080 orr r3, r2, #128 ; 0x80 a000add4: 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 ) { a000add8: e5983018 ldr r3, [r8, #24] a000addc: e3530000 cmp r3, #0 a000ade0: 1a00000c bne a000ae18 /* * 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; a000ade4: e5883038 str r3, [r8, #56] ; 0x38 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a000ade8: e5883018 str r3, [r8, #24] the_watchdog->routine = routine; a000adec: e588402c str r4, [r8, #44] ; 0x2c the_watchdog->id = id; a000adf0: e5885030 str r5, [r8, #48] ; 0x30 the_watchdog->user_data = user_data; a000adf4: e5887034 str r7, [r8, #52] ; 0x34 static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a000adf8: e129f002 msr CPSR_fc, r2 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a000adfc: e59f0028 ldr r0, [pc, #40] ; a000ae2c a000ae00: e1a0100a mov r1, sl Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a000ae04: e588601c str r6, [r8, #28] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); a000ae08: eb000b98 bl a000dc70 <_Watchdog_Insert> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); _Watchdog_Insert_ticks( &the_timer->Ticker, ticks ); _Thread_Enable_dispatch(); a000ae0c: eb00089b bl a000d080 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a000ae10: e3a00000 mov r0, #0 a000ae14: eaffffdb b a000ad88 a000ae18: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); _Thread_Enable_dispatch(); a000ae1c: eb000897 bl a000d080 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a000ae20: e3a00000 mov r0, #0 <== NOT EXECUTED a000ae24: eaffffd7 b a000ad88 <== NOT EXECUTED =============================================================================== a001a96c : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001a96c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD.is_set ) a001a970: e59f40ec ldr r4, [pc, #236] ; a001aa64 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001a974: e1a06000 mov r6, r0 a001a978: e24dd008 sub sp, sp, #8 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD.is_set ) a001a97c: e5d40014 ldrb r0, [r4, #20] rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001a980: e1a05002 mov r5, r2 a001a984: e1a07003 mov r7, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD.is_set ) a001a988: e3500000 cmp r0, #0 return RTEMS_NOT_DEFINED; a001a98c: 03a0000b moveq r0, #11 { Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD.is_set ) a001a990: 1a000001 bne a001a99c case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001a994: e28dd008 add sp, sp, #8 a001a998: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} rtems_interval seconds; if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) a001a99c: e1a00001 mov r0, r1 a001a9a0: e58d1000 str r1, [sp] a001a9a4: ebfff42b bl a0017a58 <_TOD_Validate> a001a9a8: e3500000 cmp r0, #0 a001a9ac: e59d1000 ldr r1, [sp] a001a9b0: 1a000001 bne a001a9bc if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; a001a9b4: e3a00014 mov r0, #20 <== NOT EXECUTED a001a9b8: eafffff5 b a001a994 <== NOT EXECUTED return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) a001a9bc: e3550000 cmp r5, #0 return RTEMS_INVALID_ADDRESS; a001a9c0: 03a00009 moveq r0, #9 return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) a001a9c4: 0afffff2 beq a001a994 return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); a001a9c8: e1a00001 mov r0, r1 a001a9cc: ebfff3f6 bl a00179ac <_TOD_To_seconds> a001a9d0: e59f2090 ldr r2, [pc, #144] ; a001aa68 a001a9d4: e1a08000 mov r8, r0 a001a9d8: e3a03000 mov r3, #0 a001a9dc: e8940003 ldm r4, {r0, r1} a001a9e0: eb004eb6 bl a002e4c0 <__divdi3> if ( seconds <= _TOD_Seconds_since_epoch() ) a001a9e4: e1580000 cmp r8, r0 a001a9e8: 9afffff1 bls a001a9b4 a001a9ec: e59f0078 ldr r0, [pc, #120] ; a001aa6c a001a9f0: e1a01006 mov r1, r6 a001a9f4: e28d2004 add r2, sp, #4 a001a9f8: eb000b8c bl a001d830 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001a9fc: e59d9004 ldr r9, [sp, #4] a001aa00: e1a0a000 mov sl, r0 a001aa04: e3590000 cmp r9, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001aa08: 13a00004 movne r0, #4 seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001aa0c: 1affffe0 bne a001a994 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); a001aa10: e28ab010 add fp, sl, #16 a001aa14: e1a0000b mov r0, fp a001aa18: eb001327 bl a001f6bc <_Watchdog_Remove> a001aa1c: e8940003 ldm r4, {r0, r1} the_timer->the_class = TIMER_TIME_OF_DAY; a001aa20: e3a0c002 mov ip, #2 a001aa24: e59f203c ldr r2, [pc, #60] ; a001aa68 a001aa28: e3a03000 mov r3, #0 a001aa2c: e58ac038 str ip, [sl, #56] ; 0x38 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a001aa30: e58a9018 str r9, [sl, #24] the_watchdog->routine = routine; a001aa34: e58a502c str r5, [sl, #44] ; 0x2c the_watchdog->id = id; a001aa38: e58a6030 str r6, [sl, #48] ; 0x30 the_watchdog->user_data = user_data; a001aa3c: e58a7034 str r7, [sl, #52] ; 0x34 a001aa40: eb004e9e bl a002e4c0 <__divdi3> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( a001aa44: e0608008 rsb r8, r0, r8 ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); a001aa48: e1a0100b mov r1, fp a001aa4c: e59f001c ldr r0, [pc, #28] ; a001aa70 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; a001aa50: e58a801c str r8, [sl, #28] _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); a001aa54: eb0012ab bl a001f508 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); a001aa58: eb000f38 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a001aa5c: e1a00009 mov r0, r9 a001aa60: eaffffcb b a001a994 =============================================================================== a001aa74 : rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { a001aa74: e92d4030 push {r4, r5, lr} <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) a001aa78: e2514000 subs r4, r1, #0 <== NOT EXECUTED rtems_status_code rtems_timer_get_information( rtems_id id, rtems_timer_information *the_info ) { a001aa7c: e24dd004 sub sp, sp, #4 <== NOT EXECUTED a001aa80: e1a01000 mov r1, r0 <== NOT EXECUTED Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) return RTEMS_INVALID_ADDRESS; a001aa84: 03a00009 moveq r0, #9 <== NOT EXECUTED ) { Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) a001aa88: 0a00000e beq a001aac8 <== NOT EXECUTED a001aa8c: e59f003c ldr r0, [pc, #60] ; a001aad0 <== NOT EXECUTED a001aa90: e1a0200d mov r2, sp <== NOT EXECUTED a001aa94: eb000b65 bl a001d830 <_Objects_Get> <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001aa98: e59d5000 ldr r5, [sp] <== NOT EXECUTED a001aa9c: e3550000 cmp r5, #0 <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001aaa0: 13a00004 movne r0, #4 <== NOT EXECUTED if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001aaa4: 1a000007 bne a001aac8 <== NOT EXECUTED case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; a001aaa8: e590c038 ldr ip, [r0, #56] ; 0x38 <== NOT EXECUTED the_info->initial = the_timer->Ticker.initial; a001aaac: e590101c ldr r1, [r0, #28] <== NOT EXECUTED the_info->start_time = the_timer->Ticker.start_time; a001aab0: e5902024 ldr r2, [r0, #36] ; 0x24 <== NOT EXECUTED the_info->stop_time = the_timer->Ticker.stop_time; a001aab4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; a001aab8: e584c000 str ip, [r4] <== NOT EXECUTED the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; the_info->stop_time = the_timer->Ticker.stop_time; a001aabc: e984000e stmib r4, {r1, r2, r3} <== NOT EXECUTED _Thread_Enable_dispatch(); a001aac0: eb000f1e bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a001aac4: e1a00005 mov r0, r5 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001aac8: e28dd004 add sp, sp, #4 <== NOT EXECUTED a001aacc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a001ab04 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { a001ab04: e92d4070 push {r4, r5, r6, lr} a001ab08: e24dd004 sub sp, sp, #4 a001ab0c: e1a01000 mov r1, r0 a001ab10: e1a0200d mov r2, sp a001ab14: e59f0088 ldr r0, [pc, #136] ; a001aba4 a001ab18: eb000b44 bl a001d830 <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ab1c: e59d3000 ldr r3, [sp] a001ab20: e1a05000 mov r5, r0 a001ab24: e3530000 cmp r3, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001ab28: 13a04004 movne r4, #4 Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ab2c: 1a000006 bne a001ab4c case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { a001ab30: e5904038 ldr r4, [r0, #56] ; 0x38 a001ab34: e3540000 cmp r4, #0 a001ab38: 0a000006 beq a001ab58 _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { a001ab3c: e3540001 cmp r4, #1 <== NOT EXECUTED /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; a001ab40: 13a0400b movne r4, #11 <== NOT EXECUTED case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { a001ab44: 0a00000b beq a001ab78 <== NOT EXECUTED * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); a001ab48: eb000efc bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001ab4c: e1a00004 mov r0, r4 a001ab50: e28dd004 add sp, sp, #4 a001ab54: e8bd8070 pop {r4, r5, r6, pc} the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); a001ab58: e2805010 add r5, r0, #16 a001ab5c: e1a00005 mov r0, r5 a001ab60: eb0012d5 bl a001f6bc <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); a001ab64: e59f003c ldr r0, [pc, #60] ; a001aba8 a001ab68: e1a01005 mov r1, r5 a001ab6c: eb001265 bl a001f508 <_Watchdog_Insert> * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); a001ab70: eb000ef2 bl a001e740 <_Thread_Enable_dispatch> a001ab74: eafffff4 b a001ab4c rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; a001ab78: e1a04003 mov r4, r3 <== NOT EXECUTED case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; a001ab7c: e59f3028 ldr r3, [pc, #40] ; a001abac <== NOT EXECUTED if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); a001ab80: e2800010 add r0, r0, #16 <== NOT EXECUTED case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; a001ab84: e5936000 ldr r6, [r3] <== NOT EXECUTED if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); a001ab88: eb0012cb bl a001f6bc <_Watchdog_Remove> <== NOT EXECUTED (*timer_server->schedule_operation)( timer_server, the_timer ); a001ab8c: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED a001ab90: e1a00006 mov r0, r6 <== NOT EXECUTED a001ab94: e1a01005 mov r1, r5 <== NOT EXECUTED a001ab98: e12fff33 blx r3 <== NOT EXECUTED * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); a001ab9c: eb000ee7 bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED a001aba0: eaffffe9 b a001ab4c <== NOT EXECUTED =============================================================================== a001abb0 : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { a001abb0: e92d41f0 push {r4, r5, r6, r7, r8, lr} a001abb4: e1a06001 mov r6, r1 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; a001abb8: e59f10d0 ldr r1, [pc, #208] ; a001ac90 rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { a001abbc: e1a07000 mov r7, r0 a001abc0: e24dd008 sub sp, sp, #8 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; a001abc4: e5914000 ldr r4, [r1] rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { a001abc8: e1a05002 mov r5, r2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) a001abcc: e3540000 cmp r4, #0 return RTEMS_INCORRECT_STATE; a001abd0: 03a0000e moveq r0, #14 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) a001abd4: 0a000005 beq a001abf0 return RTEMS_INCORRECT_STATE; if ( !routine ) a001abd8: e3520000 cmp r2, #0 return RTEMS_INVALID_ADDRESS; a001abdc: 03a00009 moveq r0, #9 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !routine ) a001abe0: 0a000002 beq a001abf0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) a001abe4: e3560000 cmp r6, #0 return RTEMS_INVALID_NUMBER; a001abe8: 03a0000a moveq r0, #10 return RTEMS_INCORRECT_STATE; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) a001abec: 1a000001 bne a001abf8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001abf0: e28dd008 add sp, sp, #8 a001abf4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a001abf8: e28d2004 add r2, sp, #4 a001abfc: e59f0090 ldr r0, [pc, #144] ; a001ac94 a001ac00: e1a01007 mov r1, r7 a001ac04: e58d3000 str r3, [sp] a001ac08: eb000b08 bl a001d830 <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ac0c: e59d2004 ldr r2, [sp, #4] a001ac10: e1a08000 mov r8, r0 a001ac14: e3520000 cmp r2, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001ac18: 13a00004 movne r0, #4 if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ac1c: 1afffff3 bne a001abf0 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); a001ac20: e2880010 add r0, r8, #16 a001ac24: eb0012a4 bl a001f6bc <_Watchdog_Remove> uint32_t level; #if defined(ARM_MULTILIB_ARCH_V4) uint32_t arm_switch_reg; __asm__ volatile ( a001ac28: e10f1000 mrs r1, CPSR a001ac2c: e3812080 orr r2, r1, #128 ; 0x80 a001ac30: e129f002 msr CPSR_fc, r2 /* * 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 ) { a001ac34: e5982018 ldr r2, [r8, #24] a001ac38: e59d3000 ldr r3, [sp] a001ac3c: e3520000 cmp r2, #0 a001ac40: 1a00000e bne a001ac80 /* * 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; a001ac44: e3a00001 mov r0, #1 a001ac48: e5880038 str r0, [r8, #56] ; 0x38 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a001ac4c: e5882018 str r2, [r8, #24] the_watchdog->routine = routine; a001ac50: e588502c str r5, [r8, #44] ; 0x2c the_watchdog->id = id; a001ac54: e5887030 str r7, [r8, #48] ; 0x30 the_watchdog->user_data = user_data; a001ac58: e5883034 str r3, [r8, #52] ; 0x34 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; a001ac5c: e588601c str r6, [r8, #28] static inline void arm_interrupt_enable( uint32_t level ) { #if defined(ARM_MULTILIB_ARCH_V4) ARM_SWITCH_REGISTERS; __asm__ volatile ( a001ac60: e129f001 msr CPSR_fc, r1 _ISR_Enable( level ); (*timer_server->schedule_operation)( timer_server, the_timer ); a001ac64: e1a00004 mov r0, r4 a001ac68: e1a01008 mov r1, r8 a001ac6c: e5943004 ldr r3, [r4, #4] a001ac70: e12fff33 blx r3 _Thread_Enable_dispatch(); a001ac74: eb000eb1 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a001ac78: e3a00000 mov r0, #0 a001ac7c: eaffffdb b a001abf0 a001ac80: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); _Thread_Enable_dispatch(); a001ac84: eb000ead bl a001e740 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_SUCCESSFUL; a001ac88: e3a00000 mov r0, #0 <== NOT EXECUTED a001ac8c: eaffffd7 b a001abf0 <== NOT EXECUTED =============================================================================== a001ac98 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001ac98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a001ac9c: e1a07000 mov r7, r0 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; a001aca0: e59f00fc ldr r0, [pc, #252] ; a001ada4 rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001aca4: e24dd008 sub sp, sp, #8 a001aca8: e1a06002 mov r6, r2 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; a001acac: e5904000 ldr r4, [r0] rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { a001acb0: e1a08003 mov r8, r3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) a001acb4: e3540000 cmp r4, #0 return RTEMS_INCORRECT_STATE; a001acb8: 03a0000e moveq r0, #14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) a001acbc: 0a000004 beq a001acd4 return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) a001acc0: e59f50e0 ldr r5, [pc, #224] ; a001ada8 a001acc4: e5d53014 ldrb r3, [r5, #20] a001acc8: e3530000 cmp r3, #0 return RTEMS_NOT_DEFINED; a001accc: 03a0000b moveq r0, #11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) a001acd0: 1a000001 bne a001acdc case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } a001acd4: e28dd008 add sp, sp, #8 a001acd8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) a001acdc: e3520000 cmp r2, #0 return RTEMS_INVALID_ADDRESS; a001ace0: 03a00009 moveq r0, #9 return RTEMS_INCORRECT_STATE; if ( !_TOD.is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) a001ace4: 0afffffa beq a001acd4 return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) a001ace8: e1a00001 mov r0, r1 a001acec: e58d1000 str r1, [sp] a001acf0: ebfff358 bl a0017a58 <_TOD_Validate> a001acf4: e3500000 cmp r0, #0 a001acf8: e59d1000 ldr r1, [sp] a001acfc: 1a000001 bne a001ad08 return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; a001ad00: e3a00014 mov r0, #20 <== NOT EXECUTED a001ad04: eafffff2 b a001acd4 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); a001ad08: e1a00001 mov r0, r1 a001ad0c: ebfff326 bl a00179ac <_TOD_To_seconds> a001ad10: e59f2094 ldr r2, [pc, #148] ; a001adac a001ad14: e1a0a000 mov sl, r0 a001ad18: e3a03000 mov r3, #0 a001ad1c: e8950003 ldm r5, {r0, r1} a001ad20: eb004de6 bl a002e4c0 <__divdi3> if ( seconds <= _TOD_Seconds_since_epoch() ) a001ad24: e15a0000 cmp sl, r0 a001ad28: 9afffff4 bls a001ad00 a001ad2c: e59f007c ldr r0, [pc, #124] ; a001adb0 a001ad30: e1a01007 mov r1, r7 a001ad34: e28d2004 add r2, sp, #4 a001ad38: eb000abc bl a001d830 <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ad3c: e59db004 ldr fp, [sp, #4] a001ad40: e1a09000 mov r9, r0 a001ad44: e35b0000 cmp fp, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; a001ad48: 13a00004 movne r0, #4 seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { a001ad4c: 1affffe0 bne a001acd4 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); a001ad50: e2890010 add r0, r9, #16 a001ad54: eb001258 bl a001f6bc <_Watchdog_Remove> a001ad58: e8950003 ldm r5, {r0, r1} the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; a001ad5c: e3a0c003 mov ip, #3 a001ad60: e59f2044 ldr r2, [pc, #68] ; a001adac a001ad64: e589c038 str ip, [r9, #56] ; 0x38 a001ad68: e3a03000 mov r3, #0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a001ad6c: e589b018 str fp, [r9, #24] the_watchdog->routine = routine; a001ad70: e589602c str r6, [r9, #44] ; 0x2c the_watchdog->id = id; a001ad74: e5897030 str r7, [r9, #48] ; 0x30 the_watchdog->user_data = user_data; a001ad78: e5898034 str r8, [r9, #52] ; 0x34 a001ad7c: eb004dcf bl a002e4c0 <__divdi3> _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); a001ad80: e060a00a rsb sl, r0, sl (*timer_server->schedule_operation)( timer_server, the_timer ); a001ad84: e1a01009 mov r1, r9 a001ad88: e1a00004 mov r0, r4 a001ad8c: e5943004 ldr r3, [r4, #4] case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); a001ad90: e589a01c str sl, [r9, #28] (*timer_server->schedule_operation)( timer_server, the_timer ); a001ad94: e12fff33 blx r3 _Thread_Enable_dispatch(); a001ad98: eb000e68 bl a001e740 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; a001ad9c: e1a0000b mov r0, fp a001ada0: eaffffcb b a001acd4 =============================================================================== a000b1f8 : * * This rountine increments the thread dispatch level */ RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void) { uint32_t level = _Thread_Dispatch_disable_level; a000b1f8: e59f3020 ldr r3, [pc, #32] ; a000b220 <== NOT EXECUTED void rtems_workspace_greedy_free( void *opaque ) { a000b1fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED a000b200: e5932000 ldr r2, [r3] <== NOT EXECUTED a000b204: e1a01000 mov r1, r0 <== NOT EXECUTED ++level; a000b208: e2822001 add r2, r2, #1 <== NOT EXECUTED _Thread_Dispatch_disable_level = level; a000b20c: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); _Heap_Greedy_free( &_Workspace_Area, opaque ); a000b210: e59f000c ldr r0, [pc, #12] ; a000b224 <== NOT EXECUTED a000b214: eb0002d7 bl a000bd78 <_Heap_Greedy_free> <== NOT EXECUTED _Thread_Enable_dispatch(); } a000b218: e49de004 pop {lr} ; (ldr lr, [sp], #4) <== NOT EXECUTED void rtems_workspace_greedy_free( void *opaque ) { _Thread_Disable_dispatch(); _Heap_Greedy_free( &_Workspace_Area, opaque ); _Thread_Enable_dispatch(); a000b21c: ea0008df b a000d5a0 <_Thread_Enable_dispatch> <== NOT EXECUTED