RTEMS 4.11Annotated Report
Thu Jan 27 21:15:31 2011
a000f294 <TOD_MICROSECONDS_TO_TICKS>:
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000f294: e59f300c ldr r3, [pc, #12] ; a000f2a8 <TOD_MICROSECONDS_TO_TICKS+0x14><== NOT EXECUTED
#include <rtems/score/tod.h>
uint32_t TOD_MICROSECONDS_TO_TICKS(
uint32_t microseconds
)
{
a000f298: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return (microseconds / rtems_configuration_get_microseconds_per_tick());
a000f29c: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
a000f2a0: eb004c9f bl a0022524 <__aeabi_uidiv> <== NOT EXECUTED
}
a000f2a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000f658 <TOD_TICKS_PER_SECOND_method>:
#include <rtems/config.h>
#include <rtems/score/tod.h>
uint32_t TOD_TICKS_PER_SECOND_method(void)
{
return (TOD_MICROSECONDS_PER_SECOND /
a000f658: e59f3010 ldr r3, [pc, #16] ; a000f670 <TOD_TICKS_PER_SECOND_method+0x18><== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/tod.h>
uint32_t TOD_TICKS_PER_SECOND_method(void)
{
a000f65c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return (TOD_MICROSECONDS_PER_SECOND /
a000f660: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
a000f664: e59f0008 ldr r0, [pc, #8] ; a000f674 <TOD_TICKS_PER_SECOND_method+0x1c><== NOT EXECUTED
a000f668: eb0031f6 bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
rtems_configuration_get_microseconds_per_tick());
}
a000f66c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a00190c0 <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00190c0: 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
)
{
a00190c4: 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 ) {
a00190c8: e1520003 cmp r2, r3
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
a00190cc: e1a06000 mov r6, r0
a00190d0: e1a0a001 mov sl, r1
a00190d4: e1a07002 mov r7, r2
a00190d8: e59d8020 ldr r8, [sp, #32]
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
a00190dc: 8a000013 bhi a0019130 <_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 ) {
a00190e0: e5905048 ldr r5, [r0, #72] ; 0x48
a00190e4: e3550000 cmp r5, #0
a00190e8: 0a000009 beq a0019114 <_CORE_message_queue_Broadcast+0x54>
*count = 0;
a00190ec: e3a00000 mov r0, #0
a00190f0: e5880000 str r0, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00190f4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00190f8: e594002c ldr r0, [r4, #44] ; 0x2c
a00190fc: e1a0100a mov r1, sl
a0019100: e1a02007 mov r2, r7
a0019104: eb001e64 bl a0020a9c <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0019108: 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;
a001910c: e2855001 add r5, r5, #1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0019110: e5837000 str r7, [r3]
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
a0019114: e1a00006 mov r0, r6
a0019118: eb000a58 bl a001ba80 <_Thread_queue_Dequeue>
a001911c: e2504000 subs r4, r0, #0
a0019120: 1afffff4 bne a00190f8 <_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;
a0019124: e5885000 str r5, [r8]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a0019128: e1a00004 mov r0, r4
a001912c: 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;
a0019130: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
a0019134: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a001218c <_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
)
{
a001218c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a0012190: 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
)
{
a0012194: e1a04000 mov r4, r0
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a0012198: 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
)
{
a001219c: e1a06002 mov r6, r2
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
a00121a0: e5842044 str r2, [r4, #68] ; 0x44
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
)
{
a00121a4: e1a05001 mov r5, r1
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
a00121a8: e5840048 str r0, [r4, #72] ; 0x48
the_message_queue->maximum_message_size = maximum_message_size;
a00121ac: e584304c str r3, [r4, #76] ; 0x4c
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
a00121b0: 01a02003 moveq r2, r3
a00121b4: 0a000003 beq a00121c8 <_CORE_message_queue_Initialize+0x3c>
allocated_message_size += sizeof(uint32_t);
a00121b8: e2832004 add r2, r3, #4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
a00121bc: e3c22003 bic r2, r2, #3
}
if (allocated_message_size < maximum_message_size)
a00121c0: e1520003 cmp r2, r3
a00121c4: 3a00001e bcc a0012244 <_CORE_message_queue_Initialize+0xb8>
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
a00121c8: e2827010 add r7, r2, #16
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
a00121cc: e0000796 mul r0, r6, r7
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
a00121d0: e1500002 cmp r0, r2
a00121d4: 3a000018 bcc a001223c <_CORE_message_queue_Initialize+0xb0>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a00121d8: eb000b02 bl a0014de8 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
a00121dc: e3500000 cmp r0, #0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
a00121e0: e1a01000 mov r1, r0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
a00121e4: e584005c str r0, [r4, #92] ; 0x5c
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
a00121e8: 0a000015 beq a0012244 <_CORE_message_queue_Initialize+0xb8>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
a00121ec: e2840060 add r0, r4, #96 ; 0x60
a00121f0: e1a02006 mov r2, r6
a00121f4: e1a03007 mov r3, r7
a00121f8: eb00123f bl a0016afc <_Chain_Initialize>
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 );
a00121fc: e2843054 add r3, r4, #84 ; 0x54
head->next = tail;
a0012200: e5843050 str r3, [r4, #80] ; 0x50
head->previous = NULL;
a0012204: e3a03000 mov r3, #0
a0012208: e5843054 str r3, [r4, #84] ; 0x54
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a001220c: e2843050 add r3, r4, #80 ; 0x50
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
a0012210: e5843058 str r3, [r4, #88] ; 0x58
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
a0012214: e5951000 ldr r1, [r5]
a0012218: e1a00004 mov r0, r4
a001221c: e3a02080 mov r2, #128 ; 0x80
a0012220: e3510001 cmp r1, #1
a0012224: 13a01000 movne r1, #0
a0012228: 03a01001 moveq r1, #1
a001222c: e3a03006 mov r3, #6
a0012230: eb000884 bl a0014448 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
a0012234: e3a00001 mov r0, #1
a0012238: e8bd80f0 pop {r4, r5, r6, r7, pc}
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
return false;
a001223c: e3a00000 mov r0, #0 <== NOT EXECUTED
a0012240: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
a0012244: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0012334 <_CORE_message_queue_Submit>:
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0012334: e590304c ldr r3, [r0, #76] ; 0x4c
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0012338: 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 ) {
a001233c: e1520003 cmp r2, r3
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
a0012340: e1a04000 mov r4, r0
a0012344: e1a0a001 mov sl, r1
a0012348: e1a05002 mov r5, r2
a001234c: e59d7020 ldr r7, [sp, #32]
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
a0012350: 8a000020 bhi a00123d8 <_CORE_message_queue_Submit+0xa4>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
a0012354: e5908048 ldr r8, [r0, #72] ; 0x48
a0012358: e3580000 cmp r8, #0
a001235c: 1a00000b bne a0012390 <_CORE_message_queue_Submit+0x5c>
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
a0012360: eb00073a bl a0014050 <_Thread_queue_Dequeue>
if ( the_thread ) {
a0012364: e2506000 subs r6, r0, #0
a0012368: 0a000008 beq a0012390 <_CORE_message_queue_Submit+0x5c>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a001236c: e596002c ldr r0, [r6, #44] ; 0x2c
a0012370: e1a0100a mov r1, sl
a0012374: e1a02005 mov r2, r5
a0012378: eb001bc7 bl a001929c <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a001237c: e5963028 ldr r3, [r6, #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;
a0012380: e1a00008 mov r0, r8
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
a0012384: e5835000 str r5, [r3]
the_thread->Wait.count = (uint32_t) submit_type;
a0012388: e5867024 str r7, [r6, #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;
a001238c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
a0012390: e5942048 ldr r2, [r4, #72] ; 0x48
a0012394: e5943044 ldr r3, [r4, #68] ; 0x44
a0012398: e1520003 cmp r2, r3
a001239c: 2a00000f bcs a00123e0 <_CORE_message_queue_Submit+0xac>
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a00123a0: e2840060 add r0, r4, #96 ; 0x60
a00123a4: ebffff61 bl a0012130 <_Chain_Get>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00123a8: e1a0100a mov r1, sl
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
a00123ac: e1a06000 mov r6, r0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
a00123b0: e1a02005 mov r2, r5
a00123b4: e280000c add r0, r0, #12
a00123b8: eb001bb7 bl a001929c <memcpy>
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00123bc: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
a00123c0: e5865008 str r5, [r6, #8]
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
a00123c4: e1a01006 mov r1, r6
a00123c8: e1a02007 mov r2, r7
a00123cc: eb0011da bl a0016b3c <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
a00123d0: e3a00000 mov r0, #0
a00123d4: 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;
a00123d8: e3a00001 mov r0, #1 <== NOT EXECUTED
a00123dc: 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;
a00123e0: e3a00002 mov r0, #2 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
a00123e4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000e428 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000e428: e59f212c ldr r2, [pc, #300] ; a000e55c <_CORE_mutex_Seize_interrupt_trylock+0x134>
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
a000e42c: e1a03000 mov r3, r0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e430: e593c050 ldr ip, [r3, #80] ; 0x50
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a000e434: e5922004 ldr r2, [r2, #4]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000e438: e3a00000 mov r0, #0
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e43c: e15c0000 cmp ip, r0
a000e440: e92d4010 push {r4, lr}
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
a000e444: e5820034 str r0, [r2, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
a000e448: 0a00002c beq a000e500 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
the_mutex->lock = CORE_MUTEX_LOCKED;
a000e44c: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
a000e450: e5920008 ldr r0, [r2, #8]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
a000e454: e583205c str r2, [r3, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
a000e458: e5830060 str r0, [r3, #96] ; 0x60
the_mutex->nest_count = 1;
a000e45c: e3a00001 mov r0, #1
a000e460: e5830054 str r0, [r3, #84] ; 0x54
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
a000e464: e5930048 ldr r0, [r3, #72] ; 0x48
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
a000e468: e3500002 cmp r0, #2
a000e46c: 0a000001 beq a000e478 <_CORE_mutex_Seize_interrupt_trylock+0x50>
a000e470: e3500003 cmp r0, #3
a000e474: 1a000004 bne a000e48c <_CORE_mutex_Seize_interrupt_trylock+0x64>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000e478: e592c01c ldr ip, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a000e47c: e3500003 cmp r0, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
a000e480: e28c4001 add r4, ip, #1
a000e484: e582401c str r4, [r2, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
a000e488: 0a000000 beq a000e490 <_CORE_mutex_Seize_interrupt_trylock+0x68>
_ISR_Enable( *level_p );
a000e48c: ea00002a b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
a000e490: e593004c ldr r0, [r3, #76] ; 0x4c
current = executing->current_priority;
a000e494: e5924014 ldr r4, [r2, #20]
if ( current == ceiling ) {
a000e498: e1540000 cmp r4, r0
a000e49c: 1a000000 bne a000e4a4 <_CORE_mutex_Seize_interrupt_trylock+0x7c>
_ISR_Enable( *level_p );
a000e4a0: ea000025 b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
}
if ( current > ceiling ) {
a000e4a4: 9a00000b bls a000e4d8 <_CORE_mutex_Seize_interrupt_trylock+0xb0>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000e4a8: e59f20b0 ldr r2, [pc, #176] ; a000e560 <_CORE_mutex_Seize_interrupt_trylock+0x138>
a000e4ac: e5920000 ldr r0, [r2]
a000e4b0: e2800001 add r0, r0, #1
a000e4b4: e5820000 str r0, [r2]
a000e4b8: e5912000 ldr r2, [r1]
a000e4bc: e129f002 msr CPSR_fc, r2
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
a000e4c0: e3a02000 mov r2, #0
a000e4c4: e593005c ldr r0, [r3, #92] ; 0x5c
a000e4c8: e593104c ldr r1, [r3, #76] ; 0x4c
a000e4cc: ebfff32d bl a000b188 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
a000e4d0: ebfff452 bl a000b620 <_Thread_Enable_dispatch>
a000e4d4: ea00001a b a000e544 <_CORE_mutex_Seize_interrupt_trylock+0x11c>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a000e4d8: e3a00006 mov r0, #6
a000e4dc: e5820034 str r0, [r2, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000e4e0: e3a00001 mov r0, #1
a000e4e4: e5830050 str r0, [r3, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
a000e4e8: e3a00000 mov r0, #0
a000e4ec: e5830054 str r0, [r3, #84] ; 0x54
executing->resource_count--; /* undo locking above */
a000e4f0: e582c01c str ip, [r2, #28]
a000e4f4: e5913000 ldr r3, [r1]
a000e4f8: e129f003 msr CPSR_fc, r3
a000e4fc: e8bd8010 pop {r4, pc}
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
a000e500: e593005c ldr r0, [r3, #92] ; 0x5c
a000e504: e1500002 cmp r0, r2
a000e508: 1a00000f bne a000e54c <_CORE_mutex_Seize_interrupt_trylock+0x124>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a000e50c: e5932040 ldr r2, [r3, #64] ; 0x40
a000e510: e3520000 cmp r2, #0
a000e514: 0a000002 beq a000e524 <_CORE_mutex_Seize_interrupt_trylock+0xfc>
a000e518: e3520001 cmp r2, #1
a000e51c: 1a00000c bne a000e554 <_CORE_mutex_Seize_interrupt_trylock+0x12c>
a000e520: ea000003 b a000e534 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a000e524: e5932054 ldr r2, [r3, #84] ; 0x54
a000e528: e2822001 add r2, r2, #1
a000e52c: e5832054 str r2, [r3, #84] ; 0x54
_ISR_Enable( *level_p );
a000e530: ea000001 b a000e53c <_CORE_mutex_Seize_interrupt_trylock+0x114>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a000e534: e3a03002 mov r3, #2 <== NOT EXECUTED
a000e538: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
a000e53c: e5913000 ldr r3, [r1]
a000e540: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
return 0;
a000e544: e3a00000 mov r0, #0
a000e548: e8bd8010 pop {r4, pc}
/*
* The mutex is not available and the caller must deal with the possibility
* of blocking.
*/
return 1;
a000e54c: e3a00001 mov r0, #1
a000e550: e8bd8010 pop {r4, pc}
a000e554: e3a00001 mov r0, #1
a000e558: e8bd8010 pop {r4, pc}
a0009f68 <_CORE_mutex_Surrender>:
#else
Objects_Id id __attribute__((unused)),
CORE_mutex_API_mp_support_callout api_mutex_mp_support __attribute__((unused))
#endif
)
{
a0009f68: e92d4030 push {r4, r5, lr}
a0009f6c: e1a04000 mov r4, r0
* 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 ) {
a0009f70: e5d43044 ldrb r3, [r4, #68] ; 0x44
)
{
Thread_Control *the_thread;
Thread_Control *holder;
holder = the_mutex->holder;
a0009f74: e590005c ldr r0, [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 ) {
a0009f78: e3530000 cmp r3, #0
a0009f7c: 0a000004 beq a0009f94 <_CORE_mutex_Surrender+0x2c>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a0009f80: e59f30f4 ldr r3, [pc, #244] ; a000a07c <_CORE_mutex_Surrender+0x114>
if ( !_Thread_Is_executing( holder ) )
a0009f84: e5933004 ldr r3, [r3, #4]
a0009f88: e1500003 cmp r0, r3
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
a0009f8c: 13a05003 movne r5, #3
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
if ( !_Thread_Is_executing( holder ) )
a0009f90: 1a000037 bne a000a074 <_CORE_mutex_Surrender+0x10c>
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
a0009f94: e5945054 ldr r5, [r4, #84] ; 0x54
a0009f98: e3550000 cmp r5, #0
a0009f9c: 0a000034 beq a000a074 <_CORE_mutex_Surrender+0x10c>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a0009fa0: e2455001 sub r5, r5, #1
if ( the_mutex->nest_count != 0 ) {
a0009fa4: e3550000 cmp r5, #0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
a0009fa8: e5845054 str r5, [r4, #84] ; 0x54
/* 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;
a0009fac: 13a05000 movne r5, #0
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
a0009fb0: 1a00002f bne a000a074 <_CORE_mutex_Surrender+0x10c>
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a0009fb4: 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 ) ||
a0009fb8: e3530002 cmp r3, #2
a0009fbc: 0a000001 beq a0009fc8 <_CORE_mutex_Surrender+0x60>
a0009fc0: e3530003 cmp r3, #3
a0009fc4: 1a00000a bne a0009ff4 <_CORE_mutex_Surrender+0x8c>
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a0009fc8: e590301c ldr r3, [r0, #28]
a0009fcc: 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 &&
a0009fd0: e3530000 cmp r3, #0
_CORE_mutex_Pop_priority( the_mutex, holder );
if ( pop_status != CORE_MUTEX_STATUS_SUCCESSFUL )
return pop_status;
holder->resource_count--;
a0009fd4: e580301c str r3, [r0, #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 &&
a0009fd8: 1a000005 bne a0009ff4 <_CORE_mutex_Surrender+0x8c>
holder->real_priority != holder->current_priority ) {
a0009fdc: e5901018 ldr r1, [r0, #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 &&
a0009fe0: e5903014 ldr r3, [r0, #20]
a0009fe4: e1510003 cmp r1, r3
a0009fe8: 0a000001 beq a0009ff4 <_CORE_mutex_Surrender+0x8c>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, true );
a0009fec: e3a02001 mov r2, #1
a0009ff0: eb000464 bl a000b188 <_Thread_Change_priority>
}
}
the_mutex->holder = NULL;
a0009ff4: e3a05000 mov r5, #0
a0009ff8: e584505c str r5, [r4, #92] ; 0x5c
the_mutex->holder_id = 0;
a0009ffc: 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 ) ) ) {
a000a000: e1a00004 mov r0, r4
a000a004: eb00064f bl a000b948 <_Thread_queue_Dequeue>
a000a008: e2503000 subs r3, r0, #0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a000a00c: 03a02001 moveq r2, #1
a000a010: 05842050 streq r2, [r4, #80] ; 0x50
return CORE_MUTEX_STATUS_SUCCESSFUL;
a000a014: 01a05003 moveq r5, r3
/*
* 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 ) ) ) {
a000a018: 0a000015 beq a000a074 <_CORE_mutex_Surrender+0x10c>
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
a000a01c: e5932008 ldr r2, [r3, #8]
} else
#endif
{
the_mutex->holder = the_thread;
a000a020: e584305c str r3, [r4, #92] ; 0x5c
the_mutex->holder_id = the_thread->Object.id;
a000a024: e5842060 str r2, [r4, #96] ; 0x60
the_mutex->nest_count = 1;
a000a028: e3a02001 mov r2, #1
a000a02c: e5842054 str r2, [r4, #84] ; 0x54
switch ( the_mutex->Attributes.discipline ) {
a000a030: e5942048 ldr r2, [r4, #72] ; 0x48
a000a034: e3520002 cmp r2, #2
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++;
a000a038: 0593201c ldreq r2, [r3, #28]
a000a03c: 02822001 addeq r2, r2, #1
a000a040: 0583201c streq r2, [r3, #28]
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
a000a044: 0a00000a beq a000a074 <_CORE_mutex_Surrender+0x10c>
a000a048: e3520003 cmp r2, #3 <== NOT EXECUTED
a000a04c: 1a000008 bne a000a074 <_CORE_mutex_Surrender+0x10c> <== 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++;
a000a050: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a054: e594104c ldr r1, [r4, #76] ; 0x4c <== 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++;
a000a058: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a05c: e583201c str r2, [r3, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
a000a060: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
a000a064: e1510003 cmp r1, r3 <== NOT EXECUTED
a000a068: 2a000001 bcs a000a074 <_CORE_mutex_Surrender+0x10c> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
a000a06c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a070: eb000444 bl a000b188 <_Thread_Change_priority> <== NOT EXECUTED
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
a000a074: e1a00005 mov r0, r5
a000a078: e8bd8030 pop {r4, r5, pc}
a0008e88 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0008e88: e59fc0f8 ldr ip, [pc, #248] ; a0008f88 <_Event_Seize+0x100>
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0008e8c: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
a0008e90: e59c4004 ldr r4, [ip, #4]
executing->Wait.return_code = RTEMS_SUCCESSFUL;
a0008e94: e3a0c000 mov ip, #0
a0008e98: e584c034 str ip, [r4, #52] ; 0x34
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e9c: e59470f4 ldr r7, [r4, #244] ; 0xf4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008ea0: e10f5000 mrs r5, CPSR
a0008ea4: e385c080 orr ip, r5, #128 ; 0x80
a0008ea8: e129f00c msr CPSR_fc, ip
_ISR_Disable( level );
pending_events = api->pending_events;
a0008eac: e5976000 ldr r6, [r7]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
a0008eb0: e010c006 ands ip, r0, r6
a0008eb4: 0a000007 beq a0008ed8 <_Event_Seize+0x50>
a0008eb8: e15c0000 cmp ip, r0
a0008ebc: 0a000001 beq a0008ec8 <_Event_Seize+0x40>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
a0008ec0: e3110002 tst r1, #2 <== NOT EXECUTED
a0008ec4: 0a000003 beq a0008ed8 <_Event_Seize+0x50> <== NOT EXECUTED
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) );
a0008ec8: e1c6600c bic r6, r6, ip
api->pending_events =
a0008ecc: e5876000 str r6, [r7]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0008ed0: e129f005 msr CPSR_fc, r5
a0008ed4: ea000004 b a0008eec <_Event_Seize+0x64>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
a0008ed8: e3110001 tst r1, #1
a0008edc: 0a000004 beq a0008ef4 <_Event_Seize+0x6c>
a0008ee0: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
a0008ee4: e3a0200d mov r2, #13
a0008ee8: e5842034 str r2, [r4, #52] ; 0x34
*event_out = seized_events;
a0008eec: e583c000 str ip, [r3]
return;
a0008ef0: e8bd80f0 pop {r4, r5, r6, r7, pc}
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
a0008ef4: e5843028 str r3, [r4, #40] ; 0x28
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008ef8: e59f308c ldr r3, [pc, #140] ; a0008f8c <_Event_Seize+0x104>
* 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 = (uint32_t) option_set;
a0008efc: e5841030 str r1, [r4, #48] ; 0x30
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008f00: e3a01001 mov r1, #1
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
a0008f04: e5840024 str r0, [r4, #36] ; 0x24
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a0008f08: e5831000 str r1, [r3]
a0008f0c: e129f005 msr CPSR_fc, r5
_ISR_Enable( level );
if ( ticks ) {
a0008f10: e3520000 cmp r2, #0
a0008f14: 0a00000a beq a0008f44 <_Event_Seize+0xbc>
_Watchdog_Initialize(
a0008f18: e5941008 ldr r1, [r4, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0008f1c: e59f006c ldr r0, [pc, #108] ; a0008f90 <_Event_Seize+0x108>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0008f20: e3a03000 mov r3, #0
the_watchdog->routine = routine;
the_watchdog->id = id;
a0008f24: e5841068 str r1, [r4, #104] ; 0x68
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a0008f28: e5840064 str r0, [r4, #100] ; 0x64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0008f2c: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
a0008f30: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0008f34: e5842054 str r2, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0008f38: e59f0054 ldr r0, [pc, #84] ; a0008f94 <_Event_Seize+0x10c>
a0008f3c: e2841048 add r1, r4, #72 ; 0x48
a0008f40: eb000d28 bl a000c3e8 <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
a0008f44: e1a00004 mov r0, r4
a0008f48: e3a01c01 mov r1, #256 ; 0x100
a0008f4c: eb000bc3 bl a000be60 <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008f50: e10f2000 mrs r2, CPSR
a0008f54: e3823080 orr r3, r2, #128 ; 0x80
a0008f58: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
sync_state = _Event_Sync_state;
a0008f5c: e59f3028 ldr r3, [pc, #40] ; a0008f8c <_Event_Seize+0x104>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0008f60: e3a01000 mov r1, #0
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
a0008f64: e5930000 ldr r0, [r3]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a0008f68: e5831000 str r1, [r3]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
a0008f6c: e3500001 cmp r0, #1
a0008f70: 1a000001 bne a0008f7c <_Event_Seize+0xf4>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0008f74: e129f002 msr CPSR_fc, r2
a0008f78: e8bd80f0 pop {r4, r5, r6, r7, pc}
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
a0008f7c: e1a01004 mov r1, r4 <== NOT EXECUTED
}
a0008f80: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
a0008f84: ea00086c b a000b13c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
a0008fe8 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0008fe8: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
a0008fec: e590c0f4 ldr ip, [r0, #244] ; 0xf4
option_set = (rtems_option) the_thread->Wait.option;
a0008ff0: e5905030 ldr r5, [r0, #48] ; 0x30
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
a0008ff4: e1a04000 mov r4, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0008ff8: e10f3000 mrs r3, CPSR
a0008ffc: e3832080 orr r2, r3, #128 ; 0x80
a0009000: e129f002 msr CPSR_fc, r2
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
a0009004: e59c1000 ldr r1, [ip]
event_condition = (rtems_event_set) the_thread->Wait.count;
a0009008: e5900024 ldr r0, [r0, #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 ) ) {
a000900c: e0102001 ands r2, r0, r1
a0009010: 1a000000 bne a0009018 <_Event_Surrender+0x30>
_ISR_Enable( level );
a0009014: ea000039 b a0009100 <_Event_Surrender+0x118>
/*
* 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() &&
a0009018: e59f60e8 ldr r6, [pc, #232] ; a0009108 <_Event_Surrender+0x120>
a000901c: e5967000 ldr r7, [r6]
a0009020: e3570000 cmp r7, #0
a0009024: 0a000017 beq a0009088 <_Event_Surrender+0xa0>
a0009028: e5966004 ldr r6, [r6, #4] <== NOT EXECUTED
a000902c: e1540006 cmp r4, r6 <== NOT EXECUTED
a0009030: 1a000014 bne a0009088 <_Event_Surrender+0xa0> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a0009034: e59f60d0 ldr r6, [pc, #208] ; a000910c <_Event_Surrender+0x124><== NOT EXECUTED
a0009038: e5967000 ldr r7, [r6] <== 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 ) &&
a000903c: e3570002 cmp r7, #2 <== NOT EXECUTED
a0009040: 0a000002 beq a0009050 <_Event_Surrender+0x68> <== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
a0009044: e5966000 ldr r6, [r6] <== 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 ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
a0009048: e3560001 cmp r6, #1 <== NOT EXECUTED
a000904c: 1a00000d bne a0009088 <_Event_Surrender+0xa0> <== NOT EXECUTED
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
a0009050: e1520000 cmp r2, r0 <== NOT EXECUTED
a0009054: 0a000001 beq a0009060 <_Event_Surrender+0x78> <== NOT EXECUTED
a0009058: e3150002 tst r5, #2 <== NOT EXECUTED
a000905c: 0a000008 beq a0009084 <_Event_Surrender+0x9c> <== NOT EXECUTED
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) );
a0009060: e1c11002 bic r1, r1, r2 <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
a0009064: e58c1000 str r1, [ip] <== NOT EXECUTED
the_thread->Wait.count = 0;
a0009068: e3a01000 mov r1, #0 <== NOT EXECUTED
a000906c: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a0009070: e5941028 ldr r1, [r4, #40] ; 0x28 <== NOT EXECUTED
a0009074: e5812000 str r2, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
a0009078: e59f208c ldr r2, [pc, #140] ; a000910c <_Event_Surrender+0x124><== NOT EXECUTED
a000907c: e3a01003 mov r1, #3 <== NOT EXECUTED
a0009080: e5821000 str r1, [r2] <== NOT EXECUTED
}
_ISR_Enable( level );
a0009084: ea00001d b a0009100 <_Event_Surrender+0x118> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
a0009088: e5946010 ldr r6, [r4, #16]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
a000908c: e3160c01 tst r6, #256 ; 0x100
a0009090: 0a00001a beq a0009100 <_Event_Surrender+0x118>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
a0009094: e1520000 cmp r2, r0
a0009098: 0a000001 beq a00090a4 <_Event_Surrender+0xbc>
a000909c: e3150002 tst r5, #2 <== NOT EXECUTED
a00090a0: 0a000016 beq a0009100 <_Event_Surrender+0x118> <== NOT EXECUTED
a00090a4: e1c11002 bic r1, r1, r2
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
a00090a8: e58c1000 str r1, [ip]
the_thread->Wait.count = 0;
a00090ac: e3a01000 mov r1, #0
a00090b0: e5841024 str r1, [r4, #36] ; 0x24
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
a00090b4: e5941028 ldr r1, [r4, #40] ; 0x28
a00090b8: e5812000 str r2, [r1]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a00090bc: e10f2000 mrs r2, CPSR
a00090c0: e129f003 msr CPSR_fc, r3
a00090c4: e129f002 msr CPSR_fc, r2
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a00090c8: e5942050 ldr r2, [r4, #80] ; 0x50
a00090cc: e3520002 cmp r2, #2
a00090d0: 0a000001 beq a00090dc <_Event_Surrender+0xf4>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00090d4: e129f003 msr CPSR_fc, r3
a00090d8: ea000004 b a00090f0 <_Event_Surrender+0x108>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a00090dc: e3a02003 mov r2, #3
a00090e0: e5842050 str r2, [r4, #80] ; 0x50
a00090e4: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a00090e8: e2840048 add r0, r4, #72 ; 0x48
a00090ec: eb000d15 bl a000c548 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a00090f0: e59f1018 ldr r1, [pc, #24] ; a0009110 <_Event_Surrender+0x128>
a00090f4: e1a00004 mov r0, r4
}
return;
}
}
_ISR_Enable( level );
}
a00090f8: e8bd40f0 pop {r4, r5, r6, r7, lr}
a00090fc: ea00087c b a000b2f4 <_Thread_Clear_state>
a0009100: e129f003 msr CPSR_fc, r3
a0009104: e8bd80f0 pop {r4, r5, r6, r7, pc}
a0009114 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
a0009114: e92d4001 push {r0, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
a0009118: e1a0100d mov r1, sp <== NOT EXECUTED
a000911c: eb000948 bl a000b644 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a0009120: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a0009124: e3530000 cmp r3, #0 <== NOT EXECUTED
a0009128: 1a000015 bne a0009184 <_Event_Timeout+0x70> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000912c: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a0009130: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a0009134: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
a0009138: e5803024 str r3, [r0, #36] ; 0x24 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000913c: e59f3044 ldr r3, [pc, #68] ; a0009188 <_Event_Timeout+0x74><== NOT EXECUTED
if ( _Thread_Is_executing( the_thread ) ) {
a0009140: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
a0009144: e1500003 cmp r0, r3 <== NOT EXECUTED
a0009148: 1a000004 bne a0009160 <_Event_Timeout+0x4c> <== NOT EXECUTED
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000914c: e59f3038 ldr r3, [pc, #56] ; a000918c <_Event_Timeout+0x78><== NOT EXECUTED
a0009150: e5931000 ldr r1, [r3] <== NOT EXECUTED
a0009154: e3510001 cmp r1, #1 <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a0009158: 02811001 addeq r1, r1, #1 <== NOT EXECUTED
a000915c: 05831000 streq r1, [r3] <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
a0009160: e3a03006 mov r3, #6 <== NOT EXECUTED
a0009164: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009168: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000916c: e59f101c ldr r1, [pc, #28] ; a0009190 <_Event_Timeout+0x7c><== NOT EXECUTED
a0009170: eb00085f bl a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a0009174: e59f3018 ldr r3, [pc, #24] ; a0009194 <_Event_Timeout+0x80><== NOT EXECUTED
a0009178: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000917c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a0009180: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a0009184: e8bd8008 pop {r3, pc} <== NOT EXECUTED
a000e5c0 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000e5c4: 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;
a000e5c8: e5902010 ldr r2, [r0, #16]
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5cc: e24dd01c sub sp, sp, #28
a000e5d0: e1a0b003 mov fp, r3
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000e5d4: e2913004 adds r3, r1, #4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
a000e5d8: e1a05000 mov r5, r0
a000e5dc: e1a06001 mov r6, r1
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;
a000e5e0: e58d2000 str r2, [sp]
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
a000e5e4: e58d300c str r3, [sp, #12]
a000e5e8: 2a00006a bcs a000e798 <_Heap_Allocate_aligned_with_boundary+0x1d8>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
a000e5ec: e35b0000 cmp fp, #0
a000e5f0: 0a000003 beq a000e604 <_Heap_Allocate_aligned_with_boundary+0x44>
if ( boundary < alloc_size ) {
a000e5f4: e15b0001 cmp fp, r1 <== NOT EXECUTED
a000e5f8: 3a000066 bcc a000e798 <_Heap_Allocate_aligned_with_boundary+0x1d8><== NOT EXECUTED
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
a000e5fc: e3580000 cmp r8, #0 <== NOT EXECUTED
a000e600: 01a08002 moveq r8, r2 <== NOT EXECUTED
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
a000e604: e59d2000 ldr r2, [sp]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000e608: e2663004 rsb r3, r6, #4
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000e60c: e595a008 ldr sl, [r5, #8]
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
a000e610: e2822007 add r2, r2, #7
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000e614: e3a07000 mov r7, #0
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
a000e618: e58d2014 str r2, [sp, #20]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
a000e61c: e58d3018 str r3, [sp, #24]
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
a000e620: ea000048 b a000e748 <_Heap_Allocate_aligned_with_boundary+0x188>
/*
* 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 ) {
a000e624: e59a4004 ldr r4, [sl, #4]
a000e628: e59d200c ldr r2, [sp, #12]
a000e62c: e1540002 cmp r4, r2
a000e630: 9a00003f bls a000e734 <_Heap_Allocate_aligned_with_boundary+0x174>
a000e634: e28a3008 add r3, sl, #8
if ( alignment == 0 ) {
a000e638: e3580000 cmp r8, #0
a000e63c: e58d3008 str r3, [sp, #8]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000e640: 01a04003 moveq r4, r3
a000e644: 0a00003b beq a000e738 <_Heap_Allocate_aligned_with_boundary+0x178>
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000e648: e5952014 ldr r2, [r5, #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;
a000e64c: e59d3014 ldr r3, [sp, #20]
- 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;
a000e650: e3c44001 bic r4, r4, #1
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000e654: e58d2004 str r2, [sp, #4]
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;
a000e658: e0629003 rsb r9, r2, r3
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000e65c: e59d2018 ldr r2, [sp, #24]
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;
a000e660: e08a4004 add r4, sl, r4
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
a000e664: e0899004 add r9, r9, r4
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
a000e668: e0824004 add r4, r2, r4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000e66c: e1a00004 mov r0, r4
a000e670: e1a01008 mov r1, r8
a000e674: eb00155b bl a0013be8 <__umodsi3>
a000e678: e0604004 rsb r4, r0, r4
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 ) {
a000e67c: e1540009 cmp r4, r9
a000e680: 9a000003 bls a000e694 <_Heap_Allocate_aligned_with_boundary+0xd4>
a000e684: e1a00009 mov r0, r9 <== NOT EXECUTED
a000e688: e1a01008 mov r1, r8 <== NOT EXECUTED
a000e68c: eb001555 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e690: e0604009 rsb r4, r0, r9 <== NOT EXECUTED
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
a000e694: e35b0000 cmp fp, #0
a000e698: 0a000014 beq a000e6f0 <_Heap_Allocate_aligned_with_boundary+0x130>
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000e69c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
/* 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;
a000e6a0: e0849006 add r9, r4, r6 <== NOT EXECUTED
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
a000e6a4: e0833006 add r3, r3, r6 <== NOT EXECUTED
a000e6a8: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
a000e6ac: ea000008 b a000e6d4 <_Heap_Allocate_aligned_with_boundary+0x114><== 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 ) {
a000e6b0: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
a000e6b4: e1500002 cmp r0, r2 <== NOT EXECUTED
a000e6b8: 3a00001d bcc a000e734 <_Heap_Allocate_aligned_with_boundary+0x174><== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
a000e6bc: e0664000 rsb r4, r6, r0 <== NOT EXECUTED
a000e6c0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000e6c4: e1a01008 mov r1, r8 <== NOT EXECUTED
a000e6c8: eb001546 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e6cc: e0604004 rsb r4, r0, r4 <== NOT EXECUTED
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
a000e6d0: e0849006 add r9, r4, r6 <== NOT EXECUTED
a000e6d4: e1a00009 mov r0, r9 <== NOT EXECUTED
a000e6d8: e1a0100b mov r1, fp <== NOT EXECUTED
a000e6dc: eb001541 bl a0013be8 <__umodsi3> <== NOT EXECUTED
a000e6e0: 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 ) {
a000e6e4: e1500009 cmp r0, r9 <== NOT EXECUTED
a000e6e8: 31540000 cmpcc r4, r0 <== NOT EXECUTED
a000e6ec: 3affffef bcc a000e6b0 <_Heap_Allocate_aligned_with_boundary+0xf0><== 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 ) {
a000e6f0: e59d3008 ldr r3, [sp, #8]
a000e6f4: e1540003 cmp r4, r3
a000e6f8: 3a00000d bcc a000e734 <_Heap_Allocate_aligned_with_boundary+0x174>
a000e6fc: e1a00004 mov r0, r4
a000e700: e59d1000 ldr r1, [sp]
a000e704: eb001537 bl a0013be8 <__umodsi3>
a000e708: e3e09007 mvn r9, #7
a000e70c: e06a9009 rsb r9, sl, r9
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
a000e710: 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);
a000e714: 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 ) {
a000e718: e0603009 rsb r3, r0, r9
return alloc_begin;
}
}
return 0;
a000e71c: e1590000 cmp r9, r0
a000e720: 11530002 cmpne r3, r2
a000e724: 33a09000 movcc r9, #0
a000e728: 23a09001 movcs r9, #1
a000e72c: 31a04009 movcc r4, r9
a000e730: ea000000 b a000e738 <_Heap_Allocate_aligned_with_boundary+0x178>
a000e734: e3a04000 mov r4, #0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
a000e738: e3540000 cmp r4, #0
);
}
}
/* Statistics */
++search_count;
a000e73c: e2877001 add r7, r7, #1
if ( alloc_begin != 0 ) {
a000e740: 1a000004 bne a000e758 <_Heap_Allocate_aligned_with_boundary+0x198>
break;
}
block = block->next;
a000e744: 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 ) {
a000e748: e15a0005 cmp sl, r5
a000e74c: 1affffb4 bne a000e624 <_Heap_Allocate_aligned_with_boundary+0x64>
a000e750: e3a04000 mov r4, #0
a000e754: ea00000a b a000e784 <_Heap_Allocate_aligned_with_boundary+0x1c4>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000e758: e5953048 ldr r3, [r5, #72] ; 0x48
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e75c: e1a00005 mov r0, r5
a000e760: e1a0100a mov r1, sl
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
a000e764: e2833001 add r3, r3, #1
a000e768: e5853048 str r3, [r5, #72] ; 0x48
stats->searches += search_count;
a000e76c: e595304c ldr r3, [r5, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e770: e1a02004 mov r2, r4
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
a000e774: e0833007 add r3, r3, r7
a000e778: e585304c str r3, [r5, #76] ; 0x4c
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
a000e77c: e1a03006 mov r3, r6
a000e780: ebffef52 bl a000a4d0 <_Heap_Block_allocate>
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000e784: e5953044 ldr r3, [r5, #68] ; 0x44
stats->max_search = search_count;
}
return (void *) alloc_begin;
a000e788: e1a00004 mov r0, r4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
a000e78c: e1530007 cmp r3, r7
stats->max_search = search_count;
a000e790: 35857044 strcc r7, [r5, #68] ; 0x44
}
return (void *) alloc_begin;
a000e794: ea000000 b a000e79c <_Heap_Allocate_aligned_with_boundary+0x1dc>
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
a000e798: e3a00000 mov r0, #0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
a000e79c: e28dd01c add sp, sp, #28
a000e7a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000a4d0 <_Heap_Block_allocate>:
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4d0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a4d4: e591a004 ldr sl, [r1, #4]
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
a000a4d8: e2426008 sub r6, r2, #8
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4dc: e1a04001 mov r4, r1
a000a4e0: e1a07003 mov r7, r3
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;
a000a4e4: e0613006 rsb r3, r1, r6
- 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;
a000a4e8: e3ca1001 bic r1, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a4ec: e0849001 add r9, r4, r1
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
a000a4f0: e1a05000 mov r5, r0
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;
a000a4f4: e5990004 ldr r0, [r9, #4]
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000a4f8: e3100001 tst r0, #1
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
a000a4fc: 11a08005 movne r8, r5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
a000a500: 1a00000c bne a000a538 <_Heap_Block_allocate+0x68>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a000a504: e5940008 ldr r0, [r4, #8]
free_list_anchor = block->prev;
a000a508: e594800c ldr r8, [r4, #12]
Heap_Block *prev = block->prev;
prev->next = next;
a000a50c: e5880008 str r0, [r8, #8]
next->prev = prev;
a000a510: e580800c str r8, [r0, #12]
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
a000a514: e5950038 ldr r0, [r5, #56] ; 0x38
a000a518: e2400001 sub r0, r0, #1
a000a51c: e5850038 str r0, [r5, #56] ; 0x38
++stats->used_blocks;
a000a520: e5950040 ldr r0, [r5, #64] ; 0x40
a000a524: e2800001 add r0, r0, #1
a000a528: e5850040 str r0, [r5, #64] ; 0x40
stats->free_size -= _Heap_Block_size( block );
a000a52c: e5950030 ldr r0, [r5, #48] ; 0x30
a000a530: e0611000 rsb r1, r1, r0
a000a534: e5851030 str r1, [r5, #48] ; 0x30
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
a000a538: e5951010 ldr r1, [r5, #16]
a000a53c: e1530001 cmp r3, r1
a000a540: 2a000005 bcs a000a55c <_Heap_Block_allocate+0x8c>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
a000a544: e1a00005 mov r0, r5
a000a548: e1a01004 mov r1, r4
a000a54c: e1a02008 mov r2, r8
a000a550: e0833007 add r3, r3, r7
a000a554: ebffff2e bl a000a214 <_Heap_Block_split>
a000a558: ea000021 b a000a5e4 <_Heap_Block_allocate+0x114>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000a55c: e1a00002 mov r0, r2
a000a560: eb0025a0 bl a0013be8 <__umodsi3>
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a564: e5952030 ldr r2, [r5, #48] ; 0x30
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000a568: 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;
a000a56c: e0643006 rsb r3, r4, r6
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a570: e0822003 add r2, r2, r3
if ( _Heap_Is_prev_used( block ) ) {
a000a574: e31a0001 tst sl, #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;
a000a578: e0669009 rsb r9, r6, r9
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
a000a57c: e5852030 str r2, [r5, #48] ; 0x30
if ( _Heap_Is_prev_used( block ) ) {
a000a580: 0a000009 beq a000a5ac <_Heap_Block_allocate+0xdc>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000a584: e5982008 ldr r2, [r8, #8]
new_block->next = next;
new_block->prev = block_before;
a000a588: e584800c str r8, [r4, #12]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000a58c: e5842008 str r2, [r4, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000a590: e582400c str r4, [r2, #12]
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
a000a594: e5952038 ldr r2, [r5, #56] ; 0x38
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000a598: e5884008 str r4, [r8, #8]
a000a59c: e2822001 add r2, r2, #1
a000a5a0: e5852038 str r2, [r5, #56] ; 0x38
a000a5a4: e1a02004 mov r2, r4
a000a5a8: ea000005 b a000a5c4 <_Heap_Block_allocate+0xf4>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
a000a5ac: e5942000 ldr r2, [r4] <== NOT EXECUTED
a000a5b0: e0624004 rsb r4, r2, r4 <== 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;
a000a5b4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
a000a5b8: e3c22001 bic r2, r2, #1 <== 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;
a000a5bc: e0833002 add r3, r3, r2 <== NOT EXECUTED
a000a5c0: e1a02008 mov r2, r8 <== NOT EXECUTED
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
a000a5c4: e3831001 orr r1, r3, #1
a000a5c8: e5841004 str r1, [r4, #4]
new_block->prev_size = block_size;
a000a5cc: e8860208 stm r6, {r3, r9}
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
a000a5d0: e1a00005 mov r0, r5
a000a5d4: e1a01006 mov r1, r6
a000a5d8: e1a03007 mov r3, r7
a000a5dc: ebffff0c bl a000a214 <_Heap_Block_split>
a000a5e0: e1a04006 mov r4, r6
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000a5e4: e5953030 ldr r3, [r5, #48] ; 0x30
a000a5e8: e5952034 ldr r2, [r5, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a5ec: e1a00004 mov r0, r4
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
a000a5f0: e1520003 cmp r2, r3
stats->min_free_size = stats->free_size;
a000a5f4: 85853034 strhi r3, [r5, #52] ; 0x34
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a5f8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000a214 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a214: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, 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;
a000a218: e5908014 ldr r8, [r0, #20]
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
a000a21c: e590a010 ldr sl, [r0, #16]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a220: 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;
a000a224: e248b008 sub fp, r8, #8
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
a000a228: e153000b cmp r3, fp
a000a22c: 21a0b003 movcs fp, r3
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
a000a230: e28bb008 add fp, fp, #8
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a234: e5919004 ldr r9, [r1, #4]
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
a000a238: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000a23c: e1a0100a mov r1, sl
a000a240: e1a0000b mov r0, fp
a000a244: e1a06002 mov r6, r2
a000a248: eb002666 bl a0013be8 <__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;
a000a24c: e3c97001 bic r7, r9, #1
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
a000a250: e3500000 cmp r0, #0
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;
a000a254: e2872004 add r2, r7, #4
return value - remainder + alignment;
a000a258: 108ba00a addne sl, fp, sl
} else {
return value;
a000a25c: 01a0a00b moveq sl, fp
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
a000a260: e2888004 add r8, r8, #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;
a000a264: e06bb002 rsb fp, fp, r2
)
{
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
a000a268: 1060a00a rsbne sl, r0, sl
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a26c: e0853007 add r3, r5, 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 ) {
a000a270: e15b0008 cmp fp, r8
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000a274: 35932004 ldrcc r2, [r3, #4]
a000a278: 33822001 orrcc r2, r2, #1
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 ) {
a000a27c: 3a000023 bcc a000a310 <_Heap_Block_split+0xfc>
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
a000a280: e5941030 ldr r1, [r4, #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;
a000a284: e2099001 and r9, r9, #1
_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;
a000a288: e06a7007 rsb r7, sl, r7
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000a28c: e08a2005 add r2, sl, r5
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
a000a290: e18aa009 orr sl, sl, r9
a000a294: e585a004 str sl, [r5, #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;
a000a298: e0811007 add r1, r1, r7
a000a29c: e5841030 str r1, [r4, #48] ; 0x30
- 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;
a000a2a0: e5931004 ldr r1, [r3, #4]
a000a2a4: e3c11001 bic r1, r1, #1
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
a000a2a8: e0830001 add r0, r3, 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;
a000a2ac: e5900004 ldr r0, [r0, #4]
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
if ( _Heap_Is_used( next_block ) ) {
a000a2b0: e3100001 tst r0, #1
a000a2b4: 0a000008 beq a000a2dc <_Heap_Block_split+0xc8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
a000a2b8: e5961008 ldr r1, [r6, #8]
new_block->next = next;
new_block->prev = block_before;
a000a2bc: e582600c str r6, [r2, #12]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
a000a2c0: e5821008 str r1, [r2, #8]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
a000a2c4: e581200c str r2, [r1, #12]
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
a000a2c8: e5941038 ldr r1, [r4, #56] ; 0x38
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
a000a2cc: e5862008 str r2, [r6, #8]
a000a2d0: e2811001 add r1, r1, #1
a000a2d4: e5841038 str r1, [r4, #56] ; 0x38
a000a2d8: ea000007 b a000a2fc <_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;
a000a2dc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
a000a2e0: e593300c ldr r3, [r3, #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;
a000a2e4: e0877001 add r7, r7, r1 <== NOT EXECUTED
new_block->next = next;
a000a2e8: e5820008 str r0, [r2, #8] <== NOT EXECUTED
new_block->prev = prev;
a000a2ec: e582300c str r3, [r2, #12] <== NOT EXECUTED
next->prev = new_block;
prev->next = new_block;
a000a2f0: e5832008 str r2, [r3, #8] <== NOT EXECUTED
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
a000a2f4: e580200c str r2, [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);
a000a2f8: e0873002 add r3, r7, r2 <== NOT EXECUTED
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
a000a2fc: e3871001 orr r1, r7, #1
a000a300: e5821004 str r1, [r2, #4]
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000a304: e5932004 ldr r2, [r3, #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;
a000a308: e5837000 str r7, [r3]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
a000a30c: e3c22001 bic r2, r2, #1
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000a310: e5832004 str r2, [r3, #4]
a000a314: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a000eadc <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eadc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a000eae0: e1a05001 mov r5, r1
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000eae4: e5901020 ldr r1, [r0, #32]
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eae8: e24dd028 sub sp, sp, #40 ; 0x28
a000eaec: e58d3018 str r3, [sp, #24]
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
a000eaf0: e58d1010 str r1, [sp, #16]
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;
a000eaf4: e5903010 ldr r3, [r0, #16]
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;
a000eaf8: e5901030 ldr r1, [r0, #48] ; 0x30
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;
a000eafc: e3a08000 mov r8, #0
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 ) {
a000eb00: e0956002 adds r6, r5, r2
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
a000eb04: e1a04000 mov r4, r0
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;
a000eb08: e58d3014 str r3, [sp, #20]
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;
a000eb0c: e58d8024 str r8, [sp, #36] ; 0x24
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000eb10: e5903014 ldr r3, [r0, #20]
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;
Heap_Block *extend_last_block = NULL;
a000eb14: e58d8020 str r8, [sp, #32]
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;
a000eb18: e58d101c str r1, [sp, #28]
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 false;
a000eb1c: 21a00008 movcs r0, r8
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 ) {
a000eb20: 2a00009e bcs a000eda0 <_Heap_Extend+0x2c4>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
a000eb24: e28d1024 add r1, sp, #36 ; 0x24
a000eb28: e58d1000 str r1, [sp]
a000eb2c: e28d1020 add r1, sp, #32
a000eb30: e58d1004 str r1, [sp, #4]
a000eb34: e1a00005 mov r0, r5
a000eb38: e1a01002 mov r1, r2
a000eb3c: e59d2014 ldr r2, [sp, #20]
a000eb40: ebffeecc bl a000a678 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
a000eb44: e3500000 cmp r0, #0
a000eb48: 0a000094 beq a000eda0 <_Heap_Extend+0x2c4>
a000eb4c: e59da010 ldr sl, [sp, #16]
a000eb50: e1a07008 mov r7, r8
a000eb54: e1a09008 mov r9, r8
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
a000eb58: e5941018 ldr r1, [r4, #24]
a000eb5c: e1a03008 mov r3, r8
a000eb60: e1a0c004 mov ip, r4
a000eb64: ea000000 b a000eb6c <_Heap_Extend+0x90>
a000eb68: e1a0100a mov r1, sl <== NOT EXECUTED
uintptr_t const sub_area_end = start_block->prev_size;
a000eb6c: e59a4000 ldr r4, [sl]
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
a000eb70: e1560001 cmp r6, r1
a000eb74: 93a00000 movls r0, #0
a000eb78: 83a00001 movhi r0, #1
a000eb7c: e1550004 cmp r5, r4
a000eb80: 23a00000 movcs r0, #0
a000eb84: e3500000 cmp r0, #0
a000eb88: 1a000083 bne a000ed9c <_Heap_Extend+0x2c0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
a000eb8c: e1560001 cmp r6, r1
a000eb90: 01a0300a moveq r3, sl
a000eb94: 0a000001 beq a000eba0 <_Heap_Extend+0xc4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
a000eb98: e1560004 cmp r6, r4
a000eb9c: 31a0900a movcc r9, sl
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000eba0: e1a00004 mov r0, r4
a000eba4: e59d1014 ldr r1, [sp, #20]
a000eba8: e58d300c str r3, [sp, #12]
a000ebac: e58dc008 str ip, [sp, #8]
a000ebb0: eb001562 bl a0014140 <__umodsi3>
a000ebb4: e244b008 sub fp, r4, #8
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
a000ebb8: e1540005 cmp r4, r5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a000ebbc: e060000b rsb r0, r0, fp
a000ebc0: e59d300c ldr r3, [sp, #12]
a000ebc4: e59dc008 ldr ip, [sp, #8]
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 )
a000ebc8: 01a07000 moveq r7, r0
start_block->prev_size = extend_area_end;
a000ebcc: 058a6000 streq r6, [sl]
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 ) {
a000ebd0: 0a000000 beq a000ebd8 <_Heap_Extend+0xfc>
a000ebd4: 31a08000 movcc r8, r0
- 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;
a000ebd8: e590a004 ldr sl, [r0, #4]
} 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 );
a000ebdc: e59d2010 ldr r2, [sp, #16]
a000ebe0: e3caa001 bic sl, sl, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000ebe4: e080a00a add sl, r0, sl
a000ebe8: e15a0002 cmp sl, r2
a000ebec: 1affffdd bne a000eb68 <_Heap_Extend+0x8c>
a000ebf0: e1a02009 mov r2, r9
a000ebf4: e1a09003 mov r9, r3
if ( extend_area_begin < heap->area_begin ) {
a000ebf8: e59c3018 ldr r3, [ip, #24]
a000ebfc: e1a0400c mov r4, ip
a000ec00: e1550003 cmp r5, r3
heap->area_begin = extend_area_begin;
a000ec04: 358c5018 strcc r5, [ip, #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 ) {
a000ec08: 3a000002 bcc a000ec18 <_Heap_Extend+0x13c>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
a000ec0c: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
a000ec10: e1530006 cmp r3, r6 <== NOT EXECUTED
heap->area_end = extend_area_end;
a000ec14: 358c601c strcc r6, [ip, #28] <== NOT EXECUTED
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
a000ec18: e59d1024 ldr r1, [sp, #36] ; 0x24
a000ec1c: e59d3020 ldr r3, [sp, #32]
extend_first_block->prev_size = extend_area_end;
a000ec20: e5816000 str r6, [r1]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
a000ec24: e0610003 rsb r0, r1, r3
(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;
a000ec28: e380c001 orr ip, r0, #1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
a000ec2c: e5830000 str r0, [r3]
extend_last_block->size_and_flag = 0;
a000ec30: e3a00000 mov r0, #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 =
a000ec34: e581c004 str ip, [r1, #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;
a000ec38: e5830004 str r0, [r3, #4]
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
a000ec3c: e5940020 ldr r0, [r4, #32]
a000ec40: e1500001 cmp r0, r1
heap->first_block = extend_first_block;
a000ec44: 85841020 strhi r1, [r4, #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 ) {
a000ec48: 8a000002 bhi a000ec58 <_Heap_Extend+0x17c>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
a000ec4c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
a000ec50: e1510003 cmp r1, r3 <== NOT EXECUTED
heap->last_block = extend_last_block;
a000ec54: 35843024 strcc r3, [r4, #36] ; 0x24 <== NOT EXECUTED
}
if ( merge_below_block != NULL ) {
a000ec58: e3590000 cmp r9, #0
a000ec5c: 0a000010 beq a000eca4 <_Heap_Extend+0x1c8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
a000ec60: e594a010 ldr sl, [r4, #16] <== NOT EXECUTED
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
a000ec64: e2855008 add r5, r5, #8 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
a000ec68: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ec6c: e1a0100a mov r1, sl <== NOT EXECUTED
a000ec70: eb001532 bl a0014140 <__umodsi3> <== NOT EXECUTED
if ( remainder != 0 ) {
a000ec74: e3500000 cmp r0, #0 <== NOT EXECUTED
return value - remainder + alignment;
a000ec78: 1085500a addne r5, r5, sl <== 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;
a000ec7c: e5993000 ldr r3, [r9] <== NOT EXECUTED
a000ec80: 10605005 rsbne r5, r0, r5 <== 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 =
a000ec84: e2451008 sub r1, r5, #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;
a000ec88: e5053008 str r3, [r5, #-8] <== 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 =
a000ec8c: e0613009 rsb r3, r1, r9 <== 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;
a000ec90: e3833001 orr r3, r3, #1 <== NOT EXECUTED
a000ec94: e5053004 str r3, [r5, #-4] <== NOT EXECUTED
_Heap_Free_block( heap, new_first_block );
a000ec98: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ec9c: ebffff86 bl a000eabc <_Heap_Free_block> <== NOT EXECUTED
a000eca0: ea000004 b a000ecb8 <_Heap_Extend+0x1dc> <== NOT EXECUTED
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 ) {
a000eca4: e3520000 cmp r2, #0
_Heap_Link_below(
a000eca8: 159d3020 ldrne r3, [sp, #32]
{
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;
a000ecac: 10632002 rsbne r2, r3, r2
a000ecb0: 13822001 orrne r2, r2, #1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
a000ecb4: 15832004 strne r2, [r3, #4]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
a000ecb8: e3570000 cmp r7, #0
a000ecbc: 0a000012 beq a000ed0c <_Heap_Extend+0x230>
)
{
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,
a000ecc0: 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(
a000ecc4: e0676006 rsb r6, r7, r6 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a000ecc8: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
a000eccc: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ecd0: eb00151a bl a0014140 <__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)
a000ecd4: e5972004 ldr r2, [r7, #4] <== NOT EXECUTED
a000ecd8: 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 =
a000ecdc: e0863007 add r3, r6, r7 <== NOT EXECUTED
(last_block->size_and_flag - last_block_new_size)
a000ece0: e0662002 rsb r2, r6, r2 <== NOT EXECUTED
| HEAP_PREV_BLOCK_USED;
a000ece4: e3822001 orr r2, r2, #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 =
a000ece8: e5832004 str r2, [r3, #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;
a000ecec: e5973004 ldr r3, [r7, #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 );
a000ecf0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ecf4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000ecf8: e2033001 and r3, r3, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a000ecfc: e1866003 orr r6, r6, r3 <== NOT EXECUTED
a000ed00: e5876004 str r6, [r7, #4] <== NOT EXECUTED
a000ed04: ebffff6c bl a000eabc <_Heap_Free_block> <== NOT EXECUTED
a000ed08: ea00000b b a000ed3c <_Heap_Extend+0x260> <== NOT EXECUTED
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
a000ed0c: e3580000 cmp r8, #0
a000ed10: 0a000009 beq a000ed3c <_Heap_Extend+0x260>
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;
a000ed14: e5982004 ldr r2, [r8, #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 );
a000ed18: e59d1024 ldr r1, [sp, #36] ; 0x24 <== 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(
a000ed1c: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
a000ed20: e2022001 and r2, r2, #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 );
a000ed24: e0681001 rsb r1, r8, r1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a000ed28: e1812002 orr r2, r1, r2 <== NOT EXECUTED
a000ed2c: e5882004 str r2, [r8, #4] <== NOT EXECUTED
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
a000ed30: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000ed34: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a000ed38: e5832004 str r2, [r3, #4] <== NOT EXECUTED
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
a000ed3c: e3570000 cmp r7, #0
a000ed40: 03590000 cmpeq r9, #0
a000ed44: 1a000002 bne a000ed54 <_Heap_Extend+0x278>
_Heap_Free_block( heap, extend_first_block );
a000ed48: e1a00004 mov r0, r4
a000ed4c: e59d1024 ldr r1, [sp, #36] ; 0x24
a000ed50: ebffff59 bl a000eabc <_Heap_Free_block>
*/
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
a000ed54: e5943024 ldr r3, [r4, #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(
a000ed58: e5941020 ldr r1, [r4, #32]
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
a000ed5c: e3a00001 mov r0, #1
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;
a000ed60: e5932004 ldr r2, [r3, #4]
* 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(
a000ed64: e0631001 rsb r1, r3, r1
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;
a000ed68: e2022001 and r2, r2, #1
block->size_and_flag = size | flag;
a000ed6c: e1812002 orr r2, r1, r2
a000ed70: e5832004 str r2, [r3, #4]
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000ed74: e59d101c ldr r1, [sp, #28]
a000ed78: e5943030 ldr r3, [r4, #48] ; 0x30
/* Statistics */
stats->size += extended_size;
a000ed7c: e594202c ldr r2, [r4, #44] ; 0x2c
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
a000ed80: e0613003 rsb r3, r1, r3
/* Statistics */
stats->size += extended_size;
a000ed84: e0822003 add r2, r2, r3
a000ed88: e584202c str r2, [r4, #44] ; 0x2c
if ( extended_size_ptr != NULL )
a000ed8c: e59d2018 ldr r2, [sp, #24]
a000ed90: e3520000 cmp r2, #0
*extended_size_ptr = extended_size;
a000ed94: 15823000 strne r3, [r2]
a000ed98: ea000000 b a000eda0 <_Heap_Extend+0x2c4>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
a000ed9c: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
a000eda0: e28dd028 add sp, sp, #40 ; 0x28
a000eda4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00156a0 <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
a00156a0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
a00156a4: e1a04000 mov r4, r0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
a00156a8: e241a008 sub sl, r1, #8
a00156ac: e1a00001 mov r0, r1
a00156b0: e1a05001 mov r5, r1
a00156b4: e5941010 ldr r1, [r4, #16]
a00156b8: e1a08003 mov r8, r3
a00156bc: e1a07002 mov r7, r2
a00156c0: ebfff948 bl a0013be8 <__umodsi3>
a00156c4: e59d601c ldr r6, [sp, #28]
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;
a00156c8: e3a03000 mov r3, #0
a00156cc: e5883000 str r3, [r8]
*new_size = 0;
a00156d0: e5863000 str r3, [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;
a00156d4: e5943020 ldr r3, [r4, #32]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
a00156d8: e060100a rsb r1, r0, sl
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;
a00156dc: e1530001 cmp r3, r1
a00156e0: 8a000039 bhi a00157cc <_Heap_Resize_block+0x12c>
a00156e4: e5943024 ldr r3, [r4, #36] ; 0x24
a00156e8: e1530001 cmp r3, r1
a00156ec: 3a000038 bcc a00157d4 <_Heap_Resize_block+0x134>
- 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;
a00156f0: e5913004 ldr r3, [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;
a00156f4: e265c004 rsb ip, r5, #4
a00156f8: e3c33001 bic r3, r3, #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;
a00156fc: e0812003 add r2, r1, r3
a0015700: e5920004 ldr r0, [r2, #4]
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
a0015704: e08cc002 add ip, ip, r2
a0015708: e3c00001 bic r0, r0, #1
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
}
}
a001570c: e082a000 add sl, r2, r0
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;
a0015710: 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;
a0015714: e588c000 str ip, [r8]
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
a0015718: e31a0001 tst sl, #1
a001571c: 13a0a000 movne sl, #0
a0015720: 03a0a001 moveq sl, #1
if ( next_block_is_free ) {
a0015724: e35a0000 cmp sl, #0
block_size += next_block_size;
alloc_size += next_block_size;
a0015728: 108cc000 addne ip, ip, r0
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
a001572c: 10833000 addne r3, r3, r0
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
a0015730: e157000c cmp r7, ip
a0015734: 8a000022 bhi a00157c4 <_Heap_Resize_block+0x124>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
a0015738: e35a0000 cmp sl, #0
a001573c: 0a000011 beq a0015788 <_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;
a0015740: e591c004 ldr ip, [r1, #4] <== NOT EXECUTED
a0015744: e20cc001 and ip, ip, #1 <== NOT EXECUTED
block->size_and_flag = size | flag;
a0015748: e183c00c orr ip, r3, ip <== NOT EXECUTED
a001574c: e581c004 str ip, [r1, #4] <== NOT EXECUTED
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
a0015750: e592c008 ldr ip, [r2, #8] <== NOT EXECUTED
Heap_Block *prev = block->prev;
a0015754: e592200c ldr r2, [r2, #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);
a0015758: e0833001 add r3, r3, r1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
a001575c: e582c008 str ip, [r2, #8] <== NOT EXECUTED
next->prev = prev;
a0015760: e58c200c str r2, [ip, #12] <== NOT EXECUTED
_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;
a0015764: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a0015768: e3822001 orr r2, r2, #1 <== NOT EXECUTED
a001576c: e5832004 str r2, [r3, #4] <== NOT EXECUTED
/* Statistics */
--stats->free_blocks;
a0015770: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a0015774: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a0015778: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
stats->free_size -= next_block_size;
a001577c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
a0015780: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
a0015784: e5840030 str r0, [r4, #48] ; 0x30 <== NOT EXECUTED
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
a0015788: e1a02005 mov r2, r5
a001578c: e1a03007 mov r3, r7
a0015790: e1a00004 mov r0, r4
a0015794: ebffd34d bl a000a4d0 <_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;
a0015798: e5903004 ldr r3, [r0, #4]
a001579c: 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);
a00157a0: e2833004 add r3, r3, #4
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;
a00157a4: e0655003 rsb r5, r5, r3
a00157a8: e0800005 add r0, r0, r5
a00157ac: e5860000 str r0, [r6]
/* Statistics */
++stats->resizes;
a00157b0: e5943054 ldr r3, [r4, #84] ; 0x54
return HEAP_RESIZE_SUCCESSFUL;
a00157b4: e3a00000 mov r0, #0
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;
/* Statistics */
++stats->resizes;
a00157b8: e2833001 add r3, r3, #1
a00157bc: e5843054 str r3, [r4, #84] ; 0x54
a00157c0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
return HEAP_RESIZE_UNSATISFIED;
a00157c4: e3a00001 mov r0, #1
*new_size = 0;
_Heap_Protection_block_check( heap, block );
if ( _Heap_Is_block_in_heap( heap, block ) ) {
return _Heap_Resize_block_checked(
a00157c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
new_alloc_size,
old_size,
new_size
);
} else {
return HEAP_RESIZE_FATAL_ERROR;
a00157cc: e3a00002 mov r0, #2 <== NOT EXECUTED
a00157d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a00157d4: e3a00002 mov r0, #2 <== NOT EXECUTED
}
}
a00157d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000b1dc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b1dc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000b1e0: e5903014 ldr r3, [r0, #20]
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b1e4: e24dd030 sub sp, sp, #48 ; 0x30
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;
a000b1e8: e59f44c8 ldr r4, [pc, #1224] ; a000b6b8 <_Heap_Walk+0x4dc>
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
a000b1ec: e58d3024 str r3, [sp, #36] ; 0x24
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
a000b1f0: e5903024 ldr r3, [r0, #36] ; 0x24
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000b1f4: e31200ff tst r2, #255 ; 0xff
bool dump
)
{
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;
a000b1f8: e590c020 ldr ip, [r0, #32]
Heap_Block *const last_block = heap->last_block;
a000b1fc: e58d3028 str r3, [sp, #40] ; 0x28
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
a000b200: e59f34b4 ldr r3, [pc, #1204] ; a000b6bc <_Heap_Walk+0x4e0>
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
a000b204: e1a06000 mov r6, r0
a000b208: e1a05001 mov r5, r1
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;
a000b20c: 11a04003 movne r4, r3
if ( !_System_state_Is_up( _System_state_Get() ) ) {
a000b210: e59f34a8 ldr r3, [pc, #1192] ; a000b6c0 <_Heap_Walk+0x4e4>
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
a000b214: e5909010 ldr r9, [r0, #16]
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
a000b218: e58dc020 str ip, [sp, #32]
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() ) ) {
a000b21c: e5933000 ldr r3, [r3]
a000b220: e3530003 cmp r3, #3
a000b224: 1a000118 bne a000b68c <_Heap_Walk+0x4b0>
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)(
a000b228: e59dc024 ldr ip, [sp, #36] ; 0x24
a000b22c: e59d2020 ldr r2, [sp, #32]
a000b230: e58dc000 str ip, [sp]
a000b234: e5903018 ldr r3, [r0, #24]
a000b238: e58d3004 str r3, [sp, #4]
a000b23c: e590301c ldr r3, [r0, #28]
a000b240: e58d200c str r2, [sp, #12]
a000b244: e59f2478 ldr r2, [pc, #1144] ; a000b6c4 <_Heap_Walk+0x4e8>
a000b248: e58d3008 str r3, [sp, #8]
a000b24c: e59d3028 ldr r3, [sp, #40] ; 0x28
a000b250: e58d3010 str r3, [sp, #16]
a000b254: e5903008 ldr r3, [r0, #8]
a000b258: e58d3014 str r3, [sp, #20]
a000b25c: e590300c ldr r3, [r0, #12]
a000b260: e1a00001 mov r0, r1
a000b264: e3a01000 mov r1, #0
a000b268: e58d3018 str r3, [sp, #24]
a000b26c: e1a03009 mov r3, r9
a000b270: e12fff34 blx r4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
a000b274: e3590000 cmp r9, #0
a000b278: 1a000005 bne a000b294 <_Heap_Walk+0xb8>
(*printer)( source, true, "page size is zero\n" );
a000b27c: e1a00005 mov r0, r5
a000b280: e3a01001 mov r1, #1
a000b284: e59f243c ldr r2, [pc, #1084] ; a000b6c8 <_Heap_Walk+0x4ec>
a000b288: e12fff34 blx r4
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b28c: e1a08009 mov r8, r9
a000b290: ea0000fe b a000b690 <_Heap_Walk+0x4b4>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
a000b294: e2198007 ands r8, r9, #7
(*printer)(
a000b298: 11a00005 movne r0, r5
a000b29c: 13a01001 movne r1, #1
a000b2a0: 159f2424 ldrne r2, [pc, #1060] ; a000b6cc <_Heap_Walk+0x4f0>
a000b2a4: 11a03009 movne r3, r9
a000b2a8: 1a0000ff bne a000b6ac <_Heap_Walk+0x4d0>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b2ac: e59d0024 ldr r0, [sp, #36] ; 0x24
a000b2b0: e1a01009 mov r1, r9
a000b2b4: ebffe756 bl a0005014 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
a000b2b8: e250b000 subs fp, r0, #0
a000b2bc: 0a000005 beq a000b2d8 <_Heap_Walk+0xfc>
(*printer)(
a000b2c0: e1a00005 mov r0, r5
a000b2c4: e3a01001 mov r1, #1
a000b2c8: e59f2400 ldr r2, [pc, #1024] ; a000b6d0 <_Heap_Walk+0x4f4>
a000b2cc: e59d3024 ldr r3, [sp, #36] ; 0x24
a000b2d0: e12fff34 blx r4
a000b2d4: ea0000ed b a000b690 <_Heap_Walk+0x4b4>
a000b2d8: e59dc020 ldr ip, [sp, #32]
a000b2dc: e1a01009 mov r1, r9
a000b2e0: e28c0008 add r0, ip, #8
a000b2e4: ebffe74a bl a0005014 <__umodsi3>
);
return false;
}
if (
a000b2e8: e250a000 subs sl, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
a000b2ec: 11a00005 movne r0, r5
a000b2f0: 13a01001 movne r1, #1
a000b2f4: 159f23d8 ldrne r2, [pc, #984] ; a000b6d4 <_Heap_Walk+0x4f8>
a000b2f8: 159d3020 ldrne r3, [sp, #32]
a000b2fc: 1a0000c3 bne a000b610 <_Heap_Walk+0x434>
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;
a000b300: e59d2020 ldr r2, [sp, #32]
a000b304: e5928004 ldr r8, [r2, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
a000b308: e2188001 ands r8, r8, #1
(*printer)(
a000b30c: 01a00005 moveq r0, r5
a000b310: 03a01001 moveq r1, #1
a000b314: 059f23bc ldreq r2, [pc, #956] ; a000b6d8 <_Heap_Walk+0x4fc>
a000b318: 0a000009 beq a000b344 <_Heap_Walk+0x168>
- 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;
a000b31c: e59d3028 ldr r3, [sp, #40] ; 0x28
a000b320: e5937004 ldr r7, [r3, #4]
a000b324: e3c77001 bic r7, r7, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000b328: e0837007 add r7, r3, r7
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;
a000b32c: e5978004 ldr r8, [r7, #4]
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
a000b330: e2188001 ands r8, r8, #1
a000b334: 1a000004 bne a000b34c <_Heap_Walk+0x170>
(*printer)(
a000b338: e59f239c ldr r2, [pc, #924] ; a000b6dc <_Heap_Walk+0x500> <== NOT EXECUTED
a000b33c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b340: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b344: e12fff34 blx r4 <== NOT EXECUTED
a000b348: ea0000d0 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
);
return false;
}
if (
a000b34c: e59dc020 ldr ip, [sp, #32]
a000b350: e157000c cmp r7, ip
a000b354: 0a000005 beq a000b370 <_Heap_Walk+0x194>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
a000b358: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b35c: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b360: e59f2378 ldr r2, [pc, #888] ; a000b6e0 <_Heap_Walk+0x504> <== NOT EXECUTED
a000b364: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b368: e1a0800a mov r8, sl <== NOT EXECUTED
a000b36c: ea0000c7 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
a000b370: e596b010 ldr fp, [r6, #16]
block = next_block;
} while ( block != first_block );
return true;
}
a000b374: e5968008 ldr r8, [r6, #8]
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
a000b378: e1a0a006 mov sl, r6
a000b37c: ea000032 b a000b44c <_Heap_Walk+0x270>
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;
a000b380: e5963020 ldr r3, [r6, #32]
a000b384: e1530008 cmp r3, r8
a000b388: 83a0c000 movhi ip, #0
a000b38c: 8a000003 bhi a000b3a0 <_Heap_Walk+0x1c4>
a000b390: e596c024 ldr ip, [r6, #36] ; 0x24
a000b394: e15c0008 cmp ip, r8
a000b398: 33a0c000 movcc ip, #0
a000b39c: 23a0c001 movcs ip, #1
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 ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
a000b3a0: e21cc0ff ands ip, ip, #255 ; 0xff
(*printer)(
a000b3a4: 01a00005 moveq r0, r5
a000b3a8: 03a01001 moveq r1, #1
a000b3ac: 059f2330 ldreq r2, [pc, #816] ; a000b6e4 <_Heap_Walk+0x508>
a000b3b0: 0a000012 beq a000b400 <_Heap_Walk+0x224>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b3b4: e2880008 add r0, r8, #8
a000b3b8: e1a0100b mov r1, fp
a000b3bc: ebffe714 bl a0005014 <__umodsi3>
);
return false;
}
if (
a000b3c0: e250c000 subs ip, r0, #0
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
a000b3c4: 11a00005 movne r0, r5
a000b3c8: 13a01001 movne r1, #1
a000b3cc: 159f2314 ldrne r2, [pc, #788] ; a000b6e8 <_Heap_Walk+0x50c>
a000b3d0: 11a03008 movne r3, r8
a000b3d4: 1a0000b4 bne a000b6ac <_Heap_Walk+0x4d0>
- 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;
a000b3d8: e5983004 ldr r3, [r8, #4]
a000b3dc: e3c33001 bic r3, r3, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000b3e0: e0883003 add r3, r8, 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;
a000b3e4: e5933004 ldr r3, [r3, #4]
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
a000b3e8: e2133001 ands r3, r3, #1
a000b3ec: e58d302c str r3, [sp, #44] ; 0x2c
a000b3f0: 0a000008 beq a000b418 <_Heap_Walk+0x23c>
(*printer)(
a000b3f4: e59f22f0 ldr r2, [pc, #752] ; a000b6ec <_Heap_Walk+0x510> <== NOT EXECUTED
a000b3f8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b3fc: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b400: e1a03008 mov r3, r8 <== NOT EXECUTED
a000b404: e58dc01c str ip, [sp, #28] <== NOT EXECUTED
a000b408: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b40c: e59dc01c ldr ip, [sp, #28] <== NOT EXECUTED
a000b410: e1a0800c mov r8, ip <== NOT EXECUTED
a000b414: ea00009d b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
);
return false;
}
if ( free_block->prev != prev_block ) {
a000b418: e598300c ldr r3, [r8, #12]
a000b41c: e153000a cmp r3, sl
a000b420: 0a000007 beq a000b444 <_Heap_Walk+0x268>
(*printer)(
a000b424: e58d3000 str r3, [sp] <== NOT EXECUTED
a000b428: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b42c: e1a03008 mov r3, r8 <== NOT EXECUTED
a000b430: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b434: e59f22b4 ldr r2, [pc, #692] ; a000b6f0 <_Heap_Walk+0x514> <== NOT EXECUTED
a000b438: e12fff34 blx r4 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
a000b43c: e59d802c ldr r8, [sp, #44] ; 0x2c <== NOT EXECUTED
a000b440: ea000092 b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
a000b444: e1a0a008 mov sl, r8
a000b448: e5988008 ldr r8, [r8, #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 ) {
a000b44c: e1580006 cmp r8, r6
a000b450: 1affffca bne a000b380 <_Heap_Walk+0x1a4>
a000b454: ea000000 b a000b45c <_Heap_Walk+0x280>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000b458: e1a07008 mov r7, r8
return true;
}
a000b45c: e5973004 ldr r3, [r7, #4]
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;
a000b460: e5962020 ldr r2, [r6, #32]
- 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;
a000b464: e3c3a001 bic sl, r3, #1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
a000b468: e087800a add r8, r7, sl
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;
a000b46c: e1520008 cmp r2, r8
a000b470: 83a0b000 movhi fp, #0
a000b474: 8a000003 bhi a000b488 <_Heap_Walk+0x2ac>
a000b478: e596b024 ldr fp, [r6, #36] ; 0x24
a000b47c: e15b0008 cmp fp, r8
a000b480: 33a0b000 movcc fp, #0
a000b484: 23a0b001 movcs fp, #1
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;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
a000b488: e21bb0ff ands fp, fp, #255 ; 0xff
a000b48c: 1a000006 bne a000b4ac <_Heap_Walk+0x2d0>
(*printer)(
a000b490: e58d8000 str r8, [sp] <== NOT EXECUTED
a000b494: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b498: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b49c: e59f2250 ldr r2, [pc, #592] ; a000b6f4 <_Heap_Walk+0x518> <== NOT EXECUTED
a000b4a0: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b4a4: e12fff34 blx r4 <== NOT EXECUTED
a000b4a8: ea000059 b a000b614 <_Heap_Walk+0x438> <== NOT EXECUTED
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;
a000b4ac: e59d2028 ldr r2, [sp, #40] ; 0x28
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
a000b4b0: e1a0000a mov r0, sl
a000b4b4: e1a01009 mov r1, r9
a000b4b8: e057b002 subs fp, r7, r2
a000b4bc: 13a0b001 movne fp, #1
a000b4c0: e58d301c str r3, [sp, #28]
a000b4c4: ebffe6d2 bl a0005014 <__umodsi3>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
a000b4c8: e3500000 cmp r0, #0
a000b4cc: e59d301c ldr r3, [sp, #28]
a000b4d0: 0a000005 beq a000b4ec <_Heap_Walk+0x310>
a000b4d4: e35b0000 cmp fp, #0 <== NOT EXECUTED
(*printer)(
a000b4d8: 158da000 strne sl, [sp] <== NOT EXECUTED
a000b4dc: 11a00005 movne r0, r5 <== NOT EXECUTED
a000b4e0: 13a01001 movne r1, #1 <== NOT EXECUTED
a000b4e4: 159f220c ldrne r2, [pc, #524] ; a000b6f8 <_Heap_Walk+0x51c><== NOT EXECUTED
a000b4e8: 1a000013 bne a000b53c <_Heap_Walk+0x360> <== NOT EXECUTED
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
a000b4ec: e59dc024 ldr ip, [sp, #36] ; 0x24
a000b4f0: e15a000c cmp sl, ip
a000b4f4: 2a000008 bcs a000b51c <_Heap_Walk+0x340>
a000b4f8: e35b0000 cmp fp, #0 <== NOT EXECUTED
a000b4fc: 0a000006 beq a000b51c <_Heap_Walk+0x340> <== NOT EXECUTED
(*printer)(
a000b500: e88d1400 stm sp, {sl, ip} <== NOT EXECUTED
a000b504: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b508: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b50c: e59f21e8 ldr r2, [pc, #488] ; a000b6fc <_Heap_Walk+0x520> <== NOT EXECUTED
a000b510: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b514: e12fff34 blx r4 <== NOT EXECUTED
a000b518: ea000064 b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
a000b51c: e1580007 cmp r8, r7
a000b520: 8a000008 bhi a000b548 <_Heap_Walk+0x36c>
a000b524: e35b0000 cmp fp, #0
a000b528: 0a000006 beq a000b548 <_Heap_Walk+0x36c>
(*printer)(
a000b52c: e59f21cc ldr r2, [pc, #460] ; a000b700 <_Heap_Walk+0x524> <== NOT EXECUTED
a000b530: e58d8000 str r8, [sp] <== NOT EXECUTED
a000b534: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b538: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b53c: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b540: e12fff34 blx r4 <== NOT EXECUTED
a000b544: ea000059 b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
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;
a000b548: e203b001 and fp, r3, #1
a000b54c: e5983004 ldr r3, [r8, #4]
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
a000b550: e3130001 tst r3, #1
a000b554: 1a000038 bne a000b63c <_Heap_Walk+0x460>
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 ?
a000b558: e597200c ldr r2, [r7, #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)(
a000b55c: e5963008 ldr r3, [r6, #8]
block = next_block;
} while ( block != first_block );
return true;
}
a000b560: e596100c ldr r1, [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)(
a000b564: e1520003 cmp r2, r3
a000b568: 059f0194 ldreq r0, [pc, #404] ; a000b704 <_Heap_Walk+0x528>
a000b56c: 0a000003 beq a000b580 <_Heap_Walk+0x3a4>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
a000b570: e59f3190 ldr r3, [pc, #400] ; a000b708 <_Heap_Walk+0x52c>
a000b574: e1520006 cmp r2, r6
a000b578: e59f018c ldr r0, [pc, #396] ; a000b70c <_Heap_Walk+0x530>
a000b57c: 01a00003 moveq r0, r3
block->next,
block->next == last_free_block ?
a000b580: e5973008 ldr r3, [r7, #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)(
a000b584: e1530001 cmp r3, r1
a000b588: 059f1180 ldreq r1, [pc, #384] ; a000b710 <_Heap_Walk+0x534>
a000b58c: 0a000003 beq a000b5a0 <_Heap_Walk+0x3c4>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
a000b590: e59fc17c ldr ip, [pc, #380] ; a000b714 <_Heap_Walk+0x538>
a000b594: e1530006 cmp r3, r6
a000b598: e59f116c ldr r1, [pc, #364] ; a000b70c <_Heap_Walk+0x530>
a000b59c: 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)(
a000b5a0: e58d2004 str r2, [sp, #4]
a000b5a4: e58d0008 str r0, [sp, #8]
a000b5a8: e58d300c str r3, [sp, #12]
a000b5ac: e58d1010 str r1, [sp, #16]
a000b5b0: e1a03007 mov r3, r7
a000b5b4: e58da000 str sl, [sp]
a000b5b8: e1a00005 mov r0, r5
a000b5bc: e3a01000 mov r1, #0
a000b5c0: e59f2150 ldr r2, [pc, #336] ; a000b718 <_Heap_Walk+0x53c>
a000b5c4: e12fff34 blx r4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
a000b5c8: e5983000 ldr r3, [r8]
a000b5cc: e15a0003 cmp sl, r3
a000b5d0: 0a000008 beq a000b5f8 <_Heap_Walk+0x41c>
(*printer)(
a000b5d4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000b5d8: e58da000 str sl, [sp] <== NOT EXECUTED
a000b5dc: e58d8008 str r8, [sp, #8] <== NOT EXECUTED
a000b5e0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b5e4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b5e8: e59f212c ldr r2, [pc, #300] ; a000b71c <_Heap_Walk+0x540> <== NOT EXECUTED
a000b5ec: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b5f0: e12fff34 blx r4 <== NOT EXECUTED
a000b5f4: ea00002d b a000b6b0 <_Heap_Walk+0x4d4> <== NOT EXECUTED
);
return false;
}
if ( !prev_used ) {
a000b5f8: e35b0000 cmp fp, #0
a000b5fc: 1a000006 bne a000b61c <_Heap_Walk+0x440>
(*printer)(
a000b600: e59f2118 ldr r2, [pc, #280] ; a000b720 <_Heap_Walk+0x544> <== NOT EXECUTED
a000b604: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b608: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b60c: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b610: e12fff34 blx r4 <== NOT EXECUTED
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000b614: e1a0800b mov r8, fp <== NOT EXECUTED
a000b618: ea00001c b a000b690 <_Heap_Walk+0x4b4> <== NOT EXECUTED
block = next_block;
} while ( block != first_block );
return true;
}
a000b61c: e5963008 ldr r3, [r6, #8]
a000b620: ea000002 b a000b630 <_Heap_Walk+0x454>
{
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 ) {
if ( free_block == block ) {
a000b624: e1530007 cmp r3, r7
a000b628: 0a000014 beq a000b680 <_Heap_Walk+0x4a4>
return true;
}
free_block = free_block->next;
a000b62c: 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 ) {
a000b630: e1530006 cmp r3, r6
a000b634: 1afffffa bne a000b624 <_Heap_Walk+0x448>
a000b638: ea000017 b a000b69c <_Heap_Walk+0x4c0> <== NOT EXECUTED
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
a000b63c: e35b0000 cmp fp, #0
a000b640: 0a000006 beq a000b660 <_Heap_Walk+0x484>
(*printer)(
a000b644: e58da000 str sl, [sp]
a000b648: e1a00005 mov r0, r5
a000b64c: e3a01000 mov r1, #0
a000b650: e59f20cc ldr r2, [pc, #204] ; a000b724 <_Heap_Walk+0x548>
a000b654: e1a03007 mov r3, r7
a000b658: e12fff34 blx r4
a000b65c: ea000007 b a000b680 <_Heap_Walk+0x4a4>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
a000b660: e58da000 str sl, [sp]
a000b664: e5973000 ldr r3, [r7]
a000b668: e1a00005 mov r0, r5
a000b66c: e1a0100b mov r1, fp
a000b670: e58d3004 str r3, [sp, #4]
a000b674: e59f20ac ldr r2, [pc, #172] ; a000b728 <_Heap_Walk+0x54c>
a000b678: e1a03007 mov r3, r7
a000b67c: e12fff34 blx r4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
a000b680: e59d2020 ldr r2, [sp, #32]
a000b684: e1580002 cmp r8, r2
a000b688: 1affff72 bne a000b458 <_Heap_Walk+0x27c>
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() ) ) {
return true;
a000b68c: e3a08001 mov r8, #1
block = next_block;
} while ( block != first_block );
return true;
}
a000b690: e1a00008 mov r0, r8
a000b694: e28dd030 add sp, sp, #48 ; 0x30
a000b698: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
a000b69c: e59f2088 ldr r2, [pc, #136] ; a000b72c <_Heap_Walk+0x550> <== NOT EXECUTED
a000b6a0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000b6a4: e3a01001 mov r1, #1 <== NOT EXECUTED
a000b6a8: e1a03007 mov r3, r7 <== NOT EXECUTED
a000b6ac: e12fff34 blx r4
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
a000b6b0: e3a08000 mov r8, #0
a000b6b4: eafffff5 b a000b690 <_Heap_Walk+0x4b4>
a000b198 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
a000b198: e92d000c push {r2, r3} <== NOT EXECUTED
a000b19c: e92d4001 push {r0, lr} <== NOT EXECUTED
a000b1a0: e1a03000 mov r3, r0 <== NOT EXECUTED
va_list ap;
if ( error ) {
a000b1a4: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
a000b1a8: 159f0024 ldrne r0, [pc, #36] ; a000b1d4 <_Heap_Walk_print+0x3c><== NOT EXECUTED
} else {
printk( "PASS[%d]: ", source );
a000b1ac: 059f0024 ldreq r0, [pc, #36] ; a000b1d8 <_Heap_Walk_print+0x40><== NOT EXECUTED
a000b1b0: e1a01003 mov r1, r3 <== NOT EXECUTED
a000b1b4: ebfff179 bl a00077a0 <printk> <== NOT EXECUTED
}
va_start( ap, fmt );
a000b1b8: e28d100c add r1, sp, #12 <== NOT EXECUTED
vprintk( fmt, ap );
a000b1bc: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
a000b1c0: e58d1000 str r1, [sp] <== NOT EXECUTED
vprintk( fmt, ap );
a000b1c4: ebfff842 bl a00092d4 <vprintk> <== NOT EXECUTED
va_end( ap );
}
a000b1c8: e8bd4008 pop {r3, lr} <== NOT EXECUTED
a000b1cc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
a000b1d0: e12fff1e bx lr <== NOT EXECUTED
a000a5fc <_Internal_error_Occurred>:
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
a000a5fc: e59f3038 ldr r3, [pc, #56] ; a000a63c <_Internal_error_Occurred+0x40>
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000a600: e20110ff and r1, r1, #255 ; 0xff
a000a604: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Internal_errors_What_happened.the_source = the_source;
a000a608: e5830000 str r0, [r3]
_Internal_errors_What_happened.is_internal = is_internal;
a000a60c: e5c31004 strb r1, [r3, #4]
_Internal_errors_What_happened.the_error = the_error;
a000a610: e5832008 str r2, [r3, #8]
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000a614: e1a04002 mov r4, r2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
a000a618: eb000717 bl a000c27c <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
a000a61c: e59f301c ldr r3, [pc, #28] ; a000a640 <_Internal_error_Occurred+0x44><== NOT EXECUTED
a000a620: e3a02005 mov r2, #5 <== NOT EXECUTED
a000a624: e5832000 str r2, [r3] <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a628: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a000a62c: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
a000a630: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
a000a634: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a638: eafffffe b a000a638 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED
a000aa08 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000aa08: e1a01801 lsl r1, r1, #16
a000aa0c: e92d4030 push {r4, r5, lr}
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000aa10: e1b05821 lsrs r5, r1, #16
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
a000aa14: e1a04000 mov r4, r0
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
a000aa18: 0a000010 beq a000aa60 <_Objects_Get_information+0x58>
/*
* 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 );
a000aa1c: eb000fd9 bl a000e988 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
a000aa20: e3500000 cmp r0, #0
a000aa24: 0a00000f beq a000aa68 <_Objects_Get_information+0x60>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
a000aa28: e1550000 cmp r5, r0
return NULL;
a000aa2c: 83a00000 movhi r0, #0
*/
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 )
a000aa30: 8a00000c bhi a000aa68 <_Objects_Get_information+0x60>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
a000aa34: e59f3030 ldr r3, [pc, #48] ; a000aa6c <_Objects_Get_information+0x64>
a000aa38: e7930104 ldr r0, [r3, r4, lsl #2]
a000aa3c: e3500000 cmp r0, #0
a000aa40: 0a000008 beq a000aa68 <_Objects_Get_information+0x60>
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
a000aa44: e7900105 ldr r0, [r0, r5, lsl #2]
if ( !info )
a000aa48: e3500000 cmp r0, #0
a000aa4c: 0a000005 beq a000aa68 <_Objects_Get_information+0x60>
* 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 )
a000aa50: e1d031b0 ldrh r3, [r0, #16]
return NULL;
a000aa54: e3530000 cmp r3, #0
a000aa58: 03a00000 moveq r0, #0
a000aa5c: e8bd8030 pop {r4, r5, pc}
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
a000aa60: e1a00005 mov r0, r5 <== NOT EXECUTED
a000aa64: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
a000aa68: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000aa70 <_Objects_Get_isr_disable>:
{
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000aa70: e590c008 ldr ip, [r0, #8]
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
a000aa74: e92d4010 push {r4, lr}
Objects_Control *the_object;
uint32_t index;
ISR_Level level;
index = id - information->minimum_id + 1;
a000aa78: e26cc001 rsb ip, ip, #1
a000aa7c: e08c1001 add r1, ip, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000aa80: e10f4000 mrs r4, CPSR
a000aa84: e384c080 orr ip, r4, #128 ; 0x80
a000aa88: e129f00c msr CPSR_fc, ip
_ISR_Disable( level );
if ( information->maximum >= index ) {
a000aa8c: e1d0c1b0 ldrh ip, [r0, #16]
a000aa90: e15c0001 cmp ip, r1
a000aa94: 3a00000b bcc a000aac8 <_Objects_Get_isr_disable+0x58>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a000aa98: e590001c ldr r0, [r0, #28]
a000aa9c: e7900101 ldr r0, [r0, r1, lsl #2]
a000aaa0: e3500000 cmp r0, #0
a000aaa4: 0a000003 beq a000aab8 <_Objects_Get_isr_disable+0x48>
*location = OBJECTS_LOCAL;
a000aaa8: e3a01000 mov r1, #0
a000aaac: e5821000 str r1, [r2]
*level_p = level;
a000aab0: e5834000 str r4, [r3]
return the_object;
a000aab4: e8bd8010 pop {r4, pc}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000aab8: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000aabc: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aac0: e5823000 str r3, [r2] <== NOT EXECUTED
return NULL;
a000aac4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000aac8: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
a000aacc: e3a03001 mov r3, #1 <== NOT EXECUTED
a000aad0: 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;
a000aad4: e3a00000 mov r0, #0 <== NOT EXECUTED
#endif
}
a000aad8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000c518 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000c518: e92d4077 push {r0, r1, r2, r4, r5, r6, lr} <== NOT EXECUTED
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000c51c: e2515000 subs r5, r1, #0 <== NOT EXECUTED
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
a000c520: e1a04002 mov r4, r2 <== NOT EXECUTED
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
return NULL;
a000c524: 01a04005 moveq r4, r5 <== NOT EXECUTED
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
a000c528: 0a00002e beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
if ( name == NULL )
a000c52c: e3540000 cmp r4, #0 <== NOT EXECUTED
a000c530: 0a00002c beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000c534: e3500000 cmp r0, #0 <== NOT EXECUTED
a000c538: 059f30b0 ldreq r3, [pc, #176] ; a000c5f0 <_Objects_Get_name_as_string+0xd8><== NOT EXECUTED
a000c53c: 11a06000 movne r6, r0 <== NOT EXECUTED
a000c540: 05933004 ldreq r3, [r3, #4] <== NOT EXECUTED
a000c544: 05936008 ldreq r6, [r3, #8] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
a000c548: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c54c: ebffffb7 bl a000c430 <_Objects_Get_information_id> <== NOT EXECUTED
if ( !information )
a000c550: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return NULL;
a000c554: 01a04003 moveq r4, r3 <== NOT EXECUTED
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
if ( !information )
a000c558: 0a000022 beq a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
a000c55c: e1a01006 mov r1, r6 <== NOT EXECUTED
a000c560: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000c564: eb000023 bl a000c5f8 <_Objects_Get> <== NOT EXECUTED
switch ( location ) {
a000c568: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a000c56c: e3530000 cmp r3, #0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
a000c570: 13a04000 movne r4, #0 <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
if ( !information )
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
switch ( location ) {
a000c574: 1a00001b bne a000c5e8 <_Objects_Get_name_as_string+0xd0> <== NOT EXECUTED
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
a000c578: e590200c ldr r2, [r0, #12] <== NOT EXECUTED
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';
a000c57c: e5cd3004 strb r3, [sp, #4] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c580: e2455001 sub r5, r5, #1 <== NOT EXECUTED
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
a000c584: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
a000c588: e5cd1000 strb r1, [sp] <== NOT EXECUTED
lname[ 1 ] = (u32_name >> 16) & 0xff;
a000c58c: e1a01822 lsr r1, r2, #16 <== NOT EXECUTED
a000c590: e5cd1001 strb r1, [sp, #1] <== NOT EXECUTED
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000c594: e1a01422 lsr r1, r2, #8 <== NOT EXECUTED
lname[ 3 ] = (u32_name >> 0) & 0xff;
a000c598: e5cd2003 strb r2, [sp, #3] <== NOT EXECUTED
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
a000c59c: e5cd1002 strb r1, [sp, #2] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5a0: e1a02004 mov r2, r4 <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5a4: e59f0048 ldr r0, [pc, #72] ; a000c5f4 <_Objects_Get_name_as_string+0xdc><== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5a8: ea000006 b a000c5c8 <_Objects_Get_name_as_string+0xb0> <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5ac: e590c000 ldr ip, [r0] <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5b0: e2833001 add r3, r3, #1 <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
a000c5b4: e08cc001 add ip, ip, r1 <== NOT EXECUTED
a000c5b8: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
a000c5bc: e31c0097 tst ip, #151 ; 0x97 <== NOT EXECUTED
a000c5c0: 03a0102a moveq r1, #42 ; 0x2a <== NOT EXECUTED
a000c5c4: e4c21001 strb r1, [r2], #1 <== NOT EXECUTED
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
a000c5c8: e1530005 cmp r3, r5 <== NOT EXECUTED
a000c5cc: 2a000002 bcs a000c5dc <_Objects_Get_name_as_string+0xc4> <== NOT EXECUTED
a000c5d0: e7dd1003 ldrb r1, [sp, r3] <== NOT EXECUTED
a000c5d4: e3510000 cmp r1, #0 <== NOT EXECUTED
a000c5d8: 1afffff3 bne a000c5ac <_Objects_Get_name_as_string+0x94> <== NOT EXECUTED
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
a000c5dc: e3a03000 mov r3, #0 <== NOT EXECUTED
a000c5e0: e5c23000 strb r3, [r2] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000c5e4: eb0002b0 bl a000d0ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return name;
}
return NULL; /* unreachable path */
}
a000c5e8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000c5ec: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc} <== NOT EXECUTED
a001abd4 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
a001abd4: e5903008 ldr r3, [r0, #8]
a001abd8: e2633001 rsb r3, r3, #1
a001abdc: e0833001 add r3, r3, r1
if ( information->maximum >= index ) {
a001abe0: e1d011b0 ldrh r1, [r0, #16]
a001abe4: e1510003 cmp r1, r3
a001abe8: 3a000005 bcc a001ac04 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001abec: e590101c ldr r1, [r0, #28]
a001abf0: e7910103 ldr r0, [r1, r3, lsl #2]
a001abf4: e3500000 cmp r0, #0
*location = OBJECTS_LOCAL;
a001abf8: 13a03000 movne r3, #0
a001abfc: 15823000 strne r3, [r2]
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
a001ac00: 112fff1e bxne lr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
a001ac04: e3a03001 mov r3, #1
a001ac08: e5823000 str r3, [r2]
return NULL;
a001ac0c: e3a00000 mov r0, #0
}
a001ac10: e12fff1e bx lr
a000c040 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
a000c040: e92d4011 push {r0, r4, lr}
a000c044: e1a04001 mov r4, r1
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000c048: e2501000 subs r1, r0, #0
a000c04c: 059f306c ldreq r3, [pc, #108] ; a000c0c0 <_Objects_Id_to_name+0x80>
a000c050: 05933004 ldreq r3, [r3, #4]
a000c054: 05931008 ldreq r1, [r3, #8]
a000c058: e1a03c21 lsr r3, r1, #24
a000c05c: e2033007 and r3, r3, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000c060: e2432001 sub r2, r3, #1
a000c064: e3520002 cmp r2, #2
a000c068: 8a00000d bhi a000c0a4 <_Objects_Id_to_name+0x64>
a000c06c: ea00000e b a000c0ac <_Objects_Id_to_name+0x6c>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000c070: e1a02da1 lsr r2, r1, #27
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
a000c074: e7930102 ldr r0, [r3, r2, lsl #2]
if ( !information )
a000c078: e3500000 cmp r0, #0
a000c07c: 0a000008 beq a000c0a4 <_Objects_Id_to_name+0x64>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
a000c080: e1a0200d mov r2, sp
a000c084: ebffffd3 bl a000bfd8 <_Objects_Get>
if ( !the_object )
a000c088: e3500000 cmp r0, #0
a000c08c: 0a000004 beq a000c0a4 <_Objects_Id_to_name+0x64>
return OBJECTS_INVALID_ID;
*name = the_object->name;
a000c090: e590300c ldr r3, [r0, #12]
a000c094: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000c098: eb0002c1 bl a000cba4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000c09c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000c0a0: ea000000 b a000c0a8 <_Objects_Id_to_name+0x68> <== NOT EXECUTED
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
a000c0a4: e3a00003 mov r0, #3
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
a000c0a8: e8bd8018 pop {r3, r4, pc}
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
a000c0ac: e59f2010 ldr r2, [pc, #16] ; a000c0c4 <_Objects_Id_to_name+0x84>
a000c0b0: e7923103 ldr r3, [r2, r3, lsl #2]
a000c0b4: e3530000 cmp r3, #0
a000c0b8: 1affffec bne a000c070 <_Objects_Id_to_name+0x30>
a000c0bc: eafffff8 b a000c0a4 <_Objects_Id_to_name+0x64> <== NOT EXECUTED
a000ac28 <_Objects_Name_to_id_u32>:
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000ac28: e3530000 cmp r3, #0
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
a000ac2c: e92d4030 push {r4, r5, lr}
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
a000ac30: 0a00001a beq a000aca0 <_Objects_Name_to_id_u32+0x78>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
a000ac34: e3510000 cmp r1, #0
a000ac38: 0a00001a beq a000aca8 <_Objects_Name_to_id_u32+0x80>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
a000ac3c: e1d041b0 ldrh r4, [r0, #16]
a000ac40: e3540000 cmp r4, #0
a000ac44: 0a000019 beq a000acb0 <_Objects_Name_to_id_u32+0x88>
a000ac48: e3720106 cmn r2, #-2147483647 ; 0x80000001
a000ac4c: 13520000 cmpne r2, #0
a000ac50: 03a02001 moveq r2, #1
a000ac54: 0a00000e beq a000ac94 <_Objects_Name_to_id_u32+0x6c>
(node == OBJECTS_SEARCH_ALL_NODES ||
node == OBJECTS_SEARCH_LOCAL_NODE ||
a000ac58: e3520001 cmp r2, #1
a000ac5c: 1a000011 bne a000aca8 <_Objects_Name_to_id_u32+0x80>
a000ac60: ea00000b b a000ac94 <_Objects_Name_to_id_u32+0x6c>
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
a000ac64: e590c01c ldr ip, [r0, #28]
a000ac68: e79cc102 ldr ip, [ip, r2, lsl #2]
if ( !the_object )
a000ac6c: e35c0000 cmp ip, #0
a000ac70: 0a000006 beq a000ac90 <_Objects_Name_to_id_u32+0x68>
continue;
if ( name == the_object->name.name_u32 ) {
a000ac74: e59c500c ldr r5, [ip, #12]
a000ac78: e1510005 cmp r1, r5
a000ac7c: 1a000003 bne a000ac90 <_Objects_Name_to_id_u32+0x68>
*id = the_object->id;
a000ac80: e59c2008 ldr r2, [ip, #8]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000ac84: e3a00000 mov r0, #0
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
a000ac88: e5832000 str r2, [r3]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
a000ac8c: e8bd8030 pop {r4, r5, pc}
_Objects_Is_local_node( node )
))
search_local_node = true;
if ( search_local_node ) {
for ( index = 1; index <= information->maximum; index++ ) {
a000ac90: e2822001 add r2, r2, #1
a000ac94: e1520004 cmp r2, r4
a000ac98: 9afffff1 bls a000ac64 <_Objects_Name_to_id_u32+0x3c>
a000ac9c: ea000001 b a000aca8 <_Objects_Name_to_id_u32+0x80> <== NOT EXECUTED
#endif
/* ASSERT: information->is_string == false */
if ( !id )
return OBJECTS_INVALID_ADDRESS;
a000aca0: e3a00002 mov r0, #2 <== NOT EXECUTED
a000aca4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
if ( name == 0 )
return OBJECTS_INVALID_NAME;
a000aca8: e3a00001 mov r0, #1 <== NOT EXECUTED
a000acac: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
return OBJECTS_INVALID_NAME;
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
a000acb0: e3a00001 mov r0, #1 <== NOT EXECUTED
#endif
}
a000acb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000cee0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000cee0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000cee4: e1a04001 mov r4, r1 <== NOT EXECUTED
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000cee8: e1d013b8 ldrh r1, [r0, #56] ; 0x38 <== NOT EXECUTED
a000ceec: e1a00002 mov r0, r2 <== NOT EXECUTED
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
a000cef0: e1a05002 mov r5, r2 <== NOT EXECUTED
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
a000cef4: eb001bbb bl a0013de8 <strnlen> <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
a000cef8: e3500001 cmp r0, #1 <== NOT EXECUTED
a000cefc: 85d53001 ldrbhi r3, [r5, #1] <== NOT EXECUTED
a000cf00: e5d52000 ldrb r2, [r5] <== NOT EXECUTED
a000cf04: 93a03602 movls r3, #2097152 ; 0x200000 <== NOT EXECUTED
a000cf08: 81a03803 lslhi r3, r3, #16 <== NOT EXECUTED
a000cf0c: e1a02c02 lsl r2, r2, #24 <== NOT EXECUTED
a000cf10: e3500002 cmp r0, #2 <== NOT EXECUTED
a000cf14: e1832002 orr r2, r3, r2 <== NOT EXECUTED
a000cf18: 85d53002 ldrbhi r3, [r5, #2] <== NOT EXECUTED
a000cf1c: 93a03a02 movls r3, #8192 ; 0x2000 <== NOT EXECUTED
a000cf20: 81a03403 lslhi r3, r3, #8 <== NOT EXECUTED
a000cf24: e3500003 cmp r0, #3 <== NOT EXECUTED
a000cf28: e1822003 orr r2, r2, r3 <== NOT EXECUTED
a000cf2c: 85d53003 ldrbhi r3, [r5, #3] <== NOT EXECUTED
a000cf30: 93a03020 movls r3, #32 <== NOT EXECUTED
);
}
return true;
}
a000cf34: 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(
a000cf38: e1823003 orr r3, r2, r3 <== NOT EXECUTED
a000cf3c: e584300c str r3, [r4, #12] <== NOT EXECUTED
);
}
return true;
}
a000cf40: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000b490 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000b490: e92d4070 push {r4, r5, r6, lr}
if ( !the_heap )
a000b494: e2506000 subs r6, r0, #0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
a000b498: e1a05001 mov r5, r1
if ( !the_heap )
a000b49c: 0a00000b beq a000b4d0 <_Protected_heap_Get_information+0x40>
return false;
if ( !the_info )
a000b4a0: e3510000 cmp r1, #0
a000b4a4: 0a00000b beq a000b4d8 <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
a000b4a8: e59f4030 ldr r4, [pc, #48] ; a000b4e0 <_Protected_heap_Get_information+0x50>
a000b4ac: e5940000 ldr r0, [r4]
a000b4b0: ebfffbb4 bl a000a388 <_API_Mutex_Lock>
_Heap_Get_information( the_heap, the_info );
a000b4b4: e1a00006 mov r0, r6
a000b4b8: e1a01005 mov r1, r5
a000b4bc: eb000fa7 bl a000f360 <_Heap_Get_information>
_RTEMS_Unlock_allocator();
a000b4c0: e5940000 ldr r0, [r4]
a000b4c4: ebfffbc8 bl a000a3ec <_API_Mutex_Unlock>
return true;
a000b4c8: e3a00001 mov r0, #1
a000b4cc: e8bd8070 pop {r4, r5, r6, pc}
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
if ( !the_heap )
return false;
a000b4d0: e1a00006 mov r0, r6
a000b4d4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
if ( !the_info )
return false;
a000b4d8: e1a00001 mov r0, r1 <== NOT EXECUTED
_RTEMS_Lock_allocator();
_Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
return true;
}
a000b4dc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000ff00 <_Protected_heap_Walk>:
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff00: e59f3054 ldr r3, [pc, #84] ; a000ff5c <_Protected_heap_Walk+0x5c><== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff04: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff08: e5933000 ldr r3, [r3] <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff0c: e1a06000 mov r6, r0 <== NOT EXECUTED
a000ff10: e1a05001 mov r5, r1 <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff14: e3530000 cmp r3, #0 <== NOT EXECUTED
bool _Protected_heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
a000ff18: e20270ff and r7, r2, #255 ; 0xff <== NOT EXECUTED
* then it is forbidden to lock a mutex. But since we are inside
* a critical section, it should be safe to walk it unlocked.
*
* NOTE: Dispatching is also disabled during initialization.
*/
if ( !_Thread_Dispatch_disable_level ) {
a000ff1c: 1a00000b bne a000ff50 <_Protected_heap_Walk+0x50> <== NOT EXECUTED
_RTEMS_Lock_allocator();
a000ff20: e59f4038 ldr r4, [pc, #56] ; a000ff60 <_Protected_heap_Walk+0x60><== NOT EXECUTED
a000ff24: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000ff28: ebfff868 bl a000e0d0 <_API_Mutex_Lock> <== NOT EXECUTED
status = _Heap_Walk( the_heap, source, do_dump );
a000ff2c: e1a01005 mov r1, r5 <== NOT EXECUTED
a000ff30: e1a02007 mov r2, r7 <== NOT EXECUTED
a000ff34: e1a00006 mov r0, r6 <== NOT EXECUTED
a000ff38: ebfffc3f bl a000f03c <_Heap_Walk> <== NOT EXECUTED
a000ff3c: e1a05000 mov r5, r0 <== NOT EXECUTED
_RTEMS_Unlock_allocator();
a000ff40: e5940000 ldr r0, [r4] <== NOT EXECUTED
a000ff44: ebfff87a bl a000e134 <_API_Mutex_Unlock> <== NOT EXECUTED
} else {
status = _Heap_Walk( the_heap, source, do_dump );
}
return status;
}
a000ff48: e1a00005 mov r0, r5 <== NOT EXECUTED
a000ff4c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a000ff50: e1a02007 mov r2, r7 <== NOT EXECUTED
}
return status;
}
a000ff54: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
if ( !_Thread_Dispatch_disable_level ) {
_RTEMS_Lock_allocator();
status = _Heap_Walk( the_heap, source, do_dump );
_RTEMS_Unlock_allocator();
} else {
status = _Heap_Walk( the_heap, source, do_dump );
a000ff58: eafffc37 b a000f03c <_Heap_Walk> <== NOT EXECUTED
a000e2f8 <_RTEMS_Tasks_Invoke_task_variable_dtor>:
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000e2f8: e59f203c ldr r2, [pc, #60] ; a000e33c <_RTEMS_Tasks_Invoke_task_variable_dtor+0x44><== NOT EXECUTED
)
{
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
a000e2fc: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000e300: e92d4010 push {r4, lr} <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000e304: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
)
{
a000e308: e1a04001 mov r4, r1 <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
a000e30c: e1520000 cmp r2, r0 <== NOT EXECUTED
value = *tvp->ptr;
a000e310: 05912004 ldreq r2, [r1, #4] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e314: 05911008 ldreq r1, [r1, #8] <== NOT EXECUTED
} else {
value = tvp->tval;
a000e318: 1594000c ldrne r0, [r4, #12] <== NOT EXECUTED
void (*dtor)(void *);
void *value;
dtor = tvp->dtor;
if (_Thread_Is_executing(the_thread)) {
value = *tvp->ptr;
a000e31c: 05920000 ldreq r0, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e320: 05821000 streq r1, [r2] <== NOT EXECUTED
} else {
value = tvp->tval;
}
if ( dtor )
a000e324: e3530000 cmp r3, #0 <== NOT EXECUTED
a000e328: 0a000000 beq a000e330 <_RTEMS_Tasks_Invoke_task_variable_dtor+0x38><== NOT EXECUTED
(*dtor)(value);
a000e32c: e12fff33 blx r3 <== NOT EXECUTED
_Workspace_Free(tvp);
a000e330: e1a00004 mov r0, r4 <== NOT EXECUTED
}
a000e334: e8bd4010 pop {r4, lr} <== NOT EXECUTED
}
if ( dtor )
(*dtor)(value);
_Workspace_Free(tvp);
a000e338: eafff8ee b a000c6f8 <_Workspace_Free> <== NOT EXECUTED
a000e1d0 <_RTEMS_tasks_Delete_extension>:
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
a000e1d0: e3a03000 mov r3, #0
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a000e1d4: e92d4070 push {r4, r5, r6, lr}
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
a000e1d8: e5916100 ldr r6, [r1, #256] ; 0x100
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
a000e1dc: e1a04001 mov r4, r1
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
a000e1e0: e5813100 str r3, [r1, #256] ; 0x100
while (tvp) {
a000e1e4: ea000004 b a000e1fc <_RTEMS_tasks_Delete_extension+0x2c>
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a000e1e8: e1a01006 mov r1, r6 <== NOT EXECUTED
a000e1ec: e1a00004 mov r0, r4 <== NOT EXECUTED
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
a000e1f0: e5965000 ldr r5, [r6] <== NOT EXECUTED
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
a000e1f4: eb00003f bl a000e2f8 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
tvp = next;
a000e1f8: e1a06005 mov r6, r5 <== NOT EXECUTED
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
a000e1fc: e3560000 cmp r6, #0
a000e200: 1afffff8 bne a000e1e8 <_RTEMS_tasks_Delete_extension+0x18>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
a000e204: e59400f4 ldr r0, [r4, #244] ; 0xf4
a000e208: ebfff93a bl a000c6f8 <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
a000e20c: e58460f4 str r6, [r4, #244] ; 0xf4
}
a000e210: e8bd8070 pop {r4, r5, r6, pc}
a000e0d8 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
a000e0d8: e5903100 ldr r3, [r0, #256] ; 0x100
while (tvp) {
a000e0dc: ea000005 b a000e0f8 <_RTEMS_tasks_Switch_extension+0x20>
tvp->tval = *tvp->ptr;
a000e0e0: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000e0e4: e5920000 ldr r0, [r2] <== NOT EXECUTED
a000e0e8: e583000c str r0, [r3, #12] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
a000e0ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
a000e0f0: e5933000 ldr r3, [r3] <== NOT EXECUTED
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
a000e0f4: e5820000 str r0, [r2] <== NOT EXECUTED
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
a000e0f8: e3530000 cmp r3, #0
a000e0fc: 1afffff7 bne a000e0e0 <_RTEMS_tasks_Switch_extension+0x8>
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
a000e100: e5913100 ldr r3, [r1, #256] ; 0x100
while (tvp) {
a000e104: ea000005 b a000e120 <_RTEMS_tasks_Switch_extension+0x48>
tvp->gval = *tvp->ptr;
a000e108: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000e10c: e5921000 ldr r1, [r2] <== NOT EXECUTED
a000e110: e5831008 str r1, [r3, #8] <== NOT EXECUTED
*tvp->ptr = tvp->tval;
a000e114: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
tvp = (rtems_task_variable_t *)tvp->next;
a000e118: e5933000 ldr r3, [r3] <== NOT EXECUTED
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
a000e11c: e5821000 str r1, [r2] <== NOT EXECUTED
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
a000e120: e3530000 cmp r3, #0
a000e124: 1afffff7 bne a000e108 <_RTEMS_tasks_Switch_extension+0x30>
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
a000e128: e12fff1e bx lr
a000a8b8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
a000a8b8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
a000a8bc: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a8c0: e1a0200d mov r2, sp <== NOT EXECUTED
a000a8c4: e59f0088 ldr r0, [pc, #136] ; a000a954 <_Rate_monotonic_Timeout+0x9c><== NOT EXECUTED
a000a8c8: eb00072a bl a000c578 <_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 ) {
a000a8cc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a8d0: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a8d4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a8d8: 1a00001c bne a000a950 <_Rate_monotonic_Timeout+0x98> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_thread = the_period->owner;
a000a8dc: 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);
a000a8e0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
a000a8e4: e3130901 tst r3, #16384 ; 0x4000 <== NOT EXECUTED
a000a8e8: 0a000006 beq a000a908 <_Rate_monotonic_Timeout+0x50> <== NOT EXECUTED
a000a8ec: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED
a000a8f0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
a000a8f4: e1520003 cmp r2, r3 <== NOT EXECUTED
a000a8f8: 1a000002 bne a000a908 <_Rate_monotonic_Timeout+0x50> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000a8fc: e59f1054 ldr r1, [pc, #84] ; a000a958 <_Rate_monotonic_Timeout+0xa0><== NOT EXECUTED
a000a900: eb000922 bl a000cd90 <_Thread_Clear_state> <== NOT EXECUTED
a000a904: ea000006 b a000a924 <_Rate_monotonic_Timeout+0x6c> <== 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 ) {
a000a908: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
a000a90c: 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;
a000a910: 13a03004 movne r3, #4 <== NOT EXECUTED
a000a914: 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 ) {
a000a918: 1a000008 bne a000a940 <_Rate_monotonic_Timeout+0x88> <== NOT EXECUTED
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
a000a91c: e2833002 add r3, r3, #2 <== NOT EXECUTED
a000a920: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
a000a924: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a928: ebfffe82 bl a000a338 <_Rate_monotonic_Initiate_statistics> <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a92c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a930: e59f0024 ldr r0, [pc, #36] ; a000a95c <_Rate_monotonic_Timeout+0xa4><== NOT EXECUTED
a000a934: e2841010 add r1, r4, #16 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a938: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a93c: eb000d9e bl a000dfbc <_Watchdog_Insert> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000a940: e59f3018 ldr r3, [pc, #24] ; a000a960 <_Rate_monotonic_Timeout+0xa8><== NOT EXECUTED
a000a944: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a948: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000a94c: e5832000 str r2, [r3] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
a000a950: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
a000a538 <_TOD_Get_uptime_as_timespec>:
*/
void _TOD_Get_uptime_as_timespec(
struct timespec *uptime
)
{
a000a538: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED
a000a53c: e1a04000 mov r4, r0 <== NOT EXECUTED
Timestamp_Control uptime_ts;
/* assume time checked for NULL by caller */
_TOD_Get_uptime( &uptime_ts );
a000a540: e1a0000d mov r0, sp <== NOT EXECUTED
a000a544: eb001127 bl a000e9e8 <_TOD_Get_uptime> <== NOT EXECUTED
_Timestamp_To_timespec( &uptime_ts, uptime );
a000a548: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a000a54c: e884000c stm r4, {r2, r3} <== NOT EXECUTED
}
a000a550: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED
a000a198 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
a000a198: e92d4013 push {r0, r1, r4, lr}
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a19c: e3a03000 mov r3, #0
a000a1a0: e58d3000 str r3, [sp]
a000a1a4: e59f3054 ldr r3, [pc, #84] ; a000a200 <_TOD_Tickle_ticks+0x68>
a000a1a8: e3a02ffa mov r2, #1000 ; 0x3e8
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1ac: e1a0100d mov r1, sp
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a1b0: e593300c ldr r3, [r3, #12]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1b4: e59f0048 ldr r0, [pc, #72] ; a000a204 <_TOD_Tickle_ticks+0x6c>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
a000a1b8: e0030392 mul r3, r2, r3
a000a1bc: e58d3004 str r3, [sp, #4]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
a000a1c0: e59f3040 ldr r3, [pc, #64] ; a000a208 <_TOD_Tickle_ticks+0x70>
a000a1c4: e5932000 ldr r2, [r3]
a000a1c8: e2822001 add r2, r2, #1
a000a1cc: e5832000 str r2, [r3]
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
a000a1d0: eb0007b8 bl a000c0b8 <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
a000a1d4: e59f0030 ldr r0, [pc, #48] ; a000a20c <_TOD_Tickle_ticks+0x74>
a000a1d8: e1a0100d mov r1, sp
a000a1dc: eb0007b5 bl a000c0b8 <_Timespec_Add_to>
a000a1e0: e1a04000 mov r4, r0
while ( seconds ) {
a000a1e4: ea000002 b a000a1f4 <_TOD_Tickle_ticks+0x5c>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
a000a1e8: e59f0020 ldr r0, [pc, #32] ; a000a210 <_TOD_Tickle_ticks+0x78><== NOT EXECUTED
a000a1ec: eb0008fe bl a000c5ec <_Watchdog_Tickle> <== NOT EXECUTED
_Watchdog_Tickle_seconds();
seconds--;
a000a1f0: e2444001 sub r4, r4, #1 <== NOT EXECUTED
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
a000a1f4: e3540000 cmp r4, #0
a000a1f8: 1afffffa bne a000a1e8 <_TOD_Tickle_ticks+0x50>
_Watchdog_Tickle_seconds();
seconds--;
}
}
a000a1fc: e8bd801c pop {r2, r3, r4, pc}
a000a3d0 <_TOD_Validate>:
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000a3d0: e59f30b4 ldr r3, [pc, #180] ; a000a48c <_TOD_Validate+0xbc>
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
a000a3d4: 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) ||
a000a3d8: e2504000 subs r4, r0, #0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
a000a3dc: e593100c ldr r1, [r3, #12]
if ((!the_tod) ||
a000a3e0: 0a000021 beq a000a46c <_TOD_Validate+0x9c>
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
a000a3e4: e59f00a4 ldr r0, [pc, #164] ; a000a490 <_TOD_Validate+0xc0>
a000a3e8: eb004474 bl a001b5c0 <__aeabi_uidiv>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
a000a3ec: e5943018 ldr r3, [r4, #24]
a000a3f0: e1530000 cmp r3, r0
a000a3f4: 2a000020 bcs a000a47c <_TOD_Validate+0xac>
(the_tod->ticks >= ticks_per_second) ||
a000a3f8: e5943014 ldr r3, [r4, #20]
a000a3fc: e353003b cmp r3, #59 ; 0x3b
a000a400: 8a00001d bhi a000a47c <_TOD_Validate+0xac>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
a000a404: e5943010 ldr r3, [r4, #16]
a000a408: e353003b cmp r3, #59 ; 0x3b
a000a40c: 8a00001a bhi a000a47c <_TOD_Validate+0xac>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
a000a410: e594300c ldr r3, [r4, #12]
a000a414: e3530017 cmp r3, #23
a000a418: 8a000017 bhi a000a47c <_TOD_Validate+0xac>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
a000a41c: e5943004 ldr r3, [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) ||
a000a420: e3530000 cmp r3, #0
a000a424: 0a000012 beq a000a474 <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
a000a428: e353000c cmp r3, #12
a000a42c: 8a000012 bhi a000a47c <_TOD_Validate+0xac>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
a000a430: 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) ||
a000a434: e59f1058 ldr r1, [pc, #88] ; a000a494 <_TOD_Validate+0xc4>
a000a438: e1520001 cmp r2, r1
a000a43c: 9a000010 bls a000a484 <_TOD_Validate+0xb4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
a000a440: e5940008 ldr r0, [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) ||
a000a444: e3500000 cmp r0, #0
a000a448: 0a00000e beq a000a488 <_TOD_Validate+0xb8>
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
a000a44c: e3120003 tst r2, #3
a000a450: e59f2040 ldr r2, [pc, #64] ; a000a498 <_TOD_Validate+0xc8>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
a000a454: 0283300d addeq r3, r3, #13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
a000a458: e7924103 ldr r4, [r2, r3, lsl #2]
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
a000a45c: e1500004 cmp r0, r4
a000a460: 83a00000 movhi r0, #0
a000a464: 93a00001 movls r0, #1
a000a468: 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;
a000a46c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a470: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a474: e1a00003 mov r0, r3 <== NOT EXECUTED
a000a478: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a47c: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a480: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a484: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
a000a488: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000b340 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
a000b340: e1d120b8 ldrh r2, [r1, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b344: e590301c ldr r3, [r0, #28]
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
a000b348: e92d4070 push {r4, r5, r6, lr}
a000b34c: e1a04001 mov r4, r1
a000b350: e3a01000 mov r1, #0
a000b354: e7831102 str r1, [r3, r2, lsl #2]
a000b358: e1a05000 mov r5, r0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000b35c: e59f6094 ldr r6, [pc, #148] ; a000b3f8 <_Thread_Close+0xb8>
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
a000b360: e1a00004 mov r0, r4
a000b364: e5963000 ldr r3, [r6]
a000b368: e2433001 sub r3, r3, #1
a000b36c: e5863000 str r3, [r6]
a000b370: eb0003e9 bl a000c31c <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b374: e5963000 ldr r3, [r6]
a000b378: e2833001 add r3, r3, #1
a000b37c: e5863000 str r3, [r6]
/*
* 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 );
a000b380: e1a00005 mov r0, r5
a000b384: e1a01004 mov r1, r4
a000b388: ebfffcd4 bl a000a6e0 <_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 );
a000b38c: e1a00004 mov r0, r4
a000b390: e3a01001 mov r1, #1
a000b394: eb0002b1 bl a000be60 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000b398: e1a00004 mov r0, r4
a000b39c: eb000251 bl a000bce8 <_Thread_queue_Extract_with_proxy>
a000b3a0: e3500000 cmp r0, #0
a000b3a4: 1a000004 bne a000b3bc <_Thread_Close+0x7c>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000b3a8: e5943050 ldr r3, [r4, #80] ; 0x50
a000b3ac: e3530002 cmp r3, #2
a000b3b0: 1a000001 bne a000b3bc <_Thread_Close+0x7c>
(void) _Watchdog_Remove( &the_thread->Timer );
a000b3b4: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000b3b8: eb000462 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
a000b3bc: e59f0038 ldr r0, [pc, #56] ; a000b3fc <_Thread_Close+0xbc>
a000b3c0: e1a01004 mov r1, r4
a000b3c4: e5903018 ldr r3, [r0, #24]
a000b3c8: 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 );
a000b3cc: e1a00004 mov r0, r4
a000b3d0: eb0002f0 bl a000bf98 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
a000b3d4: e59400fc ldr r0, [r4, #252] ; 0xfc
/*
* 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;
a000b3d8: e3a03000 mov r3, #0
a000b3dc: e58430bc str r3, [r4, #188] ; 0xbc
if ( the_thread->extensions )
a000b3e0: e1500003 cmp r0, r3
a000b3e4: 0a000000 beq a000b3ec <_Thread_Close+0xac>
(void) _Workspace_Free( the_thread->extensions );
a000b3e8: eb0004c2 bl a000c6f8 <_Workspace_Free>
the_thread->extensions = NULL;
a000b3ec: e3a03000 mov r3, #0
a000b3f0: e58430fc str r3, [r4, #252] ; 0xfc
}
a000b3f4: e8bd8070 pop {r4, r5, r6, pc}
a000b644 <_Thread_Get>:
*/
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
a000b644: 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 ) ) {
a000b648: e2501000 subs r1, r0, #0
a000b64c: 1a000007 bne a000b670 <_Thread_Get+0x2c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000b650: e59f3074 ldr r3, [pc, #116] ; a000b6cc <_Thread_Get+0x88>
a000b654: e5930000 ldr r0, [r3]
a000b658: e2800001 add r0, r0, #1
a000b65c: e5830000 str r0, [r3]
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
a000b660: e59f3068 ldr r3, [pc, #104] ; a000b6d0 <_Thread_Get+0x8c>
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;
a000b664: e5821000 str r1, [r2]
tp = _Thread_Executing;
a000b668: e5930004 ldr r0, [r3, #4]
goto done;
a000b66c: e12fff1e bx lr
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000b670: e1a00c21 lsr r0, r1, #24
a000b674: e2000007 and r0, r0, #7
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000b678: e2403001 sub r3, r0, #1
a000b67c: e3530002 cmp r3, #2
a000b680: 9a00000d bls a000b6bc <_Thread_Get+0x78>
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
a000b684: e3a03001 mov r3, #1
a000b688: 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;
a000b68c: e3a00000 mov r0, #0
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
a000b690: e12fff1e bx lr
}
api_information = _Objects_Information_table[ the_api ];
a000b694: e59fc038 ldr ip, [pc, #56] ; a000b6d4 <_Thread_Get+0x90>
a000b698: e79c0100 ldr r0, [ip, r0, lsl #2]
/*
* There is no way for this to happen if POSIX is enabled.
*/
#if !defined(RTEMS_POSIX_API)
if ( !api_information ) {
a000b69c: e3500000 cmp r0, #0
a000b6a0: 0a000002 beq a000b6b0 <_Thread_Get+0x6c>
*location = OBJECTS_ERROR;
goto done;
}
#endif
information = api_information[ the_class ];
a000b6a4: e5900004 ldr r0, [r0, #4]
if ( !information ) {
a000b6a8: e3500000 cmp r0, #0
a000b6ac: 1a000001 bne a000b6b8 <_Thread_Get+0x74>
*location = OBJECTS_ERROR;
a000b6b0: e5823000 str r3, [r2] <== NOT EXECUTED
goto done;
a000b6b4: e12fff1e bx lr <== NOT EXECUTED
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
a000b6b8: eafffd07 b a000aadc <_Objects_Get>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
a000b6bc: e1a03da1 lsr r3, r1, #27
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
a000b6c0: e3530001 cmp r3, #1
a000b6c4: 0afffff2 beq a000b694 <_Thread_Get+0x50>
a000b6c8: eaffffed b a000b684 <_Thread_Get+0x40> <== NOT EXECUTED
a000b6d8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6d8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
a000b6dc: e3a06000 mov r6, #0
a000b6e0: e58160f4 str r6, [r1, #244] ; 0xf4
a000b6e4: e58160f8 str r6, [r1, #248] ; 0xf8
extensions_area = NULL;
the_thread->libc_reent = NULL;
a000b6e8: e58160f0 str r6, [r1, #240] ; 0xf0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6ec: e1a05000 mov r5, r0
a000b6f0: e1a04001 mov r4, r1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000b6f4: e1a00001 mov r0, r1
a000b6f8: e1a01003 mov r1, r3
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
a000b6fc: e1a07003 mov r7, r3
a000b700: e59da024 ldr sl, [sp, #36] ; 0x24
a000b704: e5dd8028 ldrb r8, [sp, #40] ; 0x28
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
a000b708: eb00020b bl a000bf3c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
a000b70c: e1500006 cmp r0, r6
a000b710: 13a03000 movne r3, #0
a000b714: 03a03001 moveq r3, #1
a000b718: e1500007 cmp r0, r7
a000b71c: 21a07003 movcs r7, r3
a000b720: 33837001 orrcc r7, r3, #1
a000b724: e1570006 cmp r7, r6
a000b728: 1a000058 bne a000b890 <_Thread_Initialize+0x1b8>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a000b72c: e59430bc ldr r3, [r4, #188] ; 0xbc
the_stack->size = size;
a000b730: e58400b4 str r0, [r4, #180] ; 0xb4
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000b734: e5847050 str r7, [r4, #80] ; 0x50
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
a000b738: e58430b8 str r3, [r4, #184] ; 0xb8
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
a000b73c: e59f315c ldr r3, [pc, #348] ; a000b8a0 <_Thread_Initialize+0x1c8>
the_watchdog->routine = routine;
a000b740: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000b744: e5847068 str r7, [r4, #104] ; 0x68
a000b748: e5936000 ldr r6, [r3]
the_watchdog->user_data = user_data;
a000b74c: e584706c str r7, [r4, #108] ; 0x6c
a000b750: e3560000 cmp r6, #0
a000b754: 0a000004 beq a000b76c <_Thread_Initialize+0x94>
extensions_area = _Workspace_Allocate(
a000b758: e2866001 add r6, r6, #1
a000b75c: e1a00106 lsl r0, r6, #2
a000b760: eb0003de bl a000c6e0 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
a000b764: e2506000 subs r6, r0, #0
a000b768: 0a00002f beq a000b82c <_Thread_Initialize+0x154>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a000b76c: e3560000 cmp r6, #0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
a000b770: e58460fc str r6, [r4, #252] ; 0xfc
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
a000b774: 0a000009 beq a000b7a0 <_Thread_Initialize+0xc8>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a000b778: e59f3120 ldr r3, [pc, #288] ; a000b8a0 <_Thread_Initialize+0x1c8>
a000b77c: e1a02006 mov r2, r6
a000b780: e5930000 ldr r0, [r3]
a000b784: e3a03000 mov r3, #0
the_thread->extensions[i] = NULL;
a000b788: e1a01003 mov r1, r3
a000b78c: ea000001 b a000b798 <_Thread_Initialize+0xc0>
a000b790: e4821004 str r1, [r2], #4
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
a000b794: e2833001 add r3, r3, #1
a000b798: e1530000 cmp r3, r0
a000b79c: 9afffffb bls a000b790 <_Thread_Initialize+0xb8>
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a000b7a0: e59d302c ldr r3, [sp, #44] ; 0x2c
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
a000b7a4: e59f00f8 ldr r0, [pc, #248] ; a000b8a4 <_Thread_Initialize+0x1cc>
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
a000b7a8: e3a07000 mov r7, #0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
a000b7ac: e58430a4 str r3, [r4, #164] ; 0xa4
the_thread->Start.budget_callout = budget_callout;
a000b7b0: e59d3030 ldr r3, [sp, #48] ; 0x30
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
a000b7b4: e3a09001 mov r9, #1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
a000b7b8: e5c480a0 strb r8, [r4, #160] ; 0xa0
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
a000b7bc: e58430a8 str r3, [r4, #168] ; 0xa8
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a000b7c0: e59d3034 ldr r3, [sp, #52] ; 0x34
the_thread->current_state = STATES_DORMANT;
a000b7c4: e5849010 str r9, [r4, #16]
the_thread->Wait.queue = NULL;
a000b7c8: e5847044 str r7, [r4, #68] ; 0x44
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
a000b7cc: e58430ac str r3, [r4, #172] ; 0xac
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
a000b7d0: e584701c str r7, [r4, #28]
the_thread->real_priority = priority;
a000b7d4: e584a018 str sl, [r4, #24]
the_thread->Start.initial_priority = priority;
a000b7d8: e584a0b0 str sl, [r4, #176] ; 0xb0
RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(
Scheduler_Control *the_scheduler,
Thread_Control *the_thread
)
{
return
a000b7dc: e5903014 ldr r3, [r0, #20]
a000b7e0: e1a01004 mov r1, r4
a000b7e4: e12fff33 blx r3
sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
if ( !sched )
a000b7e8: e2508000 subs r8, r0, #0
a000b7ec: 0a00000f beq a000b830 <_Thread_Initialize+0x158>
goto failed;
_Thread_Set_priority( the_thread, priority );
a000b7f0: e1a00004 mov r0, r4
a000b7f4: e1a0100a mov r1, sl
a000b7f8: eb00018f bl a000be3c <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
a000b7fc: e595301c ldr r3, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000b800: e1d420b8 ldrh r2, [r4, #8]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
a000b804: e5847084 str r7, [r4, #132] ; 0x84
a000b808: e5847088 str r7, [r4, #136] ; 0x88
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000b80c: e7834102 str r4, [r3, r2, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000b810: e59d3038 ldr r3, [sp, #56] ; 0x38
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
a000b814: e1a00004 mov r0, r4
a000b818: e584300c str r3, [r4, #12]
a000b81c: eb0002a9 bl a000c2c8 <_User_extensions_Thread_create>
if ( extension_status )
a000b820: e1500007 cmp r0, r7
a000b824: 0a000001 beq a000b830 <_Thread_Initialize+0x158>
a000b828: ea00001a b a000b898 <_Thread_Initialize+0x1c0>
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
a000b82c: e1a08006 mov r8, r6
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
a000b830: e59400f0 ldr r0, [r4, #240] ; 0xf0
a000b834: e3500000 cmp r0, #0
a000b838: 0a000000 beq a000b840 <_Thread_Initialize+0x168>
_Workspace_Free( the_thread->libc_reent );
a000b83c: eb0003ad bl a000c6f8 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000b840: e59400f4 ldr r0, [r4, #244] ; 0xf4
a000b844: e3500000 cmp r0, #0
a000b848: 0a000000 beq a000b850 <_Thread_Initialize+0x178>
_Workspace_Free( the_thread->API_Extensions[i] );
a000b84c: eb0003a9 bl a000c6f8 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
a000b850: e59400f8 ldr r0, [r4, #248] ; 0xf8
a000b854: e3500000 cmp r0, #0
a000b858: 0a000000 beq a000b860 <_Thread_Initialize+0x188>
_Workspace_Free( the_thread->API_Extensions[i] );
a000b85c: eb0003a5 bl a000c6f8 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
a000b860: e3560000 cmp r6, #0
a000b864: 0a000001 beq a000b870 <_Thread_Initialize+0x198>
(void) _Workspace_Free( extensions_area );
a000b868: e1a00006 mov r0, r6
a000b86c: eb0003a1 bl a000c6f8 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
if ( sched )
a000b870: e3580000 cmp r8, #0
a000b874: 0a000001 beq a000b880 <_Thread_Initialize+0x1a8>
(void) _Workspace_Free( sched );
a000b878: e1a00008 mov r0, r8
a000b87c: eb00039d bl a000c6f8 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
a000b880: e1a00004 mov r0, r4
a000b884: eb0001c3 bl a000bf98 <_Thread_Stack_Free>
return false;
a000b888: e3a00000 mov r0, #0
a000b88c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
a000b890: e1a00006 mov r0, r6
a000b894: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
a000b898: e1a00009 mov r0, r9
_Thread_Stack_Free( the_thread );
return false;
}
a000b89c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000fb3c <_Thread_Reset>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
a000fb3c: e3a03000 mov r3, #0
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000fb40: e92d4010 push {r4, lr}
the_thread->resource_count = 0;
a000fb44: e580301c str r3, [r0, #28]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a000fb48: e5d030a0 ldrb r3, [r0, #160] ; 0xa0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
a000fb4c: e5801098 str r1, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a000fb50: e580209c str r2, [r0, #156] ; 0x9c
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
a000fb54: e5c03074 strb r3, [r0, #116] ; 0x74
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a000fb58: e59030a4 ldr r3, [r0, #164] ; 0xa4
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000fb5c: e1a04000 mov r4, r0
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
a000fb60: e580307c str r3, [r0, #124] ; 0x7c
the_thread->budget_callout = the_thread->Start.budget_callout;
a000fb64: e59030a8 ldr r3, [r0, #168] ; 0xa8
a000fb68: e5803080 str r3, [r0, #128] ; 0x80
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
a000fb6c: ebfff389 bl a000c998 <_Thread_queue_Extract_with_proxy>
a000fb70: e3500000 cmp r0, #0
a000fb74: 1a000004 bne a000fb8c <_Thread_Reset+0x50>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
a000fb78: e5943050 ldr r3, [r4, #80] ; 0x50
a000fb7c: e3530002 cmp r3, #2
a000fb80: 1a000001 bne a000fb8c <_Thread_Reset+0x50>
(void) _Watchdog_Remove( &the_thread->Timer );
a000fb84: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000fb88: ebfff5c9 bl a000d2b4 <_Watchdog_Remove> <== NOT EXECUTED
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
a000fb8c: e59410b0 ldr r1, [r4, #176] ; 0xb0
a000fb90: e5943014 ldr r3, [r4, #20]
a000fb94: e1530001 cmp r3, r1
a000fb98: 0a000003 beq a000fbac <_Thread_Reset+0x70>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
a000fb9c: 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;
a000fba0: e5841018 str r1, [r4, #24]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
a000fba4: e8bd4010 pop {r4, 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 );
a000fba8: eafff3ec b a000cb60 <_Thread_Set_priority>
a000fbac: e8bd8010 pop {r4, pc}
a000c000 <_Thread_Start>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
a000c000: e590c010 ldr ip, [r0, #16]
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c004: e92d4010 push {r4, lr}
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c008: e21cc001 ands ip, ip, #1
Thread_Start_types the_prototype,
void *entry_point,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
a000c00c: e1a04000 mov r4, r0
if ( _States_Is_dormant( the_thread->current_state ) ) {
a000c010: 0a00000b beq a000c044 <_Thread_Start+0x44>
the_thread->Start.entry_point = (Thread_Entry) entry_point;
the_thread->Start.prototype = the_prototype;
the_thread->Start.pointer_argument = pointer_argument;
a000c014: e5803098 str r3, [r0, #152] ; 0x98
the_thread->Start.numeric_argument = numeric_argument;
a000c018: 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;
a000c01c: e5802090 str r2, [r0, #144] ; 0x90
the_thread->Start.prototype = the_prototype;
a000c020: e5801094 str r1, [r0, #148] ; 0x94
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
a000c024: e580309c str r3, [r0, #156] ; 0x9c
_Thread_Load_environment( the_thread );
a000c028: eb000aa1 bl a000eab4 <_Thread_Load_environment>
_Thread_Ready( the_thread );
a000c02c: e1a00004 mov r0, r4
a000c030: eb000b37 bl a000ed14 <_Thread_Ready>
_User_extensions_Thread_start( the_thread );
a000c034: e1a00004 mov r0, r4
a000c038: eb0000c9 bl a000c364 <_User_extensions_Thread_start>
return true;
a000c03c: e3a00001 mov r0, #1
a000c040: e8bd8010 pop {r4, pc}
}
return false;
a000c044: e1a0000c mov r0, ip <== NOT EXECUTED
}
a000c048: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000f32c <_Thread_Suspend>:
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
a000f32c: e92d4010 push {r4, lr}
a000f330: e1a01000 mov r1, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000f334: e10f4000 mrs r4, CPSR
a000f338: e3843080 orr r3, r4, #128 ; 0x80
a000f33c: e129f003 msr CPSR_fc, r3
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
a000f340: e5903010 ldr r3, [r0, #16]
a000f344: e3530000 cmp r3, #0
a000f348: 0a000002 beq a000f358 <_Thread_Suspend+0x2c>
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
)
{
return (current_state | states_to_set);
a000f34c: e3833002 orr r3, r3, #2 <== NOT EXECUTED
the_thread->current_state =
a000f350: e5803010 str r3, [r0, #16] <== NOT EXECUTED
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
a000f354: ea000004 b a000f36c <_Thread_Suspend+0x40> <== NOT EXECUTED
return;
}
the_thread->current_state = STATES_SUSPENDED;
a000f358: e3a03002 mov r3, #2
a000f35c: e5803010 str r3, [r0, #16]
a000f360: e59f000c ldr r0, [pc, #12] ; a000f374 <_Thread_Suspend+0x48>
a000f364: e590300c ldr r3, [r0, #12]
a000f368: e12fff33 blx r3
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000f36c: e129f004 msr CPSR_fc, r4
a000f370: e8bd8010 pop {r4, pc}
a000c04c <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
a000c04c: e59f3058 ldr r3, [pc, #88] ; a000c0ac <_Thread_Tickle_timeslice+0x60>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
a000c050: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
a000c054: e5934004 ldr r4, [r3, #4]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
a000c058: e5d43074 ldrb r3, [r4, #116] ; 0x74
a000c05c: e3530000 cmp r3, #0
a000c060: 0a000010 beq a000c0a8 <_Thread_Tickle_timeslice+0x5c>
return;
if ( !_States_Is_ready( executing->current_state ) )
a000c064: e5943010 ldr r3, [r4, #16]
a000c068: e3530000 cmp r3, #0
a000c06c: 1a00000d bne a000c0a8 <_Thread_Tickle_timeslice+0x5c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
a000c070: e594307c ldr r3, [r4, #124] ; 0x7c
a000c074: e3530001 cmp r3, #1
a000c078: 1a00000a bne a000c0a8 <_Thread_Tickle_timeslice+0x5c>
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 ) {
a000c07c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c080: e2433001 sub r3, r3, #1 <== NOT EXECUTED
a000c084: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c088: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c08c: ca000005 bgt a000c0a8 <_Thread_Tickle_timeslice+0x5c> <== NOT EXECUTED
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield( &_Scheduler );
a000c090: e59f0018 ldr r0, [pc, #24] ; a000c0b0 <_Thread_Tickle_timeslice+0x64><== NOT EXECUTED
a000c094: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
a000c098: 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;
a000c09c: e59f3010 ldr r3, [pc, #16] ; a000c0b4 <_Thread_Tickle_timeslice+0x68><== NOT EXECUTED
a000c0a0: e5933000 ldr r3, [r3] <== NOT EXECUTED
a000c0a4: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
a000c0a8: e8bd8010 pop {r4, pc}
a000b13c <_Thread_blocking_operation_Cancel>:
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000b13c: e3a03000 mov r3, #0 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b140: e92d4010 push {r4, lr} <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
a000b144: 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 ) ) {
a000b148: e5913050 ldr r3, [r1, #80] ; 0x50 <== NOT EXECUTED
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
a000b14c: e1a04001 mov r4, r1 <== NOT EXECUTED
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
a000b150: e3530002 cmp r3, #2 <== NOT EXECUTED
a000b154: 1a000005 bne a000b170 <_Thread_blocking_operation_Cancel+0x34><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000b158: e2833001 add r3, r3, #1 <== NOT EXECUTED
a000b15c: e5813050 str r3, [r1, #80] ; 0x50 <== NOT EXECUTED
a000b160: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000b164: e2810048 add r0, r1, #72 ; 0x48 <== NOT EXECUTED
a000b168: eb0004f6 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
a000b16c: ea000000 b a000b174 <_Thread_blocking_operation_Cancel+0x38><== NOT EXECUTED
a000b170: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000b174: e59f1008 ldr r1, [pc, #8] ; a000b184 <_Thread_blocking_operation_Cancel+0x48><== NOT EXECUTED
a000b178: e1a00004 mov r0, r4 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000b17c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
a000b180: ea00005b b a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
a000eb00 <_Thread_queue_Dequeue_fifo>:
*/
Thread_Control *_Thread_queue_Dequeue_fifo(
Thread_queue_Control *the_thread_queue
)
{
a000eb00: e92d4030 push {r4, r5, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000eb04: e10f3000 mrs r3, CPSR
a000eb08: e3832080 orr r2, r3, #128 ; 0x80
a000eb0c: e129f002 msr CPSR_fc, r2
return the_thread;
}
_ISR_Enable( level );
return NULL;
}
a000eb10: e1a02000 mov r2, r0
a000eb14: e4925004 ldr r5, [r2], #4
{
ISR_Level level;
Thread_Control *the_thread;
_ISR_Disable( level );
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) {
a000eb18: e1550002 cmp r5, r2
a000eb1c: 0a000013 beq a000eb70 <_Thread_queue_Dequeue_fifo+0x70>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a000eb20: e5952000 ldr r2, [r5]
the_thread = (Thread_Control *)
a000eb24: e1a04005 mov r4, r5
head->next = new_first;
a000eb28: e5802000 str r2, [r0]
new_first->previous = head;
a000eb2c: e5820004 str r0, [r2, #4]
_Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo );
the_thread->Wait.queue = NULL;
a000eb30: e3a02000 mov r2, #0
a000eb34: e5852044 str r2, [r5, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000eb38: e5952050 ldr r2, [r5, #80] ; 0x50
a000eb3c: e3520002 cmp r2, #2
a000eb40: 0a000001 beq a000eb4c <_Thread_queue_Dequeue_fifo+0x4c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000eb44: e129f003 msr CPSR_fc, r3
a000eb48: ea000004 b a000eb60 <_Thread_queue_Dequeue_fifo+0x60>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000eb4c: e3a02003 mov r2, #3 <== NOT EXECUTED
a000eb50: e5852050 str r2, [r5, #80] ; 0x50 <== NOT EXECUTED
a000eb54: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000eb58: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED
a000eb5c: ebfff679 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000eb60: e1a00005 mov r0, r5
a000eb64: e59f1014 ldr r1, [pc, #20] ; a000eb80 <_Thread_queue_Dequeue_fifo+0x80>
a000eb68: ebfff1e1 bl a000b2f4 <_Thread_Clear_state>
a000eb6c: ea000001 b a000eb78 <_Thread_queue_Dequeue_fifo+0x78>
a000eb70: e129f003 msr CPSR_fc, r3
return the_thread;
}
_ISR_Enable( level );
return NULL;
a000eb74: e3a04000 mov r4, #0
}
a000eb78: e1a00004 mov r0, r4
a000eb7c: e8bd8030 pop {r4, r5, pc}
a000b9ac <_Thread_queue_Dequeue_priority>:
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
a000b9ac: e92d4030 push {r4, r5, lr}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000b9b0: e10f1000 mrs r1, CPSR
a000b9b4: e3813080 orr r3, r1, #128 ; 0x80
a000b9b8: e129f003 msr CPSR_fc, r3
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
a000b9bc: e3a02000 mov r2, #0
for( index=0 ;
a000b9c0: e1a03002 mov r3, r2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000b9c4: e3a0c00c mov ip, #12
a000b9c8: e004039c mul r4, ip, r3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000b9cc: e7905002 ldr r5, [r0, r2]
a000b9d0: e2844004 add r4, r4, #4
a000b9d4: e0804004 add r4, r0, r4
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
a000b9d8: e1550004 cmp r5, r4
a000b9dc: 0a000009 beq a000ba08 <_Thread_queue_Dequeue_priority+0x5c>
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
a000b9e0: e3a03000 mov r3, #0
a000b9e4: e5853044 str r3, [r5, #68] ; 0x44
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000b9e8: e5953038 ldr r3, [r5, #56] ; 0x38
a000b9ec: e285c03c add ip, r5, #60 ; 0x3c
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
a000b9f0: e1a04005 mov r4, r5
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;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000b9f4: e153000c cmp r3, ip
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;
a000b9f8: e5952000 ldr r2, [r5]
previous_node = the_thread->Object.Node.previous;
a000b9fc: e5950004 ldr r0, [r5, #4]
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ba00: 1a000007 bne a000ba24 <_Thread_queue_Dequeue_priority+0x78>
a000ba04: ea000017 b a000ba68 <_Thread_queue_Dequeue_priority+0xbc>
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000ba08: e2833001 add r3, r3, #1
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000ba0c: e3530004 cmp r3, #4
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a000ba10: e282200c add r2, r2, #12
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
a000ba14: 1affffeb bne a000b9c8 <_Thread_queue_Dequeue_priority+0x1c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ba18: e129f001 msr CPSR_fc, r1
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
return NULL;
a000ba1c: e3a04000 mov r4, #0
a000ba20: ea00001f b a000baa4 <_Thread_queue_Dequeue_priority+0xf8>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000ba24: e595c040 ldr ip, [r5, #64] ; 0x40 <== NOT EXECUTED
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
a000ba28: e593e000 ldr lr, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000ba2c: 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;
a000ba30: e5803000 str r3, [r0] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000ba34: e5830004 str r0, [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;
a000ba38: e5832000 str r2, [r3] <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000ba3c: e5950038 ldr r0, [r5, #56] ; 0x38 <== NOT EXECUTED
a000ba40: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
a000ba44: e1500002 cmp r0, r2 <== NOT EXECUTED
a000ba48: 0a000008 beq a000ba70 <_Thread_queue_Dequeue_priority+0xc4><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000ba4c: e2832038 add r2, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
a000ba50: e583e038 str lr, [r3, #56] ; 0x38 <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
a000ba54: e58e2004 str r2, [lr, #4] <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
a000ba58: e583c040 str ip, [r3, #64] ; 0x40 <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000ba5c: e283303c add r3, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
a000ba60: e58c3000 str r3, [ip] <== NOT EXECUTED
a000ba64: ea000001 b a000ba70 <_Thread_queue_Dequeue_priority+0xc4> <== NOT EXECUTED
}
} else {
previous_node->next = next_node;
a000ba68: e5802000 str r2, [r0]
next_node->previous = previous_node;
a000ba6c: e5820004 str r0, [r2, #4]
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000ba70: e5953050 ldr r3, [r5, #80] ; 0x50
a000ba74: e3530002 cmp r3, #2
a000ba78: 0a000001 beq a000ba84 <_Thread_queue_Dequeue_priority+0xd8>
a000ba7c: e129f001 msr CPSR_fc, r1
a000ba80: ea000004 b a000ba98 <_Thread_queue_Dequeue_priority+0xec>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
a000ba84: e3a03003 mov r3, #3 <== NOT EXECUTED
a000ba88: e5853050 str r3, [r5, #80] ; 0x50 <== NOT EXECUTED
a000ba8c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000ba90: e2850048 add r0, r5, #72 ; 0x48 <== NOT EXECUTED
a000ba94: eb0002ab bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a000ba98: e1a00005 mov r0, r5
a000ba9c: e59f1008 ldr r1, [pc, #8] ; a000baac <_Thread_queue_Dequeue_priority+0x100>
a000baa0: ebfffe13 bl a000b2f4 <_Thread_Clear_state>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
a000baa4: e1a00004 mov r0, r4
a000baa8: e8bd8030 pop {r4, r5, pc}
a000eb84 <_Thread_queue_Enqueue_fifo>:
Thread_blocking_operation_States _Thread_queue_Enqueue_fifo (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a000eb84: e92d4010 push {r4, lr}
a000eb88: e1a03000 mov r3, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000eb8c: e10fc000 mrs ip, CPSR
a000eb90: e38c0080 orr r0, ip, #128 ; 0x80
a000eb94: e129f000 msr CPSR_fc, r0
Thread_blocking_operation_States sync_state;
ISR_Level level;
_ISR_Disable( level );
sync_state = the_thread_queue->sync_state;
a000eb98: e5930030 ldr r0, [r3, #48] ; 0x30
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000eb9c: e3a04000 mov r4, #0
a000eba0: e5834030 str r4, [r3, #48] ; 0x30
if (sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) {
a000eba4: e3500001 cmp r0, #1
a000eba8: 1a000008 bne a000ebd0 <_Thread_queue_Enqueue_fifo+0x4c>
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a000ebac: e5932008 ldr r2, [r3, #8]
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
a000ebb0: e2834004 add r4, r3, #4
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
a000ebb4: e5831008 str r1, [r3, #8]
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
a000ebb8: e5814000 str r4, [r1]
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
a000ebbc: e5812004 str r2, [r1, #4]
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
a000ebc0: e5821000 str r1, [r2]
_Chain_Append_unprotected(
&the_thread_queue->Queues.Fifo,
&the_thread->Object.Node
);
the_thread->Wait.queue = the_thread_queue;
a000ebc4: e5813044 str r3, [r1, #68] ; 0x44
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ebc8: e129f00c msr CPSR_fc, ip
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000ebcc: e8bd8010 pop {r4, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
a000ebd0: e582c000 str ip, [r2] <== NOT EXECUTED
return sync_state;
}
a000ebd4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000bb50 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
a000bb50: e591c014 ldr ip, [r1, #20]
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 );
a000bb54: e281303c add r3, r1, #60 ; 0x3c
head->next = tail;
a000bb58: e5813038 str r3, [r1, #56] ; 0x38
head->previous = NULL;
a000bb5c: e3a03000 mov r3, #0
a000bb60: e581303c str r3, [r1, #60] ; 0x3c
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
a000bb64: e31c0020 tst ip, #32
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
a000bb68: e2813038 add r3, r1, #56 ; 0x38
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
a000bb6c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
a000bb70: e5813040 str r3, [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 ];
block_state = the_thread_queue->state;
a000bb74: e5907038 ldr r7, [r0, #56] ; 0x38
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
a000bb78: e1a0332c lsr r3, ip, #6
if ( _Thread_queue_Is_reverse_search( priority ) )
a000bb7c: 1a000026 bne a000bc1c <_Thread_queue_Enqueue_priority+0xcc>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bb80: e3a0600c mov r6, #12
a000bb84: e0030396 mul r3, r6, r3
a000bb88: e0808003 add r8, r0, r3
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
a000bb8c: e2833004 add r3, r3, #4
a000bb90: e0806003 add r6, r0, r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bb94: e10f4000 mrs r4, CPSR
a000bb98: e3843080 orr r3, r4, #128 ; 0x80
a000bb9c: e129f003 msr CPSR_fc, r3
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
a000bba0: e3e05000 mvn r5, #0
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
a000bba4: e5983000 ldr r3, [r8]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
a000bba8: ea00000b b a000bbdc <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
a000bbac: e5935014 ldr r5, [r3, #20]
if ( priority <= search_priority )
a000bbb0: e15c0005 cmp ip, r5
a000bbb4: 9a00000a bls a000bbe4 <_Thread_queue_Enqueue_priority+0x94>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000bbb8: e10fa000 mrs sl, CPSR
a000bbbc: e129f004 msr CPSR_fc, r4
a000bbc0: e129f00a msr CPSR_fc, sl
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
a000bbc4: e593a010 ldr sl, [r3, #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) ) {
a000bbc8: e117000a tst r7, sl
a000bbcc: 1a000001 bne a000bbd8 <_Thread_queue_Enqueue_priority+0x88>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bbd0: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bbd4: eaffffee b a000bb94 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
a000bbd8: e5933000 ldr r3, [r3]
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 ) ) {
a000bbdc: e1530006 cmp r3, r6
a000bbe0: 1afffff1 bne a000bbac <_Thread_queue_Enqueue_priority+0x5c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
a000bbe4: e5906030 ldr r6, [r0, #48] ; 0x30
a000bbe8: e3560001 cmp r6, #1
a000bbec: 1a000039 bne a000bcd8 <_Thread_queue_Enqueue_priority+0x188>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bbf0: e3a02000 mov r2, #0
if ( priority == search_priority )
a000bbf4: e15c0005 cmp ip, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bbf8: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
a000bbfc: 0a00002b beq a000bcb0 <_Thread_queue_Enqueue_priority+0x160>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
a000bc00: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000bc04: e5813000 str r3, [r1]
the_node->previous = previous_node;
a000bc08: e5812004 str r2, [r1, #4]
previous_node->next = the_node;
a000bc0c: e5821000 str r1, [r2]
search_node->previous = the_node;
a000bc10: e5831004 str r1, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
a000bc14: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
a000bc18: ea00002b b a000bccc <_Thread_queue_Enqueue_priority+0x17c>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bc1c: e3a0600c mov r6, #12
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000bc20: e59f80bc ldr r8, [pc, #188] ; a000bce4 <_Thread_queue_Enqueue_priority+0x194>
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
a000bc24: e0260693 mla r6, r3, r6, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
a000bc28: e5d85000 ldrb r5, [r8]
a000bc2c: e2855001 add r5, r5, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000bc30: e10f4000 mrs r4, CPSR
a000bc34: e3843080 orr r3, r4, #128 ; 0x80
a000bc38: e129f003 msr CPSR_fc, r3
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
a000bc3c: e5963008 ldr r3, [r6, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
a000bc40: ea00000b b a000bc74 <_Thread_queue_Enqueue_priority+0x124>
search_priority = search_thread->current_priority;
a000bc44: e5935014 ldr r5, [r3, #20]
if ( priority >= search_priority )
a000bc48: e15c0005 cmp ip, r5
a000bc4c: 2a00000a bcs a000bc7c <_Thread_queue_Enqueue_priority+0x12c>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000bc50: e10fa000 mrs sl, CPSR <== NOT EXECUTED
a000bc54: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bc58: e129f00a msr CPSR_fc, sl <== NOT EXECUTED
a000bc5c: e593a010 ldr sl, [r3, #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) ) {
a000bc60: e117000a tst r7, sl <== NOT EXECUTED
a000bc64: 1a000001 bne a000bc70 <_Thread_queue_Enqueue_priority+0x120><== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000bc68: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a000bc6c: eaffffed b a000bc28 <_Thread_queue_Enqueue_priority+0xd8> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
a000bc70: e5933004 ldr r3, [r3, #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 ) ) {
a000bc74: e1530006 cmp r3, r6
a000bc78: 1afffff1 bne a000bc44 <_Thread_queue_Enqueue_priority+0xf4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
a000bc7c: e5906030 ldr r6, [r0, #48] ; 0x30
a000bc80: e3560001 cmp r6, #1
a000bc84: 1a000013 bne a000bcd8 <_Thread_queue_Enqueue_priority+0x188>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bc88: e3a02000 mov r2, #0
if ( priority == search_priority )
a000bc8c: e15c0005 cmp ip, r5
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
a000bc90: e5802030 str r2, [r0, #48] ; 0x30
if ( priority == search_priority )
a000bc94: 0a000005 beq a000bcb0 <_Thread_queue_Enqueue_priority+0x160>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
a000bc98: e5932000 ldr r2, [r3]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
a000bc9c: e881000c stm r1, {r2, r3}
search_node->next = the_node;
next_node->previous = the_node;
a000bca0: e5821004 str r1, [r2, #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;
a000bca4: e5831000 str r1, [r3]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
a000bca8: e5810044 str r0, [r1, #68] ; 0x44
_ISR_Enable( level );
a000bcac: ea000006 b a000bccc <_Thread_queue_Enqueue_priority+0x17c>
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;
a000bcb0: e5932040 ldr r2, [r3, #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 );
a000bcb4: e283c03c add ip, r3, #60 ; 0x3c <== NOT EXECUTED
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
a000bcb8: e581c000 str ip, [r1] <== NOT EXECUTED
the_node->previous = previous_node;
a000bcbc: e5812004 str r2, [r1, #4] <== NOT EXECUTED
previous_node->next = the_node;
a000bcc0: e5821000 str r1, [r2] <== NOT EXECUTED
search_node->previous = the_node;
a000bcc4: e5831040 str r1, [r3, #64] ; 0x40 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
a000bcc8: e5810044 str r0, [r1, #68] ; 0x44 <== NOT EXECUTED
a000bccc: e129f004 msr CPSR_fc, r4
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
a000bcd0: e3a00001 mov r0, #1
a000bcd4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
a000bcd8: e5824000 str r4, [r2] <== NOT EXECUTED
return the_thread_queue->sync_state;
a000bcdc: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
}
a000bce0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000bab0 <_Thread_queue_Enqueue_with_handler>:
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000bab0: e59f3088 ldr r3, [pc, #136] ; a000bb40 <_Thread_queue_Enqueue_with_handler+0x90>
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000bab4: e92d40f1 push {r0, r4, r5, r6, r7, lr}
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
a000bab8: e5934004 ldr r4, [r3, #4]
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000babc: e1a05000 mov r5, r0
a000bac0: e1a06001 mov r6, r1
else
#endif
/*
* Set the blocking state for this thread queue in the thread.
*/
_Thread_Set_state( the_thread, the_thread_queue->state );
a000bac4: e1a00004 mov r0, r4
a000bac8: e5951038 ldr r1, [r5, #56] ; 0x38
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
a000bacc: 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 );
a000bad0: eb0000e2 bl a000be60 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
a000bad4: e3560000 cmp r6, #0
a000bad8: 0a000009 beq a000bb04 <_Thread_queue_Enqueue_with_handler+0x54>
_Watchdog_Initialize(
a000badc: e5942008 ldr r2, [r4, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000bae0: e3a03000 mov r3, #0
a000bae4: e5843050 str r3, [r4, #80] ; 0x50
the_watchdog->routine = routine;
a000bae8: e5847064 str r7, [r4, #100] ; 0x64
the_watchdog->id = id;
a000baec: e5842068 str r2, [r4, #104] ; 0x68
the_watchdog->user_data = user_data;
a000baf0: e584306c str r3, [r4, #108] ; 0x6c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000baf4: e5846054 str r6, [r4, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000baf8: e59f0044 ldr r0, [pc, #68] ; a000bb44 <_Thread_queue_Enqueue_with_handler+0x94>
a000bafc: e2841048 add r1, r4, #72 ; 0x48
a000bb00: eb000238 bl a000c3e8 <_Watchdog_Insert>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
a000bb04: e5951034 ldr r1, [r5, #52] ; 0x34
enqueue_p = _Thread_queue_Enqueue_priority;
a000bb08: e59f2038 ldr r2, [pc, #56] ; a000bb48 <_Thread_queue_Enqueue_with_handler+0x98>
a000bb0c: e59f3038 ldr r3, [pc, #56] ; a000bb4c <_Thread_queue_Enqueue_with_handler+0x9c>
a000bb10: e3510001 cmp r1, #1
a000bb14: 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 );
a000bb18: e1a00005 mov r0, r5
a000bb1c: e1a01004 mov r1, r4
a000bb20: e1a0200d mov r2, sp
a000bb24: e12fff33 blx r3
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
a000bb28: e3500001 cmp r0, #1
a000bb2c: 0a000002 beq a000bb3c <_Thread_queue_Enqueue_with_handler+0x8c>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
a000bb30: e1a01004 mov r1, r4 <== NOT EXECUTED
a000bb34: e59d2000 ldr r2, [sp] <== NOT EXECUTED
a000bb38: ebfffd7f bl a000b13c <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
}
a000bb3c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a00101b4 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
a00101b4: e92d4010 push {r4, lr}
a00101b8: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00101bc: e10f3000 mrs r3, CPSR
a00101c0: e3832080 orr r2, r3, #128 ; 0x80
a00101c4: e129f002 msr CPSR_fc, r2
a00101c8: e59f2060 ldr r2, [pc, #96] ; a0010230 <_Thread_queue_Extract_fifo+0x7c>
a00101cc: e5911010 ldr r1, [r1, #16]
a00101d0: e0012002 and r2, r1, r2
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a00101d4: e3520000 cmp r2, #0
a00101d8: 1a000001 bne a00101e4 <_Thread_queue_Extract_fifo+0x30>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00101dc: e129f003 msr CPSR_fc, r3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a00101e0: e8bd8010 pop {r4, pc}
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a00101e4: e8940006 ldm r4, {r1, r2}
next->previous = previous;
a00101e8: e5812004 str r2, [r1, #4]
previous->next = next;
a00101ec: e5821000 str r1, [r2]
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
a00101f0: e3a02000 mov r2, #0
a00101f4: e5842044 str r2, [r4, #68] ; 0x44
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a00101f8: e5942050 ldr r2, [r4, #80] ; 0x50
a00101fc: e3520002 cmp r2, #2
a0010200: 0a000001 beq a001020c <_Thread_queue_Extract_fifo+0x58>
a0010204: e129f003 msr CPSR_fc, r3
a0010208: ea000004 b a0010220 <_Thread_queue_Extract_fifo+0x6c>
a001020c: e3a02003 mov r2, #3 <== NOT EXECUTED
a0010210: e5842050 str r2, [r4, #80] ; 0x50 <== NOT EXECUTED
a0010214: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a0010218: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a001021c: ebfff0c9 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
a0010220: e59f100c ldr r1, [pc, #12] ; a0010234 <_Thread_queue_Extract_fifo+0x80>
a0010224: e1a00004 mov r0, r4
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a0010228: e8bd4010 pop {r4, lr}
a001022c: eaffec30 b a000b2f4 <_Thread_Clear_state>
a000ebf0 <_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
)
{
a000ebf0: e92d4070 push {r4, r5, r6, lr}
a000ebf4: e20220ff and r2, r2, #255 ; 0xff
a000ebf8: e1a04001 mov r4, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000ebfc: e10f1000 mrs r1, CPSR
a000ec00: e3813080 orr r3, r1, #128 ; 0x80
a000ec04: 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);
a000ec08: e59f30b0 ldr r3, [pc, #176] ; a000ecc0 <_Thread_queue_Extract_priority_helper+0xd0>
a000ec0c: e5940010 ldr r0, [r4, #16]
a000ec10: 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 ) ) {
a000ec14: e3530000 cmp r3, #0
a000ec18: 1a000000 bne a000ec20 <_Thread_queue_Extract_priority_helper+0x30>
_ISR_Enable( level );
a000ec1c: ea000017 b a000ec80 <_Thread_queue_Extract_priority_helper+0x90>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ec20: e5943038 ldr r3, [r4, #56] ; 0x38
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a000ec24: e8941001 ldm r4, {r0, ip}
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a000ec28: e284503c add r5, r4, #60 ; 0x3c
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ec2c: e1530005 cmp r3, r5
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
a000ec30: 058c0000 streq r0, [ip]
next_node->previous = previous_node;
a000ec34: 0580c004 streq ip, [r0, #4]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a000ec38: 0a00000e beq a000ec78 <_Thread_queue_Extract_priority_helper+0x88>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ec3c: e5945040 ldr r5, [r4, #64] ; 0x40 <== NOT EXECUTED
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
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;
a000ec40: e5936000 ldr r6, [r3] <== NOT EXECUTED
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a000ec44: 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;
a000ec48: e58c3000 str r3, [ip] <== NOT EXECUTED
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a000ec4c: e8831001 stm r3, {r0, ip} <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a000ec50: e594c038 ldr ip, [r4, #56] ; 0x38 <== NOT EXECUTED
a000ec54: e5940040 ldr r0, [r4, #64] ; 0x40 <== NOT EXECUTED
a000ec58: e15c0000 cmp ip, r0 <== NOT EXECUTED
a000ec5c: 0a000005 beq a000ec78 <_Thread_queue_Extract_priority_helper+0x88><== NOT EXECUTED
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
a000ec60: e2830038 add r0, r3, #56 ; 0x38 <== NOT EXECUTED
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
a000ec64: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
a000ec68: e5860004 str r0, [r6, #4] <== NOT EXECUTED
head->next = new_second_node;
tail->previous = last_node;
a000ec6c: e5835040 str r5, [r3, #64] ; 0x40 <== NOT EXECUTED
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
a000ec70: e283303c add r3, r3, #60 ; 0x3c <== NOT EXECUTED
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
a000ec74: e5853000 str r3, [r5] <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a000ec78: e3520000 cmp r2, #0
a000ec7c: 0a000001 beq a000ec88 <_Thread_queue_Extract_priority_helper+0x98>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ec80: e129f001 msr CPSR_fc, r1
a000ec84: e8bd8070 pop {r4, r5, r6, pc}
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a000ec88: e5943050 ldr r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000ec8c: e3530002 cmp r3, #2 <== NOT EXECUTED
a000ec90: 0a000001 beq a000ec9c <_Thread_queue_Extract_priority_helper+0xac><== NOT EXECUTED
a000ec94: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a000ec98: ea000004 b a000ecb0 <_Thread_queue_Extract_priority_helper+0xc0><== NOT EXECUTED
a000ec9c: e3a03003 mov r3, #3 <== NOT EXECUTED
a000eca0: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED
a000eca4: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
a000eca8: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a000ecac: ebfff625 bl a000c548 <_Watchdog_Remove> <== NOT EXECUTED
a000ecb0: e59f100c ldr r1, [pc, #12] ; a000ecc4 <_Thread_queue_Extract_priority_helper+0xd4><== NOT EXECUTED
a000ecb4: e1a00004 mov r0, r4 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a000ecb8: e8bd4070 pop {r4, r5, r6, lr} <== NOT EXECUTED
a000ecbc: eafff18c b a000b2f4 <_Thread_Clear_state> <== NOT EXECUTED
a001edac <_Thread_queue_First_priority>:
*/
Thread_Control *_Thread_queue_First_priority (
Thread_queue_Control *the_thread_queue
)
{
a001edac: e92d4010 push {r4, lr} <== NOT EXECUTED
a001edb0: e3a02000 mov r2, #0 <== NOT EXECUTED
uint32_t index;
for( index=0 ;
a001edb4: e1a03002 mov r3, r2 <== NOT EXECUTED
a001edb8: e3a0c00c mov ip, #12 <== NOT EXECUTED
a001edbc: e004039c mul r4, ip, r3 <== NOT EXECUTED
return (Thread_Control *) _Chain_First(
&the_thread_queue->Queues.Priority[ index ]
);
}
return NULL;
}
a001edc0: e7901002 ldr r1, [r0, r2] <== NOT EXECUTED
a001edc4: e2844004 add r4, r4, #4 <== NOT EXECUTED
a001edc8: e0804004 add r4, r0, r4 <== NOT EXECUTED
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
a001edcc: e1510004 cmp r1, r4 <== NOT EXECUTED
a001edd0: 0a000001 beq a001eddc <_Thread_queue_First_priority+0x30> <== NOT EXECUTED
return (Thread_Control *) _Chain_First(
a001edd4: e1a00001 mov r0, r1 <== NOT EXECUTED
a001edd8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
{
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a001eddc: e2833001 add r3, r3, #1 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a001ede0: e3530004 cmp r3, #4 <== NOT EXECUTED
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
a001ede4: e282200c add r2, r2, #12 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue
)
{
uint32_t index;
for( index=0 ;
a001ede8: 1afffff3 bne a001edbc <_Thread_queue_First_priority+0x10> <== 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;
a001edec: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a001edf0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000ecc8 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
a000ecc8: e1a01000 mov r1, r0 <== NOT EXECUTED
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a000eccc: 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 &&
a000ecd0: e5903030 ldr r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a000ecd4: e3530000 cmp r3, #0 <== NOT EXECUTED
a000ecd8: 0a000009 beq a000ed04 <_Thread_queue_Process_timeout+0x3c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
a000ecdc: e59f202c ldr r2, [pc, #44] ; a000ed10 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED
a000ece0: e5922004 ldr r2, [r2, #4] <== NOT EXECUTED
a000ece4: e1510002 cmp r1, r2 <== NOT EXECUTED
a000ece8: 1a000005 bne a000ed04 <_Thread_queue_Process_timeout+0x3c> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
a000ecec: e3530003 cmp r3, #3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a000ecf0: 1590303c ldrne r3, [r0, #60] ; 0x3c <== NOT EXECUTED
a000ecf4: 15813034 strne r3, [r1, #52] ; 0x34 <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a000ecf8: 13a03002 movne r3, #2 <== NOT EXECUTED
a000ecfc: 15803030 strne r3, [r0, #48] ; 0x30 <== NOT EXECUTED
a000ed00: e12fff1e bx lr <== NOT EXECUTED
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a000ed04: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED
a000ed08: e5813034 str r3, [r1, #52] ; 0x34 <== NOT EXECUTED
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a000ed0c: eaffffb1 b a000ebd8 <_Thread_queue_Extract> <== NOT EXECUTED
a000be08 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
a000be08: e92d4001 push {r0, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000be0c: e1a0100d mov r1, sp <== NOT EXECUTED
a000be10: ebfffe0b bl a000b644 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
a000be14: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000be18: e3530000 cmp r3, #0 <== NOT EXECUTED
a000be1c: 1a000004 bne a000be34 <_Thread_queue_Timeout+0x2c> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
a000be20: eb000ba8 bl a000ecc8 <_Thread_queue_Process_timeout> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
a000be24: e59f300c ldr r3, [pc, #12] ; a000be38 <_Thread_queue_Timeout+0x30><== NOT EXECUTED
a000be28: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000be2c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
a000be30: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Unnest_dispatch();
break;
}
}
a000be34: e8bd8008 pop {r3, pc} <== NOT EXECUTED
a0018574 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
a0018574: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
a0018578: e24dd01c sub sp, sp, #28
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001857c: e28db010 add fp, sp, #16
a0018580: e28d6004 add r6, sp, #4
a0018584: e28b2004 add r2, fp, #4
head->previous = NULL;
a0018588: e3a03000 mov r3, #0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a001858c: e2868004 add r8, r6, #4
a0018590: e1a04000 mov r4, r0
a0018594: e58d2010 str r2, [sp, #16]
head->previous = NULL;
a0018598: e58d3014 str r3, [sp, #20]
tail->previous = head;
a001859c: e58db018 str fp, [sp, #24]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
a00185a0: e58d8004 str r8, [sp, #4]
head->previous = NULL;
a00185a4: e58d3008 str r3, [sp, #8]
tail->previous = head;
a00185a8: e58d600c str r6, [sp, #12]
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail(
const Chain_Control *the_chain
)
{
return &the_chain->Tail.Node;
a00185ac: e58d2000 str r2, [sp]
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00185b0: e59f9160 ldr r9, [pc, #352] ; a0018718 <_Timer_server_Body+0x1a4>
Chain_Control *tmp;
/*
* 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;
a00185b4: e584b078 str fp, [r4, #120] ; 0x78
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185b8: e284a030 add sl, r4, #48 ; 0x30
/*
* 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 );
a00185bc: e2847068 add r7, r4, #104 ; 0x68
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a00185c0: e59f2154 ldr r2, [pc, #340] ; a001871c <_Timer_server_Body+0x1a8>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185c4: e1a0000a mov r0, sl
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
a00185c8: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
a00185cc: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185d0: e1a02006 mov r2, r6
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
a00185d4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
a00185d8: e0611003 rsb r1, r1, r3
a00185dc: eb001067 bl a001c780 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
a00185e0: e5995000 ldr r5, [r9]
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
a00185e4: e5942074 ldr r2, [r4, #116] ; 0x74
/*
* 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 ) {
a00185e8: e1550002 cmp r5, r2
a00185ec: 9a000004 bls a0018604 <_Timer_server_Body+0x90>
/*
* 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 );
a00185f0: e0621005 rsb r1, r2, r5
a00185f4: e1a00007 mov r0, r7
a00185f8: e1a02006 mov r2, r6
a00185fc: eb00105f bl a001c780 <_Watchdog_Adjust_to_chain>
a0018600: ea000004 b a0018618 <_Timer_server_Body+0xa4>
} else if ( snapshot < last_snapshot ) {
a0018604: 2a000003 bcs a0018618 <_Timer_server_Body+0xa4>
/*
* 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 );
a0018608: e1a00007 mov r0, r7 <== NOT EXECUTED
a001860c: e3a01001 mov r1, #1 <== NOT EXECUTED
a0018610: e0652002 rsb r2, r5, r2 <== NOT EXECUTED
a0018614: eb001031 bl a001c6e0 <_Watchdog_Adjust> <== NOT EXECUTED
}
watchdogs->last_snapshot = snapshot;
a0018618: 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 );
a001861c: e5940078 ldr r0, [r4, #120] ; 0x78
a0018620: eb000289 bl a001904c <_Chain_Get>
if ( timer == NULL ) {
a0018624: e2505000 subs r5, r0, #0
a0018628: 0a000009 beq a0018654 <_Timer_server_Body+0xe0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001862c: e5953038 ldr r3, [r5, #56] ; 0x38 <== NOT EXECUTED
a0018630: e3530001 cmp r3, #1 <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a0018634: 01a0000a moveq r0, sl <== NOT EXECUTED
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a0018638: 0a000002 beq a0018648 <_Timer_server_Body+0xd4> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a001863c: e3530003 cmp r3, #3 <== NOT EXECUTED
a0018640: 1afffff5 bne a001861c <_Timer_server_Body+0xa8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a0018644: e1a00007 mov r0, r7 <== NOT EXECUTED
a0018648: e2851010 add r1, r5, #16 <== NOT EXECUTED
a001864c: eb001076 bl a001c82c <_Watchdog_Insert> <== NOT EXECUTED
a0018650: eafffff1 b a001861c <_Timer_server_Body+0xa8> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
a0018654: ebffff94 bl a00184ac <arm_interrupt_disable>
tmp = ts->insert_chain;
a0018658: e5943078 ldr r3, [r4, #120] ; 0x78
if ( _Chain_Is_empty( insert_chain ) ) {
a001865c: e59d2000 ldr r2, [sp]
a0018660: e59d3010 ldr r3, [sp, #16]
a0018664: e1530002 cmp r3, r2
ts->insert_chain = NULL;
a0018668: 05845078 streq r5, [r4, #120] ; 0x78
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
tmp = ts->insert_chain;
if ( _Chain_Is_empty( insert_chain ) ) {
a001866c: 13a05001 movne r5, #1
a0018670: e129f000 msr CPSR_fc, r0
* 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;
while ( do_loop ) {
a0018674: e3550000 cmp r5, #0
a0018678: 1affffd0 bne a00185c0 <_Timer_server_Body+0x4c>
_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 ) ) {
a001867c: e59d3004 ldr r3, [sp, #4]
a0018680: e1530008 cmp r3, r8
a0018684: 0a000012 beq a00186d4 <_Timer_server_Body+0x160>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
a0018688: ebffff87 bl a00184ac <arm_interrupt_disable>
initialized = false;
}
#endif
return status;
}
a001868c: e59d2004 ldr r2, [sp, #4]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
a0018690: e1520008 cmp r2, r8
a0018694: 0a00000c beq a00186cc <_Timer_server_Body+0x158>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
a0018698: e5923000 ldr r3, [r2]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
a001869c: e3520000 cmp r2, #0
head->next = new_first;
a00186a0: e58d3004 str r3, [sp, #4]
new_first->previous = head;
a00186a4: e5836004 str r6, [r3, #4]
a00186a8: 0a000007 beq a00186cc <_Timer_server_Body+0x158>
watchdog->state = WATCHDOG_INACTIVE;
a00186ac: e3a03000 mov r3, #0
a00186b0: e5823008 str r3, [r2, #8]
a00186b4: e129f000 msr CPSR_fc, r0
/*
* 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 );
a00186b8: e592301c ldr r3, [r2, #28]
a00186bc: e5920020 ldr r0, [r2, #32]
a00186c0: e5921024 ldr r1, [r2, #36] ; 0x24
a00186c4: e12fff33 blx r3
}
a00186c8: eaffffee b a0018688 <_Timer_server_Body+0x114>
a00186cc: e129f000 msr CPSR_fc, r0
a00186d0: eaffffb6 b a00185b0 <_Timer_server_Body+0x3c>
} else {
ts->active = false;
a00186d4: e5c4507c strb r5, [r4, #124] ; 0x7c
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
a00186d8: ebffff77 bl a00184bc <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
a00186dc: e3a01008 mov r1, #8
a00186e0: e5940000 ldr r0, [r4]
a00186e4: eb000e5a bl a001c054 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
a00186e8: e1a00004 mov r0, r4
a00186ec: ebffff78 bl a00184d4 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
a00186f0: e1a00004 mov r0, r4
a00186f4: ebffff8a bl a0018524 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
a00186f8: eb000c16 bl a001b758 <_Thread_Enable_dispatch>
ts->active = true;
a00186fc: e3a03001 mov r3, #1
a0018700: 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 );
a0018704: e2840008 add r0, r4, #8
a0018708: eb00109f bl a001c98c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
a001870c: e2840040 add r0, r4, #64 ; 0x40
a0018710: eb00109d bl a001c98c <_Watchdog_Remove>
a0018714: eaffffa5 b a00185b0 <_Timer_server_Body+0x3c>
a0018720 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a0018720: e92d4070 push {r4, r5, r6, lr}
if ( ts->insert_chain == NULL ) {
a0018724: e5906078 ldr r6, [r0, #120] ; 0x78
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
a0018728: e1a04000 mov r4, r0
a001872c: e1a05001 mov r5, r1
if ( ts->insert_chain == NULL ) {
a0018730: e3560000 cmp r6, #0
a0018734: 1a00003a bne a0018824 <_Timer_server_Schedule_operation_method+0x104>
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
a0018738: ebffff5f bl a00184bc <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001873c: e5953038 ldr r3, [r5, #56] ; 0x38
a0018740: e3530001 cmp r3, #1
a0018744: 1a000017 bne a00187a8 <_Timer_server_Schedule_operation_method+0x88>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
a0018748: ebffff57 bl a00184ac <arm_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
a001874c: e59f30dc ldr r3, [pc, #220] ; a0018830 <_Timer_server_Schedule_operation_method+0x110>
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a0018750: e284c034 add ip, r4, #52 ; 0x34
a0018754: e5932000 ldr r2, [r3]
initialized = false;
}
#endif
return status;
}
a0018758: e5943030 ldr r3, [r4, #48] ; 0x30
* 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;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
a001875c: e594103c ldr r1, [r4, #60] ; 0x3c
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
a0018760: e153000c cmp r3, ip
a0018764: 0a000004 beq a001877c <_Timer_server_Schedule_operation_method+0x5c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
a0018768: e593c010 ldr ip, [r3, #16]
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
a001876c: e0611002 rsb r1, r1, r2
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
a0018770: e15c0001 cmp ip, r1
delta_interval -= delta;
a0018774: 8061600c rsbhi r6, r1, ip
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
a0018778: e5836010 str r6, [r3, #16]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
a001877c: e584203c str r2, [r4, #60] ; 0x3c
a0018780: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
a0018784: e2840030 add r0, r4, #48 ; 0x30
a0018788: e2851010 add r1, r5, #16
a001878c: eb001026 bl a001c82c <_Watchdog_Insert>
if ( !ts->active ) {
a0018790: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a0018794: e3530000 cmp r3, #0
a0018798: 1a00001f bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
_Timer_server_Reset_interval_system_watchdog( ts );
a001879c: e1a00004 mov r0, r4
a00187a0: ebffff4b bl a00184d4 <_Timer_server_Reset_interval_system_watchdog>
a00187a4: ea00001c b a001881c <_Timer_server_Schedule_operation_method+0xfc>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
a00187a8: e3530003 cmp r3, #3
a00187ac: 1a00001a bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
a00187b0: ebffff3d bl a00184ac <arm_interrupt_disable>
initialized = false;
}
#endif
return status;
}
a00187b4: e5942068 ldr r2, [r4, #104] ; 0x68
/*
* 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();
a00187b8: e59f3074 ldr r3, [pc, #116] ; a0018834 <_Timer_server_Schedule_operation_method+0x114>
a00187bc: e284c06c add ip, r4, #108 ; 0x6c
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a00187c0: e152000c cmp r2, ip
/*
* 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();
a00187c4: e5933000 ldr r3, [r3]
last_snapshot = ts->TOD_watchdogs.last_snapshot;
a00187c8: e5941074 ldr r1, [r4, #116] ; 0x74
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
a00187cc: 0a000008 beq a00187f4 <_Timer_server_Schedule_operation_method+0xd4>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
a00187d0: e592c010 ldr ip, [r2, #16] <== NOT EXECUTED
if ( snapshot > last_snapshot ) {
a00187d4: e1530001 cmp r3, r1 <== NOT EXECUTED
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
a00187d8: 908c6001 addls r6, ip, r1 <== NOT EXECUTED
delta_interval += delta;
a00187dc: 90636006 rsbls r6, r3, r6 <== 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 ) {
a00187e0: 9a000002 bls a00187f0 <_Timer_server_Schedule_operation_method+0xd0><== NOT EXECUTED
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
a00187e4: e0611003 rsb r1, r1, r3 <== NOT EXECUTED
if (delta_interval > delta) {
a00187e8: e15c0001 cmp ip, r1 <== NOT EXECUTED
delta_interval -= delta;
a00187ec: 8061600c rsbhi r6, r1, ip <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
a00187f0: e5826010 str r6, [r2, #16] <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
a00187f4: e5843074 str r3, [r4, #116] ; 0x74
a00187f8: e129f000 msr CPSR_fc, r0
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
a00187fc: e2840068 add r0, r4, #104 ; 0x68
a0018800: e2851010 add r1, r5, #16
a0018804: eb001008 bl a001c82c <_Watchdog_Insert>
if ( !ts->active ) {
a0018808: e5d4307c ldrb r3, [r4, #124] ; 0x7c
a001880c: e3530000 cmp r3, #0
a0018810: 1a000001 bne a001881c <_Timer_server_Schedule_operation_method+0xfc>
_Timer_server_Reset_tod_system_watchdog( ts );
a0018814: e1a00004 mov r0, r4
a0018818: ebffff41 bl a0018524 <_Timer_server_Reset_tod_system_watchdog>
* 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 );
}
}
a001881c: e8bd4070 pop {r4, r5, r6, lr}
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
a0018820: ea000bcc b a001b758 <_Thread_Enable_dispatch>
* 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 );
a0018824: e5900078 ldr r0, [r0, #120] ; 0x78 <== NOT EXECUTED
}
}
a0018828: e8bd4070 pop {r4, r5, r6, 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 );
a001882c: ea0001f3 b a0019000 <_Chain_Append> <== NOT EXECUTED
a000c0b8 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
a000c0b8: e1a03000 mov r3, r0
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000c0bc: e5932000 ldr r2, [r3]
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
a000c0c0: e5910000 ldr r0, [r1]
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
a000c0c4: e593c004 ldr ip, [r3, #4]
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
a000c0c8: e0822000 add r2, r2, r0
a000c0cc: e5832000 str r2, [r3]
time->tv_nsec += add->tv_nsec;
a000c0d0: e5912004 ldr r2, [r1, #4]
a000c0d4: e08c2002 add r2, ip, r2
a000c0d8: e5832004 str r2, [r3, #4]
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000c0dc: e59fc02c ldr ip, [pc, #44] ; a000c110 <_Timespec_Add_to+0x58>
a000c0e0: ea000006 b a000c100 <_Timespec_Add_to+0x48>
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000c0e4: e59f2028 ldr r2, [pc, #40] ; a000c114 <_Timespec_Add_to+0x5c><== NOT EXECUTED
time->tv_sec++;
seconds++;
a000c0e8: e2800001 add r0, r0, #1 <== NOT EXECUTED
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
a000c0ec: e0812002 add r2, r1, r2 <== NOT EXECUTED
a000c0f0: e5832004 str r2, [r3, #4] <== NOT EXECUTED
time->tv_sec++;
a000c0f4: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000c0f8: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000c0fc: e5832000 str r2, [r3] <== NOT EXECUTED
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
a000c100: e5931004 ldr r1, [r3, #4]
a000c104: e151000c cmp r1, ip
a000c108: 8afffff5 bhi a000c0e4 <_Timespec_Add_to+0x2c>
time->tv_sec++;
seconds++;
}
return seconds;
}
a000c10c: e12fff1e bx lr
a000dc38 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000dc38: e92d40f0 push {r4, r5, r6, r7, lr}
a000dc3c: e1a05002 mov r5, r2
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000dc40: e5912004 ldr r2, [r1, #4]
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc44: e5917000 ldr r7, [r1]
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc48: e590c000 ldr ip, [r0]
left += lhs->tv_nsec;
a000dc4c: e5906004 ldr r6, [r0, #4]
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
a000dc50: e59f0068 ldr r0, [pc, #104] ; a000dcc0 <_Timespec_Divide+0x88>
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
a000dc54: e1a04003 mov r4, r3
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
a000dc58: e1a03fc2 asr r3, r2, #31
a000dc5c: e0e32790 smlal r2, r3, r0, r7
if ( right == 0 ) {
a000dc60: e1921003 orrs r1, r2, r3
a000dc64: 1a000002 bne a000dc74 <_Timespec_Divide+0x3c>
*ival_percentage = 0;
a000dc68: e5851000 str r1, [r5]
*fval_percentage = 0;
a000dc6c: e5841000 str r1, [r4]
return;
a000dc70: e8bd80f0 pop {r4, r5, r6, r7, pc}
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
a000dc74: e1a07fc6 asr r7, r6, #31
a000dc78: e0e76c90 smlal r6, r7, r0, ip <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000dc7c: e59fc040 ldr ip, [pc, #64] ; a000dcc4 <_Timespec_Divide+0x8c><== NOT EXECUTED
a000dc80: e0810c96 umull r0, r1, r6, ip <== NOT EXECUTED
a000dc84: e021179c mla r1, ip, r7, r1 <== NOT EXECUTED
a000dc88: eb003c3b bl a001cd7c <__udivdi3> <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000dc8c: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000dc90: e3a03000 mov r3, #0 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
a000dc94: e1a07000 mov r7, r0 <== NOT EXECUTED
a000dc98: e1a06001 mov r6, r1 <== NOT EXECUTED
*ival_percentage = answer / 1000;
a000dc9c: eb003c36 bl a001cd7c <__udivdi3> <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000dca0: e1a01006 mov r1, r6 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
a000dca4: e5850000 str r0, [r5] <== NOT EXECUTED
*fval_percentage = answer % 1000;
a000dca8: e3a02ffa mov r2, #1000 ; 0x3e8 <== NOT EXECUTED
a000dcac: e1a00007 mov r0, r7 <== NOT EXECUTED
a000dcb0: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dcb4: eb003d42 bl a001d1c4 <__umoddi3> <== NOT EXECUTED
a000dcb8: e5840000 str r0, [r4] <== NOT EXECUTED
a000dcbc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a000dc00 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000dc00: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc04: e59fc06c ldr ip, [pc, #108] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000dc08: e590e000 ldr lr, [r0] <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
a000dc0c: e1a03001 mov r3, r1 <== NOT EXECUTED
a000dc10: e1a04002 mov r4, r2 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc14: e0821c9e umull r1, r2, lr, ip <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
a000dc18: e1a0500e mov r5, lr <== NOT EXECUTED
a000dc1c: e1a06fc5 asr r6, r5, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
t += time->tv_nsec;
a000dc20: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
a000dc24: e022269c mla r2, ip, r6, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000dc28: e0915000 adds r5, r1, r0 <== NOT EXECUTED
a000dc2c: e0a26fc0 adc r6, r2, r0, asr #31 <== NOT EXECUTED
a000dc30: e1a01006 mov r1, r6 <== NOT EXECUTED
a000dc34: e1a02003 mov r2, r3 <== NOT EXECUTED
a000dc38: e1a00005 mov r0, r5 <== NOT EXECUTED
a000dc3c: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dc40: eb003a7a bl a001c630 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc44: e59f202c ldr r2, [pc, #44] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
a000dc48: e3a03000 mov r3, #0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
a000dc4c: e1a06000 mov r6, r0 <== NOT EXECUTED
a000dc50: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc54: eb003a75 bl a001c630 <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000dc58: e1a01005 mov r1, r5 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
a000dc5c: e5840000 str r0, [r4] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
a000dc60: e59f2010 ldr r2, [pc, #16] ; a000dc78 <_Timespec_Divide_by_integer+0x78><== NOT EXECUTED
a000dc64: e1a00006 mov r0, r6 <== NOT EXECUTED
a000dc68: e3a03000 mov r3, #0 <== NOT EXECUTED
a000dc6c: eb003b81 bl a001ca78 <__umoddi3> <== NOT EXECUTED
a000dc70: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
a000dc74: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000d034 <_Timespec_From_ticks>:
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d034: e59f3038 ldr r3, [pc, #56] ; a000d074 <_Timespec_From_ticks+0x40><== NOT EXECUTED
void _Timespec_From_ticks(
uint32_t ticks,
struct timespec *time
)
{
a000d038: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d03c: e593500c ldr r5, [r3, #12] <== NOT EXECUTED
void _Timespec_From_ticks(
uint32_t ticks,
struct timespec *time
)
{
a000d040: e1a04001 mov r4, r1 <== NOT EXECUTED
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d044: e59f102c ldr r1, [pc, #44] ; a000d078 <_Timespec_From_ticks+0x44><== NOT EXECUTED
struct timespec *time
)
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
a000d048: e0050590 mul r5, r0, r5 <== NOT EXECUTED
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d04c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000d050: eb003b7c bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a000d054: e59f101c ldr r1, [pc, #28] ; a000d078 <_Timespec_From_ticks+0x44><== NOT EXECUTED
{
uint32_t usecs;
usecs = ticks * rtems_configuration_get_microseconds_per_tick();
time->tv_sec = usecs / TOD_MICROSECONDS_PER_SECOND;
a000d058: e5840000 str r0, [r4] <== NOT EXECUTED
time->tv_nsec = (usecs % TOD_MICROSECONDS_PER_SECOND) *
a000d05c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000d060: eb003c10 bl a001c0a8 <__umodsi3> <== NOT EXECUTED
a000d064: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED
a000d068: e0030390 mul r3, r0, r3 <== NOT EXECUTED
a000d06c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
TOD_NANOSECONDS_PER_MICROSECOND;
}
a000d070: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000dc7c <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000dc7c: e5902000 ldr r2, [r0]
a000dc80: e5913000 ldr r3, [r1]
a000dc84: e1520003 cmp r2, r3
return true;
a000dc88: c3a00001 movgt r0, #1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
a000dc8c: c12fff1e bxgt lr
return true;
if ( lhs->tv_sec < rhs->tv_sec )
a000dc90: ba000005 blt a000dcac <_Timespec_Greater_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
a000dc94: e5900004 ldr r0, [r0, #4]
a000dc98: e5913004 ldr r3, [r1, #4]
a000dc9c: e1500003 cmp r0, r3
a000dca0: d3a00000 movle r0, #0
a000dca4: c3a00001 movgt r0, #1
a000dca8: e12fff1e bx lr
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
return false;
a000dcac: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
a000dcb0: e12fff1e bx lr
a000d07c <_Timespec_Is_valid>:
bool _Timespec_Is_valid(
const struct timespec *time
)
{
if ( !time )
a000d07c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d080: 012fff1e bxeq lr <== NOT EXECUTED
return false;
if ( time->tv_sec < 0 )
a000d084: e5903000 ldr r3, [r0] <== NOT EXECUTED
a000d088: e3530000 cmp r3, #0 <== NOT EXECUTED
return false;
a000d08c: b3a00000 movlt r0, #0 <== NOT EXECUTED
)
{
if ( !time )
return false;
if ( time->tv_sec < 0 )
a000d090: b12fff1e bxlt lr <== NOT EXECUTED
return false;
if ( time->tv_nsec < 0 )
a000d094: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
a000d098: e3530000 cmp r3, #0 <== NOT EXECUTED
a000d09c: ba000004 blt a000d0b4 <_Timespec_Is_valid+0x38> <== NOT EXECUTED
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Is_valid(
a000d0a0: e59f0014 ldr r0, [pc, #20] ; a000d0bc <_Timespec_Is_valid+0x40><== NOT EXECUTED
a000d0a4: e1530000 cmp r3, r0 <== NOT EXECUTED
a000d0a8: 83a00000 movhi r0, #0 <== NOT EXECUTED
a000d0ac: 93a00001 movls r0, #1 <== NOT EXECUTED
a000d0b0: e12fff1e bx lr <== NOT EXECUTED
if ( time->tv_sec < 0 )
return false;
if ( time->tv_nsec < 0 )
return false;
a000d0b4: e3a00000 mov r0, #0 <== NOT EXECUTED
if ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
return false;
return true;
}
a000d0b8: e12fff1e bx lr <== NOT EXECUTED
a000dcb4 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000dcb4: e5902000 ldr r2, [r0]
a000dcb8: e5913000 ldr r3, [r1]
a000dcbc: e1520003 cmp r2, r3
return true;
a000dcc0: b3a00001 movlt r0, #1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
a000dcc4: b12fff1e bxlt lr
return true;
if ( lhs->tv_sec > rhs->tv_sec )
a000dcc8: ca000005 bgt a000dce4 <_Timespec_Less_than+0x30>
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
a000dccc: e5900004 ldr r0, [r0, #4]
a000dcd0: e5913004 ldr r3, [r1, #4]
a000dcd4: e1500003 cmp r0, r3
a000dcd8: a3a00000 movge r0, #0
a000dcdc: b3a00001 movlt r0, #1
a000dce0: e12fff1e bx lr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
a000dce4: e3a00000 mov r0, #0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
a000dce8: e12fff1e bx lr
a000d108 <_Timespec_To_ticks>:
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
a000d108: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
a000d10c: e5906000 ldr r6, [r0] <== NOT EXECUTED
*/
uint32_t _Timespec_To_ticks(
const struct timespec *time
)
{
a000d110: e1a05000 mov r5, r0 <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
a000d114: e3560000 cmp r6, #0 <== NOT EXECUTED
a000d118: 1a000002 bne a000d128 <_Timespec_To_ticks+0x20> <== NOT EXECUTED
a000d11c: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
a000d120: e3500000 cmp r0, #0 <== NOT EXECUTED
a000d124: 0a000009 beq a000d150 <_Timespec_To_ticks+0x48> <== NOT EXECUTED
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
a000d128: eb00094a bl a000f658 <TOD_TICKS_PER_SECOND_method> <== NOT EXECUTED
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
a000d12c: e59f3020 ldr r3, [pc, #32] ; a000d154 <_Timespec_To_ticks+0x4c><== NOT EXECUTED
a000d130: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
uint32_t ticks;
if ( (time->tv_sec == 0) && (time->tv_nsec == 0) )
return 0;
ticks = time->tv_sec * TOD_TICKS_PER_SECOND;
a000d134: e0040096 mul r4, r6, r0 <== NOT EXECUTED
ticks += time->tv_nsec / rtems_configuration_get_nanoseconds_per_tick();
a000d138: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000d13c: e5950004 ldr r0, [r5, #4] <== NOT EXECUTED
a000d140: e0010193 mul r1, r3, r1 <== NOT EXECUTED
a000d144: eb003b3f bl a001be48 <__aeabi_uidiv> <== NOT EXECUTED
if (ticks)
a000d148: e0940000 adds r0, r4, r0 <== NOT EXECUTED
return ticks;
return 1;
a000d14c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
a000d150: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000c27c <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000c27c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c280: e59f503c ldr r5, [pc, #60] ; a000c2c4 <_User_extensions_Fatal+0x48>
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
a000c284: e1a08000 mov r8, r0
a000c288: e1a07002 mov r7, r2
a000c28c: e20160ff and r6, r1, #255 ; 0xff
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c290: e5954008 ldr r4, [r5, #8]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c294: ea000007 b a000c2b8 <_User_extensions_Fatal+0x3c>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
a000c298: e5943030 ldr r3, [r4, #48] ; 0x30
a000c29c: e3530000 cmp r3, #0
a000c2a0: 0a000003 beq a000c2b4 <_User_extensions_Fatal+0x38>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
a000c2a4: e1a00008 mov r0, r8
a000c2a8: e1a01006 mov r1, r6
a000c2ac: e1a02007 mov r2, r7
a000c2b0: e12fff33 blx r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
a000c2b4: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c2b8: e1540005 cmp r4, r5
a000c2bc: 1afffff5 bne a000c298 <_User_extensions_Fatal+0x1c>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c2c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000d9a8 <_User_extensions_Remove_set>:
#include <rtems/score/userext.h>
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
a000d9a8: e92d4010 push {r4, lr}
a000d9ac: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
a000d9b0: ebfff694 bl a000b408 <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
a000d9b4: e5943024 ldr r3, [r4, #36] ; 0x24
a000d9b8: e3530000 cmp r3, #0
a000d9bc: 0a000002 beq a000d9cc <_User_extensions_Remove_set+0x24>
_Chain_Extract( &the_extension->Switch.Node );
a000d9c0: e2840008 add r0, r4, #8
}
a000d9c4: e8bd4010 pop {r4, lr}
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
a000d9c8: eafff68e b a000b408 <_Chain_Extract> <== NOT EXECUTED
a000d9cc: e8bd8010 pop {r4, pc}
a000c240 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
a000c240: e92d4070 push {r4, r5, r6, lr}
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c244: e59f502c ldr r5, [pc, #44] ; a000c278 <_User_extensions_Thread_exitted+0x38>
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
a000c248: e1a06000 mov r6, r0
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
a000c24c: e5954008 ldr r4, [r5, #8]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c250: ea000005 b a000c26c <_User_extensions_Thread_exitted+0x2c>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
a000c254: e594302c ldr r3, [r4, #44] ; 0x2c
a000c258: e3530000 cmp r3, #0
a000c25c: 0a000001 beq a000c268 <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
a000c260: e1a00006 mov r0, r6 <== NOT EXECUTED
a000c264: e12fff33 blx r3 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
a000c268: e5944004 ldr r4, [r4, #4]
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
a000c26c: e1540005 cmp r4, r5
a000c270: 1afffff7 bne a000c254 <_User_extensions_Thread_exitted+0x14>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
a000c274: e8bd8070 pop {r4, r5, r6, pc}
a000dfd8 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
a000dfd8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a000dfdc: e1a04000 mov r4, r0
a000dfe0: e1a05002 mov r5, r2
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000dfe4: e10f3000 mrs r3, CPSR
a000dfe8: e3832080 orr r2, r3, #128 ; 0x80
a000dfec: e129f002 msr CPSR_fc, r2
}
}
_ISR_Enable( level );
}
a000dff0: e1a06000 mov r6, r0
a000dff4: e4962004 ldr r2, [r6], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
a000dff8: e1520006 cmp r2, r6
a000dffc: 0a00001b beq a000e070 <_Watchdog_Adjust+0x98>
switch ( direction ) {
a000e000: e3510000 cmp r1, #0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000e004: 03a08001 moveq r8, #1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
a000e008: 0a000016 beq a000e068 <_Watchdog_Adjust+0x90>
a000e00c: e3510001 cmp r1, #1 <== NOT EXECUTED
a000e010: 1a000016 bne a000e070 <_Watchdog_Adjust+0x98> <== NOT EXECUTED
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
a000e014: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
a000e018: e0815005 add r5, r1, r5 <== NOT EXECUTED
a000e01c: ea000004 b a000e034 <_Watchdog_Adjust+0x5c> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000e020: e5942000 ldr r2, [r4]
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
a000e024: e5927010 ldr r7, [r2, #16]
a000e028: e1550007 cmp r5, r7
a000e02c: 2a000002 bcs a000e03c <_Watchdog_Adjust+0x64>
_Watchdog_First( header )->delta_interval -= units;
a000e030: e0655007 rsb r5, r5, r7 <== NOT EXECUTED
a000e034: e5825010 str r5, [r2, #16] <== NOT EXECUTED
break;
a000e038: ea00000c b a000e070 <_Watchdog_Adjust+0x98> <== NOT EXECUTED
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
a000e03c: e5828010 str r8, [r2, #16]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000e040: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
_Watchdog_Tickle( header );
a000e044: e1a00004 mov r0, r4
a000e048: eb00008b bl a000e27c <_Watchdog_Tickle>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000e04c: e10f3000 mrs r3, CPSR
a000e050: e3832080 orr r2, r3, #128 ; 0x80
a000e054: e129f002 msr CPSR_fc, r2
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000e058: e5942000 ldr r2, [r4]
a000e05c: e1520006 cmp r2, r6
a000e060: 0a000002 beq a000e070 <_Watchdog_Adjust+0x98>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
a000e064: e0675005 rsb r5, r7, r5 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
a000e068: e3550000 cmp r5, #0
a000e06c: 1affffeb bne a000e020 <_Watchdog_Adjust+0x48>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000e070: e129f003 msr CPSR_fc, r3
}
}
_ISR_Enable( level );
}
a000e074: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a001c780 <_Watchdog_Adjust_to_chain>:
{
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001c780: e3510000 cmp r1, #0
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
a001c784: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
a001c788: 0a000026 beq a001c828 <_Watchdog_Adjust_to_chain+0xa8>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a001c78c: e10f5000 mrs r5, CPSR
a001c790: e3853080 orr r3, r5, #128 ; 0x80
a001c794: e129f003 msr CPSR_fc, r3
/*
* 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;
a001c798: e3a08000 mov r8, #0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
a001c79c: e2806004 add r6, r0, #4
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
a001c7a0: e2827004 add r7, r2, #4
a001c7a4: ea000001 b a001c7b0 <_Watchdog_Adjust_to_chain+0x30>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
a001c7a8: e3510000 cmp r1, #0
a001c7ac: 0a00001c beq a001c824 <_Watchdog_Adjust_to_chain+0xa4>
break;
}
}
_ISR_Enable( level );
}
a001c7b0: e590c000 ldr ip, [r0]
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
a001c7b4: e15c0006 cmp ip, r6
a001c7b8: 0a000019 beq a001c824 <_Watchdog_Adjust_to_chain+0xa4>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
a001c7bc: e59c4010 ldr r4, [ip, #16]
a001c7c0: e1a0300c mov r3, ip
a001c7c4: e1510004 cmp r1, r4
first->delta_interval -= units;
a001c7c8: 30611004 rsbcc r1, r1, r4
a001c7cc: 358c1010 strcc r1, [ip, #16]
break;
a001c7d0: 3a000013 bcc a001c824 <_Watchdog_Adjust_to_chain+0xa4>
/*
* 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;
a001c7d4: e0641001 rsb r1, r4, r1
first->delta_interval = 0;
a001c7d8: e58c8010 str r8, [ip, #16]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
a001c7dc: e8931010 ldm r3, {r4, ip}
next->previous = previous;
a001c7e0: e584c004 str ip, [r4, #4]
previous->next = next;
a001c7e4: e58c4000 str r4, [ip]
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
a001c7e8: e592c008 ldr ip, [r2, #8]
the_node->next = tail;
a001c7ec: e5837000 str r7, [r3]
tail->previous = the_node;
a001c7f0: e5823008 str r3, [r2, #8]
old_last->next = the_node;
a001c7f4: e58c3000 str r3, [ip]
the_node->previous = old_last;
a001c7f8: e583c004 str ip, [r3, #4]
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a001c7fc: e10f3000 mrs r3, CPSR
a001c800: e129f005 msr CPSR_fc, r5
a001c804: e129f003 msr CPSR_fc, r3
break;
}
}
_ISR_Enable( level );
}
a001c808: e5903000 ldr r3, [r0]
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
if ( _Chain_Is_empty( header ) )
a001c80c: e1530006 cmp r3, r6
a001c810: 0affffe4 beq a001c7a8 <_Watchdog_Adjust_to_chain+0x28>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
a001c814: e593c010 ldr ip, [r3, #16] <== NOT EXECUTED
a001c818: e35c0000 cmp ip, #0 <== NOT EXECUTED
a001c81c: 0affffee beq a001c7dc <_Watchdog_Adjust_to_chain+0x5c> <== NOT EXECUTED
a001c820: eaffffe0 b a001c7a8 <_Watchdog_Adjust_to_chain+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a001c824: e129f005 msr CPSR_fc, r5
a001c828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000c3e8 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000c3e8: e59f30f4 ldr r3, [pc, #244] ; a000c4e4 <_Watchdog_Insert+0xfc>
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
a000c3ec: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
a000c3f0: e5934000 ldr r4, [r3]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c3f4: e10fc000 mrs ip, CPSR
a000c3f8: e38c3080 orr r3, ip, #128 ; 0x80
a000c3fc: 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 ) {
a000c400: e5913008 ldr r3, [r1, #8]
a000c404: e3530000 cmp r3, #0
a000c408: 0a000000 beq a000c410 <_Watchdog_Insert+0x28>
_ISR_Enable( level );
a000c40c: ea000032 b a000c4dc <_Watchdog_Insert+0xf4> <== NOT EXECUTED
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
a000c410: e3a03001 mov r3, #1
a000c414: e5813008 str r3, [r1, #8]
_Watchdog_Sync_count++;
a000c418: e59f30c8 ldr r3, [pc, #200] ; a000c4e8 <_Watchdog_Insert+0x100>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c41c: e59f60c8 ldr r6, [pc, #200] ; a000c4ec <_Watchdog_Insert+0x104>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000c420: e5932000 ldr r2, [r3]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c424: e1a07006 mov r7, r6
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
a000c428: e2822001 add r2, r2, #1
a000c42c: e5832000 str r2, [r3]
restart:
delta_interval = the_watchdog->initial;
a000c430: e591200c ldr r2, [r1, #12]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000c434: e5903000 ldr r3, [r0]
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
a000c438: e3520000 cmp r2, #0
a000c43c: 0a000014 beq a000c494 <_Watchdog_Insert+0xac>
a000c440: e5935000 ldr r5, [r3]
a000c444: e3550000 cmp r5, #0
a000c448: 0a000011 beq a000c494 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
a000c44c: e5935010 ldr r5, [r3, #16]
a000c450: e1520005 cmp r2, r5
after->delta_interval -= delta_interval;
a000c454: 30625005 rsbcc r5, r2, r5
a000c458: 35835010 strcc r5, [r3, #16]
break;
a000c45c: 3a00000c bcc a000c494 <_Watchdog_Insert+0xac>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000c460: e10f8000 mrs r8, CPSR
a000c464: e129f00c msr CPSR_fc, ip
a000c468: e129f008 msr CPSR_fc, r8
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
a000c46c: e5918008 ldr r8, [r1, #8]
a000c470: e3580001 cmp r8, #1
a000c474: 1a000012 bne a000c4c4 <_Watchdog_Insert+0xdc>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
a000c478: e5968000 ldr r8, [r6]
a000c47c: e1580004 cmp r8, r4
_Watchdog_Sync_level = insert_isr_nest_level;
a000c480: 85874000 strhi r4, [r7]
goto restart;
a000c484: 8affffe9 bhi a000c430 <_Watchdog_Insert+0x48>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
a000c488: e0652002 rsb r2, r5, r2
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
a000c48c: e5933000 ldr r3, [r3]
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
goto restart;
}
}
a000c490: eaffffe8 b a000c438 <_Watchdog_Insert+0x50>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
a000c494: e5933004 ldr r3, [r3, #4]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
a000c498: e3a00002 mov r0, #2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
a000c49c: e5812010 str r2, [r1, #16]
a000c4a0: e5810008 str r0, [r1, #8]
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
a000c4a4: e5932000 ldr r2, [r3]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
a000c4a8: e5813004 str r3, [r1, #4]
before_node = after_node->next;
after_node->next = the_node;
a000c4ac: e5831000 str r1, [r3]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
a000c4b0: e59f3038 ldr r3, [pc, #56] ; a000c4f0 <_Watchdog_Insert+0x108>
the_node->next = before_node;
before_node->previous = the_node;
a000c4b4: e5821004 str r1, [r2, #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;
a000c4b8: e5812000 str r2, [r1]
a000c4bc: e5933000 ldr r3, [r3]
a000c4c0: e5813014 str r3, [r1, #20]
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
a000c4c4: e59f3020 ldr r3, [pc, #32] ; a000c4ec <_Watchdog_Insert+0x104>
a000c4c8: e5834000 str r4, [r3]
_Watchdog_Sync_count--;
a000c4cc: e59f3014 ldr r3, [pc, #20] ; a000c4e8 <_Watchdog_Insert+0x100>
a000c4d0: e5932000 ldr r2, [r3]
a000c4d4: e2422001 sub r2, r2, #1
a000c4d8: e5832000 str r2, [r3]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c4dc: e129f00c msr CPSR_fc, ip
a000c4e0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a000dae8 <_Watchdog_Report>:
void _Watchdog_Report(
const char *name,
Watchdog_Control *watch
)
{
a000dae8: e92d401f push {r0, r1, r2, r3, r4, lr} <== NOT EXECUTED
a000daec: e1a03001 mov r3, r1 <== NOT EXECUTED
printk(
a000daf0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
a000daf4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
a000daf8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000dafc: 059f1034 ldreq r1, [pc, #52] ; a000db38 <_Watchdog_Report+0x50><== NOT EXECUTED
a000db00: e58d0000 str r0, [sp] <== NOT EXECUTED
a000db04: e593001c ldr r0, [r3, #28] <== NOT EXECUTED
a000db08: 01a02001 moveq r2, r1 <== NOT EXECUTED
a000db0c: 159f2028 ldrne r2, [pc, #40] ; a000db3c <_Watchdog_Report+0x54><== NOT EXECUTED
a000db10: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
a000db14: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
a000db18: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000db1c: e5930024 ldr r0, [r3, #36] ; 0x24 <== NOT EXECUTED
a000db20: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
a000db24: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
a000db28: e59f0010 ldr r0, [pc, #16] ; a000db40 <_Watchdog_Report+0x58><== NOT EXECUTED
a000db2c: ebffe868 bl a0007cd4 <printk> <== NOT EXECUTED
watch,
watch->routine,
watch->id,
watch->user_data
);
}
a000db30: e28dd014 add sp, sp, #20 <== NOT EXECUTED
a000db34: e8bd8000 pop {pc} <== NOT EXECUTED
a000da70 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
a000da70: e92d40f0 push {r4, r5, r6, r7, lr}
a000da74: e1a04000 mov r4, r0
a000da78: e1a05001 mov r5, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000da7c: e10f6000 mrs r6, CPSR
a000da80: e3863080 orr r3, r6, #128 ; 0x80
a000da84: e129f003 msr CPSR_fc, r3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
a000da88: e59f004c ldr r0, [pc, #76] ; a000dadc <_Watchdog_Report_chain+0x6c>
a000da8c: e1a02005 mov r2, r5
a000da90: e1a01004 mov r1, r4
a000da94: ebffe88e bl a0007cd4 <printk>
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
a000da98: e4957004 ldr r7, [r5], #4
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
a000da9c: e1570005 cmp r7, r5
a000daa0: 0a000009 beq a000dacc <_Watchdog_Report_chain+0x5c>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
a000daa4: e1a01007 mov r1, r7 <== NOT EXECUTED
a000daa8: e3a00000 mov r0, #0 <== NOT EXECUTED
a000daac: eb00000d bl a000dae8 <_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 )
a000dab0: 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 ) ;
a000dab4: e1570005 cmp r7, r5 <== NOT EXECUTED
a000dab8: 1afffff9 bne a000daa4 <_Watchdog_Report_chain+0x34> <== NOT EXECUTED
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
a000dabc: e59f001c ldr r0, [pc, #28] ; a000dae0 <_Watchdog_Report_chain+0x70><== NOT EXECUTED
a000dac0: e1a01004 mov r1, r4 <== NOT EXECUTED
a000dac4: ebffe882 bl a0007cd4 <printk> <== NOT EXECUTED
a000dac8: ea000001 b a000dad4 <_Watchdog_Report_chain+0x64> <== NOT EXECUTED
} else {
printk( "Chain is empty\n" );
a000dacc: e59f0010 ldr r0, [pc, #16] ; a000dae4 <_Watchdog_Report_chain+0x74>
a000dad0: ebffe87f bl a0007cd4 <printk>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000dad4: e129f006 msr CPSR_fc, r6
}
_ISR_Enable( level );
}
a000dad8: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000c5ec <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
a000c5ec: e92d40f0 push {r4, r5, r6, r7, lr}
a000c5f0: e1a05000 mov r5, r0
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c5f4: e10f7000 mrs r7, CPSR
a000c5f8: e3873080 orr r3, r7, #128 ; 0x80
a000c5fc: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c600: e1a04000 mov r4, r0
a000c604: e4943004 ldr r3, [r4], #4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
a000c608: e1530004 cmp r3, r4
a000c60c: 0a000019 beq a000c678 <_Watchdog_Tickle+0x8c>
* 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) {
a000c610: e5932010 ldr r2, [r3, #16]
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
a000c614: e1a06003 mov r6, r3
a000c618: e3520000 cmp r2, #0
a000c61c: 0a000003 beq a000c630 <_Watchdog_Tickle+0x44>
the_watchdog->delta_interval--;
a000c620: e2422001 sub r2, r2, #1
a000c624: e5832010 str r2, [r3, #16]
if ( the_watchdog->delta_interval != 0 )
a000c628: e3520000 cmp r2, #0
a000c62c: 1a000011 bne a000c678 <_Watchdog_Tickle+0x8c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
a000c630: e1a00006 mov r0, r6
a000c634: ebffffc3 bl a000c548 <_Watchdog_Remove>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c638: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
switch( watchdog_state ) {
a000c63c: e3500002 cmp r0, #2
a000c640: 1a000003 bne a000c654 <_Watchdog_Tickle+0x68>
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
a000c644: e596301c ldr r3, [r6, #28]
a000c648: e5960020 ldr r0, [r6, #32]
a000c64c: e5961024 ldr r1, [r6, #36] ; 0x24
a000c650: e12fff33 blx r3
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000c654: e10f7000 mrs r7, CPSR
a000c658: e3873080 orr r3, r7, #128 ; 0x80
a000c65c: e129f003 msr CPSR_fc, r3
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c660: e5956000 ldr r6, [r5]
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
a000c664: e1560004 cmp r6, r4
a000c668: 0a000002 beq a000c678 <_Watchdog_Tickle+0x8c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
a000c66c: e5963010 ldr r3, [r6, #16] <== NOT EXECUTED
a000c670: e3530000 cmp r3, #0 <== NOT EXECUTED
a000c674: eaffffec b a000c62c <_Watchdog_Tickle+0x40> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000c678: e129f007 msr CPSR_fc, r7
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
a000c67c: e8bd80f0 pop {r4, r5, r6, r7, pc}
a000b00c <rtems_build_id>:
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
a000b00c: e1a00c00 lsl r0, r0, #24 <== NOT EXECUTED
a000b010: e1800d81 orr r0, r0, r1, lsl #27 <== NOT EXECUTED
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
a000b014: e1800003 orr r0, r0, r3 <== NOT EXECUTED
uint32_t node,
uint32_t index
)
{
return _Objects_Build_id( api, class, node, index );
}
a000b018: e1800802 orr r0, r0, r2, lsl #16 <== NOT EXECUTED
a000b01c: e12fff1e bx lr <== NOT EXECUTED
a000b020 <rtems_build_name>:
char C1,
char C2,
char C3,
char C4
)
{
a000b020: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b024: e20118ff and r1, r1, #16711680 ; 0xff0000 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000b028: e1a02402 lsl r2, r2, #8 <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b02c: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
a000b030: e2022cff and r2, r2, #65280 ; 0xff00 <== NOT EXECUTED
char C1,
char C2,
char C3,
char C4
)
{
a000b034: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
return _Objects_Build_name( C1, C2, C3, C4 );
a000b038: e1800002 orr r0, r0, r2 <== NOT EXECUTED
}
a000b03c: e1800003 orr r0, r0, r3 <== NOT EXECUTED
a000b040: e12fff1e bx lr <== NOT EXECUTED
a000a0b0 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a0b0: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a0b4: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a0b8: 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 );
a000a0bc: eb000127 bl a000a560 <_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 ) {
a000a0c0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a0c4: 0a000003 beq a000a0d8 <rtems_chain_append_with_notification+0x28><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a0c8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a0cc: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a0d0: 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 );
a000a0d4: eafffda5 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a0d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a0dc <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
a000a0dc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a0e0: 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 );
a000a0e4: e1a01003 mov r1, r3 <== NOT EXECUTED
a000a0e8: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a0ec: eb00013f bl a000a5f0 <_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 ) {
a000a0f0: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a0f4: 0a000003 beq a000a108 <rtems_chain_get_with_notification+0x2c><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a0f8: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a0fc: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a100: 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 );
a000a104: eafffd99 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a108: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a000a10c <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
a000a10c: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
a000a110: e1a07000 mov r7, r0 <== NOT EXECUTED
a000a114: e1a06001 mov r6, r1 <== NOT EXECUTED
a000a118: e1a05002 mov r5, r2 <== NOT EXECUTED
a000a11c: e1a0a003 mov sl, r3 <== NOT EXECUTED
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
a000a120: e1a0800d mov r8, sp <== NOT EXECUTED
a000a124: ea000006 b a000a144 <rtems_chain_get_with_wait+0x38> <== NOT EXECUTED
a000a128: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a12c: e1a01004 mov r1, r4 <== NOT EXECUTED
a000a130: e1a02005 mov r2, r5 <== NOT EXECUTED
a000a134: e1a0300d mov r3, sp <== NOT EXECUTED
a000a138: ebfffd30 bl a0009600 <rtems_event_receive> <== NOT EXECUTED
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
a000a13c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a140: 1a000004 bne a000a158 <rtems_chain_get_with_wait+0x4c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
a000a144: e1a00007 mov r0, r7 <== NOT EXECUTED
a000a148: eb00013c bl a000a640 <_Chain_Get> <== NOT EXECUTED
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
a000a14c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
a000a150: 0afffff4 beq a000a128 <rtems_chain_get_with_wait+0x1c> <== NOT EXECUTED
a000a154: e3a00000 mov r0, #0 <== NOT EXECUTED
timeout,
&out
);
}
*node_ptr = node;
a000a158: e58a4000 str r4, [sl] <== NOT EXECUTED
return sc;
}
a000a15c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
a000a160 <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
a000a160: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a164: e1a04002 mov r4, r2 <== NOT EXECUTED
a000a168: 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 );
a000a16c: eb00014a bl a000a69c <_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) {
a000a170: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a174: 0a000003 beq a000a188 <rtems_chain_prepend_with_notification+0x28><== NOT EXECUTED
sc = rtems_event_send( task, events );
a000a178: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a17c: e1a01005 mov r1, r5 <== NOT EXECUTED
}
return sc;
}
a000a180: 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 );
a000a184: eafffd79 b a0009770 <rtems_event_send> <== NOT EXECUTED
}
return sc;
}
a000a188: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
a001525c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
a001525c: e92d4010 push {r4, lr}
if ( !time_buffer )
a0015260: e2514000 subs r4, r1, #0
a0015264: 0a000018 beq a00152cc <rtems_clock_get+0x70>
return RTEMS_INVALID_ADDRESS;
if ( option == RTEMS_CLOCK_GET_TOD )
a0015268: e3500000 cmp r0, #0
a001526c: 1a000002 bne a001527c <rtems_clock_get+0x20>
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
a0015270: 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;
}
a0015274: 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 );
a0015278: ea000031 b a0015344 <rtems_clock_get_tod>
if ( option == RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH )
a001527c: e3500001 cmp r0, #1
a0015280: 1a000002 bne a0015290 <rtems_clock_get+0x34>
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
a0015284: 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;
}
a0015288: 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);
a001528c: ea000012 b a00152dc <rtems_clock_get_seconds_since_epoch>
if ( option == RTEMS_CLOCK_GET_TICKS_SINCE_BOOT ) {
a0015290: e3500002 cmp r0, #2
a0015294: 1a000001 bne a00152a0 <rtems_clock_get+0x44>
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
a0015298: eb000025 bl a0015334 <rtems_clock_get_ticks_since_boot>
a001529c: ea000002 b a00152ac <rtems_clock_get+0x50>
return RTEMS_SUCCESSFUL;
}
if ( option == RTEMS_CLOCK_GET_TICKS_PER_SECOND ) {
a00152a0: e3500003 cmp r0, #3
a00152a4: 1a000003 bne a00152b8 <rtems_clock_get+0x5c>
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
a00152a8: eb000019 bl a0015314 <rtems_clock_get_ticks_per_second>
a00152ac: e5840000 str r0, [r4]
return RTEMS_SUCCESSFUL;
a00152b0: e3a00000 mov r0, #0
a00152b4: e8bd8010 pop {r4, pc}
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
a00152b8: e3500004 cmp r0, #4 <== NOT EXECUTED
a00152bc: 1a000004 bne a00152d4 <rtems_clock_get+0x78> <== NOT EXECUTED
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
a00152c0: e1a00004 mov r0, r4 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
a00152c4: 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 );
a00152c8: ea00004f b a001540c <rtems_clock_get_tod_timeval> <== NOT EXECUTED
rtems_clock_get_options option,
void *time_buffer
)
{
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a00152cc: e3a00009 mov r0, #9 <== NOT EXECUTED
a00152d0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
}
if ( option == RTEMS_CLOCK_GET_TIME_VALUE )
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
return RTEMS_INVALID_NUMBER;
a00152d4: e3a0000a mov r0, #10 <== NOT EXECUTED
}
a00152d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a001540c <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
a001540c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
if ( !time )
a0015410: e2504000 subs r4, r0, #0 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0015414: 03a00009 moveq r0, #9 <== NOT EXECUTED
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
if ( !time )
a0015418: 0a000011 beq a0015464 <rtems_clock_get_tod_timeval+0x58> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a001541c: e59f3044 ldr r3, [pc, #68] ; a0015468 <rtems_clock_get_tod_timeval+0x5c><== NOT EXECUTED
a0015420: e5d33000 ldrb r3, [r3] <== NOT EXECUTED
a0015424: e3530000 cmp r3, #0 <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a0015428: 03a0000b moveq r0, #11 <== NOT EXECUTED
)
{
if ( !time )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
a001542c: 0a00000c beq a0015464 <rtems_clock_get_tod_timeval+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0015430: e10f5000 mrs r5, CPSR <== NOT EXECUTED
a0015434: e3853080 orr r3, r5, #128 ; 0x80 <== NOT EXECUTED
a0015438: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
a001543c: e1a0000d mov r0, sp <== NOT EXECUTED
a0015440: eb0010dd bl a00197bc <_TOD_Get> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0015444: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
a0015448: e59d3000 ldr r3, [sp] <== NOT EXECUTED
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a001544c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
a0015450: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
time->tv_sec = now.tv_sec;
a0015454: e5843000 str r3, [r4] <== NOT EXECUTED
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
a0015458: eb00616f bl a002da1c <__aeabi_idiv> <== NOT EXECUTED
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
a001545c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
a0015460: e3a00000 mov r0, #0 <== NOT EXECUTED
}
a0015464: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
a0009010 <rtems_clock_get_uptime>:
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
if ( !uptime )
a0009010: e3500000 cmp r0, #0 <== NOT EXECUTED
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
a0009014: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if ( !uptime )
a0009018: 0a000002 beq a0009028 <rtems_clock_get_uptime+0x18> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime_as_timespec( uptime );
a000901c: eb000545 bl a000a538 <_TOD_Get_uptime_as_timespec> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0009020: e3a00000 mov r0, #0 <== NOT EXECUTED
a0009024: 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;
a0009028: e3a00009 mov r0, #9 <== NOT EXECUTED
_TOD_Get_uptime_as_timespec( uptime );
return RTEMS_SUCCESSFUL;
}
a000902c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a0008ddc <rtems_clock_tick>:
*
* NOTE: This routine only works for leap-years through 2099.
*/
rtems_status_code rtems_clock_tick( void )
{
a0008ddc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_TOD_Tickle_ticks();
a0008de0: eb0004ec bl a000a198 <_TOD_Tickle_ticks>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void )
{
_Watchdog_Tickle( &_Watchdog_Ticks_chain );
a0008de4: e59f0030 ldr r0, [pc, #48] ; a0008e1c <rtems_clock_tick+0x40>
a0008de8: eb000dff bl a000c5ec <_Watchdog_Tickle>
_Watchdog_Tickle_ticks();
_Thread_Tickle_timeslice();
a0008dec: eb000c96 bl a000c04c <_Thread_Tickle_timeslice>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_context_switch_necessary( void )
{
return ( _Thread_Dispatch_necessary );
a0008df0: e59f3028 ldr r3, [pc, #40] ; a0008e20 <rtems_clock_tick+0x44>
a0008df4: e5d33010 ldrb r3, [r3, #16]
if ( _Thread_Is_context_switch_necessary() &&
a0008df8: e3530000 cmp r3, #0
a0008dfc: 0a000004 beq a0008e14 <rtems_clock_tick+0x38>
* otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_dispatching_enabled( void )
{
return ( _Thread_Dispatch_disable_level == 0 );
a0008e00: e59f301c ldr r3, [pc, #28] ; a0008e24 <rtems_clock_tick+0x48><== NOT EXECUTED
a0008e04: e5933000 ldr r3, [r3] <== NOT EXECUTED
a0008e08: e3530000 cmp r3, #0 <== NOT EXECUTED
a0008e0c: 1a000000 bne a0008e14 <rtems_clock_tick+0x38> <== NOT EXECUTED
_Thread_Is_dispatching_enabled() )
_Thread_Dispatch();
a0008e10: eb0009be bl a000b510 <_Thread_Dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
a0008e14: e3a00000 mov r0, #0
a0008e18: e49df004 pop {pc} ; (ldr pc, [sp], #4)
a0008e28 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
a0008e28: e92d4070 push {r4, r5, r6, lr}
RTEMS_API_Control *api;
if ( !event_out )
a0008e2c: e2535000 subs r5, r3, #0
a0008e30: 0a000010 beq a0008e78 <rtems_event_receive+0x50>
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e34: e59f4044 ldr r4, [pc, #68] ; a0008e80 <rtems_event_receive+0x58>
if ( _Event_sets_Is_empty( event_in ) ) {
a0008e38: e3500000 cmp r0, #0
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a0008e3c: e5946004 ldr r6, [r4, #4]
a0008e40: e59660f4 ldr r6, [r6, #244] ; 0xf4
if ( _Event_sets_Is_empty( event_in ) ) {
a0008e44: 1a000002 bne a0008e54 <rtems_event_receive+0x2c>
*event_out = api->pending_events;
a0008e48: e5963000 ldr r3, [r6]
a0008e4c: e5853000 str r3, [r5]
return RTEMS_SUCCESSFUL;
a0008e50: e8bd8070 pop {r4, r5, r6, pc}
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0008e54: e59fc028 ldr ip, [pc, #40] ; a0008e84 <rtems_event_receive+0x5c>
a0008e58: e59ce000 ldr lr, [ip]
a0008e5c: e28ee001 add lr, lr, #1
a0008e60: e58ce000 str lr, [ip]
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
a0008e64: eb000007 bl a0008e88 <_Event_Seize>
_Thread_Enable_dispatch();
a0008e68: eb0009ec bl a000b620 <_Thread_Enable_dispatch>
return( _Thread_Executing->Wait.return_code );
a0008e6c: e5943004 ldr r3, [r4, #4]
a0008e70: e5930034 ldr r0, [r3, #52] ; 0x34
a0008e74: e8bd8070 pop {r4, r5, r6, pc}
)
{
RTEMS_API_Control *api;
if ( !event_out )
return RTEMS_INVALID_ADDRESS;
a0008e78: e3a00009 mov r0, #9 <== NOT EXECUTED
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
_Thread_Enable_dispatch();
return( _Thread_Executing->Wait.return_code );
}
a0008e7c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a000bbfc <rtems_extension_ident>:
rtems_status_code rtems_extension_ident(
rtems_name name,
rtems_id *id
)
{
a000bbfc: e1a02000 mov r2, r0 <== NOT EXECUTED
a000bc00: e1a03001 mov r3, r1 <== NOT EXECUTED
a000bc04: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
Objects_Name_or_id_lookup_errors status;
status = _Objects_Name_to_id_u32(
a000bc08: e1a01002 mov r1, r2 <== NOT EXECUTED
a000bc0c: e59f0010 ldr r0, [pc, #16] ; a000bc24 <rtems_extension_ident+0x28><== NOT EXECUTED
a000bc10: e3e02102 mvn r2, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000bc14: eb00048c bl a000ce4c <_Objects_Name_to_id_u32> <== NOT EXECUTED
OBJECTS_SEARCH_LOCAL_NODE,
id
);
return _Status_Object_name_errors_to_status[ status ];
}
a000bc18: e59f3008 ldr r3, [pc, #8] ; a000bc28 <rtems_extension_ident+0x2c><== NOT EXECUTED
a000bc1c: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
a000bc20: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000a244 <rtems_interrupt_disable>:
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a244: e10f0000 mrs r0, CPSR <== NOT EXECUTED
a000a248: e3803080 orr r3, r0, #128 ; 0x80 <== NOT EXECUTED
a000a24c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_level previous_level;
_ISR_Disable( previous_level );
return previous_level;
}
a000a250: e12fff1e bx lr <== NOT EXECUTED
a000a254 <rtems_interrupt_enable>:
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a254: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
void rtems_interrupt_enable(
rtems_interrupt_level previous_level
)
{
_ISR_Enable( previous_level );
}
a000a258: e12fff1e bx lr <== NOT EXECUTED
a000a25c <rtems_interrupt_flash>:
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
a000a25c: e10f3000 mrs r3, CPSR <== NOT EXECUTED
a000a260: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
a000a264: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
void rtems_interrupt_flash(
rtems_interrupt_level previous_level
)
{
_ISR_Flash( previous_level );
}
a000a268: e12fff1e bx lr <== NOT EXECUTED
a000a26c <rtems_interrupt_is_in_progress>:
#undef rtems_interrupt_is_in_progress
bool rtems_interrupt_is_in_progress( void )
{
return _ISR_Is_in_progress();
a000a26c: e59f300c ldr r3, [pc, #12] ; a000a280 <rtems_interrupt_is_in_progress+0x14><== NOT EXECUTED
a000a270: e5930000 ldr r0, [r3] <== NOT EXECUTED
}
a000a274: e2500000 subs r0, r0, #0 <== NOT EXECUTED
a000a278: 13a00001 movne r0, #1 <== NOT EXECUTED
a000a27c: e12fff1e bx lr <== NOT EXECUTED
a0009c68 <rtems_interrupt_level_attribute>:
rtems_attribute rtems_interrupt_level_attribute(
uint32_t level
)
{
return RTEMS_INTERRUPT_LEVEL(level);
}
a0009c68: e2000080 and r0, r0, #128 ; 0x80 <== NOT EXECUTED
a0009c6c: e12fff1e bx lr <== NOT EXECUTED
a000ff98 <rtems_io_close>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ff98: e59fc044 ldr ip, [pc, #68] ; a000ffe4 <rtems_io_close+0x4c>
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000ff9c: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffa0: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000ffa4: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffa8: e150000c cmp r0, ip
a000ffac: 2a000008 bcs a000ffd4 <rtems_io_close+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
a000ffb0: e59fc030 ldr ip, [pc, #48] ; a000ffe8 <rtems_io_close+0x50>
a000ffb4: e3a04018 mov r4, #24
a000ffb8: e59cc000 ldr ip, [ip]
a000ffbc: e023c394 mla r3, r4, r3, ip
a000ffc0: e5933008 ldr r3, [r3, #8]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000ffc4: e3530000 cmp r3, #0
a000ffc8: 0a000003 beq a000ffdc <rtems_io_close+0x44>
a000ffcc: e12fff33 blx r3
a000ffd0: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a000ffd4: e3a0000a mov r0, #10 <== NOT EXECUTED
a000ffd8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000ffdc: e1a00003 mov r0, r3
}
a000ffe0: e8bd8010 pop {r4, pc}
a000ffec <rtems_io_control>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000ffec: e59fc044 ldr ip, [pc, #68] ; a0010038 <rtems_io_control+0x4c>
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000fff0: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000fff4: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000fff8: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000fffc: e150000c cmp r0, ip
a0010000: 2a000008 bcs a0010028 <rtems_io_control+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
a0010004: e59fc030 ldr ip, [pc, #48] ; a001003c <rtems_io_control+0x50>
a0010008: e3a04018 mov r4, #24
a001000c: e59cc000 ldr ip, [ip]
a0010010: e023c394 mla r3, r4, r3, ip
a0010014: e5933014 ldr r3, [r3, #20]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010018: e3530000 cmp r3, #0
a001001c: 0a000003 beq a0010030 <rtems_io_control+0x44>
a0010020: e12fff33 blx r3
a0010024: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0010028: e3a0000a mov r0, #10 <== NOT EXECUTED
a001002c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010030: e1a00003 mov r0, r3 <== NOT EXECUTED
}
a0010034: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000e394 <rtems_io_initialize>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e394: e59fc044 ldr ip, [pc, #68] ; a000e3e0 <rtems_io_initialize+0x4c>
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000e398: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e39c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a000e3a0: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a000e3a4: e150000c cmp r0, ip
a000e3a8: 2a000008 bcs a000e3d0 <rtems_io_initialize+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
a000e3ac: e59fc030 ldr ip, [pc, #48] ; a000e3e4 <rtems_io_initialize+0x50>
a000e3b0: e3a04018 mov r4, #24
a000e3b4: e0030394 mul r3, r4, r3
a000e3b8: e59cc000 ldr ip, [ip]
a000e3bc: e79c3003 ldr r3, [ip, r3]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000e3c0: e3530000 cmp r3, #0
a000e3c4: 0a000003 beq a000e3d8 <rtems_io_initialize+0x44>
a000e3c8: e12fff33 blx r3
a000e3cc: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a000e3d0: e3a0000a mov r0, #10 <== NOT EXECUTED
a000e3d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a000e3d8: e1a00003 mov r0, r3
}
a000e3dc: e8bd8010 pop {r4, pc}
a0010040 <rtems_io_open>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010040: e59fc044 ldr ip, [pc, #68] ; a001008c <rtems_io_open+0x4c>
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0010044: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010048: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_open(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a001004c: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010050: e150000c cmp r0, ip
a0010054: 2a000008 bcs a001007c <rtems_io_open+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
a0010058: e59fc030 ldr ip, [pc, #48] ; a0010090 <rtems_io_open+0x50>
a001005c: e3a04018 mov r4, #24
a0010060: e59cc000 ldr ip, [ip]
a0010064: e023c394 mla r3, r4, r3, ip
a0010068: e5933004 ldr r3, [r3, #4]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a001006c: e3530000 cmp r3, #0
a0010070: 0a000003 beq a0010084 <rtems_io_open+0x44>
a0010074: e12fff33 blx r3
a0010078: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a001007c: e3a0000a mov r0, #10 <== NOT EXECUTED
a0010080: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010084: e1a00003 mov r0, r3
}
a0010088: e8bd8010 pop {r4, pc}
a0010094 <rtems_io_read>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a0010094: e59fc044 ldr ip, [pc, #68] ; a00100e0 <rtems_io_read+0x4c>
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a0010098: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a001009c: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_read(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100a0: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100a4: e150000c cmp r0, ip
a00100a8: 2a000008 bcs a00100d0 <rtems_io_read+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
a00100ac: e59fc030 ldr ip, [pc, #48] ; a00100e4 <rtems_io_read+0x50>
a00100b0: e3a04018 mov r4, #24
a00100b4: e59cc000 ldr ip, [ip]
a00100b8: e023c394 mla r3, r4, r3, ip
a00100bc: e593300c ldr r3, [r3, #12]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00100c0: e3530000 cmp r3, #0
a00100c4: 0a000003 beq a00100d8 <rtems_io_read+0x44>
a00100c8: e12fff33 blx r3
a00100cc: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a00100d0: e3a0000a mov r0, #10 <== NOT EXECUTED
a00100d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a00100d8: e1a00003 mov r0, r3
}
a00100dc: e8bd8010 pop {r4, pc}
a000ab6c <rtems_io_register_driver>:
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
)
{
a000ab6c: e92d4010 push {r4, lr}
a000ab70: e1a04000 mov r4, r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
a000ab74: e59f015c ldr r0, [pc, #348] ; a000acd8 <rtems_io_register_driver+0x16c>
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;
a000ab78: e59f315c ldr r3, [pc, #348] ; a000acdc <rtems_io_register_driver+0x170>
if ( rtems_interrupt_is_in_progress() )
a000ab7c: e5900000 ldr r0, [r0]
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;
a000ab80: e5933000 ldr r3, [r3]
if ( rtems_interrupt_is_in_progress() )
a000ab84: e3500000 cmp r0, #0
a000ab88: 1a000043 bne a000ac9c <rtems_io_register_driver+0x130>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
a000ab8c: e3520000 cmp r2, #0
a000ab90: 0a000043 beq a000aca4 <rtems_io_register_driver+0x138>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
a000ab94: e3510000 cmp r1, #0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
a000ab98: e5823000 str r3, [r2]
if ( driver_table == NULL )
a000ab9c: 0a000040 beq a000aca4 <rtems_io_register_driver+0x138>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000aba0: e5910000 ldr r0, [r1]
a000aba4: e3500000 cmp r0, #0
a000aba8: 1a000041 bne a000acb4 <rtems_io_register_driver+0x148>
a000abac: e5910004 ldr r0, [r1, #4]
a000abb0: e3500000 cmp r0, #0
a000abb4: 1a00003e bne a000acb4 <rtems_io_register_driver+0x148>
a000abb8: ea000039 b a000aca4 <rtems_io_register_driver+0x138> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000abbc: e59f311c ldr r3, [pc, #284] ; a000ace0 <rtems_io_register_driver+0x174>
a000abc0: e5930000 ldr r0, [r3]
a000abc4: e2800001 add r0, r0, #1
a000abc8: e5830000 str r0, [r3]
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
a000abcc: e3540000 cmp r4, #0
a000abd0: e59f010c ldr r0, [pc, #268] ; a000ace4 <rtems_io_register_driver+0x178>
a000abd4: 1a000010 bne a000ac1c <rtems_io_register_driver+0xb0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
a000abd8: e59f30fc ldr r3, [pc, #252] ; a000acdc <rtems_io_register_driver+0x170>
a000abdc: e593c000 ldr ip, [r3]
a000abe0: e5903000 ldr r3, [r0]
a000abe4: ea000006 b a000ac04 <rtems_io_register_driver+0x98>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
a000abe8: e5930000 ldr r0, [r3]
a000abec: e3500000 cmp r0, #0
a000abf0: 1a000032 bne a000acc0 <rtems_io_register_driver+0x154>
a000abf4: e5930004 ldr r0, [r3, #4]
a000abf8: e3500000 cmp r0, #0
a000abfc: 1a00002f bne a000acc0 <rtems_io_register_driver+0x154>
a000ac00: ea000001 b a000ac0c <rtems_io_register_driver+0xa0>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a000ac04: e154000c cmp r4, ip
a000ac08: 3afffff6 bcc a000abe8 <rtems_io_register_driver+0x7c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
a000ac0c: e154000c cmp r4, ip
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
a000ac10: e5824000 str r4, [r2]
if ( m != n )
a000ac14: 1a000011 bne a000ac60 <rtems_io_register_driver+0xf4>
a000ac18: ea00002b b a000accc <rtems_io_register_driver+0x160>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
a000ac1c: e3a03018 mov r3, #24
a000ac20: e0030394 mul r3, r4, r3
a000ac24: e5900000 ldr r0, [r0]
a000ac28: e080c003 add ip, 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;
a000ac2c: e7903003 ldr r3, [r0, r3]
a000ac30: e3530000 cmp r3, #0
a000ac34: 13a03000 movne r3, #0
a000ac38: 1a000002 bne a000ac48 <rtems_io_register_driver+0xdc>
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
}
rtems_status_code rtems_io_register_driver(
a000ac3c: e59c3004 ldr r3, [ip, #4]
a000ac40: e2733001 rsbs r3, r3, #1
a000ac44: 33a03000 movcc r3, #0
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
a000ac48: e3530000 cmp r3, #0
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
a000ac4c: 15824000 strne r4, [r2]
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
a000ac50: 1a000002 bne a000ac60 <rtems_io_register_driver+0xf4>
_Thread_Enable_dispatch();
a000ac54: eb0006e1 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
a000ac58: e3a0000c mov r0, #12
a000ac5c: e8bd8010 pop {r4, pc}
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
a000ac60: e59f307c ldr r3, [pc, #124] ; a000ace4 <rtems_io_register_driver+0x178>
a000ac64: e3a0c018 mov ip, #24
a000ac68: e1a0e001 mov lr, r1
a000ac6c: e5933000 ldr r3, [r3]
a000ac70: e02c3c94 mla ip, r4, ip, r3
a000ac74: e8be000f ldm lr!, {r0, r1, r2, r3}
a000ac78: e8ac000f stmia ip!, {r0, r1, r2, r3}
a000ac7c: e89e0003 ldm lr, {r0, r1}
a000ac80: e88c0003 stm ip, {r0, r1}
_Thread_Enable_dispatch();
a000ac84: eb0006d5 bl a000c7e0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
a000ac88: e3a01000 mov r1, #0
a000ac8c: e1a00004 mov r0, r4
a000ac90: e1a02001 mov r2, r1
}
a000ac94: e8bd4010 pop {r4, lr}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
a000ac98: ea001cb4 b a0011f70 <rtems_io_initialize>
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000ac9c: e3a00012 mov r0, #18 <== NOT EXECUTED
a000aca0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
a000aca4: e3a00009 mov r0, #9 <== NOT EXECUTED
a000aca8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
a000acac: e3a0000a mov r0, #10 <== NOT EXECUTED
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
a000acb0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
a000acb4: e1540003 cmp r4, r3
a000acb8: 3affffbf bcc a000abbc <rtems_io_register_driver+0x50>
a000acbc: eafffffa b a000acac <rtems_io_register_driver+0x140> <== NOT EXECUTED
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
a000acc0: e2844001 add r4, r4, #1
a000acc4: e2833018 add r3, r3, #24
a000acc8: eaffffcd b a000ac04 <rtems_io_register_driver+0x98>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
a000accc: eb0006c3 bl a000c7e0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
a000acd0: 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;
a000acd4: e8bd8010 pop {r4, pc}
a000ace8 <rtems_io_unregister_driver>:
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
a000ace8: e59f3060 ldr r3, [pc, #96] ; a000ad50 <rtems_io_unregister_driver+0x68>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
a000acec: e92d4010 push {r4, lr}
if ( rtems_interrupt_is_in_progress() )
a000acf0: e5934000 ldr r4, [r3]
a000acf4: e3540000 cmp r4, #0
a000acf8: 1a000010 bne a000ad40 <rtems_io_unregister_driver+0x58>
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
a000acfc: e59f3050 ldr r3, [pc, #80] ; a000ad54 <rtems_io_unregister_driver+0x6c>
a000ad00: e5933000 ldr r3, [r3]
a000ad04: e1500003 cmp r0, r3
a000ad08: 2a00000e bcs a000ad48 <rtems_io_unregister_driver+0x60>
a000ad0c: e59f3044 ldr r3, [pc, #68] ; a000ad58 <rtems_io_unregister_driver+0x70>
a000ad10: e5932000 ldr r2, [r3]
a000ad14: e2822001 add r2, r2, #1
a000ad18: e5832000 str r2, [r3]
_Thread_Disable_dispatch();
memset(
a000ad1c: e59f3038 ldr r3, [pc, #56] ; a000ad5c <rtems_io_unregister_driver+0x74>
&_IO_Driver_address_table[major],
a000ad20: e3a02018 mov r2, #24
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( major < _IO_Number_of_drivers ) {
_Thread_Disable_dispatch();
memset(
a000ad24: e1a01004 mov r1, r4
a000ad28: e5933000 ldr r3, [r3]
a000ad2c: e0203092 mla r0, r2, r0, r3
a000ad30: eb0026cc bl a0014868 <memset>
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
_Thread_Enable_dispatch();
a000ad34: eb0006a9 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ad38: e1a00004 mov r0, r4
a000ad3c: e8bd8010 pop {r4, pc}
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
a000ad40: e3a00012 mov r0, #18 <== NOT EXECUTED
a000ad44: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
a000ad48: e3a0000d mov r0, #13 <== NOT EXECUTED
}
a000ad4c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a00100e8 <rtems_io_write>:
void *argument
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100e8: e59fc044 ldr ip, [pc, #68] ; a0010134 <rtems_io_write+0x4c>
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100ec: e92d4010 push {r4, lr}
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100f0: e59cc000 ldr ip, [ip]
rtems_status_code rtems_io_write(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
a00100f4: e1a03000 mov r3, r0
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
a00100f8: e150000c cmp r0, ip
a00100fc: 2a000008 bcs a0010124 <rtems_io_write+0x3c>
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
a0010100: e59fc030 ldr ip, [pc, #48] ; a0010138 <rtems_io_write+0x50>
a0010104: e3a04018 mov r4, #24
a0010108: e59cc000 ldr ip, [ip]
a001010c: e023c394 mla r3, r4, r3, ip
a0010110: e5933010 ldr r3, [r3, #16]
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a0010114: e3530000 cmp r3, #0
a0010118: 0a000003 beq a001012c <rtems_io_write+0x44>
a001011c: e12fff33 blx r3
a0010120: e8bd8010 pop {r4, pc}
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
a0010124: e3a0000a mov r0, #10 <== NOT EXECUTED
a0010128: e8bd8010 pop {r4, pc} <== NOT EXECUTED
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
a001012c: e1a00003 mov r0, r3
}
a0010130: e8bd8010 pop {r4, pc}
a0015c34 <rtems_message_queue_broadcast>:
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0015c34: e92d40f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a0015c38: e2517000 subs r7, r1, #0
rtems_id id,
const void *buffer,
size_t size,
uint32_t *count
)
{
a0015c3c: e1a04000 mov r4, r0
a0015c40: e1a05002 mov r5, r2
a0015c44: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status core_status;
if ( !buffer )
a0015c48: 0a000015 beq a0015ca4 <rtems_message_queue_broadcast+0x70>
return RTEMS_INVALID_ADDRESS;
if ( !count )
a0015c4c: e3530000 cmp r3, #0
a0015c50: 0a000013 beq a0015ca4 <rtems_message_queue_broadcast+0x70>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a0015c54: e59f0050 ldr r0, [pc, #80] ; a0015cac <rtems_message_queue_broadcast+0x78>
a0015c58: e1a01004 mov r1, r4
a0015c5c: e28d2008 add r2, sp, #8
a0015c60: eb0013eb bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015c64: e59d3008 ldr r3, [sp, #8]
a0015c68: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0015c6c: 13a00004 movne r0, #4
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015c70: 1a00000c bne a0015ca8 <rtems_message_queue_broadcast+0x74>
case OBJECTS_LOCAL:
core_status = _CORE_message_queue_Broadcast(
a0015c74: e58d3000 str r3, [sp]
a0015c78: e1a01007 mov r1, r7
a0015c7c: e1a03004 mov r3, r4
a0015c80: e1a02005 mov r2, r5
a0015c84: e2800014 add r0, r0, #20
a0015c88: e58d6004 str r6, [sp, #4]
a0015c8c: eb000d0b bl a00190c0 <_CORE_message_queue_Broadcast>
a0015c90: e1a04000 mov r4, r0
NULL,
#endif
count
);
_Thread_Enable_dispatch();
a0015c94: eb0016af bl a001b758 <_Thread_Enable_dispatch>
return
a0015c98: e1a00004 mov r0, r4
a0015c9c: eb0000cc bl a0015fd4 <_Message_queue_Translate_core_message_queue_return_code>
a0015ca0: ea000000 b a0015ca8 <rtems_message_queue_broadcast+0x74>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0015ca4: e3a00009 mov r0, #9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0015ca8: e8bd80fe pop {r1, r2, r3, r4, r5, r6, r7, pc}
a0010fc4 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0010fc4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0010fc8: e2507000 subs r7, r0, #0
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0010fcc: e1a06001 mov r6, r1
a0010fd0: e1a05002 mov r5, r2
a0010fd4: e1a0a003 mov sl, r3
a0010fd8: e59d8020 ldr r8, [sp, #32]
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0010fdc: 03a00003 moveq r0, #3
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
a0010fe0: 0a00002d beq a001109c <rtems_message_queue_create+0xd8>
return RTEMS_INVALID_NAME;
if ( !id )
a0010fe4: e3580000 cmp r8, #0
return RTEMS_INVALID_ADDRESS;
a0010fe8: 03a00009 moveq r0, #9
#endif
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a0010fec: 0a00002a beq a001109c <rtems_message_queue_create+0xd8>
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
a0010ff0: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a0010ff4: 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 )
a0010ff8: 0a000027 beq a001109c <rtems_message_queue_create+0xd8>
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a0010ffc: e3520000 cmp r2, #0
return RTEMS_INVALID_SIZE;
a0011000: 03a00008 moveq r0, #8
#endif
if ( count == 0 )
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
a0011004: 0a000024 beq a001109c <rtems_message_queue_create+0xd8>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0011008: e59f3090 ldr r3, [pc, #144] ; a00110a0 <rtems_message_queue_create+0xdc>
a001100c: e5932000 ldr r2, [r3]
a0011010: e2822001 add r2, r2, #1
a0011014: e5832000 str r2, [r3]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
a0011018: eb001598 bl a0016680 <_Message_queue_Allocate>
if ( !the_message_queue ) {
a001101c: e2504000 subs r4, r0, #0
a0011020: 1a000002 bne a0011030 <rtems_message_queue_create+0x6c>
_Thread_Enable_dispatch();
a0011024: eb000b3f bl a0013d28 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a0011028: e3a00005 mov r0, #5 <== NOT EXECUTED
a001102c: ea00001a b a001109c <rtems_message_queue_create+0xd8> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_message_queue->attribute_set = attribute_set;
a0011030: e584a010 str sl, [r4, #16]
if (_Attributes_Is_priority( attribute_set ) )
a0011034: e21aa004 ands sl, sl, #4
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
a0011038: 13a03001 movne r3, #1
a001103c: 158d3000 strne r3, [sp]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
a0011040: e2840014 add r0, r4, #20
a0011044: e1a0100d mov r1, sp
a0011048: e1a02006 mov r2, r6
a001104c: e1a03005 mov r3, r5
the_message_queue->attribute_set = attribute_set;
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;
a0011050: 058da000 streq sl, [sp]
if ( ! _CORE_message_queue_Initialize(
a0011054: eb00044c bl a001218c <_CORE_message_queue_Initialize>
a0011058: e3500000 cmp r0, #0
a001105c: 1a000005 bne a0011078 <rtems_message_queue_create+0xb4>
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
a0011060: e59f003c ldr r0, [pc, #60] ; a00110a4 <rtems_message_queue_create+0xe0><== NOT EXECUTED
a0011064: e1a01004 mov r1, r4 <== NOT EXECUTED
a0011068: eb0007df bl a0012fec <_Objects_Free> <== NOT EXECUTED
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
a001106c: eb000b2d bl a0013d28 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
a0011070: e3a0000d mov r0, #13 <== NOT EXECUTED
a0011074: ea000008 b a001109c <rtems_message_queue_create+0xd8> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011078: e59f2024 ldr r2, [pc, #36] ; a00110a4 <rtems_message_queue_create+0xe0>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a001107c: e5943008 ldr r3, [r4, #8]
a0011080: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0011084: e592201c ldr r2, [r2, #28]
a0011088: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a001108c: e584700c str r7, [r4, #12]
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
a0011090: e5883000 str r3, [r8]
name,
0
);
#endif
_Thread_Enable_dispatch();
a0011094: eb000b23 bl a0013d28 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0011098: e3a00000 mov r0, #0
}
a001109c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a0015e44 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0015e44: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0015e48: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_message_queue_get_number_pending(
rtems_id id,
uint32_t *count
)
{
a0015e4c: e1a03000 mov r3, r0 <== NOT EXECUTED
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
return RTEMS_INVALID_ADDRESS;
a0015e50: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
a0015e54: 0a00000b beq a0015e88 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
a0015e58: e59f002c ldr r0, [pc, #44] ; a0015e8c <rtems_message_queue_get_number_pending+0x48><== NOT EXECUTED
a0015e5c: e1a01003 mov r1, r3 <== NOT EXECUTED
a0015e60: e1a0200d mov r2, sp <== NOT EXECUTED
a0015e64: eb00136a bl a001ac14 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015e68: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0015e6c: e3550000 cmp r5, #0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0015e70: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !count )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a0015e74: 1a000003 bne a0015e88 <rtems_message_queue_get_number_pending+0x44><== NOT EXECUTED
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
a0015e78: e590305c ldr r3, [r0, #92] ; 0x5c <== NOT EXECUTED
a0015e7c: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a0015e80: eb001634 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0015e84: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0015e88: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a00110dc <rtems_message_queue_receive>:
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a00110dc: e92d4077 push {r0, r1, r2, r4, r5, r6, lr}
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a00110e0: e2515000 subs r5, r1, #0
void *buffer,
size_t *size,
rtems_option option_set,
rtems_interval timeout
)
{
a00110e4: e1a0c000 mov ip, r0
a00110e8: e1a04002 mov r4, r2
a00110ec: e1a06003 mov r6, r3
register Message_queue_Control *the_message_queue;
Objects_Locations location;
bool wait;
if ( !buffer )
a00110f0: 0a00001a beq a0011160 <rtems_message_queue_receive+0x84>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a00110f4: e3520000 cmp r2, #0
a00110f8: 0a000018 beq a0011160 <rtems_message_queue_receive+0x84>
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
_Objects_Get( &_Message_queue_Information, id, location );
a00110fc: e28d2008 add r2, sp, #8
a0011100: e59f0060 ldr r0, [pc, #96] ; a0011168 <rtems_message_queue_receive+0x8c>
a0011104: e1a0100c mov r1, ip
a0011108: eb00080f bl a001314c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001110c: e59d2008 ldr r2, [sp, #8]
a0011110: e1a03000 mov r3, r0
a0011114: e3520000 cmp r2, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0011118: 13a00004 movne r0, #4
if ( !size )
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
a001111c: 1a000010 bne a0011164 <rtems_message_queue_receive+0x88>
if ( _Options_Is_no_wait( option_set ) )
wait = false;
else
wait = true;
_CORE_message_queue_Seize(
a0011120: e59d201c ldr r2, [sp, #28]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0011124: e2066001 and r6, r6, #1
a0011128: e2266001 eor r6, r6, #1
a001112c: e58d2004 str r2, [sp, #4]
a0011130: e58d6000 str r6, [sp]
a0011134: e2830014 add r0, r3, #20
a0011138: e5931008 ldr r1, [r3, #8]
a001113c: e1a02005 mov r2, r5
a0011140: e1a03004 mov r3, r4
a0011144: eb00043f bl a0012248 <_CORE_message_queue_Seize>
buffer,
size,
wait,
timeout
);
_Thread_Enable_dispatch();
a0011148: eb000af6 bl a0013d28 <_Thread_Enable_dispatch>
return _Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
a001114c: e59f3018 ldr r3, [pc, #24] ; a001116c <rtems_message_queue_receive+0x90>
a0011150: e5933004 ldr r3, [r3, #4]
size,
wait,
timeout
);
_Thread_Enable_dispatch();
return _Message_queue_Translate_core_message_queue_return_code(
a0011154: e5930034 ldr r0, [r3, #52] ; 0x34
a0011158: eb000023 bl a00111ec <_Message_queue_Translate_core_message_queue_return_code>
a001115c: ea000000 b a0011164 <rtems_message_queue_receive+0x88>
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0011160: e3a00009 mov r0, #9 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0011164: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc}
a000b044 <rtems_object_api_maximum_class>:
int rtems_object_api_maximum_class(
int api
)
{
return _Objects_API_maximum_class(api);
a000b044: ea0005f2 b a000c814 <_Objects_API_maximum_class> <== NOT EXECUTED
a000b048 <rtems_object_api_minimum_class>:
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
a000b048: e2400001 sub r0, r0, #1 <== NOT EXECUTED
uint32_t api
)
{
if ( _Objects_Is_api_valid( api ) )
return 1;
return -1;
a000b04c: e3500003 cmp r0, #3 <== NOT EXECUTED
}
a000b050: 33a00001 movcc r0, #1 <== NOT EXECUTED
a000b054: 23e00000 mvncs r0, #0 <== NOT EXECUTED
a000b058: e12fff1e bx lr <== NOT EXECUTED
a000b05c <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
a000b05c: e3500001 cmp r0, #1 <== NOT EXECUTED
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
a000b060: 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 )
a000b064: 0a000003 beq a000b078 <rtems_object_get_api_class_name+0x1c><== NOT EXECUTED
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
a000b068: e3500002 cmp r0, #2 <== NOT EXECUTED
api_assoc = rtems_object_api_classic_assoc;
a000b06c: 059f002c ldreq r0, [pc, #44] ; a000b0a0 <rtems_object_get_api_class_name+0x44><== 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 )
a000b070: 1a000006 bne a000b090 <rtems_object_get_api_class_name+0x34><== NOT EXECUTED
a000b074: ea000000 b a000b07c <rtems_object_get_api_class_name+0x20> <== 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;
a000b078: e59f0024 ldr r0, [pc, #36] ; a000b0a4 <rtems_object_get_api_class_name+0x48><== 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 );
a000b07c: eb0012a7 bl a000fb20 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( class_assoc )
a000b080: e3500000 cmp r0, #0 <== NOT EXECUTED
return class_assoc->name;
a000b084: 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 )
a000b088: 149df004 popne {pc} ; (ldrne pc, [sp], #4) <== NOT EXECUTED
a000b08c: ea000001 b a000b098 <rtems_object_get_api_class_name+0x3c> <== 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";
a000b090: e59f0010 ldr r0, [pc, #16] ; a000b0a8 <rtems_object_get_api_class_name+0x4c><== NOT EXECUTED
a000b094: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
a000b098: e59f000c ldr r0, [pc, #12] ; a000b0ac <rtems_object_get_api_class_name+0x50><== NOT EXECUTED
}
a000b09c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b0b0 <rtems_object_get_api_name>:
};
const char *rtems_object_get_api_name(
int api
)
{
a000b0b0: e1a01000 mov r1, r0 <== NOT EXECUTED
a000b0b4: 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 );
a000b0b8: e59f0010 ldr r0, [pc, #16] ; a000b0d0 <rtems_object_get_api_name+0x20><== NOT EXECUTED
a000b0bc: eb001297 bl a000fb20 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if ( api_assoc )
a000b0c0: e3500000 cmp r0, #0 <== NOT EXECUTED
return api_assoc->name;
a000b0c4: 15900000 ldrne r0, [r0] <== NOT EXECUTED
return "BAD CLASS";
a000b0c8: 059f0004 ldreq r0, [pc, #4] ; a000b0d4 <rtems_object_get_api_name+0x24><== NOT EXECUTED
}
a000b0cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
a000b108 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
a000b108: e92d4010 push {r4, lr} <== NOT EXECUTED
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
a000b10c: e2524000 subs r4, r2, #0 <== NOT EXECUTED
a000b110: 0a000019 beq a000b17c <rtems_object_get_class_information+0x74><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
a000b114: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
a000b118: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
a000b11c: eb00068d bl a000cb58 <_Objects_Get_information> <== NOT EXECUTED
if ( !obj_info )
a000b120: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b124: 0a000016 beq a000b184 <rtems_object_get_class_information+0x7c><== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b128: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
a000b12c: e1d011b0 ldrh r1, [r0, #16] <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b130: e3a02000 mov r2, #0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
a000b134: e5843000 str r3, [r4] <== NOT EXECUTED
info->maximum_id = obj_info->maximum_id;
a000b138: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
a000b13c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
info->auto_extend = obj_info->auto_extend;
a000b140: e5d03012 ldrb r3, [r0, #18] <== NOT EXECUTED
info->maximum = obj_info->maximum;
a000b144: e5841008 str r1, [r4, #8] <== 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;
a000b148: e5c4300c strb r3, [r4, #12] <== NOT EXECUTED
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
a000b14c: e3a03001 mov r3, #1 <== NOT EXECUTED
a000b150: ea000004 b a000b168 <rtems_object_get_class_information+0x60><== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b154: e590c01c ldr ip, [r0, #28] <== NOT EXECUTED
a000b158: e79cc103 ldr ip, [ip, r3, 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++ )
a000b15c: e2833001 add r3, r3, #1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
a000b160: e35c0000 cmp ip, #0 <== NOT EXECUTED
unallocated++;
a000b164: 02822001 addeq r2, r2, #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++ )
a000b168: e1530001 cmp r3, r1 <== NOT EXECUTED
a000b16c: 9afffff8 bls a000b154 <rtems_object_get_class_information+0x4c><== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
a000b170: e5842010 str r2, [r4, #16] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b174: e3a00000 mov r0, #0 <== NOT EXECUTED
a000b178: e8bd8010 pop {r4, pc} <== NOT EXECUTED
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
a000b17c: e3a00009 mov r0, #9 <== NOT EXECUTED
a000b180: e8bd8010 pop {r4, pc} <== NOT EXECUTED
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
a000b184: e3a0000a mov r0, #10 <== NOT EXECUTED
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
a000b188: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a000a80c <rtems_object_get_name>:
Objects_Id id,
size_t length,
char *name
)
{
return _Objects_Get_name_as_string( id, length, name );
a000a80c: ea000741 b a000c518 <_Objects_Get_name_as_string> <== NOT EXECUTED
a000b190 <rtems_object_id_api_maximum>:
#undef rtems_object_id_api_maximum
int rtems_object_id_api_maximum(void)
{
return OBJECTS_APIS_LAST;
}
a000b190: e3a00003 mov r0, #3 <== NOT EXECUTED
a000b194: e12fff1e bx lr <== NOT EXECUTED
a000b198 <rtems_object_id_api_minimum>:
#undef rtems_object_id_api_minimum
int rtems_object_id_api_minimum(void)
{
return OBJECTS_INTERNAL_API;
}
a000b198: e3a00001 mov r0, #1 <== NOT EXECUTED
a000b19c: e12fff1e bx lr <== NOT EXECUTED
a000b1a0 <rtems_object_id_get_api>:
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
a000b1a0: e1a00c20 lsr r0, r0, #24 <== NOT EXECUTED
int rtems_object_id_get_api(
rtems_id id
)
{
return _Objects_Get_API( id );
}
a000b1a4: e2000007 and r0, r0, #7 <== NOT EXECUTED
a000b1a8: e12fff1e bx lr <== NOT EXECUTED
a000b1ac <rtems_object_id_get_class>:
int rtems_object_id_get_class(
rtems_id id
)
{
return _Objects_Get_class( id );
}
a000b1ac: e1a00da0 lsr r0, r0, #27 <== NOT EXECUTED
a000b1b0: e12fff1e bx lr <== NOT EXECUTED
a000b1b4 <rtems_object_id_get_index>:
#undef rtems_object_id_get_index
int rtems_object_id_get_index(
rtems_id id
)
{
return _Objects_Get_index( id );
a000b1b4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
}
a000b1b8: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
a000b1bc: e12fff1e bx lr <== NOT EXECUTED
a000b1c0 <rtems_object_id_get_node>:
* 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;
a000b1c0: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
int rtems_object_id_get_node(
rtems_id id
)
{
return _Objects_Get_node( id );
}
a000b1c4: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
a000b1c8: e12fff1e bx lr <== NOT EXECUTED
a000b1cc <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
a000b1cc: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000b1d0: e2515000 subs r5, r1, #0 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a000b1d4: 03a00009 moveq r0, #9 <== NOT EXECUTED
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
a000b1d8: 0a000016 beq a000b238 <rtems_object_set_name+0x6c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
a000b1dc: e3500000 cmp r0, #0 <== NOT EXECUTED
a000b1e0: 059f3054 ldreq r3, [pc, #84] ; a000b23c <rtems_object_set_name+0x70><== NOT EXECUTED
a000b1e4: 11a04000 movne r4, r0 <== NOT EXECUTED
a000b1e8: 05933004 ldreq r3, [r3, #4] <== NOT EXECUTED
a000b1ec: 05934008 ldreq r4, [r3, #8] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
a000b1f0: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b1f4: eb000652 bl a000cb44 <_Objects_Get_information_id> <== NOT EXECUTED
if ( !information )
a000b1f8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
a000b1fc: 0a00000c beq a000b234 <rtems_object_set_name+0x68> <== NOT EXECUTED
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a000b200: e1a01004 mov r1, r4 <== NOT EXECUTED
a000b204: e1a0200d mov r2, sp <== NOT EXECUTED
a000b208: eb0006bf bl a000cd0c <_Objects_Get> <== NOT EXECUTED
switch ( location ) {
a000b20c: e59d4000 ldr r4, [sp] <== NOT EXECUTED
information = _Objects_Get_information_id( tmpId );
if ( !information )
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
a000b210: e1a01000 mov r1, r0 <== NOT EXECUTED
switch ( location ) {
a000b214: e3540000 cmp r4, #0 <== NOT EXECUTED
a000b218: 1a000005 bne a000b234 <rtems_object_set_name+0x68> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
a000b21c: e1a02005 mov r2, r5 <== NOT EXECUTED
a000b220: e1a00006 mov r0, r6 <== NOT EXECUTED
a000b224: eb00072d bl a000cee0 <_Objects_Set_name> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000b228: eb00099f bl a000d8ac <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b22c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000b230: ea000000 b a000b238 <rtems_object_set_name+0x6c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b234: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a000b238: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
a0016060 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016060: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0016064: e2508000 subs r8, r0, #0
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016068: e1a05001 mov r5, r1
a001606c: e1a09002 mov r9, r2
a0016070: e1a0a003 mov sl, r3
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
a0016074: 0a000032 beq a0016144 <rtems_partition_create+0xe4>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a0016078: e3510000 cmp r1, #0
a001607c: 0a000032 beq a001614c <rtems_partition_create+0xec>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0016080: e59d2028 ldr r2, [sp, #40] ; 0x28
a0016084: e3520000 cmp r2, #0
a0016088: 0a00002f beq a001614c <rtems_partition_create+0xec>
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
a001608c: e3590000 cmp r9, #0
a0016090: 13530000 cmpne r3, #0
a0016094: 0a00002e beq a0016154 <rtems_partition_create+0xf4>
a0016098: e1590003 cmp r9, r3
a001609c: 3a00002c bcc a0016154 <rtems_partition_create+0xf4>
a00160a0: e3130007 tst r3, #7
a00160a4: 1a00002a bne a0016154 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
a00160a8: e2116007 ands r6, r1, #7
a00160ac: 1a00002a bne a001615c <rtems_partition_create+0xfc>
a00160b0: e59f30ac ldr r3, [pc, #172] ; a0016164 <rtems_partition_create+0x104>
a00160b4: e5932000 ldr r2, [r3]
a00160b8: e2822001 add r2, r2, #1
a00160bc: e5832000 str r2, [r3]
* 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 );
a00160c0: e59f70a0 ldr r7, [pc, #160] ; a0016168 <rtems_partition_create+0x108>
a00160c4: e1a00007 mov r0, r7
a00160c8: eb0011a0 bl a001a750 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
a00160cc: e2504000 subs r4, r0, #0
a00160d0: 1a000002 bne a00160e0 <rtems_partition_create+0x80>
_Thread_Enable_dispatch();
a00160d4: eb00159f bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a00160d8: e3a00005 mov r0, #5 <== NOT EXECUTED
a00160dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a00160e0: e59d3024 ldr r3, [sp, #36] ; 0x24
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
a00160e4: e1a0100a mov r1, sl
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
a00160e8: e5845010 str r5, [r4, #16]
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
a00160ec: e584301c str r3, [r4, #28]
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
a00160f0: e5849014 str r9, [r4, #20]
the_partition->buffer_size = buffer_size;
a00160f4: e584a018 str sl, [r4, #24]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
a00160f8: e5846020 str r6, [r4, #32]
_Chain_Initialize( &the_partition->Memory, starting_address,
a00160fc: e1a00009 mov r0, r9
a0016100: eb005dff bl a002d904 <__aeabi_uidiv>
a0016104: e284b024 add fp, r4, #36 ; 0x24
a0016108: e1a02000 mov r2, r0
a001610c: e1a01005 mov r1, r5
a0016110: e1a0000b mov r0, fp
a0016114: e1a0300a mov r3, sl
a0016118: eb000bd8 bl a0019080 <_Chain_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a001611c: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0016120: e1d410b8 ldrh r1, [r4, #8]
a0016124: e5943008 ldr r3, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016128: e7824101 str r4, [r2, r1, lsl #2]
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
a001612c: e59d2028 ldr r2, [sp, #40] ; 0x28
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0016130: e584800c str r8, [r4, #12]
a0016134: e5823000 str r3, [r2]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0016138: eb001586 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001613c: e1a00006 mov r0, r6
a0016140: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0016144: e3a00003 mov r0, #3 <== NOT EXECUTED
a0016148: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a001614c: e3a00009 mov r0, #9 <== NOT EXECUTED
a0016150: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
a0016154: e3a00008 mov r0, #8 <== NOT EXECUTED
a0016158: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
a001615c: e3a00009 mov r0, #9 <== NOT EXECUTED
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0016160: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a001616c <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
a001616c: e92d4031 push {r0, r4, r5, lr}
a0016170: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0016174: e1a0200d mov r2, sp
a0016178: e59f0050 ldr r0, [pc, #80] ; a00161d0 <rtems_partition_delete+0x64>
a001617c: eb0012a4 bl a001ac14 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016180: e59d3000 ldr r3, [sp]
a0016184: e1a04000 mov r4, r0
a0016188: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001618c: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016190: 1a00000d bne a00161cc <rtems_partition_delete+0x60>
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
a0016194: e5945020 ldr r5, [r4, #32]
a0016198: e3550000 cmp r5, #0
a001619c: 1a000008 bne a00161c4 <rtems_partition_delete+0x58>
_Objects_Close( &_Partition_Information, &the_partition->Object );
a00161a0: e59f0028 ldr r0, [pc, #40] ; a00161d0 <rtems_partition_delete+0x64>
a00161a4: e1a01004 mov r1, r4
a00161a8: eb00118a bl a001a7d8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
a00161ac: e59f001c ldr r0, [pc, #28] ; a00161d0 <rtems_partition_delete+0x64>
a00161b0: e1a01004 mov r1, r4
a00161b4: eb00122e bl a001aa74 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a00161b8: eb001566 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00161bc: e1a00005 mov r0, r5
a00161c0: ea000001 b a00161cc <rtems_partition_delete+0x60>
}
_Thread_Enable_dispatch();
a00161c4: eb001563 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a00161c8: e3a0000c mov r0, #12 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00161cc: e8bd8038 pop {r3, r4, r5, pc}
a001627c <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
a001627c: e92d4071 push {r0, r4, r5, r6, lr}
a0016280: e1a03000 mov r3, r0
a0016284: e1a04001 mov r4, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
a0016288: e59f0088 ldr r0, [pc, #136] ; a0016318 <rtems_partition_return_buffer+0x9c>
a001628c: e1a01003 mov r1, r3
a0016290: e1a0200d mov r2, sp
a0016294: eb00125e bl a001ac14 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a0016298: e59d3000 ldr r3, [sp]
a001629c: e1a05000 mov r5, r0
a00162a0: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00162a4: 13a00004 movne r0, #4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
a00162a8: 1a000016 bne a0016308 <rtems_partition_return_buffer+0x8c>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
a00162ac: e5950010 ldr r0, [r5, #16]
a00162b0: e5953014 ldr r3, [r5, #20]
a00162b4: e0803003 add r3, r0, r3
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
a00162b8: e1540003 cmp r4, r3
a00162bc: 83a03000 movhi r3, #0
a00162c0: 93a03001 movls r3, #1
a00162c4: e1540000 cmp r4, r0
a00162c8: 33a03000 movcc r3, #0
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00162cc: e3530000 cmp r3, #0
a00162d0: 0a00000d beq a001630c <rtems_partition_return_buffer+0x90>
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
a00162d4: e0600004 rsb r0, r0, r4
a00162d8: e5951018 ldr r1, [r5, #24]
a00162dc: eb005e20 bl a002db64 <__umodsi3>
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
a00162e0: e2506000 subs r6, r0, #0
a00162e4: 1a000008 bne a001630c <rtems_partition_return_buffer+0x90>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
a00162e8: e2850024 add r0, r5, #36 ; 0x24
a00162ec: e1a01004 mov r1, r4
a00162f0: eb000b42 bl a0019000 <_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;
a00162f4: e5953020 ldr r3, [r5, #32]
a00162f8: e2433001 sub r3, r3, #1
a00162fc: e5853020 str r3, [r5, #32]
_Thread_Enable_dispatch();
a0016300: eb001514 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0016304: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0016308: e8bd8078 pop {r3, 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();
a001630c: eb001511 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
a0016310: e3a00009 mov r0, #9 <== NOT EXECUTED
a0016314: eafffffb b a0016308 <rtems_partition_return_buffer+0x8c> <== NOT EXECUTED
a00156c0 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a00156c0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a00156c4: e250a000 subs sl, r0, #0
void *internal_start,
void *external_start,
uint32_t length,
rtems_id *id
)
{
a00156c8: e1a04001 mov r4, r1
a00156cc: e1a05002 mov r5, r2
a00156d0: e1a09003 mov r9, r3
a00156d4: e59d6020 ldr r6, [sp, #32]
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
a00156d8: 0a00001d beq a0015754 <rtems_port_create+0x94>
return RTEMS_INVALID_NAME;
if ( !id )
a00156dc: e3560000 cmp r6, #0
a00156e0: 0a00001d beq a001575c <rtems_port_create+0x9c>
* id - port id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_port_create(
a00156e4: e1828001 orr r8, r2, r1
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
a00156e8: e2188007 ands r8, r8, #7
a00156ec: 1a00001c bne a0015764 <rtems_port_create+0xa4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a00156f0: e59f3074 ldr r3, [pc, #116] ; a001576c <rtems_port_create+0xac>
a00156f4: e5932000 ldr r2, [r3]
a00156f8: e2822001 add r2, r2, #1
a00156fc: e5832000 str r2, [r3]
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
_Objects_Allocate( &_Dual_ported_memory_Information );
a0015700: e59f7068 ldr r7, [pc, #104] ; a0015770 <rtems_port_create+0xb0>
a0015704: e1a00007 mov r0, r7
a0015708: eb001410 bl a001a750 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
a001570c: e3500000 cmp r0, #0
a0015710: 1a000002 bne a0015720 <rtems_port_create+0x60>
_Thread_Enable_dispatch();
a0015714: eb00180f bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0015718: e3a00005 mov r0, #5
a001571c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0015720: e5903008 ldr r3, [r0, #8]
a0015724: e1d010b8 ldrh r1, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0015728: e597201c ldr r2, [r7, #28]
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
a001572c: e2499001 sub r9, r9, #1
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
a0015730: e5804010 str r4, [r0, #16]
the_port->external_base = external_start;
a0015734: e5805014 str r5, [r0, #20]
the_port->length = length - 1;
a0015738: e5809018 str r9, [r0, #24]
a001573c: e7820101 str r0, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0015740: e580a00c str sl, [r0, #12]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
a0015744: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a0015748: eb001802 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001574c: e1a00008 mov r0, r8
a0015750: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
)
{
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0015754: e3a00003 mov r0, #3 <== NOT EXECUTED
a0015758: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
a001575c: e3a00009 mov r0, #9 <== NOT EXECUTED
a0015760: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
if ( !_Addresses_Is_aligned( internal_start ) ||
!_Addresses_Is_aligned( external_start ) )
return RTEMS_INVALID_ADDRESS;
a0015764: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0015768: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
a001631c <rtems_rate_monotonic_cancel>:
*/
rtems_status_code rtems_rate_monotonic_cancel(
rtems_id id
)
{
a001631c: e92d4031 push {r0, r4, r5, lr}
a0016320: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a0016324: e1a0200d mov r2, sp
a0016328: e59f004c ldr r0, [pc, #76] ; a001637c <rtems_rate_monotonic_cancel+0x60>
a001632c: eb001238 bl a001ac14 <_Objects_Get>
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0016330: e59d4000 ldr r4, [sp]
a0016334: e1a05000 mov r5, r0
a0016338: e3540000 cmp r4, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001633c: 13a00004 movne r0, #4
{
Rate_monotonic_Control *the_period;
Objects_Locations location;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a0016340: 1a00000c bne a0016378 <rtems_rate_monotonic_cancel+0x5c>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a0016344: e59f3034 ldr r3, [pc, #52] ; a0016380 <rtems_rate_monotonic_cancel+0x64>
a0016348: e5952040 ldr r2, [r5, #64] ; 0x40
a001634c: e5933004 ldr r3, [r3, #4]
a0016350: e1520003 cmp r2, r3
a0016354: 0a000002 beq a0016364 <rtems_rate_monotonic_cancel+0x48>
_Thread_Enable_dispatch();
a0016358: eb0014fe bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a001635c: e3a00017 mov r0, #23 <== NOT EXECUTED
a0016360: ea000004 b a0016378 <rtems_rate_monotonic_cancel+0x5c> <== NOT EXECUTED
}
(void) _Watchdog_Remove( &the_period->Timer );
a0016364: e2850010 add r0, r5, #16
a0016368: eb001987 bl a001c98c <_Watchdog_Remove>
the_period->state = RATE_MONOTONIC_INACTIVE;
a001636c: e5854038 str r4, [r5, #56] ; 0x38
_Thread_Enable_dispatch();
a0016370: eb0014f8 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0016374: e1a00004 mov r0, r4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0016378: e8bd8038 pop {r3, r4, r5, pc}
a000a180 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a180: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a184: e2508000 subs r8, r0, #0
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
rtems_id *id
)
{
a000a188: e1a06001 mov r6, r1
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
a000a18c: 0a000028 beq a000a234 <rtems_rate_monotonic_create+0xb4>
return RTEMS_INVALID_NAME;
if ( !id )
a000a190: e3510000 cmp r1, #0
a000a194: 0a000028 beq a000a23c <rtems_rate_monotonic_create+0xbc>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a000a198: e59f30a4 ldr r3, [pc, #164] ; a000a244 <rtems_rate_monotonic_create+0xc4>
a000a19c: e5932000 ldr r2, [r3]
a000a1a0: e2822001 add r2, r2, #1
a000a1a4: e5832000 str r2, [r3]
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
_Objects_Allocate( &_Rate_monotonic_Information );
a000a1a8: e59f7098 ldr r7, [pc, #152] ; a000a248 <rtems_rate_monotonic_create+0xc8>
a000a1ac: e1a00007 mov r0, r7
a000a1b0: eb000797 bl a000c014 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
a000a1b4: e2504000 subs r4, r0, #0
a000a1b8: 1a000002 bne a000a1c8 <rtems_rate_monotonic_create+0x48>
_Thread_Enable_dispatch();
a000a1bc: eb000bbe bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a000a1c0: e3a00005 mov r0, #5 <== NOT EXECUTED
a000a1c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
the_period->owner = _Thread_Executing;
a000a1c8: e59f307c ldr r3, [pc, #124] ; a000a24c <rtems_rate_monotonic_create+0xcc>
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a1cc: e3a05000 mov r5, #0
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1d0: e1a01005 mov r1, r5
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a1d4: e5933004 ldr r3, [r3, #4]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1d8: e3a02038 mov r2, #56 ; 0x38
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
a000a1dc: e5845038 str r5, [r4, #56] ; 0x38
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
a000a1e0: e5843040 str r3, [r4, #64] ; 0x40
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a1e4: e5845018 str r5, [r4, #24]
the_watchdog->routine = routine;
a000a1e8: e584502c str r5, [r4, #44] ; 0x2c
the_watchdog->id = id;
a000a1ec: e5845030 str r5, [r4, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a1f0: e5845034 str r5, [r4, #52] ; 0x34
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
a000a1f4: e2840054 add r0, r4, #84 ; 0x54
a000a1f8: eb0021b1 bl a00128c4 <memset>
a000a1fc: e3e03102 mvn r3, #-2147483648 ; 0x80000000
a000a200: e584305c str r3, [r4, #92] ; 0x5c
a000a204: e5843060 str r3, [r4, #96] ; 0x60
a000a208: e5843074 str r3, [r4, #116] ; 0x74
a000a20c: e5843078 str r3, [r4, #120] ; 0x78
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a210: e597201c ldr r2, [r7, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000a214: e5943008 ldr r3, [r4, #8]
a000a218: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a000a21c: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000a220: e584800c str r8, [r4, #12]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
a000a224: e5863000 str r3, [r6]
_Thread_Enable_dispatch();
a000a228: eb000ba3 bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a22c: e1a00005 mov r0, r5
a000a230: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
)
{
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a000a234: e3a00003 mov r0, #3 <== NOT EXECUTED
a000a238: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
a000a23c: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_period->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000a240: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a000fc3c <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a000fc3c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
a000fc40: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
a000fc44: e1a03000 mov r3, r0 <== NOT EXECUTED
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
a000fc48: 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 )
a000fc4c: 0a000025 beq a000fce8 <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
a000fc50: e59f0094 ldr r0, [pc, #148] ; a000fcec <rtems_rate_monotonic_get_statistics+0xb0><== NOT EXECUTED
a000fc54: e1a01003 mov r1, r3 <== NOT EXECUTED
a000fc58: e1a0200d mov r2, sp <== NOT EXECUTED
a000fc5c: ebfff245 bl a000c578 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fc60: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000fc64: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000fc68: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fc6c: 1a00001d bne a000fce8 <rtems_rate_monotonic_get_statistics+0xac><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
a000fc70: e5903054 ldr r3, [r0, #84] ; 0x54 <== NOT EXECUTED
a000fc74: e5843000 str r3, [r4] <== NOT EXECUTED
dst->missed_count = src->missed_count;
a000fc78: e5903058 ldr r3, [r0, #88] ; 0x58 <== NOT EXECUTED
a000fc7c: e5843004 str r3, [r4, #4] <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
a000fc80: e280305c add r3, r0, #92 ; 0x5c <== NOT EXECUTED
a000fc84: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fc88: e5842008 str r2, [r4, #8] <== NOT EXECUTED
a000fc8c: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
a000fc90: e2803064 add r3, r0, #100 ; 0x64 <== NOT EXECUTED
a000fc94: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fc98: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a000fc9c: e5843014 str r3, [r4, #20] <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
a000fca0: e280306c add r3, r0, #108 ; 0x6c <== NOT EXECUTED
a000fca4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fca8: e5842018 str r2, [r4, #24] <== NOT EXECUTED
a000fcac: e584301c str r3, [r4, #28] <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
a000fcb0: e2803074 add r3, r0, #116 ; 0x74 <== NOT EXECUTED
a000fcb4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcb8: e5842020 str r2, [r4, #32] <== NOT EXECUTED
a000fcbc: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
a000fcc0: e280307c add r3, r0, #124 ; 0x7c <== NOT EXECUTED
a000fcc4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcc8: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
a000fccc: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
a000fcd0: e2803084 add r3, r0, #132 ; 0x84 <== NOT EXECUTED
a000fcd4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fcd8: e5842030 str r2, [r4, #48] ; 0x30 <== NOT EXECUTED
a000fcdc: e5843034 str r3, [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();
a000fce0: ebfff4f5 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000fce4: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000fce8: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a000fcf0 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000fcf0: e92d4010 push {r4, lr}
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
a000fcf4: e2514000 subs r4, r1, #0
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
a000fcf8: e1a03000 mov r3, r0
a000fcfc: e24dd014 sub sp, sp, #20
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
a000fd00: 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 )
a000fd04: 0a000023 beq a000fd98 <rtems_rate_monotonic_get_status+0xa8>
a000fd08: e1a01003 mov r1, r3
a000fd0c: e28d2010 add r2, sp, #16
a000fd10: e59f0088 ldr r0, [pc, #136] ; a000fda0 <rtems_rate_monotonic_get_status+0xb0>
a000fd14: ebfff217 bl a000c578 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fd18: e59d2010 ldr r2, [sp, #16]
a000fd1c: e1a03000 mov r3, r0
a000fd20: e3520000 cmp r2, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000fd24: 13a00004 movne r0, #4
if ( !status )
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000fd28: 1a00001a bne a000fd98 <rtems_rate_monotonic_get_status+0xa8>
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a000fd2c: e5932040 ldr r2, [r3, #64] ; 0x40
status->state = the_period->state;
a000fd30: e5933038 ldr r3, [r3, #56] ; 0x38
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
a000fd34: e5922008 ldr r2, [r2, #8]
status->state = the_period->state;
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
a000fd38: 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;
a000fd3c: e884000c stm r4, {r2, r3}
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
a000fd40: 05843008 streq r3, [r4, #8]
a000fd44: 0584300c streq r3, [r4, #12]
_Timespec_Set_to_zero( &status->executed_since_last_period );
a000fd48: 05843010 streq r3, [r4, #16]
a000fd4c: 05843014 streq r3, [r4, #20]
a000fd50: 0a00000e beq a000fd90 <rtems_rate_monotonic_get_status+0xa0>
} else {
/*
* Grab the current status.
*/
valid_status =
a000fd54: e1a0100d mov r1, sp <== NOT EXECUTED
a000fd58: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a000fd5c: ebffe947 bl a000a280 <_Rate_monotonic_Get_status> <== NOT EXECUTED
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
a000fd60: e3500000 cmp r0, #0 <== NOT EXECUTED
a000fd64: 1a000002 bne a000fd74 <rtems_rate_monotonic_get_status+0x84><== NOT EXECUTED
_Thread_Enable_dispatch();
a000fd68: ebfff4d3 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
a000fd6c: e3a0000b mov r0, #11 <== NOT EXECUTED
a000fd70: ea000008 b a000fd98 <rtems_rate_monotonic_get_status+0xa8> <== NOT EXECUTED
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
a000fd74: e89d000c ldm sp, {r2, r3} <== NOT EXECUTED
a000fd78: e5842008 str r2, [r4, #8] <== NOT EXECUTED
a000fd7c: e584300c str r3, [r4, #12] <== NOT EXECUTED
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
a000fd80: e28d3008 add r3, sp, #8 <== NOT EXECUTED
a000fd84: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a000fd88: e5842010 str r2, [r4, #16] <== NOT EXECUTED
a000fd8c: e5843014 str r3, [r4, #20] <== NOT EXECUTED
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
a000fd90: ebfff4c9 bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000fd94: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000fd98: e28dd014 add sp, sp, #20
a000fd9c: e8bd8010 pop {r4, pc}
a000a484 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
a000a484: e92d40f1 push {r0, r4, r5, r6, r7, lr}
a000a488: e1a05000 mov r5, r0
a000a48c: e1a04001 mov r4, r1
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
a000a490: e59f0170 ldr r0, [pc, #368] ; a000a608 <rtems_rate_monotonic_period+0x184>
a000a494: e1a01005 mov r1, r5
a000a498: e1a0200d mov r2, sp
a000a49c: eb000835 bl a000c578 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a4a0: e59d3000 ldr r3, [sp]
a000a4a4: e1a06000 mov r6, r0
a000a4a8: e3530000 cmp r3, #0
a000a4ac: 1a000052 bne a000a5fc <rtems_rate_monotonic_period+0x178>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
a000a4b0: e59f3154 ldr r3, [pc, #340] ; a000a60c <rtems_rate_monotonic_period+0x188>
a000a4b4: e5902040 ldr r2, [r0, #64] ; 0x40
a000a4b8: e5933004 ldr r3, [r3, #4]
a000a4bc: e1520003 cmp r2, r3
a000a4c0: 0a000002 beq a000a4d0 <rtems_rate_monotonic_period+0x4c>
_Thread_Enable_dispatch();
a000a4c4: eb000afc bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_NOT_OWNER_OF_RESOURCE;
a000a4c8: e3a04017 mov r4, #23 <== NOT EXECUTED
a000a4cc: ea00004b b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
}
if ( length == RTEMS_PERIOD_STATUS ) {
a000a4d0: e3540000 cmp r4, #0
a000a4d4: 1a000005 bne a000a4f0 <rtems_rate_monotonic_period+0x6c>
switch ( the_period->state ) {
a000a4d8: e5903038 ldr r3, [r0, #56] ; 0x38
a000a4dc: e3530004 cmp r3, #4
a000a4e0: 959f2128 ldrls r2, [pc, #296] ; a000a610 <rtems_rate_monotonic_period+0x18c>
a000a4e4: 97924103 ldrls r4, [r2, r3, lsl #2]
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
a000a4e8: eb000af3 bl a000d0bc <_Thread_Enable_dispatch>
return( return_value );
a000a4ec: ea000043 b a000a600 <rtems_rate_monotonic_period+0x17c>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a4f0: e10f7000 mrs r7, CPSR
a000a4f4: e3873080 orr r3, r7, #128 ; 0x80
a000a4f8: e129f003 msr CPSR_fc, r3
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
a000a4fc: e5903038 ldr r3, [r0, #56] ; 0x38
a000a500: e3530000 cmp r3, #0
a000a504: 1a000011 bne a000a550 <rtems_rate_monotonic_period+0xcc>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a508: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
a000a50c: ebffff89 bl a000a338 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a510: e3a03002 mov r3, #2
a000a514: e5863038 str r3, [r6, #56] ; 0x38
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000a518: e59f30f4 ldr r3, [pc, #244] ; a000a614 <rtems_rate_monotonic_period+0x190>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a51c: e3a07000 mov r7, #0
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
a000a520: e586403c str r4, [r6, #60] ; 0x3c
the_watchdog->routine = routine;
a000a524: e586302c str r3, [r6, #44] ; 0x2c
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a528: e586401c str r4, [r6, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a52c: e59f00e4 ldr r0, [pc, #228] ; a000a618 <rtems_rate_monotonic_period+0x194>
a000a530: e2861010 add r1, r6, #16
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000a534: e5867018 str r7, [r6, #24]
the_watchdog->routine = routine;
the_watchdog->id = id;
a000a538: e5865030 str r5, [r6, #48] ; 0x30
the_watchdog->user_data = user_data;
a000a53c: e5867034 str r7, [r6, #52] ; 0x34
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a540: eb000e9d bl a000dfbc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
a000a544: e1a04007 mov r4, r7
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000a548: eb000adb bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a54c: ea00002b b a000a600 <rtems_rate_monotonic_period+0x17c>
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
a000a550: e3530002 cmp r3, #2
a000a554: 1a00001a bne a000a5c4 <rtems_rate_monotonic_period+0x140>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
a000a558: ebffff93 bl a000a3ac <_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;
a000a55c: e3a03001 mov r3, #1
a000a560: e5863038 str r3, [r6, #56] ; 0x38
the_period->next_length = length;
a000a564: e586403c str r4, [r6, #60] ; 0x3c
a000a568: e129f007 msr CPSR_fc, r7
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000a56c: e59f3098 ldr r3, [pc, #152] ; a000a60c <rtems_rate_monotonic_period+0x188>
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a570: e3a01901 mov r1, #16384 ; 0x4000
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
a000a574: e5930004 ldr r0, [r3, #4]
a000a578: e5963008 ldr r3, [r6, #8]
a000a57c: e5803020 str r3, [r0, #32]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a580: eb000cdd bl a000d8fc <_Thread_Set_state>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000a584: e10f2000 mrs r2, CPSR
a000a588: e3823080 orr r3, r2, #128 ; 0x80
a000a58c: 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;
a000a590: e3a01002 mov r1, #2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
a000a594: e5963038 ldr r3, [r6, #56] ; 0x38
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a598: e5861038 str r1, [r6, #56] ; 0x38
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000a59c: 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 )
a000a5a0: e3530003 cmp r3, #3
a000a5a4: 1a000003 bne a000a5b8 <rtems_rate_monotonic_period+0x134>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
a000a5a8: e59f305c ldr r3, [pc, #92] ; a000a60c <rtems_rate_monotonic_period+0x188><== NOT EXECUTED
a000a5ac: e3a01901 mov r1, #16384 ; 0x4000 <== NOT EXECUTED
a000a5b0: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
a000a5b4: eb0009f5 bl a000cd90 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a5b8: eb000abf bl a000d0bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5bc: e3a04000 mov r4, #0 <== NOT EXECUTED
a000a5c0: ea00000e b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
a000a5c4: e3530004 cmp r3, #4 <== NOT EXECUTED
a000a5c8: 1a00000b bne a000a5fc <rtems_rate_monotonic_period+0x178> <== NOT EXECUTED
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
a000a5cc: ebffff76 bl a000a3ac <_Rate_monotonic_Update_statistics> <== NOT EXECUTED
a000a5d0: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
a000a5d4: e3a03002 mov r3, #2 <== NOT EXECUTED
a000a5d8: e5863038 str r3, [r6, #56] ; 0x38 <== NOT EXECUTED
the_period->next_length = length;
a000a5dc: e586403c str r4, [r6, #60] ; 0x3c <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000a5e0: e586401c str r4, [r6, #28] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a000a5e4: e59f002c ldr r0, [pc, #44] ; a000a618 <rtems_rate_monotonic_period+0x194><== NOT EXECUTED
a000a5e8: e2861010 add r1, r6, #16 <== NOT EXECUTED
a000a5ec: eb000e72 bl a000dfbc <_Watchdog_Insert> <== NOT EXECUTED
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
a000a5f0: e3a04006 mov r4, #6 <== NOT EXECUTED
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
a000a5f4: eb000ab0 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TIMEOUT;
a000a5f8: ea000000 b a000a600 <rtems_rate_monotonic_period+0x17c> <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a5fc: e3a04004 mov r4, #4 <== NOT EXECUTED
}
a000a600: e1a00004 mov r0, r4
a000a604: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a000a804 <rtems_rate_monotonic_report_statistics>:
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
a000a804: e59f1004 ldr r1, [pc, #4] ; a000a810 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
a000a808: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a80c: eaffff82 b a000a61c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
a000a61c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a61c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
a000a620: e2514000 subs r4, r1, #0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
a000a624: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000a628: e1a05000 mov r5, 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 )
a000a62c: 0a000068 beq a000a7d4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1b8><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
a000a630: e59f11a4 ldr r1, [pc, #420] ; a000a7dc <rtems_rate_monotonic_report_statistics_with_plugin+0x1c0><== NOT EXECUTED
a000a634: e12fff34 blx r4 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
a000a638: e59f11a0 ldr r1, [pc, #416] ; a000a7e0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c4><== NOT EXECUTED
a000a63c: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a640: e12fff34 blx r4 <== NOT EXECUTED
(*print)( context, "--- Wall times are in seconds ---\n" );
a000a644: e59f1198 ldr r1, [pc, #408] ; a000a7e4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8><== NOT EXECUTED
a000a648: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a64c: e12fff34 blx r4 <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
a000a650: e59f1190 ldr r1, [pc, #400] ; a000a7e8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc><== NOT EXECUTED
a000a654: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a658: e12fff34 blx r4 <== NOT EXECUTED
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
a000a65c: e28d7018 add r7, sp, #24 <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a000a660: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a664: e59f1180 ldr r1, [pc, #384] ; a000a7ec <rtems_rate_monotonic_report_statistics_with_plugin+0x1d0><== 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 ;
a000a668: e59f8180 ldr r8, [pc, #384] ; a000a7f0 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d4><== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
a000a66c: e12fff34 blx r4 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a670: e2873018 add r3, r7, #24 <== NOT EXECUTED
a000a674: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a678: e2873030 add r3, r7, #48 ; 0x30 <== 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 ;
a000a67c: e5986008 ldr r6, [r8, #8] <== NOT EXECUTED
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000a680: e28da070 add sl, sp, #112 ; 0x70 <== 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 );
a000a684: e28d9068 add r9, sp, #104 ; 0x68 <== NOT EXECUTED
{
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
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;
a000a688: e58d3014 str r3, [sp, #20] <== 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 ;
a000a68c: ea00004d b a000a7c8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ac><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
a000a690: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a694: e1a01007 mov r1, r7 <== NOT EXECUTED
a000a698: eb001567 bl a000fc3c <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
a000a69c: e3500000 cmp r0, #0 <== NOT EXECUTED
a000a6a0: 1a000047 bne a000a7c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== 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 );
a000a6a4: e28d1050 add r1, sp, #80 ; 0x50 <== NOT EXECUTED
a000a6a8: e1a00006 mov r0, r6 <== NOT EXECUTED
a000a6ac: eb00158f bl a000fcf0 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
a000a6b0: e3a01005 mov r1, #5 <== NOT EXECUTED
a000a6b4: e1a0200a mov r2, sl <== NOT EXECUTED
a000a6b8: e59d0050 ldr r0, [sp, #80] ; 0x50 <== NOT EXECUTED
a000a6bc: eb0000a8 bl a000a964 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
a000a6c0: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
a000a6c4: e59f1128 ldr r1, [pc, #296] ; a000a7f4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8><== NOT EXECUTED
a000a6c8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6cc: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a6d0: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
a000a6d4: e1a02006 mov r2, r6 <== NOT EXECUTED
a000a6d8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
a000a6dc: e1a0300a mov r3, sl <== NOT EXECUTED
a000a6e0: e12fff34 blx r4 <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
a000a6e4: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
a000a6e8: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a6ec: 1a000003 bne a000a700 <rtems_rate_monotonic_report_statistics_with_plugin+0xe4><== NOT EXECUTED
(*print)( context, "\n" );
a000a6f0: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a6f4: e59f10fc ldr r1, [pc, #252] ; a000a7f8 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NOT EXECUTED
a000a6f8: e12fff34 blx r4 <== NOT EXECUTED
continue;
a000a6fc: ea000030 b a000a7c4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== 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 );
a000a700: e1a02009 mov r2, r9 <== NOT EXECUTED
a000a704: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
a000a708: eb000d3c bl a000dc00 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000a70c: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
a000a710: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a714: eb004255 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a718: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
a000a71c: e1a0b000 mov fp, r0 <== NOT EXECUTED
a000a720: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a724: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
a000a728: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a72c: eb00424f bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a730: e59d3068 ldr r3, [sp, #104] ; 0x68 <== NOT EXECUTED
a000a734: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
a000a738: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a73c: e59d006c ldr r0, [sp, #108] ; 0x6c <== NOT EXECUTED
a000a740: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
a000a744: eb004249 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a748: e1a0300b mov r3, fp <== NOT EXECUTED
a000a74c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000a750: e59f10a4 ldr r1, [pc, #164] ; a000a7fc <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0><== NOT EXECUTED
a000a754: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
a000a758: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a75c: e12fff34 blx r4 <== 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);
a000a760: e1a02009 mov r2, r9 <== NOT EXECUTED
a000a764: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
a000a768: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
a000a76c: eb000d23 bl a000dc00 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
a000a770: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a774: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
a000a778: eb00423c bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a77c: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
a000a780: e1a0b000 mov fp, r0 <== NOT EXECUTED
a000a784: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a788: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED
a000a78c: e58d3000 str r3, [sp] <== NOT EXECUTED
a000a790: eb004236 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a794: e59d3068 ldr r3, [sp, #104] ; 0x68 <== NOT EXECUTED
a000a798: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
a000a79c: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED
a000a7a0: e59d006c ldr r0, [sp, #108] ; 0x6c <== NOT EXECUTED
a000a7a4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
a000a7a8: eb004230 bl a001b070 <__aeabi_idiv> <== NOT EXECUTED
a000a7ac: e59f104c ldr r1, [pc, #76] ; a000a800 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e4><== NOT EXECUTED
a000a7b0: e58d000c str r0, [sp, #12] <== NOT EXECUTED
a000a7b4: e59d2038 ldr r2, [sp, #56] ; 0x38 <== NOT EXECUTED
a000a7b8: e1a00005 mov r0, r5 <== NOT EXECUTED
a000a7bc: e1a0300b mov r3, fp <== NOT EXECUTED
a000a7c0: e12fff34 blx r4 <== NOT EXECUTED
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a000a7c4: e2866001 add r6, r6, #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 ;
a000a7c8: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
a000a7cc: e1560003 cmp r6, r3 <== NOT EXECUTED
a000a7d0: 9affffae bls a000a690 <rtems_rate_monotonic_report_statistics_with_plugin+0x74><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
a000a7d4: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED
a000a7d8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
a000a814 <rtems_rate_monotonic_reset_all_statistics>:
a000a814: e59f3038 ldr r3, [pc, #56] ; a000a854 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
a000a818: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
a000a81c: e5932000 ldr r2, [r3] <== NOT EXECUTED
a000a820: e2822001 add r2, r2, #1 <== NOT EXECUTED
a000a824: 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 ;
a000a828: e59f5028 ldr r5, [pc, #40] ; a000a858 <rtems_rate_monotonic_reset_all_statistics+0x44><== NOT EXECUTED
a000a82c: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
a000a830: ea000002 b a000a840 <rtems_rate_monotonic_reset_all_statistics+0x2c><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
a000a834: e1a00004 mov r0, r4 <== NOT EXECUTED
a000a838: eb000007 bl a000a85c <rtems_rate_monotonic_reset_statistics><== NOT EXECUTED
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
a000a83c: 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 ;
a000a840: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
a000a844: e1540003 cmp r4, r3 <== NOT EXECUTED
a000a848: 9afffff9 bls a000a834 <rtems_rate_monotonic_reset_all_statistics+0x20><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
a000a84c: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
a000a850: ea000a19 b a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
a000a85c <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
a000a85c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
a000a860: e1a01000 mov r1, r0 <== NOT EXECUTED
a000a864: e1a0200d mov r2, sp <== NOT EXECUTED
a000a868: e59f0044 ldr r0, [pc, #68] ; a000a8b4 <rtems_rate_monotonic_reset_statistics+0x58><== NOT EXECUTED
a000a86c: eb000741 bl a000c578 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a870: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a000a874: e1a04000 mov r4, r0 <== NOT EXECUTED
a000a878: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a87c: 13a00004 movne r0, #4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
a000a880: 1a00000a bne a000a8b0 <rtems_rate_monotonic_reset_statistics+0x54><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
a000a884: e1a01005 mov r1, r5 <== NOT EXECUTED
a000a888: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
a000a88c: e2840054 add r0, r4, #84 ; 0x54 <== NOT EXECUTED
a000a890: eb00200b bl a00128c4 <memset> <== NOT EXECUTED
a000a894: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
a000a898: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
a000a89c: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
a000a8a0: e5843074 str r3, [r4, #116] ; 0x74 <== NOT EXECUTED
a000a8a4: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a8a8: eb000a03 bl a000d0bc <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a8ac: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000a8b0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016a90 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016a90: 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 ) )
a0016a94: e2509000 subs r9, r0, #0
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
a0016a98: e1a06001 mov r6, r1
a0016a9c: e1a07002 mov r7, r2
a0016aa0: e1a08003 mov r8, r3
a0016aa4: e59da024 ldr sl, [sp, #36] ; 0x24
a0016aa8: e59db028 ldr fp, [sp, #40] ; 0x28
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0016aac: 03a06003 moveq r6, #3
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
a0016ab0: 0a000031 beq a0016b7c <rtems_region_create+0xec>
return RTEMS_INVALID_NAME;
if ( !starting_address )
a0016ab4: e3560000 cmp r6, #0
a0016ab8: 0a00002e beq a0016b78 <rtems_region_create+0xe8>
return RTEMS_INVALID_ADDRESS;
if ( !id )
a0016abc: e35b0000 cmp fp, #0
a0016ac0: 0a00002c beq a0016b78 <rtems_region_create+0xe8>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a0016ac4: e59f30b8 ldr r3, [pc, #184] ; a0016b84 <rtems_region_create+0xf4>
* 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 );
a0016ac8: e59f50b8 ldr r5, [pc, #184] ; a0016b88 <rtems_region_create+0xf8>
a0016acc: e5930000 ldr r0, [r3]
a0016ad0: eb000924 bl a0018f68 <_API_Mutex_Lock>
a0016ad4: e1a00005 mov r0, r5
a0016ad8: eb000f1c bl a001a750 <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
a0016adc: e2504000 subs r4, r0, #0
return_status = RTEMS_TOO_MANY;
a0016ae0: 03a06005 moveq r6, #5
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
a0016ae4: 0a00001f beq a0016b68 <rtems_region_create+0xd8>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0016ae8: e2840068 add r0, r4, #104 ; 0x68
a0016aec: e1a01006 mov r1, r6
a0016af0: e1a02007 mov r2, r7
a0016af4: e1a03008 mov r3, r8
a0016af8: eb000df5 bl a001a2d4 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a0016afc: e3500000 cmp r0, #0
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
a0016b00: e584005c str r0, [r4, #92] ; 0x5c
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
a0016b04: 1a000004 bne a0016b1c <rtems_region_create+0x8c>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
a0016b08: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016b0c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016b10: eb000fd7 bl a001aa74 <_Objects_Free> <== NOT EXECUTED
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
a0016b14: e3a06008 mov r6, #8 <== NOT EXECUTED
a0016b18: ea000012 b a0016b68 <rtems_region_create+0xd8> <== NOT EXECUTED
}
else {
the_region->starting_address = starting_address;
a0016b1c: e5846050 str r6, [r4, #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;
_Thread_queue_Initialize(
a0016b20: e31a0004 tst sl, #4
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;
a0016b24: e3a06000 mov r6, #0
_Thread_queue_Initialize(
a0016b28: 03a01000 moveq r1, #0
a0016b2c: 13a01001 movne r1, #1
a0016b30: e3a02040 mov r2, #64 ; 0x40
a0016b34: e3a03006 mov r3, #6
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
a0016b38: e5847054 str r7, [r4, #84] ; 0x54
the_region->page_size = page_size;
a0016b3c: e5848058 str r8, [r4, #88] ; 0x58
the_region->attribute_set = attribute_set;
a0016b40: e584a060 str sl, [r4, #96] ; 0x60
the_region->number_of_used_blocks = 0;
a0016b44: e5846064 str r6, [r4, #100] ; 0x64
_Thread_queue_Initialize(
a0016b48: e2840010 add r0, r4, #16
a0016b4c: eb0014c9 bl a001be78 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016b50: e595201c ldr r2, [r5, #28]
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0016b54: e5943008 ldr r3, [r4, #8]
a0016b58: e1d410b8 ldrh r1, [r4, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0016b5c: e7824101 str r4, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0016b60: e584900c str r9, [r4, #12]
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
a0016b64: e58b3000 str r3, [fp]
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
a0016b68: e59f3014 ldr r3, [pc, #20] ; a0016b84 <rtems_region_create+0xf4>
a0016b6c: e5930000 ldr r0, [r3]
a0016b70: eb000915 bl a0018fcc <_API_Mutex_Unlock>
return return_status;
a0016b74: ea000000 b a0016b7c <rtems_region_create+0xec>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a0016b78: e3a06009 mov r6, #9 <== NOT EXECUTED
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
a0016b7c: e1a00006 mov r0, r6
a0016b80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
a0016c08 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0016c08: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0016c0c: e2517000 subs r7, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
a0016c10: e1a04000 mov r4, r0 <== NOT EXECUTED
a0016c14: e1a06002 mov r6, r2 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
a0016c18: 03a05009 moveq r5, #9 <== NOT EXECUTED
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
a0016c1c: 0a00001d beq a0016c98 <rtems_region_extend+0x90> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
a0016c20: e59f3078 ldr r3, [pc, #120] ; a0016ca0 <rtems_region_extend+0x98><== NOT EXECUTED
a0016c24: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016c28: eb0008ce bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
a0016c2c: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016c30: e59f006c ldr r0, [pc, #108] ; a0016ca4 <rtems_region_extend+0x9c><== NOT EXECUTED
a0016c34: e1a0200d mov r2, sp <== NOT EXECUTED
a0016c38: eb000fe5 bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016c3c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016c40: e1a04000 mov r4, r0 <== NOT EXECUTED
a0016c44: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016c48: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016c4c: 1a00000e bne a0016c8c <rtems_region_extend+0x84> <== NOT EXECUTED
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
a0016c50: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016c54: e1a01007 mov r1, r7 <== NOT EXECUTED
a0016c58: e1a02006 mov r2, r6 <== NOT EXECUTED
a0016c5c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0016c60: eb000bd8 bl a0019bc8 <_Heap_Extend> <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a0016c64: 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;
a0016c68: 03a05009 moveq r5, #9 <== NOT EXECUTED
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
a0016c6c: 0a000006 beq a0016c8c <rtems_region_extend+0x84> <== NOT EXECUTED
the_region->length += amount_extended;
a0016c70: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
a0016c74: e5942054 ldr r2, [r4, #84] ; 0x54 <== NOT EXECUTED
a0016c78: e0822003 add r2, r2, r3 <== NOT EXECUTED
a0016c7c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED
the_region->maximum_segment_size += amount_extended;
a0016c80: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
a0016c84: e0823003 add r3, r2, r3 <== NOT EXECUTED
a0016c88: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016c8c: e59f300c ldr r3, [pc, #12] ; a0016ca0 <rtems_region_extend+0x98><== NOT EXECUTED
a0016c90: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016c94: eb0008cc bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016c98: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016c9c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
a0016ca8 <rtems_region_get_free_information>:
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016ca8: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016cac: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_free_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016cb0: e1a05000 mov r5, r0 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0016cb4: 03a05009 moveq r5, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016cb8: 0a000013 beq a0016d0c <rtems_region_get_free_information+0x64><== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016cbc: e59f3050 ldr r3, [pc, #80] ; a0016d14 <rtems_region_get_free_information+0x6c><== NOT EXECUTED
a0016cc0: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016cc4: eb0008a7 bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016cc8: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016ccc: e59f0044 ldr r0, [pc, #68] ; a0016d18 <rtems_region_get_free_information+0x70><== NOT EXECUTED
a0016cd0: e1a0200d mov r2, sp <== NOT EXECUTED
a0016cd4: eb000fbe bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016cd8: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016cdc: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016ce0: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016ce4: 1a000005 bne a0016d00 <rtems_region_get_free_information+0x58><== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->Used.number = 0;
a0016ce8: e584500c str r5, [r4, #12] <== NOT EXECUTED
the_info->Used.total = 0;
a0016cec: e5845014 str r5, [r4, #20] <== NOT EXECUTED
the_info->Used.largest = 0;
a0016cf0: e5845010 str r5, [r4, #16] <== NOT EXECUTED
_Heap_Get_free_information( &the_region->Memory, &the_info->Free );
a0016cf4: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016cf8: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016cfc: eb000cdd bl a001a078 <_Heap_Get_free_information> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016d00: e59f300c ldr r3, [pc, #12] ; a0016d14 <rtems_region_get_free_information+0x6c><== NOT EXECUTED
a0016d04: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d08: eb0008af bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016d0c: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016d10: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016d1c <rtems_region_get_information>:
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016d1c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016d20: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_region_get_information(
rtems_id id,
Heap_Information_block *the_info
)
{
a0016d24: e1a05000 mov r5, r0 <== NOT EXECUTED
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a0016d28: 03a05009 moveq r5, #9 <== NOT EXECUTED
{
Objects_Locations location;
rtems_status_code return_status;
register Region_Control *the_region;
if ( !the_info )
a0016d2c: 0a000010 beq a0016d74 <rtems_region_get_information+0x58> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016d30: e59f3044 ldr r3, [pc, #68] ; a0016d7c <rtems_region_get_information+0x60><== NOT EXECUTED
a0016d34: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d38: eb00088a bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016d3c: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016d40: e59f0038 ldr r0, [pc, #56] ; a0016d80 <rtems_region_get_information+0x64><== NOT EXECUTED
a0016d44: e1a0200d mov r2, sp <== NOT EXECUTED
a0016d48: eb000fa1 bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016d4c: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a0016d50: e3550000 cmp r5, #0 <== NOT EXECUTED
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a0016d54: 13a05004 movne r5, #4 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016d58: 1a000002 bne a0016d68 <rtems_region_get_information+0x4c> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Heap_Get_information( &the_region->Memory, the_info );
a0016d5c: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016d60: e1a01004 mov r1, r4 <== NOT EXECUTED
a0016d64: eb000cd7 bl a001a0c8 <_Heap_Get_information> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016d68: e59f300c ldr r3, [pc, #12] ; a0016d7c <rtems_region_get_information+0x60><== NOT EXECUTED
a0016d6c: e5930000 ldr r0, [r3] <== NOT EXECUTED
a0016d70: eb000895 bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a0016d74: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016d78: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a0016eb0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0016eb0: e92d4071 push {r0, r4, r5, r6, lr}
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0016eb4: e2515000 subs r5, r1, #0
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
a0016eb8: e1a06000 mov r6, r0
a0016ebc: e1a04002 mov r4, r2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
a0016ec0: 0a000019 beq a0016f2c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
if ( !size )
a0016ec4: e3520000 cmp r2, #0
a0016ec8: 0a000017 beq a0016f2c <rtems_region_get_segment_size+0x7c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016ecc: e59f3064 ldr r3, [pc, #100] ; a0016f38 <rtems_region_get_segment_size+0x88>
a0016ed0: e5930000 ldr r0, [r3]
a0016ed4: eb000823 bl a0018f68 <_API_Mutex_Lock>
a0016ed8: e59f005c ldr r0, [pc, #92] ; a0016f3c <rtems_region_get_segment_size+0x8c>
a0016edc: e1a01006 mov r1, r6
a0016ee0: e1a0200d mov r2, sp
a0016ee4: eb000f3a bl a001abd4 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016ee8: e59d3000 ldr r3, [sp]
a0016eec: e3530000 cmp r3, #0
a0016ef0: 0a000002 beq a0016f00 <rtems_region_get_segment_size+0x50>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016ef4: e3530001 cmp r3, #1 <== NOT EXECUTED
a0016ef8: 03a04004 moveq r4, #4 <== NOT EXECUTED
a0016efc: ea000005 b a0016f18 <rtems_region_get_segment_size+0x68> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
a0016f00: e1a02004 mov r2, r4
a0016f04: e2800068 add r0, r0, #104 ; 0x68
a0016f08: e1a01005 mov r1, r5
a0016f0c: eb000dd2 bl a001a65c <_Heap_Size_of_alloc_area>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016f10: e3500000 cmp r0, #0
a0016f14: 03a04009 moveq r4, #9
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016f18: e59f3018 ldr r3, [pc, #24] ; a0016f38 <rtems_region_get_segment_size+0x88>
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
a0016f1c: 13a04000 movne r4, #0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0016f20: e5930000 ldr r0, [r3]
a0016f24: eb000828 bl a0018fcc <_API_Mutex_Unlock>
return return_status;
a0016f28: ea000000 b a0016f30 <rtems_region_get_segment_size+0x80>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
a0016f2c: e3a04009 mov r4, #9 <== NOT EXECUTED
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
a0016f30: e1a00004 mov r0, r4
a0016f34: e8bd8078 pop {r3, r4, r5, r6, pc}
a0016f70 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0016f70: e92d41ff push {r0, r1, r2, r3, 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 )
a0016f74: e2538000 subs r8, r3, #0 <== NOT EXECUTED
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
a0016f78: e1a05000 mov r5, r0 <== NOT EXECUTED
a0016f7c: e1a07001 mov r7, r1 <== NOT EXECUTED
a0016f80: e1a06002 mov r6, r2 <== NOT EXECUTED
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
return RTEMS_INVALID_ADDRESS;
a0016f84: 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 )
a0016f88: 0a000022 beq a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
a0016f8c: e59f408c ldr r4, [pc, #140] ; a0017020 <rtems_region_resize_segment+0xb0><== NOT EXECUTED
a0016f90: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0016f94: eb0007f3 bl a0018f68 <_API_Mutex_Lock> <== NOT EXECUTED
a0016f98: e1a01005 mov r1, r5 <== NOT EXECUTED
a0016f9c: e59f0080 ldr r0, [pc, #128] ; a0017024 <rtems_region_resize_segment+0xb4><== NOT EXECUTED
a0016fa0: e28d2008 add r2, sp, #8 <== NOT EXECUTED
a0016fa4: eb000f0a bl a001abd4 <_Objects_Get_no_protection> <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
a0016fa8: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
a0016fac: e1a05000 mov r5, r0 <== NOT EXECUTED
a0016fb0: e3530000 cmp r3, #0 <== NOT EXECUTED
a0016fb4: 1a000014 bne a001700c <rtems_region_resize_segment+0x9c> <== NOT EXECUTED
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
a0016fb8: e28d300c add r3, sp, #12 <== NOT EXECUTED
a0016fbc: e58d3000 str r3, [sp] <== NOT EXECUTED
a0016fc0: e1a02006 mov r2, r6 <== NOT EXECUTED
a0016fc4: e28d3004 add r3, sp, #4 <== NOT EXECUTED
a0016fc8: e2800068 add r0, r0, #104 ; 0x68 <== NOT EXECUTED
a0016fcc: e1a01007 mov r1, r7 <== NOT EXECUTED
a0016fd0: eb000d52 bl a001a520 <_Heap_Resize_block> <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0016fd4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0016fd8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
a0016fdc: e5883000 str r3, [r8] <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
a0016fe0: 1a000003 bne a0016ff4 <rtems_region_resize_segment+0x84> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
a0016fe4: e1a00005 mov r0, r5 <== NOT EXECUTED
a0016fe8: eb001d48 bl a001e510 <_Region_Process_queue> <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
a0016fec: e1a00006 mov r0, r6 <== NOT EXECUTED
a0016ff0: ea000008 b a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
a0016ff4: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0016ff8: eb0007f3 bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
a0016ffc: e3560001 cmp r6, #1 <== NOT EXECUTED
a0017000: 13a00009 movne r0, #9 <== NOT EXECUTED
a0017004: 03a0000d moveq r0, #13 <== NOT EXECUTED
a0017008: ea000002 b a0017018 <rtems_region_resize_segment+0xa8> <== NOT EXECUTED
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a001700c: e5940000 ldr r0, [r4] <== NOT EXECUTED
a0017010: eb0007ed bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
a0017014: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a0017018: e28dd010 add sp, sp, #16 <== NOT EXECUTED
a001701c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
a0017028 <rtems_region_return_segment>:
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0017028: e92d4071 push {r0, r4, r5, r6, lr}
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a001702c: e59f3074 ldr r3, [pc, #116] ; a00170a8 <rtems_region_return_segment+0x80>
rtems_status_code rtems_region_return_segment(
rtems_id id,
void *segment
)
{
a0017030: e1a05000 mov r5, r0
a0017034: e1a04001 mov r4, r1
uint32_t size;
#endif
int status;
register Region_Control *the_region;
_RTEMS_Lock_allocator();
a0017038: e5930000 ldr r0, [r3]
a001703c: eb0007c9 bl a0018f68 <_API_Mutex_Lock>
a0017040: e1a01005 mov r1, r5
a0017044: e59f0060 ldr r0, [pc, #96] ; a00170ac <rtems_region_return_segment+0x84>
a0017048: e1a0200d mov r2, sp
a001704c: eb000ee0 bl a001abd4 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
a0017050: e59d6000 ldr r6, [sp]
a0017054: e1a05000 mov r5, r0
a0017058: e3560000 cmp r6, #0
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
a001705c: 13a06004 movne r6, #4
register Region_Control *the_region;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
a0017060: 1a00000b bne a0017094 <rtems_region_return_segment+0x6c>
RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
Region_Control *the_region,
void *the_segment
)
{
return _Heap_Free( &the_region->Memory, the_segment );
a0017064: e2800068 add r0, r0, #104 ; 0x68
a0017068: e1a01004 mov r1, r4
a001706c: eb000b88 bl a0019e94 <_Heap_Free>
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0017070: e3500000 cmp r0, #0
return_status = RTEMS_INVALID_ADDRESS;
a0017074: 03a06009 moveq r6, #9
#endif
status = _Region_Free_segment( the_region, segment );
_Region_Debug_Walk( the_region, 4 );
if ( !status )
a0017078: 0a000005 beq a0017094 <rtems_region_return_segment+0x6c>
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a001707c: e5953064 ldr r3, [r5, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a0017080: e1a00005 mov r0, r5
_Region_Debug_Walk( the_region, 4 );
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
the_region->number_of_used_blocks -= 1;
a0017084: e2433001 sub r3, r3, #1
a0017088: e5853064 str r3, [r5, #100] ; 0x64
_Region_Process_queue(the_region); /* unlocks allocator */
a001708c: eb001d1f bl a001e510 <_Region_Process_queue>
return RTEMS_SUCCESSFUL;
a0017090: ea000002 b a00170a0 <rtems_region_return_segment+0x78>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
a0017094: e59f300c ldr r3, [pc, #12] ; a00170a8 <rtems_region_return_segment+0x80><== NOT EXECUTED
a0017098: e5930000 ldr r0, [r3] <== NOT EXECUTED
a001709c: eb0007ca bl a0018fcc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
}
a00170a0: e1a00006 mov r0, r6
a00170a4: e8bd8078 pop {r3, r4, r5, r6, pc}
a0009198 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a0009198: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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 ) )
a000919c: e2507000 subs r7, r0, #0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
a00091a0: e24dd018 sub sp, sp, #24
a00091a4: e1a04001 mov r4, r1
a00091a8: e1a08002 mov r8, r2
a00091ac: e1a09003 mov r9, r3
a00091b0: 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;
a00091b4: 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 ) )
a00091b8: 0a00005d beq a0009334 <rtems_semaphore_create+0x19c>
return RTEMS_INVALID_NAME;
if ( !id )
a00091bc: e3560000 cmp r6, #0
return RTEMS_INVALID_ADDRESS;
a00091c0: 03a00009 moveq r0, #9
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
a00091c4: 0a00005a beq a0009334 <rtems_semaphore_create+0x19c>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
a00091c8: e21230c0 ands r3, r2, #192 ; 0xc0
a00091cc: 0a000006 beq a00091ec <rtems_semaphore_create+0x54>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
a00091d0: e2022030 and r2, r2, #48 ; 0x30
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
a00091d4: e3520010 cmp r2, #16
a00091d8: 1a000054 bne a0009330 <rtems_semaphore_create+0x198>
a00091dc: e3180004 tst r8, #4
a00091e0: 0a000052 beq a0009330 <rtems_semaphore_create+0x198>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
a00091e4: e35300c0 cmp r3, #192 ; 0xc0
a00091e8: 0a000050 beq a0009330 <rtems_semaphore_create+0x198>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
a00091ec: e218a030 ands sl, r8, #48 ; 0x30
a00091f0: 0a000002 beq a0009200 <rtems_semaphore_create+0x68>
a00091f4: e3540001 cmp r4, #1
return RTEMS_INVALID_NUMBER;
a00091f8: 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 ) )
a00091fc: 8a00004c bhi a0009334 <rtems_semaphore_create+0x19c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a0009200: e59f3134 ldr r3, [pc, #308] ; a000933c <rtems_semaphore_create+0x1a4>
a0009204: e5932000 ldr r2, [r3]
a0009208: e2822001 add r2, r2, #1
a000920c: e5832000 str r2, [r3]
* 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 );
a0009210: e59f0128 ldr r0, [pc, #296] ; a0009340 <rtems_semaphore_create+0x1a8>
a0009214: eb00050f bl a000a658 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
a0009218: e2505000 subs r5, r0, #0
a000921c: 1a000002 bne a000922c <rtems_semaphore_create+0x94>
_Thread_Enable_dispatch();
a0009220: eb0008fe bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
a0009224: e3a00005 mov r0, #5
a0009228: ea000041 b a0009334 <rtems_semaphore_create+0x19c>
the_semaphore->attribute_set = attribute_set;
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a000922c: e35a0000 cmp sl, #0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
a0009230: e5858010 str r8, [r5, #16]
a0009234: e2083004 and r3, r8, #4
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
a0009238: 1a00000d bne a0009274 <rtems_semaphore_create+0xdc>
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
a000923c: e3530000 cmp r3, #0
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a0009240: 13a03001 movne r3, #1
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
a0009244: e3e02000 mvn r2, #0
a0009248: e58d2010 str r2, [sp, #16]
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
a000924c: 158d3014 strne r3, [sp, #20]
* 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(
a0009250: e2850014 add r0, r5, #20
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;
a0009254: e3a03000 mov r3, #0
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
a0009258: e28d1010 add r1, sp, #16
a000925c: e1a02004 mov r2, r4
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
a0009260: 058da014 streq sl, [sp, #20]
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009264: e58d3000 str r3, [sp]
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
a0009268: e58d300c str r3, [sp, #12]
_CORE_semaphore_Initialize(
a000926c: eb000384 bl a000a084 <_CORE_semaphore_Initialize>
a0009270: ea000024 b a0009308 <rtems_semaphore_create+0x170>
} else {
/*
* 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 ) )
a0009274: e3530000 cmp r3, #0
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
a0009278: 13a03001 movne r3, #1
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a000927c: e35a0010 cmp sl, #16
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
a0009280: e58d3008 str r3, [sp, #8]
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;
a0009284: 13a03002 movne r3, #2
a0009288: 158d3000 strne r3, [sp]
the_mutex_attr.only_owner_release = false;
a000928c: 13a03000 movne r3, #0
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
a0009290: 1a00000d bne a00092cc <rtems_semaphore_create+0x134>
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
a0009294: e3a03000 mov r3, #0
a0009298: e58d3000 str r3, [sp]
the_mutex_attr.only_owner_release = false;
a000929c: e5cd3004 strb r3, [sp, #4]
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
a00092a0: e59d3008 ldr r3, [sp, #8]
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;
a00092a4: e58d900c str r9, [sp, #12]
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 ) {
a00092a8: e3530001 cmp r3, #1
a00092ac: 1a000007 bne a00092d0 <rtems_semaphore_create+0x138>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
a00092b0: e3180040 tst r8, #64 ; 0x40
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
a00092b4: 13a02002 movne r2, #2
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 ) ) {
a00092b8: 1a000002 bne a00092c8 <rtems_semaphore_create+0x130>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
a00092bc: e3180080 tst r8, #128 ; 0x80
a00092c0: 0a000002 beq a00092d0 <rtems_semaphore_create+0x138>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
a00092c4: e3a02003 mov r2, #3
a00092c8: e58d2008 str r2, [sp, #8]
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attr.only_owner_release = false;
a00092cc: e5cd3004 strb r3, [sp, #4]
}
mutex_status = _CORE_mutex_Initialize(
a00092d0: e3540001 cmp r4, #1
a00092d4: 13a02000 movne r2, #0
a00092d8: 03a02001 moveq r2, #1
a00092dc: e2850014 add r0, r5, #20
a00092e0: e1a0100d mov r1, sp
a00092e4: eb0002a4 bl a0009d7c <_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 ) {
a00092e8: e3500006 cmp r0, #6
a00092ec: 1a000005 bne a0009308 <rtems_semaphore_create+0x170>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a00092f0: e59f0048 ldr r0, [pc, #72] ; a0009340 <rtems_semaphore_create+0x1a8>
a00092f4: e1a01005 mov r1, r5
a00092f8: eb00059f bl a000a97c <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
a00092fc: eb0008c7 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
a0009300: e3a00013 mov r0, #19
a0009304: ea00000a b a0009334 <rtems_semaphore_create+0x19c>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009308: e59f2030 ldr r2, [pc, #48] ; a0009340 <rtems_semaphore_create+0x1a8>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a000930c: e5953008 ldr r3, [r5, #8]
a0009310: e1d510b8 ldrh r1, [r5, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009314: e592201c ldr r2, [r2, #28]
a0009318: e7825101 str r5, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a000931c: e585700c str r7, [r5, #12]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
a0009320: e5863000 str r3, [r6]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
a0009324: eb0008bd bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009328: e3a00000 mov r0, #0
a000932c: ea000000 b a0009334 <rtems_semaphore_create+0x19c>
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
a0009330: e3a0000b mov r0, #11 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0009334: e28dd018 add sp, sp, #24
a0009338: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a0009344 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
a0009344: e92d4011 push {r0, r4, lr}
a0009348: e1a01000 mov r1, r0
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
a000934c: e1a0200d mov r2, sp
a0009350: e59f0084 ldr r0, [pc, #132] ; a00093dc <rtems_semaphore_delete+0x98>
a0009354: eb0005e0 bl a000aadc <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009358: e59d3000 ldr r3, [sp]
a000935c: e1a04000 mov r4, r0
a0009360: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009364: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0009368: 1a00001a bne a00093d8 <rtems_semaphore_delete+0x94>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a000936c: e5941010 ldr r1, [r4, #16]
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0009370: e2111030 ands r1, r1, #48 ; 0x30
a0009374: 0a00000c beq a00093ac <rtems_semaphore_delete+0x68>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
a0009378: e5943064 ldr r3, [r4, #100] ; 0x64
a000937c: e3530000 cmp r3, #0
a0009380: 1a000004 bne a0009398 <rtems_semaphore_delete+0x54>
a0009384: e3510020 cmp r1, #32
a0009388: 0a000002 beq a0009398 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
a000938c: eb0008a3 bl a000b620 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a0009390: e3a0000c mov r0, #12 <== NOT EXECUTED
a0009394: ea00000f b a00093d8 <rtems_semaphore_delete+0x94> <== NOT EXECUTED
}
_CORE_mutex_Flush(
a0009398: e2840014 add r0, r4, #20
a000939c: e3a01000 mov r1, #0
a00093a0: e3a02004 mov r2, #4
a00093a4: eb000273 bl a0009d78 <_CORE_mutex_Flush>
a00093a8: ea000002 b a00093b8 <rtems_semaphore_delete+0x74>
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
a00093ac: e2840014 add r0, r4, #20
a00093b0: e3a02002 mov r2, #2
a00093b4: eb000331 bl a000a080 <_CORE_semaphore_Flush>
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
a00093b8: e59f001c ldr r0, [pc, #28] ; a00093dc <rtems_semaphore_delete+0x98>
a00093bc: e1a01004 mov r1, r4
a00093c0: eb0004c6 bl a000a6e0 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
a00093c4: e59f0010 ldr r0, [pc, #16] ; a00093dc <rtems_semaphore_delete+0x98>
a00093c8: e1a01004 mov r1, r4
a00093cc: eb00056a bl a000a97c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
a00093d0: eb000892 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00093d4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00093d8: e8bd8018 pop {r3, r4, pc}
a0011a84 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
a0011a84: e92d4001 push {r0, lr}
a0011a88: e1a01000 mov r1, r0
a0011a8c: e1a0200d mov r2, sp
a0011a90: e59f0044 ldr r0, [pc, #68] ; a0011adc <rtems_semaphore_flush+0x58>
a0011a94: ebffe87e bl a000bc94 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0011a98: e59d3000 ldr r3, [sp]
a0011a9c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0011aa0: 13a00004 movne r0, #4
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
a0011aa4: 1a00000b bne a0011ad8 <rtems_semaphore_flush+0x54>
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
a0011aa8: e5901010 ldr r1, [r0, #16]
a0011aac: e2800014 add r0, r0, #20
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a0011ab0: e2111030 ands r1, r1, #48 ; 0x30
a0011ab4: 0a000003 beq a0011ac8 <rtems_semaphore_flush+0x44>
_CORE_mutex_Flush(
a0011ab8: e1a01003 mov r1, r3
a0011abc: e3a02001 mov r2, #1
a0011ac0: ebffe539 bl a000afac <_CORE_mutex_Flush>
a0011ac4: ea000001 b a0011ad0 <rtems_semaphore_flush+0x4c>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
a0011ac8: e3a02001 mov r2, #1 <== NOT EXECUTED
a0011acc: ebffe5f8 bl a000b2b4 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
a0011ad0: ebffeb42 bl a000c7e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0011ad4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0011ad8: e8bd8008 pop {r3, pc}
a00093e0 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
a00093e0: e92d40f7 push {r0, r1, r2, r4, r5, r6, r7, lr}
a00093e4: e1a04000 mov r4, r0
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
a00093e8: e28d3004 add r3, sp, #4
a00093ec: e1a06001 mov r6, r1
a00093f0: e1a05002 mov r5, r2
a00093f4: e59f00ec ldr r0, [pc, #236] ; a00094e8 <rtems_semaphore_obtain+0x108>
a00093f8: e1a01004 mov r1, r4
a00093fc: e28d2008 add r2, sp, #8
a0009400: eb00059a bl a000aa70 <_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 ) {
a0009404: e59d3008 ldr r3, [sp, #8]
a0009408: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000940c: 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 ) {
a0009410: 1a000033 bne a00094e4 <rtems_semaphore_obtain+0x104>
a0009414: e5903010 ldr r3, [r0, #16]
a0009418: e59f70cc ldr r7, [pc, #204] ; a00094ec <rtems_semaphore_obtain+0x10c>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
a000941c: e2132030 ands r2, r3, #48 ; 0x30
a0009420: 0a00000b beq a0009454 <rtems_semaphore_obtain+0x74>
_CORE_mutex_Seize(
a0009424: e59d3004 ldr r3, [sp, #4]
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
a0009428: e2062001 and r2, r6, #1
a000942c: e2800014 add r0, r0, #20
a0009430: e58d3000 str r3, [sp]
a0009434: e1a01004 mov r1, r4
a0009438: e1a03005 mov r3, r5
a000943c: e2222001 eor r2, r2, #1
a0009440: eb000295 bl a0009e9c <_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 );
a0009444: e5973004 ldr r3, [r7, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
a0009448: e5930034 ldr r0, [r3, #52] ; 0x34
a000944c: eb000047 bl a0009570 <_Semaphore_Translate_core_mutex_return_code>
a0009450: ea000023 b a00094e4 <rtems_semaphore_obtain+0x104>
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
a0009454: e5973004 ldr r3, [r7, #4]
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
a0009458: e5832034 str r2, [r3, #52] ; 0x34
if ( the_semaphore->count != 0 ) {
a000945c: e590205c ldr r2, [r0, #92] ; 0x5c
a0009460: e3520000 cmp r2, #0
a0009464: 0a000004 beq a000947c <rtems_semaphore_obtain+0x9c>
the_semaphore->count -= 1;
a0009468: e2422001 sub r2, r2, #1
a000946c: e580205c str r2, [r0, #92] ; 0x5c
a0009470: e59d3004 ldr r3, [sp, #4]
a0009474: e129f003 msr CPSR_fc, r3
a0009478: ea000015 b a00094d4 <rtems_semaphore_obtain+0xf4>
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
a000947c: e3160001 tst r6, #1
a0009480: 0a000004 beq a0009498 <rtems_semaphore_obtain+0xb8>
a0009484: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
a0009488: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_ISR_Enable( *level_p );
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
a000948c: e3a02001 mov r2, #1 <== NOT EXECUTED
a0009490: e5832034 str r2, [r3, #52] ; 0x34 <== NOT EXECUTED
a0009494: ea00000e b a00094d4 <rtems_semaphore_obtain+0xf4> <== NOT EXECUTED
a0009498: e59f2050 ldr r2, [pc, #80] ; a00094f0 <rtems_semaphore_obtain+0x110>
a000949c: e5921000 ldr r1, [r2]
a00094a0: e2811001 add r1, r1, #1
a00094a4: e5821000 str r1, [r2]
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;
a00094a8: e3a02001 mov r2, #1
a00094ac: e5802044 str r2, [r0, #68] ; 0x44
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
a00094b0: e2800014 add r0, r0, #20
a00094b4: e5830044 str r0, [r3, #68] ; 0x44
executing->Wait.id = id;
a00094b8: e5834020 str r4, [r3, #32]
a00094bc: e59d3004 ldr r3, [sp, #4]
a00094c0: e129f003 msr CPSR_fc, r3
_ISR_Enable( *level_p );
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
a00094c4: e59f2028 ldr r2, [pc, #40] ; a00094f4 <rtems_semaphore_obtain+0x114>
a00094c8: e1a01005 mov r1, r5
a00094cc: eb000977 bl a000bab0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
a00094d0: eb000852 bl a000b620 <_Thread_Enable_dispatch>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
a00094d4: e59f3010 ldr r3, [pc, #16] ; a00094ec <rtems_semaphore_obtain+0x10c>
a00094d8: e5933004 ldr r3, [r3, #4]
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
a00094dc: e5930034 ldr r0, [r3, #52] ; 0x34
a00094e0: eb000026 bl a0009580 <_Semaphore_Translate_core_semaphore_return_code>
break;
}
return RTEMS_INVALID_ID;
}
a00094e4: e8bd80fe pop {r1, r2, r3, r4, r5, r6, r7, pc}
a001753c <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
a001753c: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0017540: e2514000 subs r4, r1, #0
return RTEMS_INVALID_NUMBER;
a0017544: 03a0000a moveq r0, #10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
a0017548: 0a000028 beq a00175f0 <rtems_signal_send+0xb4>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
a001754c: e1a0100d mov r1, sp
a0017550: eb001089 bl a001b77c <_Thread_Get>
switch ( location ) {
a0017554: e59d3000 ldr r3, [sp]
a0017558: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001755c: 13a00004 movne r0, #4
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0017560: 1a000022 bne a00175f0 <rtems_signal_send+0xb4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
a0017564: e59030f4 ldr r3, [r0, #244] ; 0xf4
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
a0017568: e593200c ldr r2, [r3, #12]
a001756c: e3520000 cmp r2, #0
a0017570: 0a00001c beq a00175e8 <rtems_signal_send+0xac>
if ( asr->is_enabled ) {
a0017574: e5d32008 ldrb r2, [r3, #8]
a0017578: e3520000 cmp r2, #0
a001757c: 0a00000f beq a00175c0 <rtems_signal_send+0x84>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0017580: e10f2000 mrs r2, CPSR
a0017584: e3821080 orr r1, r2, #128 ; 0x80
a0017588: e129f001 msr CPSR_fc, r1
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
a001758c: e5931014 ldr r1, [r3, #20]
a0017590: e1814004 orr r4, r1, r4
a0017594: e5834014 str r4, [r3, #20]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0017598: e129f002 msr CPSR_fc, r2
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
a001759c: e59f3050 ldr r3, [pc, #80] ; a00175f4 <rtems_signal_send+0xb8>
a00175a0: e5932000 ldr r2, [r3]
a00175a4: e3520000 cmp r2, #0
a00175a8: 0a00000b beq a00175dc <rtems_signal_send+0xa0>
a00175ac: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a00175b0: e1500002 cmp r0, r2 <== NOT EXECUTED
_Thread_Dispatch_necessary = true;
a00175b4: 03a02001 moveq r2, #1 <== NOT EXECUTED
a00175b8: 05c32010 strbeq r2, [r3, #16] <== NOT EXECUTED
a00175bc: ea000006 b a00175dc <rtems_signal_send+0xa0> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a00175c0: e10f2000 mrs r2, CPSR <== NOT EXECUTED
a00175c4: e3821080 orr r1, r2, #128 ; 0x80 <== NOT EXECUTED
a00175c8: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
a00175cc: e5931018 ldr r1, [r3, #24] <== NOT EXECUTED
a00175d0: e1814004 orr r4, r1, r4 <== NOT EXECUTED
a00175d4: e5834018 str r4, [r3, #24] <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a00175d8: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
a00175dc: eb00105d bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00175e0: e3a00000 mov r0, #0
a00175e4: ea000001 b a00175f0 <rtems_signal_send+0xb4>
}
_Thread_Enable_dispatch();
a00175e8: eb00105a bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
a00175ec: e3a0000b mov r0, #11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00175f0: e8bd8018 pop {r3, r4, pc}
a000b5e0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000b5e0: e92d4071 push {r0, r4, r5, r6, lr}
a000b5e4: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b5e8: e59f209c ldr r2, [pc, #156] ; a000b68c <rtems_task_get_note+0xac>
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
a000b5ec: e1a03000 mov r3, r0
a000b5f0: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b5f4: e5d22004 ldrb r2, [r2, #4]
a000b5f8: e3520000 cmp r2, #0
return RTEMS_NOT_CONFIGURED;
a000b5fc: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b600: 0a000020 beq a000b688 <rtems_task_get_note+0xa8>
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000b604: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000b608: 03a00009 moveq r0, #9
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
if ( !note )
a000b60c: 0a00001d beq a000b688 <rtems_task_get_note+0xa8>
/*
* 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 )
a000b610: e351000f cmp r1, #15
return RTEMS_INVALID_NUMBER;
a000b614: 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 )
a000b618: 8a00001a bhi a000b688 <rtems_task_get_note+0xa8>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b61c: e3530000 cmp r3, #0
a000b620: 0a000004 beq a000b638 <rtems_task_get_note+0x58>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000b624: e59f2064 ldr r2, [pc, #100] ; a000b690 <rtems_task_get_note+0xb0>
a000b628: e5922004 ldr r2, [r2, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b62c: e5922008 ldr r2, [r2, #8]
a000b630: e1530002 cmp r3, r2
a000b634: 1a000007 bne a000b658 <rtems_task_get_note+0x78>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b638: e59f3050 ldr r3, [pc, #80] ; a000b690 <rtems_task_get_note+0xb0><== NOT EXECUTED
*note = api->Notepads[ notepad ];
a000b63c: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b640: e3a00000 mov r0, #0 <== NOT EXECUTED
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
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 ];
a000b644: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
*note = api->Notepads[ notepad ];
a000b648: e59330f4 ldr r3, [r3, #244] ; 0xf4 <== NOT EXECUTED
a000b64c: e7933104 ldr r3, [r3, r4, lsl #2] <== NOT EXECUTED
a000b650: e5853000 str r3, [r5] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b654: ea00000b b a000b688 <rtems_task_get_note+0xa8> <== NOT EXECUTED
}
the_thread = _Thread_Get( id, &location );
a000b658: e1a0100d mov r1, sp
a000b65c: eb000881 bl a000d868 <_Thread_Get>
switch ( location ) {
a000b660: e59d6000 ldr r6, [sp]
a000b664: e3560000 cmp r6, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b668: 13a00004 movne r0, #4
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000b66c: 1a000005 bne a000b688 <rtems_task_get_note+0xa8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
a000b670: e59030f4 ldr r3, [r0, #244] ; 0xf4
a000b674: e2844008 add r4, r4, #8
a000b678: e7933104 ldr r3, [r3, r4, lsl #2]
a000b67c: e5853000 str r3, [r5]
_Thread_Enable_dispatch();
a000b680: eb00086f bl a000d844 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b684: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000b688: e8bd8078 pop {r3, r4, r5, r6, pc}
a0009754 <rtems_task_ident>:
rtems_id *id
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009754: e2523000 subs r3, r2, #0
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
rtems_id *id
)
{
a0009758: e92d4010 push {r4, lr}
a000975c: e1a0c000 mov ip, r0
a0009760: e1a04001 mov r4, r1
Objects_Name_or_id_lookup_errors status;
if ( !id )
a0009764: 0a00000d beq a00097a0 <rtems_task_ident+0x4c>
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
a0009768: e3500000 cmp r0, #0
a000976c: 1a000004 bne a0009784 <rtems_task_ident+0x30>
*id = _Thread_Executing->Object.id;
a0009770: e59f2030 ldr r2, [pc, #48] ; a00097a8 <rtems_task_ident+0x54>
a0009774: e5922004 ldr r2, [r2, #4]
a0009778: e5922008 ldr r2, [r2, #8]
a000977c: e5832000 str r2, [r3]
return RTEMS_SUCCESSFUL;
a0009780: e8bd8010 pop {r4, pc}
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
a0009784: e59f0020 ldr r0, [pc, #32] ; a00097ac <rtems_task_ident+0x58>
a0009788: e1a0100c mov r1, ip
a000978c: e1a02004 mov r2, r4
a0009790: eb000524 bl a000ac28 <_Objects_Name_to_id_u32>
return _Status_Object_name_errors_to_status[ status ];
a0009794: e59f3014 ldr r3, [pc, #20] ; a00097b0 <rtems_task_ident+0x5c>
a0009798: e7930100 ldr r0, [r3, r0, lsl #2]
a000979c: e8bd8010 pop {r4, pc}
)
{
Objects_Name_or_id_lookup_errors status;
if ( !id )
return RTEMS_INVALID_ADDRESS;
a00097a0: 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 ];
}
a00097a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
a001794c <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
)
{
a001794c: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a0017950: e1a0100d mov r1, sp
a0017954: eb000f88 bl a001b77c <_Thread_Get>
switch ( location ) {
a0017958: e59d3000 ldr r3, [sp]
a001795c: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0017960: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a0017964: 1a000007 bne a0017988 <rtems_task_is_suspended+0x3c>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a0017968: e5904010 ldr r4, [r0, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a001796c: e2144002 ands r4, r4, #2 <== NOT EXECUTED
a0017970: 1a000002 bne a0017980 <rtems_task_is_suspended+0x34> <== NOT EXECUTED
_Thread_Enable_dispatch();
a0017974: eb000f77 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0017978: e1a00004 mov r0, r4 <== NOT EXECUTED
a001797c: ea000001 b a0017988 <rtems_task_is_suspended+0x3c> <== NOT EXECUTED
}
_Thread_Enable_dispatch();
a0017980: eb000f74 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_ALREADY_SUSPENDED;
a0017984: e3a0000f mov r0, #15 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0017988: e8bd8018 pop {r3, r4, pc}
a000fe2c <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000fe2c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a000fe30: e252a000 subs sl, r2, #0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
a000fe34: e1a04000 mov r4, r0
a000fe38: e1a05001 mov r5, r1
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
a000fe3c: 0a00004f beq a000ff80 <rtems_task_mode+0x154>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
a000fe40: e59f3144 ldr r3, [pc, #324] ; a000ff8c <rtems_task_mode+0x160>
a000fe44: e5937004 ldr r7, [r3, #4]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
a000fe48: e59760f4 ldr r6, [r7, #244] ; 0xf4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000fe4c: e5d78074 ldrb r8, [r7, #116] ; 0x74
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000fe50: e597307c ldr r3, [r7, #124] ; 0x7c
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000fe54: e5d69008 ldrb r9, [r6, #8]
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
a000fe58: e3580000 cmp r8, #0
a000fe5c: 03a08c01 moveq r8, #256 ; 0x100
a000fe60: 13a08000 movne r8, #0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
a000fe64: e3530000 cmp r3, #0
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
a000fe68: 13888c02 orrne r8, r8, #512 ; 0x200
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
a000fe6c: e3590000 cmp r9, #0
a000fe70: 03a09b01 moveq r9, #1024 ; 0x400
a000fe74: 13a09000 movne r9, #0
old_mode |= _ISR_Get_level();
a000fe78: ebfff314 bl a000cad0 <_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;
a000fe7c: e1899000 orr r9, r9, r0
old_mode |= _ISR_Get_level();
a000fe80: e1898008 orr r8, r9, r8
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000fe84: e3150c01 tst r5, #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;
a000fe88: e58a8000 str r8, [sl]
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
a000fe8c: 0a000003 beq a000fea0 <rtems_task_mode+0x74>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
a000fe90: e3140c01 tst r4, #256 ; 0x100
a000fe94: 13a03000 movne r3, #0
a000fe98: 03a03001 moveq r3, #1
a000fe9c: e5c73074 strb r3, [r7, #116] ; 0x74
if ( mask & RTEMS_TIMESLICE_MASK ) {
a000fea0: e3150c02 tst r5, #512 ; 0x200
a000fea4: 0a000006 beq a000fec4 <rtems_task_mode+0x98>
if ( _Modes_Is_timeslice(mode_set) ) {
a000fea8: e2143c02 ands r3, r4, #512 ; 0x200
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
a000feac: 13a03001 movne r3, #1
a000feb0: 1587307c strne r3, [r7, #124] ; 0x7c
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
a000feb4: 159f30d4 ldrne r3, [pc, #212] ; a000ff90 <rtems_task_mode+0x164>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
a000feb8: 0587307c streq r3, [r7, #124] ; 0x7c
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;
a000febc: 15933000 ldrne r3, [r3]
a000fec0: 15873078 strne r3, [r7, #120] ; 0x78
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
a000fec4: e3150080 tst r5, #128 ; 0x80
a000fec8: 0a000001 beq a000fed4 <rtems_task_mode+0xa8>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
a000fecc: e2040080 and r0, r4, #128 ; 0x80
a000fed0: ebfff2f9 bl a000cabc <_CPU_ISR_Set_level>
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
a000fed4: e2150b01 ands r0, r5, #1024 ; 0x400
a000fed8: 0a000013 beq a000ff2c <rtems_task_mode+0x100>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000fedc: e5d62008 ldrb r2, [r6, #8]
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
a000fee0: e3140b01 tst r4, #1024 ; 0x400
a000fee4: 13a03000 movne r3, #0
a000fee8: 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 ) {
a000feec: e1520003 cmp r2, r3
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000fef0: 03a00000 moveq r0, #0
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
a000fef4: 0a00000c beq a000ff2c <rtems_task_mode+0x100>
asr->is_enabled = is_asr_enabled;
a000fef8: e5c63008 strb r3, [r6, #8]
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a000fefc: e10f3000 mrs r3, CPSR
a000ff00: e3832080 orr r2, r3, #128 ; 0x80
a000ff04: e129f002 msr CPSR_fc, r2
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
a000ff08: e5962018 ldr r2, [r6, #24]
information->signals_pending = information->signals_posted;
a000ff0c: e5961014 ldr r1, [r6, #20]
information->signals_posted = _signals;
a000ff10: e5862014 str r2, [r6, #20]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
a000ff14: e5861018 str r1, [r6, #24]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a000ff18: e129f003 msr CPSR_fc, r3
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
a000ff1c: e5960014 ldr r0, [r6, #20]
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
a000ff20: e3500000 cmp r0, #0
a000ff24: 13a00001 movne r0, #1
a000ff28: 03a00000 moveq r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000ff2c: e59f3060 ldr r3, [pc, #96] ; a000ff94 <rtems_task_mode+0x168>
a000ff30: e5933000 ldr r3, [r3]
a000ff34: e3530003 cmp r3, #3
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
a000ff38: 13a00000 movne r0, #0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
a000ff3c: 1a000011 bne a000ff88 <rtems_task_mode+0x15c>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000ff40: e59f2044 ldr r2, [pc, #68] ; a000ff8c <rtems_task_mode+0x160>
if ( are_signals_pending ||
a000ff44: e3500000 cmp r0, #0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
a000ff48: e5923004 ldr r3, [r2, #4]
if ( are_signals_pending ||
a000ff4c: 1a000005 bne a000ff68 <rtems_task_mode+0x13c>
a000ff50: e5922008 ldr r2, [r2, #8]
a000ff54: e1530002 cmp r3, r2
a000ff58: 0a00000a beq a000ff88 <rtems_task_mode+0x15c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
a000ff5c: e5d33074 ldrb r3, [r3, #116] ; 0x74
a000ff60: e3530000 cmp r3, #0
a000ff64: 0a000007 beq a000ff88 <rtems_task_mode+0x15c>
_Thread_Dispatch_necessary = true;
a000ff68: e59f301c ldr r3, [pc, #28] ; a000ff8c <rtems_task_mode+0x160>
a000ff6c: e3a02001 mov r2, #1
a000ff70: e5c32010 strb r2, [r3, #16]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
a000ff74: ebffed65 bl a000b510 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
a000ff78: e3a00000 mov r0, #0
a000ff7c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
a000ff80: e3a00009 mov r0, #9 <== NOT EXECUTED
a000ff84: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
a000ff88: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
a000c914 <rtems_task_resume>:
*/
rtems_status_code rtems_task_resume(
rtems_id id
)
{
a000c914: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000c918: e1a0100d mov r1, sp
a000c91c: eb000797 bl a000e780 <_Thread_Get>
switch ( location ) {
a000c920: e59d4000 ldr r4, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000c924: e1a03000 mov r3, r0
switch ( location ) {
a000c928: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000c92c: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000c930: 1a000009 bne a000c95c <rtems_task_resume+0x48>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000c934: e5933010 ldr r3, [r3, #16]
case OBJECTS_LOCAL:
if ( _States_Is_suspended( the_thread->current_state ) ) {
a000c938: e3130002 tst r3, #2
a000c93c: 0a000004 beq a000c954 <rtems_task_resume+0x40>
_Thread_Resume( the_thread, true );
a000c940: e3a01001 mov r1, #1
a000c944: eb00098b bl a000ef78 <_Thread_Resume>
_Thread_Enable_dispatch();
a000c948: eb000783 bl a000e75c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000c94c: e1a00004 mov r0, r4
a000c950: ea000001 b a000c95c <rtems_task_resume+0x48>
}
_Thread_Enable_dispatch();
a000c954: eb000780 bl a000e75c <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a000c958: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000c95c: e8bd8018 pop {r3, r4, pc}
a000b774 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000b774: e92d4071 push {r0, r4, r5, r6, lr}
a000b778: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b77c: e59f2088 ldr r2, [pc, #136] ; a000b80c <rtems_task_set_note+0x98>
rtems_status_code rtems_task_set_note(
rtems_id id,
uint32_t notepad,
uint32_t note
)
{
a000b780: e1a03000 mov r3, r0
a000b784: e1a04001 mov r4, r1
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b788: e5d22004 ldrb r2, [r2, #4]
a000b78c: e3520000 cmp r2, #0
return RTEMS_NOT_CONFIGURED;
a000b790: 03a00016 moveq r0, #22
{
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
a000b794: 0a00001b beq a000b808 <rtems_task_set_note+0x94>
/*
* 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 )
a000b798: e351000f cmp r1, #15
return RTEMS_INVALID_NUMBER;
a000b79c: 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 )
a000b7a0: 8a000018 bhi a000b808 <rtems_task_set_note+0x94>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b7a4: e3530000 cmp r3, #0
a000b7a8: 0a000004 beq a000b7c0 <rtems_task_set_note+0x4c>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
a000b7ac: e59f205c ldr r2, [pc, #92] ; a000b810 <rtems_task_set_note+0x9c>
a000b7b0: e5922004 ldr r2, [r2, #4]
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
a000b7b4: e5922008 ldr r2, [r2, #8]
a000b7b8: e1530002 cmp r3, r2
a000b7bc: 1a000006 bne a000b7dc <rtems_task_set_note+0x68>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
a000b7c0: e59f3048 ldr r3, [pc, #72] ; a000b810 <rtems_task_set_note+0x9c><== NOT EXECUTED
api->Notepads[ notepad ] = note;
a000b7c4: e2844008 add r4, r4, #8 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b7c8: e3a00000 mov r0, #0 <== NOT EXECUTED
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
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 ];
a000b7cc: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
api->Notepads[ notepad ] = note;
a000b7d0: e59330f4 ldr r3, [r3, #244] ; 0xf4 <== NOT EXECUTED
a000b7d4: e7835104 str r5, [r3, r4, lsl #2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000b7d8: ea00000a b a000b808 <rtems_task_set_note+0x94> <== NOT EXECUTED
}
the_thread = _Thread_Get( id, &location );
a000b7dc: e1a0100d mov r1, sp
a000b7e0: eb000820 bl a000d868 <_Thread_Get>
switch ( location ) {
a000b7e4: e59d6000 ldr r6, [sp]
a000b7e8: e3560000 cmp r6, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000b7ec: 13a00004 movne r0, #4
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000b7f0: 1a000004 bne a000b808 <rtems_task_set_note+0x94>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
a000b7f4: e59030f4 ldr r3, [r0, #244] ; 0xf4
a000b7f8: e2844008 add r4, r4, #8
a000b7fc: e7835104 str r5, [r3, r4, lsl #2]
_Thread_Enable_dispatch();
a000b800: eb00080f bl a000d844 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000b804: e1a00006 mov r0, r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000b808: e8bd8078 pop {r3, r4, r5, r6, pc}
a000d9c4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
a000d9c4: e92d4031 push {r0, r4, r5, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9c8: 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
)
{
a000d9cc: e1a05002 mov r5, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9d0: 0a000004 beq a000d9e8 <rtems_task_set_priority+0x24>
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 ) );
a000d9d4: e59f3074 ldr r3, [pc, #116] ; a000da50 <rtems_task_set_priority+0x8c>
a000d9d8: e5d33000 ldrb r3, [r3]
a000d9dc: e1540003 cmp r4, r3
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
a000d9e0: 83a00013 movhi r0, #19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
a000d9e4: 8a000018 bhi a000da4c <rtems_task_set_priority+0x88>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000d9e8: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a000d9ec: 03a00009 moveq r0, #9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
a000d9f0: 0a000015 beq a000da4c <rtems_task_set_priority+0x88>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a000d9f4: e1a0100d mov r1, sp
a000d9f8: eb000816 bl a000fa58 <_Thread_Get>
switch ( location ) {
a000d9fc: e59d3000 ldr r3, [sp]
a000da00: e3530000 cmp r3, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000da04: 13a00004 movne r0, #4
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000da08: 1a00000f bne a000da4c <rtems_task_set_priority+0x88>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
a000da0c: e5903014 ldr r3, [r0, #20]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000da10: 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;
a000da14: e5853000 str r3, [r5]
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
a000da18: 0a000009 beq a000da44 <rtems_task_set_priority+0x80>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
a000da1c: 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;
a000da20: e5804018 str r4, [r0, #24]
if ( the_thread->resource_count == 0 ||
a000da24: e3530000 cmp r3, #0
a000da28: 0a000002 beq a000da38 <rtems_task_set_priority+0x74>
a000da2c: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
a000da30: e1530004 cmp r3, r4 <== NOT EXECUTED
a000da34: 9a000002 bls a000da44 <rtems_task_set_priority+0x80> <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
a000da38: e1a01004 mov r1, r4
a000da3c: e3a02000 mov r2, #0
a000da40: eb0006d5 bl a000f59c <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
a000da44: eb0007fa bl a000fa34 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000da48: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000da4c: e8bd8038 pop {r3, r4, r5, pc}
a0009834 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a0009834: e92d4073 push {r0, r1, r4, r5, r6, lr}
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009838: e2515000 subs r5, r1, #0
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
a000983c: e1a06002 mov r6, r2
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
a0009840: 03a00009 moveq r0, #9
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
a0009844: 0a000011 beq a0009890 <rtems_task_start+0x5c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
a0009848: e28d1004 add r1, sp, #4
a000984c: eb00077c bl a000b644 <_Thread_Get>
switch ( location ) {
a0009850: e59d4004 ldr r4, [sp, #4]
a0009854: e3540000 cmp r4, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009858: 13a00004 movne r0, #4
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000985c: 1a00000b bne a0009890 <rtems_task_start+0x5c>
case OBJECTS_LOCAL:
if ( _Thread_Start(
a0009860: e1a01004 mov r1, r4
a0009864: e1a02005 mov r2, r5
a0009868: e1a03004 mov r3, r4
a000986c: e58d6000 str r6, [sp]
a0009870: eb0009e2 bl a000c000 <_Thread_Start>
a0009874: e3500000 cmp r0, #0
a0009878: 0a000002 beq a0009888 <rtems_task_start+0x54>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
a000987c: eb000767 bl a000b620 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009880: e1a00004 mov r0, r4
a0009884: ea000001 b a0009890 <rtems_task_start+0x5c>
}
_Thread_Enable_dispatch();
a0009888: eb000764 bl a000b620 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
a000988c: e3a0000e mov r0, #14 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009890: e8bd807c pop {r2, r3, r4, r5, r6, pc}
a000cb78 <rtems_task_suspend>:
*/
rtems_status_code rtems_task_suspend(
rtems_id id
)
{
a000cb78: e92d4011 push {r0, r4, lr}
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000cb7c: e1a0100d mov r1, sp
a000cb80: eb000767 bl a000e924 <_Thread_Get>
switch ( location ) {
a000cb84: e59d2000 ldr r2, [sp]
)
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
a000cb88: e1a03000 mov r3, r0
switch ( location ) {
a000cb8c: e3520000 cmp r2, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000cb90: 13a00004 movne r0, #4
{
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
a000cb94: 1a000008 bne a000cbbc <rtems_task_suspend+0x44>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_suspended (
States_Control the_states
)
{
return (the_states & STATES_SUSPENDED);
a000cb98: e5934010 ldr r4, [r3, #16]
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
a000cb9c: e2144002 ands r4, r4, #2
a000cba0: 1a000003 bne a000cbb4 <rtems_task_suspend+0x3c>
_Thread_Suspend( the_thread );
a000cba4: eb0009e0 bl a000f32c <_Thread_Suspend>
_Thread_Enable_dispatch();
a000cba8: eb000754 bl a000e900 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000cbac: e1a00004 mov r0, r4
a000cbb0: ea000001 b a000cbbc <rtems_task_suspend+0x44>
}
_Thread_Enable_dispatch();
a000cbb4: eb000751 bl a000e900 <_Thread_Enable_dispatch>
return RTEMS_ALREADY_SUSPENDED;
a000cbb8: e3a0000f mov r0, #15
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a000cbbc: e8bd8018 pop {r3, r4, pc}
a000a550 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000a550: e92d40f1 push {r0, r4, r5, r6, r7, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000a554: e2514000 subs r4, r1, #0
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
a000a558: e1a05002 mov r5, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000a55c: 03a00009 moveq r0, #9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
a000a560: 0a000023 beq a000a5f4 <rtems_task_variable_add+0xa4>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a564: e1a0100d mov r1, sp
a000a568: eb0007b7 bl a000c44c <_Thread_Get>
switch (location) {
a000a56c: e59d3000 ldr r3, [sp]
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a570: e1a07000 mov r7, r0
switch (location) {
a000a574: e3530000 cmp r3, #0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
a000a578: 05906100 ldreq r6, [r0, #256] ; 0x100
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a57c: 0a000008 beq a000a5a4 <rtems_task_variable_add+0x54>
a000a580: ea00001a b a000a5f0 <rtems_task_variable_add+0xa0>
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a584: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
a000a588: e1530004 cmp r3, r4 <== NOT EXECUTED
a000a58c: 1a000003 bne a000a5a0 <rtems_task_variable_add+0x50> <== NOT EXECUTED
tvp->dtor = dtor;
a000a590: e5865010 str r5, [r6, #16] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a594: eb0007a3 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a598: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a59c: ea000014 b a000a5f4 <rtems_task_variable_add+0xa4> <== NOT EXECUTED
}
tvp = (rtems_task_variable_t *)tvp->next;
a000a5a0: e5966000 ldr r6, [r6] <== NOT EXECUTED
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
a000a5a4: e3560000 cmp r6, #0
a000a5a8: 1afffff5 bne a000a584 <rtems_task_variable_add+0x34>
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
a000a5ac: e3a00014 mov r0, #20
a000a5b0: eb000bcc bl a000d4e8 <_Workspace_Allocate>
if (new == NULL) {
a000a5b4: e3500000 cmp r0, #0
a000a5b8: 1a000002 bne a000a5c8 <rtems_task_variable_add+0x78>
_Thread_Enable_dispatch();
a000a5bc: eb000799 bl a000c428 <_Thread_Enable_dispatch>
return RTEMS_NO_MEMORY;
a000a5c0: e3a0001a mov r0, #26
a000a5c4: ea00000a b a000a5f4 <rtems_task_variable_add+0xa4>
}
new->gval = *ptr;
a000a5c8: e5943000 ldr r3, [r4]
new->ptr = ptr;
a000a5cc: e5804004 str r4, [r0, #4]
new->dtor = dtor;
a000a5d0: e5805010 str r5, [r0, #16]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
a000a5d4: e5803008 str r3, [r0, #8]
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
a000a5d8: e5973100 ldr r3, [r7, #256] ; 0x100
a000a5dc: e5803000 str r3, [r0]
the_thread->task_variables = new;
a000a5e0: e5870100 str r0, [r7, #256] ; 0x100
_Thread_Enable_dispatch();
a000a5e4: eb00078f bl a000c428 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000a5e8: e1a00006 mov r0, r6
a000a5ec: ea000000 b a000a5f4 <rtems_task_variable_add+0xa4>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a5f0: e3a00004 mov r0, #4
}
a000a5f4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
a000a5f8 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
a000a5f8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
a000a5fc: e2514000 subs r4, r1, #0 <== NOT EXECUTED
a000a600: 0a000016 beq a000a660 <rtems_task_variable_delete+0x68> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
a000a604: e1a0100d mov r1, sp <== NOT EXECUTED
a000a608: eb00078f bl a000c44c <_Thread_Get> <== NOT EXECUTED
switch (location) {
a000a60c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
a000a610: e3530000 cmp r3, #0 <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
a000a614: 05901100 ldreq r1, [r0, #256] ; 0x100 <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a618: 0a00000d beq a000a654 <rtems_task_variable_delete+0x5c> <== NOT EXECUTED
a000a61c: ea000011 b a000a668 <rtems_task_variable_delete+0x70> <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a620: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
a000a624: e1520004 cmp r2, r4 <== NOT EXECUTED
a000a628: 1a000007 bne a000a64c <rtems_task_variable_delete+0x54> <== NOT EXECUTED
a000a62c: e5912000 ldr r2, [r1] <== NOT EXECUTED
if (prev)
a000a630: e3530000 cmp r3, #0 <== NOT EXECUTED
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
a000a634: 05802100 streq r2, [r0, #256] ; 0x100 <== NOT EXECUTED
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
a000a638: 15832000 strne r2, [r3] <== NOT EXECUTED
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
a000a63c: eb000028 bl a000a6e4 <_RTEMS_Tasks_Invoke_task_variable_dtor><== NOT EXECUTED
_Thread_Enable_dispatch();
a000a640: eb000778 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a644: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a648: ea000007 b a000a66c <rtems_task_variable_delete+0x74> <== NOT EXECUTED
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
a000a64c: e1a03001 mov r3, r1 <== NOT EXECUTED
a000a650: e5911000 ldr r1, [r1] <== NOT EXECUTED
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
a000a654: e3510000 cmp r1, #0 <== NOT EXECUTED
a000a658: 1afffff0 bne a000a620 <rtems_task_variable_delete+0x28> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000a65c: eb000771 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
a000a660: e3a00009 mov r0, #9 <== NOT EXECUTED
a000a664: ea000000 b a000a66c <rtems_task_variable_delete+0x74> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a668: e3a00004 mov r0, #4 <== NOT EXECUTED
}
a000a66c: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
a000a670 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000a670: e92d4031 push {r0, r4, r5, lr}
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000a674: e2515000 subs r5, r1, #0
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
a000a678: e1a04002 mov r4, r2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
a000a67c: 0a000014 beq a000a6d4 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
a000a680: e3520000 cmp r2, #0
a000a684: 0a000012 beq a000a6d4 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
a000a688: e1a0100d mov r1, sp
a000a68c: eb00076e bl a000c44c <_Thread_Get>
switch (location) {
a000a690: e59d3000 ldr r3, [sp]
a000a694: e3530000 cmp r3, #0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
a000a698: 05903100 ldreq r3, [r0, #256] ; 0x100
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
a000a69c: 0a000009 beq a000a6c8 <rtems_task_variable_get+0x58>
a000a6a0: ea00000d b a000a6dc <rtems_task_variable_get+0x6c>
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
a000a6a4: e5932004 ldr r2, [r3, #4] <== NOT EXECUTED
a000a6a8: e1520005 cmp r2, r5 <== NOT EXECUTED
a000a6ac: 1a000004 bne a000a6c4 <rtems_task_variable_get+0x54> <== NOT EXECUTED
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
a000a6b0: e593300c ldr r3, [r3, #12] <== NOT EXECUTED
a000a6b4: e5843000 str r3, [r4] <== NOT EXECUTED
_Thread_Enable_dispatch();
a000a6b8: eb00075a bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a000a6bc: e3a00000 mov r0, #0 <== NOT EXECUTED
a000a6c0: ea000006 b a000a6e0 <rtems_task_variable_get+0x70> <== NOT EXECUTED
}
tvp = (rtems_task_variable_t *)tvp->next;
a000a6c4: 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) {
a000a6c8: e3530000 cmp r3, #0 <== NOT EXECUTED
a000a6cc: 1afffff4 bne a000a6a4 <rtems_task_variable_get+0x34> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
a000a6d0: eb000754 bl a000c428 <_Thread_Enable_dispatch> <== NOT EXECUTED
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
a000a6d4: e3a00009 mov r0, #9
a000a6d8: ea000000 b a000a6e0 <rtems_task_variable_get+0x70>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a000a6dc: e3a00004 mov r0, #4
}
a000a6e0: e8bd8038 pop {r3, r4, r5, pc}
a000aad4 <rtems_task_wake_when>:
rtems_time_of_day *time_buffer
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aad4: e59f30c8 ldr r3, [pc, #200] ; a000aba4 <rtems_task_wake_when+0xd0>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000aad8: e92d40f0 push {r4, r5, r6, r7, lr}
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aadc: e5d33000 ldrb r3, [r3]
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
a000aae0: e1a05000 mov r5, r0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
a000aae4: e3530000 cmp r3, #0
a000aae8: 0a000025 beq a000ab84 <rtems_task_wake_when+0xb0>
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
a000aaec: e3500000 cmp r0, #0
a000aaf0: 0a000025 beq a000ab8c <rtems_task_wake_when+0xb8>
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
a000aaf4: e3a04000 mov r4, #0
a000aaf8: e5804018 str r4, [r0, #24]
if ( !_TOD_Validate( time_buffer ) )
a000aafc: ebfffd1a bl a0009f6c <_TOD_Validate>
a000ab00: e1500004 cmp r0, r4
a000ab04: 0a000022 beq a000ab94 <rtems_task_wake_when+0xc0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000ab08: e1a00005 mov r0, r5
a000ab0c: ebfffcf3 bl a0009ee0 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a000ab10: e59f6090 ldr r6, [pc, #144] ; a000aba8 <rtems_task_wake_when+0xd4>
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
a000ab14: e1a05000 mov r5, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a000ab18: e5963000 ldr r3, [r6]
a000ab1c: e1500003 cmp r0, r3
a000ab20: 9a00001d bls a000ab9c <rtems_task_wake_when+0xc8>
a000ab24: e59f3080 ldr r3, [pc, #128] ; a000abac <rtems_task_wake_when+0xd8>
a000ab28: e5932000 ldr r2, [r3]
a000ab2c: e2822001 add r2, r2, #1
a000ab30: e5832000 str r2, [r3]
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
a000ab34: e59f7074 ldr r7, [pc, #116] ; a000abb0 <rtems_task_wake_when+0xdc>
a000ab38: e3a01010 mov r1, #16
a000ab3c: e5970004 ldr r0, [r7, #4]
a000ab40: eb000976 bl a000d120 <_Thread_Set_state>
_Watchdog_Initialize(
&_Thread_Executing->Timer,
a000ab44: e5971004 ldr r1, [r7, #4]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000ab48: e59f2064 ldr r2, [pc, #100] ; a000abb4 <rtems_task_wake_when+0xe0>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000ab4c: e59f0064 ldr r0, [pc, #100] ; a000abb8 <rtems_task_wake_when+0xe4>
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
_Watchdog_Initialize(
a000ab50: e5913008 ldr r3, [r1, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
a000ab54: e5812064 str r2, [r1, #100] ; 0x64
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a000ab58: e5814050 str r4, [r1, #80] ; 0x50
the_watchdog->routine = routine;
the_watchdog->id = id;
a000ab5c: e5813068 str r3, [r1, #104] ; 0x68
&_Thread_Executing->Timer,
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_seconds(
a000ab60: e5963000 ldr r3, [r6]
the_watchdog->user_data = user_data;
a000ab64: e581406c str r4, [r1, #108] ; 0x6c
a000ab68: e0635005 rsb r5, r3, r5
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a000ab6c: e5815054 str r5, [r1, #84] ; 0x54
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a000ab70: e2811048 add r1, r1, #72 ; 0x48
a000ab74: eb000af3 bl a000d748 <_Watchdog_Insert>
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a000ab78: eb000758 bl a000c8e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a000ab7c: e1a00004 mov r0, r4 <== NOT EXECUTED
a000ab80: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
)
{
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
a000ab84: e3a0000b mov r0, #11 <== NOT EXECUTED
a000ab88: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
a000ab8c: e3a00009 mov r0, #9 <== NOT EXECUTED
a000ab90: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
a000ab94: e3a00014 mov r0, #20 <== NOT EXECUTED
a000ab98: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
seconds = _TOD_To_seconds( time_buffer );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a000ab9c: e3a00014 mov r0, #20 <== NOT EXECUTED
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a000aba0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0009d78 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a0009d78: e92d40f0 push {r4, r5, r6, r7, lr}
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a0009d7c: e2506000 subs r6, r0, #0
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
a0009d80: e1a04001 mov r4, r1
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
a0009d84: 0a00001d beq a0009e00 <rtems_timer_create+0x88>
return RTEMS_INVALID_NAME;
if ( !id )
a0009d88: e3510000 cmp r1, #0
a0009d8c: 0a00001d beq a0009e08 <rtems_timer_create+0x90>
a0009d90: e59f3078 ldr r3, [pc, #120] ; a0009e10 <rtems_timer_create+0x98>
a0009d94: e5932000 ldr r2, [r3]
a0009d98: e2822001 add r2, r2, #1
a0009d9c: 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 );
a0009da0: e59f506c ldr r5, [pc, #108] ; a0009e14 <rtems_timer_create+0x9c>
a0009da4: e1a00005 mov r0, r5
a0009da8: eb0003a3 bl a000ac3c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
a0009dac: e3500000 cmp r0, #0
a0009db0: 1a000002 bne a0009dc0 <rtems_timer_create+0x48>
_Thread_Enable_dispatch();
a0009db4: eb00076e bl a000bb74 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_TOO_MANY;
a0009db8: e3a00005 mov r0, #5 <== NOT EXECUTED
a0009dbc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
the_timer->the_class = TIMER_DORMANT;
a0009dc0: e3a03004 mov r3, #4
a0009dc4: e5803038 str r3, [r0, #56] ; 0x38
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
a0009dc8: e1d010b8 ldrh r1, [r0, #8]
a0009dcc: e5903008 ldr r3, [r0, #8]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
a0009dd0: e595201c ldr r2, [r5, #28]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009dd4: e3a07000 mov r7, #0
a0009dd8: e5807018 str r7, [r0, #24]
the_watchdog->routine = routine;
a0009ddc: e580702c str r7, [r0, #44] ; 0x2c
the_watchdog->id = id;
a0009de0: e5807030 str r7, [r0, #48] ; 0x30
the_watchdog->user_data = user_data;
a0009de4: e5807034 str r7, [r0, #52] ; 0x34
a0009de8: e7820101 str r0, [r2, r1, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
a0009dec: e580600c str r6, [r0, #12]
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
a0009df0: e5843000 str r3, [r4]
_Thread_Enable_dispatch();
a0009df4: eb00075e bl a000bb74 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009df8: e1a00007 mov r0, r7
a0009dfc: e8bd80f0 pop {r4, r5, r6, r7, pc}
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
a0009e00: e3a00003 mov r0, #3 <== NOT EXECUTED
a0009e04: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
if ( !id )
return RTEMS_INVALID_ADDRESS;
a0009e08: e3a00009 mov r0, #9 <== NOT EXECUTED
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
a0009e0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
a0009e18 <rtems_timer_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0009e18: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a0009e1c: e2516000 subs r6, r1, #0
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a0009e20: e1a04000 mov r4, r0
a0009e24: e1a05002 mov r5, r2
a0009e28: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
a0009e2c: 03a0000a moveq r0, #10
{
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
a0009e30: 0a000022 beq a0009ec0 <rtems_timer_fire_after+0xa8>
return RTEMS_INVALID_NUMBER;
if ( !routine )
a0009e34: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a0009e38: 03a00009 moveq r0, #9
ISR_Level level;
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
if ( !routine )
a0009e3c: 0a00001f beq a0009ec0 <rtems_timer_fire_after+0xa8>
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
a0009e40: e59f007c ldr r0, [pc, #124] ; a0009ec4 <rtems_timer_fire_after+0xac>
a0009e44: e1a01004 mov r1, r4
a0009e48: e1a0200d mov r2, sp
a0009e4c: eb00049b bl a000b0c0 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0009e50: e59d3000 ldr r3, [sp]
a0009e54: e1a08000 mov r8, r0
a0009e58: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0009e5c: 13a00004 movne r0, #4
if ( !routine )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0009e60: 1a000016 bne a0009ec0 <rtems_timer_fire_after+0xa8>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0009e64: e288a010 add sl, r8, #16
a0009e68: e1a0000a mov r0, sl
a0009e6c: eb000b0a bl a000ca9c <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0009e70: e10f2000 mrs r2, CPSR
a0009e74: e3823080 orr r3, r2, #128 ; 0x80
a0009e78: 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 ) {
a0009e7c: e5983018 ldr r3, [r8, #24]
a0009e80: e3530000 cmp r3, #0
a0009e84: 0a000001 beq a0009e90 <rtems_timer_fire_after+0x78>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0009e88: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
a0009e8c: ea000009 b a0009eb8 <rtems_timer_fire_after+0xa0> <== NOT EXECUTED
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
a0009e90: e5883038 str r3, [r8, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0009e94: e5883018 str r3, [r8, #24]
the_watchdog->routine = routine;
a0009e98: e588502c str r5, [r8, #44] ; 0x2c
the_watchdog->id = id;
a0009e9c: e5884030 str r4, [r8, #48] ; 0x30
the_watchdog->user_data = user_data;
a0009ea0: e5887034 str r7, [r8, #52] ; 0x34
a0009ea4: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009ea8: e59f0018 ldr r0, [pc, #24] ; a0009ec8 <rtems_timer_fire_after+0xb0>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a0009eac: e588601c str r6, [r8, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
a0009eb0: e1a0100a mov r1, sl
a0009eb4: eb000aa0 bl a000c93c <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
a0009eb8: eb00072d bl a000bb74 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0009ebc: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0009ec0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a00180d4 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180d4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00180d8: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180dc: e59f30c4 ldr r3, [pc, #196] ; a00181a8 <rtems_timer_fire_when+0xd4>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180e0: e1a04000 mov r4, r0
a00180e4: e1a06001 mov r6, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180e8: e5d33000 ldrb r3, [r3]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00180ec: e1a05002 mov r5, r2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180f0: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a00180f4: 03a0000b moveq r0, #11
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
a00180f8: 0a000029 beq a00181a4 <rtems_timer_fire_when+0xd0>
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
a00180fc: e1a00001 mov r0, r1
a0018100: ebfff53b bl a00155f4 <_TOD_Validate>
a0018104: e3500000 cmp r0, #0
a0018108: 0a000024 beq a00181a0 <rtems_timer_fire_when+0xcc>
return RTEMS_INVALID_CLOCK;
if ( !routine )
a001810c: e3550000 cmp r5, #0
return RTEMS_INVALID_ADDRESS;
a0018110: 03a00009 moveq r0, #9
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
a0018114: 0a000022 beq a00181a4 <rtems_timer_fire_when+0xd0>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0018118: e1a00006 mov r0, r6
a001811c: ebfff511 bl a0015568 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018120: e59f7084 ldr r7, [pc, #132] ; a00181ac <rtems_timer_fire_when+0xd8>
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
a0018124: e1a06000 mov r6, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018128: e5973000 ldr r3, [r7]
a001812c: e1500003 cmp r0, r3
a0018130: 9a00001a bls a00181a0 <rtems_timer_fire_when+0xcc>
a0018134: e59f0074 ldr r0, [pc, #116] ; a00181b0 <rtems_timer_fire_when+0xdc>
a0018138: e1a01004 mov r1, r4
a001813c: e1a0200d mov r2, sp
a0018140: eb000ab3 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018144: e59da000 ldr sl, [sp]
a0018148: e1a09000 mov r9, r0
a001814c: e35a0000 cmp sl, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018150: 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 ) {
a0018154: 1a000012 bne a00181a4 <rtems_timer_fire_when+0xd0>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0018158: e289b010 add fp, r9, #16
a001815c: e1a0000b mov r0, fp
a0018160: eb001209 bl a001c98c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY;
a0018164: e3a03002 mov r3, #2
a0018168: e5893038 str r3, [r9, #56] ; 0x38
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
a001816c: e5973000 ldr r3, [r7]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0018170: e59f003c ldr r0, [pc, #60] ; a00181b4 <rtems_timer_fire_when+0xe0>
a0018174: e1a0100b mov r1, fp
a0018178: e0636006 rsb r6, r3, r6
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001817c: e589a018 str sl, [r9, #24]
the_watchdog->routine = routine;
a0018180: e589502c str r5, [r9, #44] ; 0x2c
the_watchdog->id = id;
a0018184: e5894030 str r4, [r9, #48] ; 0x30
the_watchdog->user_data = user_data;
a0018188: e5898034 str r8, [r9, #52] ; 0x34
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
a001818c: e589601c str r6, [r9, #28]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
a0018190: eb0011a5 bl a001c82c <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
a0018194: eb000d6f bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a0018198: e1a0000a mov r0, sl
a001819c: ea000000 b a00181a4 <rtems_timer_fire_when+0xd0>
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a00181a0: e3a00014 mov r0, #20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00181a4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
a00181b8 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a00181b8: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a00181bc: e2514000 subs r4, r1, #0 <== NOT EXECUTED
rtems_status_code rtems_timer_get_information(
rtems_id id,
rtems_timer_information *the_info
)
{
a00181c0: e1a03000 mov r3, r0 <== NOT EXECUTED
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
a00181c4: 03a00009 moveq r0, #9 <== NOT EXECUTED
)
{
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
a00181c8: 0a000011 beq a0018214 <rtems_timer_get_information+0x5c> <== NOT EXECUTED
a00181cc: e59f0044 ldr r0, [pc, #68] ; a0018218 <rtems_timer_get_information+0x60><== NOT EXECUTED
a00181d0: e1a01003 mov r1, r3 <== NOT EXECUTED
a00181d4: e1a0200d mov r2, sp <== NOT EXECUTED
a00181d8: eb000a8d bl a001ac14 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a00181dc: e59d5000 ldr r5, [sp] <== NOT EXECUTED
a00181e0: e3550000 cmp r5, #0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a00181e4: 13a00004 movne r0, #4 <== NOT EXECUTED
if ( !the_info )
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a00181e8: 1a000009 bne a0018214 <rtems_timer_get_information+0x5c> <== NOT EXECUTED
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
a00181ec: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
a00181f0: e5843000 str r3, [r4] <== NOT EXECUTED
the_info->initial = the_timer->Ticker.initial;
a00181f4: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
a00181f8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
the_info->start_time = the_timer->Ticker.start_time;
a00181fc: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
a0018200: e5843008 str r3, [r4, #8] <== NOT EXECUTED
the_info->stop_time = the_timer->Ticker.stop_time;
a0018204: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
a0018208: e584300c str r3, [r4, #12] <== NOT EXECUTED
_Thread_Enable_dispatch();
a001820c: eb000d51 bl a001b758 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
a0018210: e1a00005 mov r0, r5 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018214: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
a001824c <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
a001824c: e92d4071 push {r0, r4, r5, r6, lr}
a0018250: e1a01000 mov r1, r0
a0018254: e1a0200d mov r2, sp
a0018258: e59f0078 ldr r0, [pc, #120] ; a00182d8 <rtems_timer_reset+0x8c>
a001825c: eb000a6c bl a001ac14 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018260: e59d5000 ldr r5, [sp]
a0018264: e1a06000 mov r6, r0
a0018268: e3550000 cmp r5, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a001826c: 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 ) {
a0018270: 1a000016 bne a00182d0 <rtems_timer_reset+0x84>
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
a0018274: e5904038 ldr r4, [r0, #56] ; 0x38
a0018278: e3540000 cmp r4, #0
a001827c: 1a000006 bne a001829c <rtems_timer_reset+0x50>
_Watchdog_Remove( &the_timer->Ticker );
a0018280: e2806010 add r6, r0, #16
a0018284: e1a00006 mov r0, r6
a0018288: eb0011bf bl a001c98c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
a001828c: e59f0048 ldr r0, [pc, #72] ; a00182dc <rtems_timer_reset+0x90>
a0018290: e1a01006 mov r1, r6
a0018294: eb001164 bl a001c82c <_Watchdog_Insert>
a0018298: ea00000b b a00182cc <rtems_timer_reset+0x80>
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
a001829c: 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;
a00182a0: 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 ) {
a00182a4: 1a000008 bne a00182cc <rtems_timer_reset+0x80> <== NOT EXECUTED
Timer_server_Control *timer_server = _Timer_server;
a00182a8: e59f3030 ldr r3, [pc, #48] ; a00182e0 <rtems_timer_reset+0x94><== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a00182ac: 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;
a00182b0: e5934000 ldr r4, [r3] <== NOT EXECUTED
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
a00182b4: eb0011b4 bl a001c98c <_Watchdog_Remove> <== NOT EXECUTED
(*timer_server->schedule_operation)( timer_server, the_timer );
a00182b8: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
a00182bc: e1a00004 mov r0, r4 <== NOT EXECUTED
a00182c0: e1a01006 mov r1, r6 <== NOT EXECUTED
a00182c4: e12fff33 blx r3 <== NOT EXECUTED
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
a00182c8: e1a04005 mov r4, r5 <== 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();
a00182cc: eb000d21 bl a001b758 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00182d0: e1a00004 mov r0, r4
a00182d4: e8bd8078 pop {r3, r4, r5, r6, pc}
a00182e4 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182e4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
a00182e8: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a00182ec: e59f30b8 ldr r3, [pc, #184] ; a00183ac <rtems_timer_server_fire_after+0xc8>
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182f0: e1a05000 mov r5, r0
a00182f4: e1a04001 mov r4, r1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
a00182f8: e5937000 ldr r7, [r3]
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00182fc: e1a06002 mov r6, r2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0018300: e3570000 cmp r7, #0
return RTEMS_INCORRECT_STATE;
a0018304: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a0018308: 0a000026 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
return RTEMS_INCORRECT_STATE;
if ( !routine )
a001830c: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a0018310: 03a00009 moveq r0, #9
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
a0018314: 0a000023 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0018318: e3510000 cmp r1, #0
return RTEMS_INVALID_NUMBER;
a001831c: 03a0000a moveq r0, #10
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
a0018320: 0a000020 beq a00183a8 <rtems_timer_server_fire_after+0xc4>
a0018324: e59f0084 ldr r0, [pc, #132] ; a00183b0 <rtems_timer_server_fire_after+0xcc>
a0018328: e1a01005 mov r1, r5
a001832c: e1a0200d mov r2, sp
a0018330: eb000a37 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018334: e59d3000 ldr r3, [sp]
a0018338: e1a0a000 mov sl, r0
a001833c: e3530000 cmp r3, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018340: 13a00004 movne r0, #4
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018344: 1a000017 bne a00183a8 <rtems_timer_server_fire_after+0xc4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a0018348: e28a0010 add r0, sl, #16
a001834c: eb00118e bl a001c98c <_Watchdog_Remove>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
a0018350: e10f3000 mrs r3, CPSR
a0018354: e3832080 orr r2, r3, #128 ; 0x80
a0018358: 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 ) {
a001835c: e59a2018 ldr r2, [sl, #24]
a0018360: e3520000 cmp r2, #0
a0018364: 0a000001 beq a0018370 <rtems_timer_server_fire_after+0x8c>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
a0018368: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
a001836c: ea00000b b a00183a0 <rtems_timer_server_fire_after+0xbc> <== NOT EXECUTED
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
a0018370: e3a01001 mov r1, #1
a0018374: e58a1038 str r1, [sl, #56] ; 0x38
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a0018378: e58a2018 str r2, [sl, #24]
the_watchdog->routine = routine;
a001837c: e58a602c str r6, [sl, #44] ; 0x2c
the_watchdog->id = id;
a0018380: e58a5030 str r5, [sl, #48] ; 0x30
the_watchdog->user_data = user_data;
a0018384: e58a8034 str r8, [sl, #52] ; 0x34
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
a0018388: e58a401c str r4, [sl, #28]
a001838c: e129f003 msr CPSR_fc, r3
_ISR_Enable( level );
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018390: e5973004 ldr r3, [r7, #4]
a0018394: e1a00007 mov r0, r7
a0018398: e1a0100a mov r1, sl
a001839c: e12fff33 blx r3
_Thread_Enable_dispatch();
a00183a0: eb000cec bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a00183a4: e3a00000 mov r0, #0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a00183a8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
a00183b4 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183b4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
a00183b8: e1a0a003 mov sl, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a00183bc: e59f30d8 ldr r3, [pc, #216] ; a001849c <rtems_timer_server_fire_when+0xe8>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183c0: e1a04000 mov r4, r0
a00183c4: e1a07001 mov r7, r1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
a00183c8: e5936000 ldr r6, [r3]
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
a00183cc: e1a05002 mov r5, r2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a00183d0: e3560000 cmp r6, #0
return RTEMS_INCORRECT_STATE;
a00183d4: 03a0000e moveq r0, #14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
a00183d8: 0a00002e beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a00183dc: e59f30bc ldr r3, [pc, #188] ; a00184a0 <rtems_timer_server_fire_when+0xec>
a00183e0: e5d33000 ldrb r3, [r3]
a00183e4: e3530000 cmp r3, #0
return RTEMS_NOT_DEFINED;
a00183e8: 03a0000b moveq r0, #11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
a00183ec: 0a000029 beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_NOT_DEFINED;
if ( !routine )
a00183f0: e3520000 cmp r2, #0
return RTEMS_INVALID_ADDRESS;
a00183f4: 03a00009 moveq r0, #9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
a00183f8: 0a000026 beq a0018498 <rtems_timer_server_fire_when+0xe4>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
a00183fc: e1a00001 mov r0, r1
a0018400: ebfff47b bl a00155f4 <_TOD_Validate>
a0018404: e3500000 cmp r0, #0
a0018408: 0a000021 beq a0018494 <rtems_timer_server_fire_when+0xe0>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a001840c: e1a00007 mov r0, r7
a0018410: ebfff454 bl a0015568 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
a0018414: e59f8088 ldr r8, [pc, #136] ; a00184a4 <rtems_timer_server_fire_when+0xf0>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
a0018418: e1a07000 mov r7, r0
if ( seconds <= _TOD_Seconds_since_epoch() )
a001841c: e5983000 ldr r3, [r8]
a0018420: e1500003 cmp r0, r3
a0018424: 9a00001a bls a0018494 <rtems_timer_server_fire_when+0xe0>
a0018428: e59f0078 ldr r0, [pc, #120] ; a00184a8 <rtems_timer_server_fire_when+0xf4>
a001842c: e1a01004 mov r1, r4
a0018430: e1a0200d mov r2, sp
a0018434: eb0009f6 bl a001ac14 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
a0018438: e59d9000 ldr r9, [sp]
a001843c: e1a0b000 mov fp, r0
a0018440: e3590000 cmp r9, #0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
a0018444: 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 ) {
a0018448: 1a000012 bne a0018498 <rtems_timer_server_fire_when+0xe4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
a001844c: e28b0010 add r0, fp, #16
a0018450: eb00114d bl a001c98c <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
a0018454: e3a03003 mov r3, #3
a0018458: e58b3038 str r3, [fp, #56] ; 0x38
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
a001845c: e5983000 ldr r3, [r8]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018460: e1a00006 mov r0, r6
a0018464: e1a0100b mov r1, fp
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();
a0018468: e0637007 rsb r7, r3, r7
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
a001846c: e58b9018 str r9, [fp, #24]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018470: e5963004 ldr r3, [r6, #4]
the_watchdog->routine = routine;
a0018474: e58b502c str r5, [fp, #44] ; 0x2c
the_watchdog->id = id;
a0018478: e58b4030 str r4, [fp, #48] ; 0x30
the_watchdog->user_data = user_data;
a001847c: e58ba034 str sl, [fp, #52] ; 0x34
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();
a0018480: e58b701c str r7, [fp, #28]
(*timer_server->schedule_operation)( timer_server, the_timer );
a0018484: e12fff33 blx r3
_Thread_Enable_dispatch();
a0018488: eb000cb2 bl a001b758 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
a001848c: e1a00009 mov r0, r9
a0018490: ea000000 b a0018498 <rtems_timer_server_fire_when+0xe4>
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
a0018494: e3a00014 mov r0, #20 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
a0018498: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}