RTEMS 4.9.6Annotated Report
Sun Jul 24 18:33:30 2011
00005214 <_API_Mutex_Unlock>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
5214: e59f3024 ldr r3, [pc, #36] ; 5240 <_API_Mutex_Unlock+0x2c>
5218: e5932000 ldr r2, [r3]
521c: e2822001 add r2, r2, #1 ; 0x1
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
5220: e52de004 push {lr} ; (str lr, [sp, #-4]!)
5224: e5832000 str r2, [r3]
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
5228: e3a02000 mov r2, #0 ; 0x0
522c: e5901008 ldr r1, [r0, #8]
5230: e2800010 add r0, r0, #16 ; 0x10
5234: eb00008a bl 5464 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
}
5238: e49de004 pop {lr} ; (ldr lr, [sp], #4)
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
523c: ea000583 b 6850 <_Thread_Enable_dispatch>
000050dc <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
50dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
50e0: e59f5030 ldr r5, [pc, #48] ; 5118 <_API_extensions_Run_postswitch+0x3c><== NOT EXECUTED
50e4: e4954004 ldr r4, [r5], #4 <== NOT EXECUTED
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
50e8: e1540005 cmp r4, r5 <== NOT EXECUTED
50ec: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
50f0: e59f6024 ldr r6, [pc, #36] ; 511c <_API_extensions_Run_postswitch+0x40><== NOT EXECUTED
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
50f4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
50f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
(*the_extension->postswitch_hook)( _Thread_Executing );
50fc: 15960000 ldrne r0, [r6] <== NOT EXECUTED
5100: 11a0e00f movne lr, pc <== NOT EXECUTED
5104: 112fff13 bxne r3 <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
5108: e5944000 ldr r4, [r4] <== NOT EXECUTED
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
510c: e1540005 cmp r4, r5 <== NOT EXECUTED
5110: 1afffff7 bne 50f4 <_API_extensions_Run_postswitch+0x18> <== NOT EXECUTED
5114: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009934 <_Barrier_Manager_initialization>:
*/
void _Barrier_Manager_initialization(
uint32_t maximum_barriers
)
{
9934: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
9938: e3a0c060 mov ip, #96 ; 0x60
*/
void _Barrier_Manager_initialization(
uint32_t maximum_barriers
)
{
993c: e24dd00c sub sp, sp, #12 ; 0xc
9940: e1a03000 mov r3, r0
_Objects_Initialize_information(
9944: e58dc000 str ip, [sp]
9948: e3a0e000 mov lr, #0 ; 0x0
994c: e24cc05c sub ip, ip, #92 ; 0x5c
9950: e59f0018 ldr r0, [pc, #24] ; 9970 <_Barrier_Manager_initialization+0x3c>
9954: e3a01002 mov r1, #2 ; 0x2
9958: e3a0200a mov r2, #10 ; 0xa
995c: e58de004 str lr, [sp, #4]
9960: e58dc008 str ip, [sp, #8]
9964: ebfff191 bl 5fb0 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
9968: e28dd00c add sp, sp, #12 ; 0xc
996c: e8bd8000 pop {pc}
0001365c <_CORE_message_queue_Broadcast>:
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
1365c: e590304c ldr r3, [r0, #76]
13660: e1530002 cmp r3, r2
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
13664: e92d41f0 push {r4, r5, r6, r7, r8, lr}
13668: e1a07000 mov r7, r0
1366c: e1a06002 mov r6, r2
13670: e1a08001 mov r8, r1
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
13674: 33a00001 movcc r0, #1 ; 0x1
13678: 38bd81f0 popcc {r4, r5, r6, r7, r8, pc}
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
1367c: e5973048 ldr r3, [r7, #72]
13680: e3530000 cmp r3, #0 ; 0x0
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
13684: 01a05003 moveq r5, r3
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
13688: 0a000009 beq 136b4 <_CORE_message_queue_Broadcast+0x58>
*count = 0;
1368c: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
13690: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
13694: e5823000 str r3, [r2] <== NOT EXECUTED
13698: e1a00003 mov r0, r3 <== NOT EXECUTED
1369c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
136a0: e594002c ldr r0, [r4, #44]
136a4: eb001e1b bl 1af18 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
136a8: e5943028 ldr r3, [r4, #40]
136ac: e5836000 str r6, [r3]
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
136b0: e2855001 add r5, r5, #1 ; 0x1
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
136b4: e1a00007 mov r0, r7
136b8: eb00099d bl 15d34 <_Thread_queue_Dequeue>
136bc: e2504000 subs r4, r0, #0 ; 0x0
136c0: e1a01008 mov r1, r8
136c4: e1a02006 mov r2, r6
136c8: 1afffff4 bne 136a0 <_CORE_message_queue_Broadcast+0x44>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
136cc: e59d301c ldr r3, [sp, #28]
136d0: e1a00004 mov r0, r4
136d4: e5835000 str r5, [r3]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
136d8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000195c4 <_CORE_message_queue_Insert_message>:
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
switch ( submit_type ) {
195c4: e3520102 cmp r2, #-2147483648 ; 0x80000000
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
195c8: e92d4030 push {r4, r5, lr}
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
195cc: e5812008 str r2, [r1, #8]
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
195d0: e1a05001 mov r5, r1
195d4: e1a04000 mov r4, r0
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
switch ( submit_type ) {
195d8: 0a000037 beq 196bc <_CORE_message_queue_Insert_message+0xf8>
195dc: e3720106 cmn r2, #-2147483647 ; 0x80000001
195e0: 0a000023 beq 19674 <_CORE_message_queue_Insert_message+0xb0>
CORE_message_queue_Buffer_control *this_message;
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
195e4: e5901050 ldr r1, [r0, #80] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
195e8: e2800054 add r0, r0, #84 ; 0x54 <== NOT EXECUTED
while ( !_Chain_Is_tail( the_header, the_node ) ) {
195ec: e1500001 cmp r0, r1 <== NOT EXECUTED
195f0: 1a00001b bne 19664 <_CORE_message_queue_Insert_message+0xa0><== NOT EXECUTED
195f4: e1a01000 mov r1, r0 <== NOT EXECUTED
continue;
}
break;
}
_ISR_Disable( level );
195f8: e10fc000 mrs ip, CPSR <== NOT EXECUTED
195fc: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED
19600: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_message_queue->number_of_pending_messages++ == 0 )
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
19604: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
}
break;
}
_ISR_Disable( level );
if ( the_message_queue->number_of_pending_messages++ == 0 )
19608: e5941048 ldr r1, [r4, #72] <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
1960c: e5930000 ldr r0, [r3] <== NOT EXECUTED
19610: e2812001 add r2, r1, #1 ; 0x1 <== NOT EXECUTED
after_node->next = the_node;
19614: e5835000 str r5, [r3] <== NOT EXECUTED
19618: e5842048 str r2, [r4, #72] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
1961c: e5853004 str r3, [r5, #4] <== NOT EXECUTED
19620: e2712001 rsbs r2, r1, #1 ; 0x1 <== NOT EXECUTED
19624: 33a02000 movcc r2, #0 ; 0x0 <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
19628: e5805004 str r5, [r0, #4] <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
1962c: e5850000 str r0, [r5] <== NOT EXECUTED
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
19630: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
19634: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
19638: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
1963c: e5943060 ldr r3, [r4, #96]
19640: e3530000 cmp r3, #0 ; 0x0
19644: 08bd8030 popeq {r4, r5, pc}
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
19648: e5940064 ldr r0, [r4, #100] <== NOT EXECUTED
1964c: e1a0e00f mov lr, pc <== NOT EXECUTED
19650: e12fff13 bx r3 <== NOT EXECUTED
19654: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
while ( !_Chain_Is_tail( the_header, the_node ) ) {
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
the_node = the_node->next;
19658: e5911000 ldr r1, [r1] <== NOT EXECUTED
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
1965c: e1500001 cmp r0, r1 <== NOT EXECUTED
19660: 0affffe3 beq 195f4 <_CORE_message_queue_Insert_message+0x30><== NOT EXECUTED
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
19664: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
19668: e1520003 cmp r2, r3 <== NOT EXECUTED
1966c: aafffff9 bge 19658 <_CORE_message_queue_Insert_message+0x94><== NOT EXECUTED
19670: eaffffe0 b 195f8 <_CORE_message_queue_Insert_message+0x34> <== NOT EXECUTED
the_message->priority = submit_type;
switch ( submit_type ) {
case CORE_MESSAGE_QUEUE_SEND_REQUEST:
_ISR_Disable( level );
19674: e10f0000 mrs r0, CPSR
19678: e38030c0 orr r3, r0, #192 ; 0xc0
1967c: e129f003 msr CPSR_fc, r3
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
19680: e2843054 add r3, r4, #84 ; 0x54
19684: e5813000 str r3, [r1]
if ( the_message_queue->number_of_pending_messages++ == 0 )
19688: e5942048 ldr r2, [r4, #72]
old_last_node = the_chain->last;
1968c: e5941058 ldr r1, [r4, #88]
19690: e2823001 add r3, r2, #1 ; 0x1
the_chain->last = the_node;
19694: e5845058 str r5, [r4, #88]
19698: e5843048 str r3, [r4, #72]
1969c: e2722001 rsbs r2, r2, #1 ; 0x1
196a0: 33a02000 movcc r2, #0 ; 0x0
old_last_node->next = the_node;
the_node->previous = old_last_node;
196a4: e5851004 str r1, [r5, #4]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
196a8: e5815000 str r5, [r1]
notify = true;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
196ac: e129f000 msr CPSR_fc, r0
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
196b0: e3520000 cmp r2, #0 ; 0x0
196b4: 1affffe0 bne 1963c <_CORE_message_queue_Insert_message+0x78>
196b8: e8bd8030 pop {r4, r5, pc}
notify = true;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
break;
case CORE_MESSAGE_QUEUE_URGENT_REQUEST:
_ISR_Disable( level );
196bc: e10fc000 mrs ip, CPSR
196c0: e38c30c0 orr r3, ip, #192 ; 0xc0
196c4: e129f003 msr CPSR_fc, r3
if ( the_message_queue->number_of_pending_messages++ == 0 )
196c8: e5901048 ldr r1, [r0, #72]
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
196cc: e5900050 ldr r0, [r0, #80]
196d0: e2812001 add r2, r1, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
196d4: e2843050 add r3, r4, #80 ; 0x50
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
196d8: e5853004 str r3, [r5, #4]
196dc: e5842048 str r2, [r4, #72]
before_node = after_node->next;
after_node->next = the_node;
196e0: e5845050 str r5, [r4, #80]
the_node->next = before_node;
before_node->previous = the_node;
196e4: e5805004 str r5, [r0, #4]
196e8: e2712001 rsbs r2, r1, #1 ; 0x1
196ec: 33a02000 movcc r2, #0 ; 0x0
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
196f0: e5850000 str r0, [r5]
notify = true;
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
196f4: e129f00c msr CPSR_fc, ip
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
196f8: e3520000 cmp r2, #0 ; 0x0
196fc: 1affffce bne 1963c <_CORE_message_queue_Insert_message+0x78>
19700: e8bd8030 pop {r4, r5, pc}
00013840 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
13840: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
13844: e59f8118 ldr r8, [pc, #280] ; 13964 <_CORE_message_queue_Seize+0x124>
13848: e598c000 ldr ip, [r8]
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
1384c: e1a05000 mov r5, r0
13850: e1a00003 mov r0, r3
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
13854: e3a03000 mov r3, #0 ; 0x0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
13858: e1a07002 mov r7, r2
1385c: e59da020 ldr sl, [sp, #32]
13860: e5dd201c ldrb r2, [sp, #28]
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
13864: e58c3034 str r3, [ip, #52]
_ISR_Disable( level );
13868: e10f6000 mrs r6, CPSR
1386c: e38630c0 orr r3, r6, #192 ; 0xc0
13870: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
13874: e5954050 ldr r4, [r5, #80]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
13878: e2853054 add r3, r5, #84 ; 0x54
1387c: e1540003 cmp r4, r3
13880: 0a000021 beq 1390c <_CORE_message_queue_Seize+0xcc>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
13884: e5941000 ldr r1, [r4]
the_chain->first = new_first;
13888: e1a03005 mov r3, r5
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
1388c: e5952048 ldr r2, [r5, #72]
13890: e5a31050 str r1, [r3, #80]!
13894: e2422001 sub r2, r2, #1 ; 0x1
new_first->previous = _Chain_Head(the_chain);
13898: e5813004 str r3, [r1, #4]
1389c: e5852048 str r2, [r5, #72]
_ISR_Enable( level );
138a0: e129f006 msr CPSR_fc, r6
*size_p = the_message->Contents.size;
138a4: e594300c ldr r3, [r4, #12]
_Thread_Executing->Wait.count = the_message->priority;
138a8: e5981000 ldr r1, [r8]
138ac: e5942008 ldr r2, [r4, #8]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
138b0: e5803000 str r3, [r0]
_Thread_Executing->Wait.count = the_message->priority;
138b4: e5812024 str r2, [r1, #36]
_CORE_message_queue_Copy_buffer(the_message->Contents.buffer,buffer,*size_p);
138b8: e2846010 add r6, r4, #16 ; 0x10
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
138bc: e5902000 ldr r2, [r0]
138c0: e1a01006 mov r1, r6
138c4: e1a00007 mov r0, r7
138c8: eb001d92 bl 1af18 <memcpy>
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
138cc: e1a00005 mov r0, r5
138d0: eb000917 bl 15d34 <_Thread_queue_Dequeue>
if ( !the_thread ) {
138d4: e2501000 subs r1, r0, #0 ; 0x0
138d8: 0a00001d beq 13954 <_CORE_message_queue_Seize+0x114>
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
138dc: e5913024 ldr r3, [r1, #36] <== NOT EXECUTED
the_message->Contents.size = (size_t) the_thread->Wait.option;
138e0: e5912030 ldr r2, [r1, #48] <== NOT EXECUTED
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
138e4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
the_message->Contents.size = (size_t) the_thread->Wait.option;
138e8: e584200c str r2, [r4, #12] <== NOT EXECUTED
138ec: e1a00006 mov r0, r6 <== NOT EXECUTED
138f0: e591102c ldr r1, [r1, #44] <== NOT EXECUTED
138f4: eb001d87 bl 1af18 <memcpy> <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
138f8: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
138fc: e1a00005 mov r0, r5 <== NOT EXECUTED
13900: e1a01004 mov r1, r4 <== NOT EXECUTED
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
13904: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
13908: ea00172d b 195c4 <_CORE_message_queue_Insert_message> <== NOT EXECUTED
the_message->priority
);
return;
}
if ( !wait ) {
1390c: e3520000 cmp r2, #0 ; 0x0
13910: 1a000003 bne 13924 <_CORE_message_queue_Seize+0xe4>
_ISR_Enable( level );
13914: e129f006 msr CPSR_fc, r6
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
13918: e3a03004 mov r3, #4 ; 0x4
1391c: e58c3034 str r3, [ip, #52]
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
13920: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
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;
13924: e3a03001 mov r3, #1 ; 0x1
13928: e5853030 str r3, [r5, #48]
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
1392c: e58c0028 str r0, [ip, #40]
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
13930: e58c1020 str r1, [ip, #32]
executing->Wait.return_argument_second.mutable_object = buffer;
13934: e58c702c str r7, [ip, #44]
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
13938: e58c5044 str r5, [ip, #68]
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
1393c: e129f006 msr CPSR_fc, r6
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
13940: e59f2020 ldr r2, [pc, #32] ; 13968 <_CORE_message_queue_Seize+0x128>
13944: e1a00005 mov r0, r5
13948: e1a0100a mov r1, sl
}
1394c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
13950: ea000959 b 15ebc <_Thread_queue_Enqueue_with_handler>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
13954: e2850068 add r0, r5, #104 ; 0x68
13958: e1a01004 mov r1, r4
}
1395c: e8bd45f0 pop {r4, r5, r6, r7, r8, sl, lr}
13960: eaffff0e b 135a0 <_Chain_Append>
0001396c <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
1396c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
13970: e590c04c ldr ip, [r0, #76]
13974: e15c0002 cmp ip, r2
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
13978: e1a04000 mov r4, r0
1397c: e1a07002 mov r7, r2
13980: e1a0a001 mov sl, r1
13984: e1a09003 mov r9, r3
13988: e5dd8028 ldrb r8, [sp, #40]
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
1398c: 33a00001 movcc r0, #1 ; 0x1
13990: 38bd87f0 popcc {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
13994: e5945048 ldr r5, [r4, #72]
13998: e3550000 cmp r5, #0 ; 0x0
1399c: 0a00001d beq 13a18 <_CORE_message_queue_Submit+0xac>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
139a0: e5943044 ldr r3, [r4, #68]
139a4: e1530005 cmp r3, r5
139a8: 8a00002a bhi 13a58 <_CORE_message_queue_Submit+0xec>
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
139ac: e3580000 cmp r8, #0 ; 0x0
139b0: 03a00002 moveq r0, #2 ; 0x2
139b4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc}
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
139b8: e59f30dc ldr r3, [pc, #220] ; 13a9c <_CORE_message_queue_Submit+0x130><== NOT EXECUTED
139bc: e5932000 ldr r2, [r3] <== NOT EXECUTED
139c0: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
139c4: 1a000021 bne 13a50 <_CORE_message_queue_Submit+0xe4> <== NOT EXECUTED
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
139c8: e59f30d0 ldr r3, [pc, #208] ; 13aa0 <_CORE_message_queue_Submit+0x134><== NOT EXECUTED
139cc: e5932000 ldr r2, [r3] <== NOT EXECUTED
_ISR_Disable( level );
139d0: e10f1000 mrs r1, CPSR <== NOT EXECUTED
139d4: e38130c0 orr r3, r1, #192 ; 0xc0 <== NOT EXECUTED
139d8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
139dc: e59d3024 ldr r3, [sp, #36] <== NOT EXECUTED
139e0: e5823024 str r3, [r2, #36] <== NOT EXECUTED
139e4: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
139e8: e5843030 str r3, [r4, #48] <== NOT EXECUTED
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
139ec: e5829020 str r9, [r2, #32] <== NOT EXECUTED
executing->Wait.return_argument_second.immutable_object = buffer;
139f0: e582a02c str sl, [r2, #44] <== NOT EXECUTED
executing->Wait.option = (uint32_t) size;
139f4: e5827030 str r7, [r2, #48] <== NOT EXECUTED
{
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
139f8: e5824044 str r4, [r2, #68] <== NOT EXECUTED
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
139fc: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
13a00: e59f209c ldr r2, [pc, #156] ; 13aa4 <_CORE_message_queue_Submit+0x138><== NOT EXECUTED
13a04: e1a00004 mov r0, r4 <== NOT EXECUTED
13a08: e59d102c ldr r1, [sp, #44] <== NOT EXECUTED
13a0c: eb00092a bl 15ebc <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
13a10: e3a00007 mov r0, #7 ; 0x7 <== NOT EXECUTED
13a14: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
13a18: eb0008c5 bl 15d34 <_Thread_queue_Dequeue>
if ( the_thread ) {
13a1c: e2506000 subs r6, r0, #0 ; 0x0
13a20: 05945048 ldreq r5, [r4, #72]
13a24: 0affffdd beq 139a0 <_CORE_message_queue_Submit+0x34>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
13a28: e1a0100a mov r1, sl
13a2c: e596002c ldr r0, [r6, #44]
13a30: e1a02007 mov r2, r7
13a34: eb001d37 bl 1af18 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
13a38: e5963028 ldr r3, [r6, #40]
13a3c: e5837000 str r7, [r3]
the_thread->Wait.count = submit_type;
13a40: e59d3024 ldr r3, [sp, #36]
13a44: e1a00005 mov r0, r5
13a48: e5863024 str r3, [r6, #36]
13a4c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
13a50: e3a00003 mov r0, #3 ; 0x3 <== NOT EXECUTED
}
13a54: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
13a58: e2840068 add r0, r4, #104 ; 0x68
13a5c: ebfffeda bl 135cc <_Chain_Get>
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
13a60: e2505000 subs r5, r0, #0 ; 0x0
13a64: 0afffff9 beq 13a50 <_CORE_message_queue_Submit+0xe4>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
13a68: e1a0100a mov r1, sl
13a6c: e1a02007 mov r2, r7
13a70: e2850010 add r0, r5, #16 ; 0x10
13a74: eb001d27 bl 1af18 <memcpy>
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
13a78: e59d3024 ldr r3, [sp, #36]
13a7c: e5853008 str r3, [r5, #8]
_CORE_message_queue_Insert_message(
13a80: e1a00004 mov r0, r4
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
13a84: e585700c str r7, [r5, #12]
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
13a88: e1a01005 mov r1, r5
13a8c: e59d2024 ldr r2, [sp, #36]
13a90: eb0016cb bl 195c4 <_CORE_message_queue_Insert_message>
13a94: e3a00000 mov r0, #0 ; 0x0
13a98: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00005274 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
5274: e92d40f0 push {r4, r5, r6, r7, lr}
5278: e1a05000 mov r5, r0
527c: e1a04002 mov r4, r2
5280: e1a07001 mov r7, r1
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
5284: e891000f ldm r1, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
5288: e3a06000 mov r6, #0 ; 0x0
if ( initial_lock == CORE_MUTEX_LOCKED ) {
528c: e3540000 cmp r4, #0 ; 0x0
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
5290: e285c040 add ip, r5, #64 ; 0x40
5294: e88c000f stm ip, {r0, r1, r2, r3}
the_mutex->lock = initial_lock;
5298: e5854050 str r4, [r5, #80]
the_mutex->blocked_count = 0;
529c: e5856058 str r6, [r5, #88]
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
52a0: 15856060 strne r6, [r5, #96]
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
52a4: 15856054 strne r6, [r5, #84]
the_mutex->holder = NULL;
52a8: 1585605c strne r6, [r5, #92]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
52ac: 1a00000b bne 52e0 <_CORE_mutex_Initialize+0x6c>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
52b0: e59f2070 ldr r2, [pc, #112] ; 5328 <_CORE_mutex_Initialize+0xb4>
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
52b4: e3a03001 mov r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
52b8: e5921000 ldr r1, [r2]
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
52bc: e5853054 str r3, [r5, #84]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
52c0: e5952048 ldr r2, [r5, #72]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
52c4: e5913008 ldr r3, [r1, #8]
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
52c8: e3520002 cmp r2, #2 ; 0x2
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
52cc: e5853060 str r3, [r5, #96]
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
52d0: e585105c str r1, [r5, #92]
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
52d4: 0a00000a beq 5304 <_CORE_mutex_Initialize+0x90>
52d8: e3520003 cmp r2, #3 ; 0x3
52dc: 0a000008 beq 5304 <_CORE_mutex_Initialize+0x90>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
52e0: e5971008 ldr r1, [r7, #8]
52e4: e1a00005 mov r0, r5
52e8: e2511000 subs r1, r1, #0 ; 0x0
52ec: 13a01001 movne r1, #1 ; 0x1
52f0: e3a02b01 mov r2, #1024 ; 0x400
52f4: e3a03005 mov r3, #5 ; 0x5
52f8: eb000768 bl 70a0 <_Thread_queue_Initialize>
52fc: e3a00000 mov r0, #0 ; 0x0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
5300: e8bd80f0 pop {r4, r5, r6, r7, pc}
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
5304: e595304c ldr r3, [r5, #76]
5308: e5912014 ldr r2, [r1, #20]
530c: e1520003 cmp r2, r3
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
5310: 2591301c ldrcs r3, [r1, #28]
5314: 22833001 addcs r3, r3, #1 ; 0x1
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
5318: 33a00006 movcc r0, #6 ; 0x6
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
531c: 2581301c strcs r3, [r1, #28]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
5320: 2affffee bcs 52e0 <_CORE_mutex_Initialize+0x6c>
5324: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0000532c <_CORE_mutex_Seize_interrupt_blocking>:
)
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
532c: e5903048 ldr r3, [r0, #72] <== NOT EXECUTED
5330: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
Watchdog_Interval timeout
)
{
Thread_Control *executing;
executing = _Thread_Executing;
5334: e59f3054 ldr r3, [pc, #84] ; 5390 <_CORE_mutex_Seize_interrupt_blocking+0x64><== NOT EXECUTED
void _CORE_mutex_Seize_interrupt_blocking(
CORE_mutex_Control *the_mutex,
Watchdog_Interval timeout
)
{
5338: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
533c: e1a05001 mov r5, r1 <== NOT EXECUTED
5340: e1a04000 mov r4, r0 <== NOT EXECUTED
Thread_Control *executing;
executing = _Thread_Executing;
5344: e5931000 ldr r1, [r3] <== NOT EXECUTED
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
5348: 0a000008 beq 5370 <_CORE_mutex_Seize_interrupt_blocking+0x44><== NOT EXECUTED
FALSE
);
}
}
the_mutex->blocked_count++;
534c: e5943058 ldr r3, [r4, #88] <== NOT EXECUTED
5350: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
5354: e5843058 str r3, [r4, #88] <== NOT EXECUTED
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
5358: e1a00004 mov r0, r4 <== NOT EXECUTED
535c: e1a01005 mov r1, r5 <== NOT EXECUTED
5360: e59f202c ldr r2, [pc, #44] ; 5394 <_CORE_mutex_Seize_interrupt_blocking+0x68><== NOT EXECUTED
5364: eb000681 bl 6d70 <_Thread_queue_Enqueue_with_handler> <== NOT EXECUTED
_Thread_Enable_dispatch();
}
5368: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
the_mutex->blocked_count++;
_Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout );
_Thread_Enable_dispatch();
536c: ea000537 b 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) {
if ( the_mutex->holder->current_priority > executing->current_priority ) {
5370: e590005c ldr r0, [r0, #92] <== NOT EXECUTED
5374: e5911014 ldr r1, [r1, #20] <== NOT EXECUTED
5378: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
537c: e1530001 cmp r3, r1 <== NOT EXECUTED
5380: 9afffff1 bls 534c <_CORE_mutex_Seize_interrupt_blocking+0x20><== NOT EXECUTED
_Thread_Change_priority(
5384: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
5388: eb0003be bl 6288 <_Thread_Change_priority> <== NOT EXECUTED
538c: eaffffee b 534c <_CORE_mutex_Seize_interrupt_blocking+0x20><== NOT EXECUTED
00009f64 <_CORE_mutex_Seize_interrupt_trylock>:
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
9f64: e59f313c ldr r3, [pc, #316] ; a0a8 <_CORE_mutex_Seize_interrupt_trylock+0x144>
9f68: e593c000 ldr ip, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
9f6c: e3a02000 mov r2, #0 ; 0x0
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
9f70: e92d4010 push {r4, lr}
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
9f74: e5914000 ldr r4, [r1]
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
9f78: e58c2034 str r2, [ip, #52]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
9f7c: e5903050 ldr r3, [r0, #80]
9f80: e1530002 cmp r3, r2
9f84: 0a00000d beq 9fc0 <_CORE_mutex_Seize_interrupt_trylock+0x5c>
the_mutex->lock = CORE_MUTEX_LOCKED;
9f88: e5802050 str r2, [r0, #80]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
9f8c: e5901048 ldr r1, [r0, #72]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
9f90: e59c2008 ldr r2, [ip, #8]
the_mutex->nest_count = 1;
9f94: e3a03001 mov r3, #1 ; 0x1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
9f98: e3510002 cmp r1, #2 ; 0x2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
9f9c: e5802060 str r2, [r0, #96]
the_mutex->nest_count = 1;
9fa0: e5803054 str r3, [r0, #84]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
9fa4: e580c05c str ip, [r0, #92]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
9fa8: 0a000009 beq 9fd4 <_CORE_mutex_Seize_interrupt_trylock+0x70>
9fac: e3510003 cmp r1, #3 ; 0x3 <== NOT EXECUTED
9fb0: 0a000007 beq 9fd4 <_CORE_mutex_Seize_interrupt_trylock+0x70><== NOT EXECUTED
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( level );
9fb4: e129f004 msr CPSR_fc, r4
9fb8: e3a00000 mov r0, #0 ; 0x0
9fbc: 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 ) ) {
9fc0: e590305c ldr r3, [r0, #92]
9fc4: e15c0003 cmp ip, r3
9fc8: 0a000017 beq a02c <_CORE_mutex_Seize_interrupt_trylock+0xc8>
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( level );
9fcc: e3a00001 mov r0, #1 ; 0x1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
9fd0: e8bd8010 pop {r4, pc}
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
9fd4: e59c301c ldr r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
9fd8: e3510003 cmp r1, #3 ; 0x3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
9fdc: e2833001 add r3, r3, #1 ; 0x1
9fe0: e58c301c str r3, [ip, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
9fe4: 1afffff2 bne 9fb4 <_CORE_mutex_Seize_interrupt_trylock+0x50>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
9fe8: e590204c ldr r2, [r0, #76] <== NOT EXECUTED
current = executing->current_priority;
9fec: e59c3014 ldr r3, [ip, #20] <== NOT EXECUTED
if ( current == ceiling ) {
9ff0: e1520003 cmp r2, r3 <== NOT EXECUTED
9ff4: 0a00001c beq a06c <_CORE_mutex_Seize_interrupt_trylock+0x108><== NOT EXECUTED
_ISR_Enable( level );
return 0;
}
if ( current > ceiling ) {
9ff8: 3a00001e bcc a078 <_CORE_mutex_Seize_interrupt_trylock+0x114><== NOT EXECUTED
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
9ffc: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a000: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a004: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
a008: e58c3034 str r3, [ip, #52] <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
a00c: e5802054 str r2, [r0, #84] <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
a010: e5801050 str r1, [r0, #80] <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
a014: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
a018: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
a01c: e58c301c str r3, [ip, #28] <== NOT EXECUTED
_ISR_Enable( level );
a020: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a024: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a028: e8bd8010 pop {r4, pc} <== NOT EXECUTED
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
a02c: e5903040 ldr r3, [r0, #64]
a030: e3530000 cmp r3, #0 ; 0x0
a034: 0a000006 beq a054 <_CORE_mutex_Seize_interrupt_trylock+0xf0>
a038: e3530001 cmp r3, #1 ; 0x1
a03c: 1affffe2 bne 9fcc <_CORE_mutex_Seize_interrupt_trylock+0x68>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
a040: e3a03002 mov r3, #2 ; 0x2
a044: e58c3034 str r3, [ip, #52]
_ISR_Enable( level );
a048: e129f004 msr CPSR_fc, r4
a04c: e3a00000 mov r0, #0 ; 0x0
a050: e8bd8010 pop {r4, pc}
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
a054: e5903054 ldr r3, [r0, #84]
a058: e2833001 add r3, r3, #1 ; 0x1
a05c: e5803054 str r3, [r0, #84]
_ISR_Enable( level );
a060: e129f004 msr CPSR_fc, r4
a064: e3a00000 mov r0, #0 ; 0x0
a068: e8bd8010 pop {r4, pc}
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( level );
a06c: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
a070: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a074: e8bd8010 pop {r4, pc} <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
a078: e59f202c ldr r2, [pc, #44] ; a0ac <_CORE_mutex_Seize_interrupt_trylock+0x148><== NOT EXECUTED
a07c: e5923000 ldr r3, [r2] <== NOT EXECUTED
a080: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
a084: e5823000 str r3, [r2] <== NOT EXECUTED
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( level );
a088: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
_Thread_Change_priority(
a08c: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
a090: e590104c ldr r1, [r0, #76] <== NOT EXECUTED
a094: e590005c ldr r0, [r0, #92] <== NOT EXECUTED
a098: ebfff07a bl 6288 <_Thread_Change_priority> <== NOT EXECUTED
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
a09c: ebfff1eb bl 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED
a0a0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
a0a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00005464 <_CORE_mutex_Surrender>:
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
5464: e5d03044 ldrb r3, [r0, #68]
5468: e3530000 cmp r3, #0 ; 0x0
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
546c: e92d4010 push {r4, lr}
5470: e1a04000 mov r4, r0
Thread_Control *the_thread;
Thread_Control *holder;
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
Chain_Node *first_node;
#endif
holder = the_mutex->holder;
5474: e590005c ldr r0, [r0, #92]
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
5478: 0a000004 beq 5490 <_CORE_mutex_Surrender+0x2c>
if ( !_Thread_Is_executing( holder ) )
547c: e59f3138 ldr r3, [pc, #312] ; 55bc <_CORE_mutex_Surrender+0x158>
5480: e5932000 ldr r2, [r3]
5484: e1500002 cmp r0, r2
5488: 13a00003 movne r0, #3 ; 0x3
548c: 18bd8010 popne {r4, pc}
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
5490: e5943054 ldr r3, [r4, #84]
5494: e3530000 cmp r3, #0 ; 0x0
5498: 0a000020 beq 5520 <_CORE_mutex_Surrender+0xbc>
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
549c: e2433001 sub r3, r3, #1 ; 0x1
if ( the_mutex->nest_count != 0 ) {
54a0: e3530000 cmp r3, #0 ; 0x0
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
54a4: e5843054 str r3, [r4, #84]
if ( the_mutex->nest_count != 0 ) {
54a8: 1a00001e bne 5528 <_CORE_mutex_Surrender+0xc4>
54ac: e5942048 ldr r2, [r4, #72]
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
54b0: e3520002 cmp r2, #2 ; 0x2
54b4: 0a00002c beq 556c <_CORE_mutex_Surrender+0x108>
54b8: e3520003 cmp r2, #3 ; 0x3
54bc: 0a00002a beq 556c <_CORE_mutex_Surrender+0x108>
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
54c0: e3a03000 mov r3, #0 ; 0x0
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
54c4: e3520002 cmp r2, #2 ; 0x2
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
54c8: e5843060 str r3, [r4, #96]
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
54cc: e584305c str r3, [r4, #92]
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
54d0: 0a00001b beq 5544 <_CORE_mutex_Surrender+0xe0>
54d4: e3520003 cmp r2, #3 ; 0x3
54d8: 0a000019 beq 5544 <_CORE_mutex_Surrender+0xe0>
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
54dc: e1a00004 mov r0, r4
54e0: eb0005c0 bl 6be8 <_Thread_queue_Dequeue>
54e4: e2501000 subs r1, r0, #0 ; 0x0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
54e8: 03a03001 moveq r3, #1 ; 0x1
54ec: 05843050 streq r3, [r4, #80]
54f0: 01a00001 moveq r0, r1
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
54f4: 08bd8010 popeq {r4, pc}
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
54f8: e594c048 ldr ip, [r4, #72]
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
54fc: e5912008 ldr r2, [r1, #8]
the_mutex->nest_count = 1;
5500: e3a03001 mov r3, #1 ; 0x1
switch ( the_mutex->Attributes.discipline ) {
5504: e35c0002 cmp ip, #2 ; 0x2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
5508: e5842060 str r2, [r4, #96]
the_mutex->nest_count = 1;
550c: e5843054 str r3, [r4, #84]
} else
#endif
{
the_mutex->holder = the_thread;
5510: e584105c str r1, [r4, #92]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
5514: 0a000023 beq 55a8 <_CORE_mutex_Surrender+0x144>
5518: e35c0003 cmp ip, #3 ; 0x3
551c: 0a000016 beq 557c <_CORE_mutex_Surrender+0x118>
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
5520: e3a00000 mov r0, #0 ; 0x0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
5524: e8bd8010 pop {r4, pc}
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
5528: e5943040 ldr r3, [r4, #64]
552c: e3530000 cmp r3, #0 ; 0x0
5530: 0afffffa beq 5520 <_CORE_mutex_Surrender+0xbc>
5534: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
5538: 03a00002 moveq r0, #2 ; 0x2 <== NOT EXECUTED
553c: 1affffda bne 54ac <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED
5540: e8bd8010 pop {r4, pc} <== NOT EXECUTED
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
5544: e590301c ldr r3, [r0, #28]
5548: e3530000 cmp r3, #0 ; 0x0
554c: 1affffe2 bne 54dc <_CORE_mutex_Surrender+0x78>
5550: e5901018 ldr r1, [r0, #24]
5554: e5903014 ldr r3, [r0, #20]
5558: e1510003 cmp r1, r3
555c: 0affffde beq 54dc <_CORE_mutex_Surrender+0x78>
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
5560: e3a02001 mov r2, #1 ; 0x1
5564: eb000347 bl 6288 <_Thread_Change_priority>
5568: eaffffdb b 54dc <_CORE_mutex_Surrender+0x78>
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
556c: e590301c ldr r3, [r0, #28]
5570: e2433001 sub r3, r3, #1 ; 0x1
5574: e580301c str r3, [r0, #28]
5578: eaffffd0 b 54c0 <_CORE_mutex_Surrender+0x5c>
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
557c: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
5580: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
5584: e581301c str r3, [r1, #28] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
5588: e5912014 ldr r2, [r1, #20] <== NOT EXECUTED
558c: e594104c ldr r1, [r4, #76] <== NOT EXECUTED
5590: e1510002 cmp r1, r2 <== NOT EXECUTED
5594: 2affffe1 bcs 5520 <_CORE_mutex_Surrender+0xbc> <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
5598: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
559c: eb000339 bl 6288 <_Thread_Change_priority> <== NOT EXECUTED
55a0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
55a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
55a8: e591301c ldr r3, [r1, #28]
55ac: e2833001 add r3, r3, #1 ; 0x1
55b0: e581301c str r3, [r1, #28]
55b4: e3a00000 mov r0, #0 ; 0x0
55b8: e8bd8010 pop {r4, pc}
00009e44 <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
9e44: e59f3010 ldr r3, [pc, #16] ; 9e5c <_Debug_Is_enabled+0x18> <== NOT EXECUTED
9e48: e5932000 ldr r2, [r3] <== NOT EXECUTED
9e4c: e1100002 tst r0, r2 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
9e50: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
9e54: 13a00001 movne r0, #1 ; 0x1 <== NOT EXECUTED
9e58: e12fff1e bx lr <== NOT EXECUTED
00009974 <_Dual_ported_memory_Manager_initialization>:
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
9974: e52de004 push {lr} ; (str lr, [sp, #-4]!)
_Objects_Initialize_information(
9978: e3a0c01c mov ip, #28 ; 0x1c
*/
void _Dual_ported_memory_Manager_initialization(
uint32_t maximum_ports
)
{
997c: e24dd00c sub sp, sp, #12 ; 0xc
9980: e1a03000 mov r3, r0
_Objects_Initialize_information(
9984: e58dc000 str ip, [sp]
9988: e3a0e000 mov lr, #0 ; 0x0
998c: e24cc018 sub ip, ip, #24 ; 0x18
9990: e59f0018 ldr r0, [pc, #24] ; 99b0 <_Dual_ported_memory_Manager_initialization+0x3c>
9994: e3a01002 mov r1, #2 ; 0x2
9998: e3a02007 mov r2, #7 ; 0x7
999c: e58de004 str lr, [sp, #4]
99a0: e58dc008 str ip, [sp, #8]
99a4: ebfff181 bl 5fb0 <_Objects_Initialize_information>
,
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
99a8: e28dd00c add sp, sp, #12 ; 0xc
99ac: e8bd8000 pop {pc}
000041e4 <_Event_Seize>:
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41e4: e59fc108 ldr ip, [pc, #264] ; 42f4 <_Event_Seize+0x110>
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41e8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
41ec: e59c5000 ldr r5, [ip]
executing->Wait.return_code = RTEMS_SUCCESSFUL;
41f0: e3a04000 mov r4, #0 ; 0x0
41f4: e5854034 str r4, [r5, #52]
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
41f8: e1a08002 mov r8, r2
41fc: e1a07003 mov r7, r3
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4200: e5954104 ldr r4, [r5, #260]
_ISR_Disable( level );
4204: e10f6000 mrs r6, CPSR
4208: e38630c0 orr r3, r6, #192 ; 0xc0
420c: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
4210: e5942000 ldr r2, [r4]
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
4214: e010c002 ands ip, r0, r2
4218: 0a000003 beq 422c <_Event_Seize+0x48>
421c: e150000c cmp r0, ip
4220: 0a00001f beq 42a4 <_Event_Seize+0xc0>
4224: e3110002 tst r1, #2 ; 0x2
4228: 1a00001d bne 42a4 <_Event_Seize+0xc0>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
422c: e3110001 tst r1, #1 ; 0x1
4230: 1a000016 bne 4290 <_Event_Seize+0xac>
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4234: e59f40bc ldr r4, [pc, #188] ; 42f8 <_Event_Seize+0x114>
4238: e3a03001 mov r3, #1 ; 0x1
423c: e5843000 str r3, [r4]
executing->Wait.option = (uint32_t) option_set;
4240: e5851030 str r1, [r5, #48]
executing->Wait.count = (uint32_t) event_in;
4244: e5850024 str r0, [r5, #36]
executing->Wait.return_argument = event_out;
4248: e5857028 str r7, [r5, #40]
_ISR_Enable( level );
424c: e129f006 msr CPSR_fc, r6
if ( ticks ) {
4250: e3580000 cmp r8, #0 ; 0x0
4254: 1a00001a bne 42c4 <_Event_Seize+0xe0>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4258: e1a00005 mov r0, r5
425c: e3a01c01 mov r1, #256 ; 0x100
4260: eb000bfe bl 7260 <_Thread_Set_state>
_ISR_Disable( level );
4264: e10f2000 mrs r2, CPSR
4268: e38230c0 orr r3, r2, #192 ; 0xc0
426c: e129f003 msr CPSR_fc, r3
sync_state = _Event_Sync_state;
4270: e5940000 ldr r0, [r4]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4274: e3a03000 mov r3, #0 ; 0x0
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4278: e3500001 cmp r0, #1 ; 0x1
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
427c: e5843000 str r3, [r4]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4280: 0a00000d beq 42bc <_Event_Seize+0xd8>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
4284: e1a01005 mov r1, r5 <== NOT EXECUTED
}
4288: e8bd41f0 pop {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
428c: ea0007e9 b 6238 <_Thread_blocking_operation_Cancel> <== NOT EXECUTED
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
4290: e129f006 msr CPSR_fc, r6
executing->Wait.return_code = RTEMS_UNSATISFIED;
4294: e3a0300d mov r3, #13 ; 0xd
4298: e5853034 str r3, [r5, #52]
*event_out = seized_events;
429c: e587c000 str ip, [r7]
42a0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
42a4: e1e0300c mvn r3, ip
42a8: e0033002 and r3, r3, r2
42ac: e5843000 str r3, [r4]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
42b0: e129f006 msr CPSR_fc, r6
*event_out = seized_events;
42b4: e587c000 str ip, [r7]
42b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
42bc: e129f002 msr CPSR_fc, r2
42c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
42c4: e5953008 ldr r3, [r5, #8]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
42c8: e59f202c ldr r2, [pc, #44] ; 42fc <_Event_Seize+0x118>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42cc: e3a01000 mov r1, #0 ; 0x0
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
42d0: e585106c str r1, [r5, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
42d4: e5851050 str r1, [r5, #80]
the_watchdog->routine = routine;
42d8: e5852064 str r2, [r5, #100]
the_watchdog->id = id;
42dc: e5853068 str r3, [r5, #104]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
42e0: e5858054 str r8, [r5, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
42e4: e59f0014 ldr r0, [pc, #20] ; 4300 <_Event_Seize+0x11c>
42e8: e2851048 add r1, r5, #72 ; 0x48
42ec: eb000ddd bl 7a68 <_Watchdog_Insert>
42f0: eaffffd8 b 4258 <_Event_Seize+0x74>
0000435c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
435c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
4360: e590c104 ldr ip, [r0, #260]
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4364: e1a04000 mov r4, r0
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
4368: e5907030 ldr r7, [r0, #48]
_ISR_Disable( level );
436c: e10f6000 mrs r6, CPSR
4370: e38630c0 orr r3, r6, #192 ; 0xc0
4374: e129f003 msr CPSR_fc, r3
pending_events = api->pending_events;
4378: e59c0000 ldr r0, [ip]
event_condition = (rtems_event_set) the_thread->Wait.count;
437c: e5941024 ldr r1, [r4, #36]
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
4380: e0115000 ands r5, r1, r0
4384: 0a000024 beq 441c <_Event_Surrender+0xc0>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
4388: e59f3118 ldr r3, [pc, #280] ; 44a8 <_Event_Surrender+0x14c>
438c: e5932000 ldr r2, [r3]
4390: e3520000 cmp r2, #0 ; 0x0
4394: 0a000003 beq 43a8 <_Event_Surrender+0x4c>
4398: e59f310c ldr r3, [pc, #268] ; 44ac <_Event_Surrender+0x150>
439c: e5932000 ldr r2, [r3]
43a0: e1540002 cmp r4, r2
43a4: 0a000029 beq 4450 <_Event_Surrender+0xf4>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
43a8: e5943010 ldr r3, [r4, #16]
43ac: e3130c01 tst r3, #256 ; 0x100
43b0: 0a000017 beq 4414 <_Event_Surrender+0xb8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
43b4: e1510005 cmp r1, r5
43b8: 0a000001 beq 43c4 <_Event_Surrender+0x68>
43bc: e3170002 tst r7, #2 ; 0x2
43c0: 0a000013 beq 4414 <_Event_Surrender+0xb8>
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43c4: e1e03005 mvn r3, r5
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43c8: e5941028 ldr r1, [r4, #40]
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43cc: e0033000 and r3, r3, r0
the_thread->Wait.count = 0;
43d0: e3a02000 mov r2, #0 ; 0x0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
43d4: e58c3000 str r3, [ip]
the_thread->Wait.count = 0;
43d8: e5842024 str r2, [r4, #36]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
43dc: e5815000 str r5, [r1]
_ISR_Flash( level );
43e0: e10f3000 mrs r3, CPSR
43e4: e129f006 msr CPSR_fc, r6
43e8: e129f003 msr CPSR_fc, r3
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
43ec: e5943050 ldr r3, [r4, #80]
43f0: e3530002 cmp r3, #2 ; 0x2
43f4: 0a00000a beq 4424 <_Event_Surrender+0xc8>
_ISR_Enable( level );
43f8: e129f006 msr CPSR_fc, r6
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
43fc: e3a01201 mov r1, #268435456 ; 0x10000000
4400: e2811bff add r1, r1, #261120 ; 0x3fc00
4404: e1a00004 mov r0, r4
4408: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
440c: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
4410: ea000807 b 6434 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4414: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
4418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
441c: e129f006 msr CPSR_fc, r6
4420: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4424: e3a03003 mov r3, #3 ; 0x3
4428: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
442c: e129f006 msr CPSR_fc, r6
(void) _Watchdog_Remove( &the_thread->Timer );
4430: e2840048 add r0, r4, #72 ; 0x48
4434: eb000dfa bl 7c24 <_Watchdog_Remove>
4438: e3a01201 mov r1, #268435456 ; 0x10000000
443c: e2811bff add r1, r1, #261120 ; 0x3fc00
4440: e1a00004 mov r0, r4
4444: e2811ffe add r1, r1, #1016 ; 0x3f8
}
return;
}
}
_ISR_Enable( level );
}
4448: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
444c: ea0007f8 b 6434 <_Thread_Clear_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
4450: e59f8058 ldr r8, [pc, #88] ; 44b0 <_Event_Surrender+0x154> <== NOT EXECUTED
4454: e5983000 ldr r3, [r8] <== NOT EXECUTED
4458: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
445c: 0a000002 beq 446c <_Event_Surrender+0x110> <== NOT EXECUTED
4460: e5983000 ldr r3, [r8] <== NOT EXECUTED
4464: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
4468: 1affffce bne 43a8 <_Event_Surrender+0x4c> <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
446c: e1510005 cmp r1, r5 <== NOT EXECUTED
4470: 0a000001 beq 447c <_Event_Surrender+0x120> <== NOT EXECUTED
4474: e3170002 tst r7, #2 ; 0x2 <== NOT EXECUTED
4478: 0a000008 beq 44a0 <_Event_Surrender+0x144> <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
447c: e1e03005 mvn r3, r5 <== NOT EXECUTED
4480: e0033000 and r3, r3, r0 <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4484: e5941028 ldr r1, [r4, #40] <== NOT EXECUTED
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
4488: e58c3000 str r3, [ip] <== NOT EXECUTED
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
448c: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
4490: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
4494: e5843024 str r3, [r4, #36] <== NOT EXECUTED
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4498: e5882000 str r2, [r8] <== NOT EXECUTED
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
449c: e5815000 str r5, [r1] <== NOT EXECUTED
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
44a0: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
44a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000044b4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
44b4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
44b8: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
44bc: e1a0100d mov r1, sp <== NOT EXECUTED
44c0: eb0008eb bl 6874 <_Thread_Get> <== NOT EXECUTED
switch ( location ) {
44c4: e59d1000 ldr r1, [sp] <== NOT EXECUTED
44c8: e3510000 cmp r1, #0 ; 0x0 <== NOT EXECUTED
44cc: 1a000015 bne 4528 <_Event_Timeout+0x74> <== NOT EXECUTED
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
44d0: e10fc000 mrs ip, CPSR <== NOT EXECUTED
44d4: e38c30c0 orr r3, ip, #192 ; 0xc0 <== NOT EXECUTED
44d8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
44dc: e5903024 ldr r3, [r0, #36] <== NOT EXECUTED
44e0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
44e4: 0a000011 beq 4530 <_Event_Timeout+0x7c> <== NOT EXECUTED
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
44e8: e59f3070 ldr r3, [pc, #112] ; 4560 <_Event_Timeout+0xac> <== NOT EXECUTED
44ec: e5932000 ldr r2, [r3] <== NOT EXECUTED
44f0: e1500002 cmp r0, r2 <== NOT EXECUTED
_Thread_Unnest_dispatch();
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
44f4: e5801024 str r1, [r0, #36] <== NOT EXECUTED
if ( _Thread_Is_executing( the_thread ) ) {
44f8: 0a000012 beq 4548 <_Event_Timeout+0x94> <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
44fc: e3a03006 mov r3, #6 ; 0x6 <== NOT EXECUTED
4500: e5803034 str r3, [r0, #52] <== NOT EXECUTED
_ISR_Enable( level );
4504: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
4508: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED
450c: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED
4510: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED
4514: eb0007c6 bl 6434 <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4518: e59f2044 ldr r2, [pc, #68] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED
451c: e5923000 ldr r3, [r2] <== NOT EXECUTED
4520: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
4524: e5823000 str r3, [r2] <== NOT EXECUTED
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4528: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
452c: e8bd8000 pop {pc} <== NOT EXECUTED
4530: e59f202c ldr r2, [pc, #44] ; 4564 <_Event_Timeout+0xb0> <== NOT EXECUTED
4534: e5923000 ldr r3, [r2] <== NOT EXECUTED
4538: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
453c: e5823000 str r3, [r2] <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
4540: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
4544: eafffff7 b 4528 <_Event_Timeout+0x74> <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
4548: e59f2018 ldr r2, [pc, #24] ; 4568 <_Event_Timeout+0xb4> <== NOT EXECUTED
454c: e5923000 ldr r3, [r2] <== NOT EXECUTED
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
4550: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4554: 93a03002 movls r3, #2 ; 0x2 <== NOT EXECUTED
4558: 95823000 strls r3, [r2] <== NOT EXECUTED
455c: eaffffe6 b 44fc <_Event_Timeout+0x48> <== NOT EXECUTED
000085c0 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
85c0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
85c4: e5909010 ldr r9, [r0, #16]
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
85c8: e1a07000 mov r7, r0
85cc: e1a03001 mov r3, r1
85d0: e24dd010 sub sp, sp, #16 ; 0x10
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
85d4: e1a00001 mov r0, r1
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
85d8: e2433004 sub r3, r3, #4 ; 0x4
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
85dc: e1a0b002 mov fp, r2
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
85e0: e1a01009 mov r1, r9
85e4: e5972014 ldr r2, [r7, #20]
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
85e8: e58d3004 str r3, [sp, #4]
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
85ec: eb000163 bl 8b80 <_Heap_Calc_block_size>
if(the_size == 0)
85f0: e3500000 cmp r0, #0 ; 0x0
85f4: e58d0008 str r0, [sp, #8]
85f8: 0a000064 beq 8790 <_Heap_Allocate_aligned+0x1d0>
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
85fc: e5975008 ldr r5, [r7, #8]
return NULL;
if(alignment == 0)
8600: e35b0000 cmp fp, #0 ; 0x0
8604: 03a0b004 moveq fp, #4 ; 0x4
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
8608: e1570005 cmp r7, r5
860c: 0a00005f beq 8790 <_Heap_Allocate_aligned+0x1d0>
8610: e3a0a000 mov sl, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
8614: e5953004 ldr r3, [r5, #4]
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
8618: e59d1008 ldr r1, [sp, #8]
861c: e3c36001 bic r6, r3, #1 ; 0x1
8620: e1510006 cmp r1, r6
8624: 8a000023 bhi 86b8 <_Heap_Allocate_aligned+0xf8>
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
aligned_user_addr = block_end - end_to_user_offs;
8628: e59d3004 ldr r3, [sp, #4]
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
862c: e0852006 add r2, r5, r6
aligned_user_addr = block_end - end_to_user_offs;
8630: e0634002 rsb r4, r3, r2
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
8634: e1a0100b mov r1, fp
8638: e1a00004 mov r0, r4
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
863c: e58d200c str r2, [sp, #12]
8640: eb003ba6 bl 174e0 <__umodsi3>
8644: e0608004 rsb r8, r0, r4
if(block_size >= the_size) { /* the_block is large enough. */
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
8648: e1a00008 mov r0, r8
864c: e1a01009 mov r1, r9
8650: eb003ba2 bl 174e0 <__umodsi3>
8654: e2854008 add r4, r5, #8 ; 0x8
8658: e0602008 rsb r2, r0, r8
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
865c: e1540002 cmp r4, r2
8660: 8a000014 bhi 86b8 <_Heap_Allocate_aligned+0xf8>
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
8664: e597c014 ldr ip, [r7, #20]
8668: e0643002 rsb r3, r4, r2
866c: e153000c cmp r3, ip
8670: 2a00001c bcs 86e8 <_Heap_Allocate_aligned+0x128>
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
8674: e0643008 rsb r3, r4, r8
8678: e1590003 cmp r9, r3
867c: 81a02004 movhi r2, r4
8680: 8a000018 bhi 86e8 <_Heap_Allocate_aligned+0x128>
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
8684: e1a00004 mov r0, r4
8688: e1a0100b mov r1, fp
868c: e58dc000 str ip, [sp]
8690: eb003b92 bl 174e0 <__umodsi3>
*value = r ? v - r + a : v;
8694: e3500000 cmp r0, #0 ; 0x0
8698: 1084300b addne r3, r4, fp
869c: 10600003 rsbne r0, r0, r3
86a0: 01a03000 moveq r3, r0
86a4: 10643000 rsbne r3, r4, r0
86a8: 01a00004 moveq r0, r4
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
86ac: e1590003 cmp r9, r3
86b0: e59dc000 ldr ip, [sp]
86b4: 8a000009 bhi 86e0 <_Heap_Allocate_aligned+0x120>
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
86b8: e5955008 ldr r5, [r5, #8]
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
86bc: e1570005 cmp r7, r5
the_block = the_block->next, ++search_count)
86c0: e28aa001 add sl, sl, #1 ; 0x1
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
86c4: 1affffd2 bne 8614 <_Heap_Allocate_aligned+0x54>
86c8: e3a00000 mov r0, #0 ; 0x0
}
}
}
}
if(stats->max_search < search_count)
86cc: e5973044 ldr r3, [r7, #68]
86d0: e153000a cmp r3, sl
stats->max_search = search_count;
86d4: 3587a044 strcc sl, [r7, #68]
return user_ptr;
}
86d8: e28dd010 add sp, sp, #16 ; 0x10
86dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
86e0: e1a02004 mov r2, r4
86e4: e1a08000 mov r8, r0
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
86e8: e3580000 cmp r8, #0 ; 0x0
86ec: 0afffff1 beq 86b8 <_Heap_Allocate_aligned+0xf8>
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
86f0: e59d100c ldr r1, [sp, #12]
86f4: e2813008 add r3, r1, #8 ; 0x8
86f8: e0624003 rsb r4, r2, r3
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
86fc: e0642006 rsb r2, r4, r6
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
8700: e152000c cmp r2, ip
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
8704: 23823001 orrcs r3, r2, #1 ; 0x1
8708: 25853004 strcs r3, [r5, #4]
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
870c: 27a52002 strcs r2, [r5, r2]!
the_block->size = alloc_size;
8710: 25854004 strcs r4, [r5, #4]
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
8714: 2a000007 bcs 8738 <_Heap_Allocate_aligned+0x178>
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
8718: e5973038 ldr r3, [r7, #56]
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
871c: e2851008 add r1, r5, #8 ; 0x8
8720: e8910006 ldm r1, {r1, r2}
8724: e2433001 sub r3, r3, #1 ; 0x1
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
8728: e581200c str r2, [r1, #12]
872c: e5873038 str r3, [r7, #56]
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
8730: e5821008 str r1, [r2, #8]
8734: e1a04006 mov r4, r6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
8738: e0852004 add r2, r5, r4
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
873c: e5923004 ldr r3, [r2, #4]
8740: e3833001 orr r3, r3, #1 ; 0x1
8744: e5823004 str r3, [r2, #4]
/* Update statistics */
stats->free_size -= alloc_size;
8748: e2871030 add r1, r7, #48 ; 0x30
874c: e891000a ldm r1, {r1, r3}
8750: e0641001 rsb r1, r4, r1
if(stats->min_free_size > stats->free_size)
8754: e1510003 cmp r1, r3
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8758: e597304c ldr r3, [r7, #76]
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
875c: e5972040 ldr r2, [r7, #64]
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
8760: e5871030 str r1, [r7, #48]
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
8764: 35871034 strcc r1, [r7, #52]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
8768: e5971048 ldr r1, [r7, #72]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
876c: e2833001 add r3, r3, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
8770: e2822001 add r2, r2, #1 ; 0x1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8774: e083300a add r3, r3, sl
stats->allocs += 1;
8778: e2811001 add r1, r1, #1 ; 0x1
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
877c: e5872040 str r2, [r7, #64]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
8780: e587304c str r3, [r7, #76]
stats->allocs += 1;
8784: e5871048 str r1, [r7, #72]
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
8788: e1a00008 mov r0, r8
878c: eaffffce b 86cc <_Heap_Allocate_aligned+0x10c>
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
8790: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
8794: eaffffcf b 86d8 <_Heap_Allocate_aligned+0x118> <== NOT EXECUTED
0000d950 <_Heap_Get_information>:
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
d950: e92d0070 push {r4, r5, r6}
Heap_Block *the_block = the_heap->start;
d954: e2802020 add r2, r0, #32 ; 0x20
d958: e8920044 ldm r2, {r2, r6}
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
d95c: e3a03000 mov r3, #0 ; 0x0
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
d960: e1520006 cmp r2, r6
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
d964: e1a0c001 mov ip, r1
the_info->Free.number = 0;
the_info->Free.total = 0;
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
d968: e5813010 str r3, [r1, #16]
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
d96c: e5813000 str r3, [r1]
the_info->Free.total = 0;
d970: e5813008 str r3, [r1, #8]
the_info->Free.largest = 0;
d974: e5813004 str r3, [r1, #4]
the_info->Used.number = 0;
d978: e581300c str r3, [r1, #12]
the_info->Used.total = 0;
d97c: e5813014 str r3, [r1, #20]
the_info->Used.largest = 0;
while ( the_block != end ) {
d980: 0a000020 beq da08 <_Heap_Get_information+0xb8>
d984: e5925004 ldr r5, [r2, #4]
d988: ea00000b b d9bc <_Heap_Get_information+0x6c>
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
d98c: e59c300c ldr r3, [ip, #12]
the_info->Used.total += the_size;
d990: e59c1014 ldr r1, [ip, #20]
if ( the_info->Used.largest < the_size )
d994: e59c2010 ldr r2, [ip, #16]
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
d998: e2833001 add r3, r3, #1 ; 0x1
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
d99c: e1520000 cmp r2, r0
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
the_info->Used.total += the_size;
d9a0: e0811000 add r1, r1, r0
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
d9a4: e58c300c str r3, [ip, #12]
the_info->Used.total += the_size;
d9a8: e58c1014 str r1, [ip, #20]
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
d9ac: 358c0010 strcc r0, [ip, #16]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
d9b0: e1560004 cmp r6, r4
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
d9b4: e1a02004 mov r2, r4
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
d9b8: 0a000012 beq da08 <_Heap_Get_information+0xb8>
d9bc: e3c50001 bic r0, r5, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
d9c0: e0824000 add r4, r2, r0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
d9c4: e5945004 ldr r5, [r4, #4]
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
d9c8: e3150001 tst r5, #1 ; 0x1
d9cc: 1affffee bne d98c <_Heap_Get_information+0x3c>
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
d9d0: e59c3000 ldr r3, [ip]
the_info->Free.total += the_size;
d9d4: e59c1008 ldr r1, [ip, #8]
if ( the_info->Free.largest < the_size )
d9d8: e59c2004 ldr r2, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
d9dc: e2833001 add r3, r3, #1 ; 0x1
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
d9e0: e1520000 cmp r2, r0
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
d9e4: e0811000 add r1, r1, r0
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
d9e8: 358c0004 strcc r0, [ip, #4]
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
d9ec: e58c3000 str r3, [ip]
the_info->Free.total += the_size;
d9f0: e58c1008 str r1, [ip, #8]
if ( the_info->Free.largest < the_size )
the_info->Free.largest = the_size;
if ( the_size != next_block->prev_size )
d9f4: e5943000 ldr r3, [r4]
d9f8: e1530000 cmp r3, r0
d9fc: 0affffeb beq d9b0 <_Heap_Get_information+0x60>
da00: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
da04: ea000003 b da18 <_Heap_Get_information+0xc8> <== NOT EXECUTED
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
da08: e59c3014 ldr r3, [ip, #20]
da0c: e2833008 add r3, r3, #8 ; 0x8
da10: e58c3014 str r3, [ip, #20]
da14: e3a00000 mov r0, #0 ; 0x0
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
da18: e8bd0070 pop {r4, r5, r6}
da1c: e12fff1e bx lr
00013fa8 <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13fa8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
13fac: e24dd00c sub sp, sp, #12 ; 0xc
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
*avail_mem_size = 0;
13fb0: e59dc030 ldr ip, [sp, #48]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13fb4: e1a05000 mov r5, r0
13fb8: e1a09003 mov r9, r3
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
uint32_t const page_size = the_heap->page_size;
*old_mem_size = 0;
13fbc: e3a03000 mov r3, #0 ; 0x0
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
13fc0: e5900014 ldr r0, [r0, #20]
uint32_t const page_size = the_heap->page_size;
13fc4: e595b010 ldr fp, [r5, #16]
*old_mem_size = 0;
13fc8: e5893000 str r3, [r9]
*avail_mem_size = 0;
13fcc: e58c3000 str r3, [ip]
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
13fd0: e58d0004 str r0, [sp, #4]
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
13fd4: e1a04001 mov r4, r1
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
13fd8: e1a00001 mov r0, r1
13fdc: e5951010 ldr r1, [r5, #16]
13fe0: e1a08002 mov r8, r2
13fe4: ebfff862 bl 12174 <__umodsi3>
13fe8: e2442008 sub r2, r4, #8 ; 0x8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
Heap_Control *the_heap,
Heap_Block *the_block
)
{
return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
13fec: e595c020 ldr ip, [r5, #32]
13ff0: e5951024 ldr r1, [r5, #36]
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
13ff4: e0606002 rsb r6, r0, r2
*old_mem_size = 0;
*avail_mem_size = 0;
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
13ff8: e156000c cmp r6, ip
13ffc: 33a03000 movcc r3, #0 ; 0x0
14000: 23a03001 movcs r3, #1 ; 0x1
14004: e1560001 cmp r6, r1
14008: 83a03000 movhi r3, #0 ; 0x0
1400c: e3530000 cmp r3, #0 ; 0x0
14010: 0a00002d beq 140cc <_Heap_Resize_block+0x124>
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
14014: e5962004 ldr r2, [r6, #4]
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14018: e3c2a001 bic sl, r2, #1 ; 0x1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
1401c: e086700a add r7, r6, sl
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
14020: e15c0007 cmp ip, r7
14024: 83a03000 movhi r3, #0 ; 0x0
14028: 93a03001 movls r3, #1 ; 0x1
1402c: e1510007 cmp r1, r7
14030: 33a03000 movcc r3, #0 ; 0x0
14034: e3530000 cmp r3, #0 ; 0x0
14038: 0a000023 beq 140cc <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
1403c: e5973004 ldr r3, [r7, #4]
14040: e3130001 tst r3, #1 ; 0x1
14044: 0a000020 beq 140cc <_Heap_Resize_block+0x124>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
14048: e3c33001 bic r3, r3, #1 ; 0x1
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
1404c: e1510007 cmp r1, r7
14050: e58d3000 str r3, [sp]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14054: e0873003 add r3, r7, r3
14058: 15933004 ldrne r3, [r3, #4]
1405c: 12033001 andne r3, r3, #1 ; 0x1
14060: 03a00001 moveq r0, #1 ; 0x1
14064: 158d3008 strne r3, [sp, #8]
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
14068: e0643007 rsb r3, r4, r7
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
1406c: 058d0008 streq r0, [sp, #8]
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
14070: e2830004 add r0, r3, #4 ; 0x4
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
14074: e1500008 cmp r0, r8
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
14078: e5890000 str r0, [r9]
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
1407c: e2029001 and r9, r2, #1 ; 0x1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
14080: 2a000014 bcs 140d8 <_Heap_Resize_block+0x130>
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
14084: e59d1008 ldr r1, [sp, #8]
14088: e3510000 cmp r1, #0 ; 0x0
1408c: 1a00000c bne 140c4 <_Heap_Resize_block+0x11c>
return HEAP_RESIZE_UNSATISFIED;
else {
uint32_t add_block_size = size - old_user_size;
14090: e0604008 rsb r4, r0, r8
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
14094: e1a00004 mov r0, r4
14098: e1a0100b mov r1, fp
1409c: ebfff834 bl 12174 <__umodsi3>
*value = r ? v - r + a : v;
140a0: e3500000 cmp r0, #0 ; 0x0
140a4: 1084300b addne r3, r4, fp
140a8: e59d2004 ldr r2, [sp, #4]
140ac: 10604003 rsbne r4, r0, r3
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
140b0: e59d3000 ldr r3, [sp]
140b4: e1540002 cmp r4, r2
140b8: 21a02004 movcs r2, r4
140bc: e1530002 cmp r3, r2
140c0: 2a000049 bcs 141ec <_Heap_Resize_block+0x244>
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
140c4: e3a00001 mov r0, #1 ; 0x1
140c8: ea000000 b 140d0 <_Heap_Resize_block+0x128>
140cc: e3a00002 mov r0, #2 ; 0x2
}
140d0: e28dd00c add sp, sp, #12 ; 0xc
140d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
140d8: e0684000 rsb r4, r8, r0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
140dc: e1a00004 mov r0, r4
140e0: e1a0100b mov r1, fp
140e4: ebfff822 bl 12174 <__umodsi3>
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
140e8: e0544000 subs r4, r4, r0
140ec: 0a000020 beq 14174 <_Heap_Resize_block+0x1cc>
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
if (new_block_size < min_block_size) {
140f0: e59dc004 ldr ip, [sp, #4]
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
140f4: e064000a rsb r0, r4, sl
if (new_block_size < min_block_size) {
140f8: e15c0000 cmp ip, r0
140fc: 9a000021 bls 14188 <_Heap_Resize_block+0x1e0>
uint32_t delta = min_block_size - new_block_size;
14100: e060300c rsb r3, r0, ip
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
14104: e0544003 subs r4, r4, r3
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
new_block_size += delta;
14108: 10800003 addne r0, r0, r3
if (new_block_size < min_block_size) {
uint32_t delta = min_block_size - new_block_size;
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
1410c: 1a00001d bne 14188 <_Heap_Resize_block+0x1e0>
++stats->resizes;
14110: e5953054 ldr r3, [r5, #84]
14114: e2833001 add r3, r3, #1 ; 0x1
14118: e5853054 str r3, [r5, #84]
1411c: e1a00004 mov r0, r4
14120: eaffffea b 140d0 <_Heap_Resize_block+0x128>
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
14124: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
14128: e15c0004 cmp ip, r4 <== NOT EXECUTED
1412c: 8a000010 bhi 14174 <_Heap_Resize_block+0x1cc> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
14130: e0861000 add r1, r6, r0 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
14134: e1803009 orr r3, r0, r9 <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14138: e3842001 orr r2, r4, #1 ; 0x1 <== NOT EXECUTED
the_heap->stats.free_size += free_block_size;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
1413c: e5863004 str r3, [r6, #4] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
14140: e5812004 str r2, [r1, #4] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
14144: e5953040 ldr r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14148: e5952050 ldr r2, [r5, #80] <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
1414c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14150: e2422001 sub r2, r2, #1 ; 0x1 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
14154: e5853040 str r3, [r5, #64] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
14158: e5852050 str r2, [r5, #80] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
1415c: e2811008 add r1, r1, #8 ; 0x8 <== NOT EXECUTED
14160: e1a00005 mov r0, r5 <== NOT EXECUTED
14164: ebffd81e bl a1e4 <_Heap_Free> <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
14168: e59d0030 ldr r0, [sp, #48] <== NOT EXECUTED
1416c: e2443004 sub r3, r4, #4 ; 0x4 <== NOT EXECUTED
14170: e5803000 str r3, [r0] <== NOT EXECUTED
}
}
}
++stats->resizes;
14174: e5953054 ldr r3, [r5, #84]
14178: e2833001 add r3, r3, #1 ; 0x1
1417c: e5853054 str r3, [r5, #84]
14180: e3a00000 mov r0, #0 ; 0x0
14184: eaffffd1 b 140d0 <_Heap_Resize_block+0x128>
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
14188: e59d1008 ldr r1, [sp, #8]
1418c: e3510000 cmp r1, #0 ; 0x0
14190: 1affffe3 bne 14124 <_Heap_Resize_block+0x17c>
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
14194: e59d3000 ldr r3, [sp]
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
next_next_block->prev_size = new_next_block_size;
14198: e59dc000 ldr ip, [sp]
if (!next_is_used) {
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
1419c: e0842003 add r2, r4, r3
141a0: e0861000 add r1, r6, r0
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
141a4: e1803009 orr r3, r0, r9
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
141a8: e3820001 orr r0, r2, #1 ; 0x1
next_next_block->prev_size = new_next_block_size;
141ac: e787200c str r2, [r7, ip]
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
141b0: e5863004 str r3, [r6, #4]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
141b4: e5810004 str r0, [r1, #4]
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
141b8: e5953030 ldr r3, [r5, #48]
141bc: e0833004 add r3, r3, r4
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
141c0: e597000c ldr r0, [r7, #12]
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
141c4: e597c008 ldr ip, [r7, #8]
141c8: e5853030 str r3, [r5, #48]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
141cc: e59d3030 ldr r3, [sp, #48]
141d0: e2422004 sub r2, r2, #4 ; 0x4
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
141d4: e581c008 str ip, [r1, #8]
block->prev = prev;
141d8: e581000c str r0, [r1, #12]
141dc: e5832000 str r2, [r3]
next->prev = prev->next = block;
141e0: e5801008 str r1, [r0, #8]
141e4: e58c100c str r1, [ip, #12]
141e8: eaffffe1 b 14174 <_Heap_Resize_block+0x1cc>
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
141ec: e1a01007 mov r1, r7
141f0: e1a00005 mov r0, r5
141f4: ebffc5c0 bl 58fc <_Heap_Block_allocate>
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
141f8: e080000a add r0, r0, sl
141fc: e1800009 orr r0, r0, r9
14200: e5860004 str r0, [r6, #4]
--stats->used_blocks;
14204: e5953040 ldr r3, [r5, #64]
14208: e2433001 sub r3, r3, #1 ; 0x1
1420c: e5853040 str r3, [r5, #64]
14210: eaffffd7 b 14174 <_Heap_Resize_block+0x1cc>
0000dacc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
dacc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
dad0: e5903024 ldr r3, [r0, #36]
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
dad4: e5906020 ldr r6, [r0, #32]
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
dad8: e24dd004 sub sp, sp, #4 ; 0x4
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
dadc: e58d3000 str r3, [sp]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
dae0: e5963004 ldr r3, [r6, #4]
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
dae4: e251b000 subs fp, r1, #0 ; 0x0
source = the_heap->stats.instance;
dae8: b590b028 ldrlt fp, [r0, #40]
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
daec: e3130001 tst r3, #1 ; 0x1
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
daf0: e1a05000 mov r5, r0
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
daf4: 13a08000 movne r8, #0 ; 0x0
daf8: 0a000086 beq dd18 <_Heap_Walk+0x24c>
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
dafc: e5962000 ldr r2, [r6]
db00: e5953010 ldr r3, [r5, #16]
db04: e1520003 cmp r2, r3
db08: 0a000003 beq db1c <_Heap_Walk+0x50>
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
db0c: e59f0238 ldr r0, [pc, #568] ; dd4c <_Heap_Walk+0x280> <== NOT EXECUTED
db10: e1a0100b mov r1, fp <== NOT EXECUTED
db14: ebffdbe3 bl 4aa8 <printk> <== NOT EXECUTED
db18: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
db1c: e59d3000 ldr r3, [sp]
db20: e1560003 cmp r6, r3
db24: 0a000080 beq dd2c <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
db28: e5960004 ldr r0, [r6, #4]
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
db2c: e5951020 ldr r1, [r5, #32]
db30: e3c07001 bic r7, r0, #1 ; 0x1
db34: e5952024 ldr r2, [r5, #36]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
db38: e0864007 add r4, r6, r7
db3c: e1540001 cmp r4, r1
db40: 33a03000 movcc r3, #0 ; 0x0
db44: 23a03001 movcs r3, #1 ; 0x1
db48: e1540002 cmp r4, r2
db4c: 83a03000 movhi r3, #0 ; 0x0
db50: e3530000 cmp r3, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
db54: 1200a001 andne sl, r0, #1 ; 0x1
db58: 11a09004 movne r9, r4
db5c: 0a000075 beq dd38 <_Heap_Walk+0x26c>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
db60: e5943004 ldr r3, [r4, #4]
db64: e3130001 tst r3, #1 ; 0x1
db68: 1a00003f bne dc6c <_Heap_Walk+0x1a0>
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
db6c: e5943000 ldr r3, [r4]
db70: e1530007 cmp r3, r7
db74: 0a000003 beq db88 <_Heap_Walk+0xbc>
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
db78: e59f01d0 ldr r0, [pc, #464] ; dd50 <_Heap_Walk+0x284> <== NOT EXECUTED
db7c: e1a0100b mov r1, fp <== NOT EXECUTED
db80: ebffdbc8 bl 4aa8 <printk> <== NOT EXECUTED
db84: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
db88: e35a0000 cmp sl, #0 ; 0x0
db8c: 1a000005 bne dba8 <_Heap_Walk+0xdc>
if (do_dump || error) printk("\n");
db90: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
db94: 1a00005c bne dd0c <_Heap_Walk+0x240> <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
db98: e59f01b4 ldr r0, [pc, #436] ; dd54 <_Heap_Walk+0x288> <== NOT EXECUTED
db9c: e1a0100b mov r1, fp <== NOT EXECUTED
dba0: ebffdbc0 bl 4aa8 <printk> <== NOT EXECUTED
dba4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
dba8: e5953008 ldr r3, [r5, #8]
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
dbac: e1530006 cmp r3, r6
dbb0: 11550003 cmpne r5, r3
dbb4: 0a000003 beq dbc8 <_Heap_Walk+0xfc>
block = block->next;
dbb8: e5933008 ldr r3, [r3, #8]
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
dbbc: e1530006 cmp r3, r6
dbc0: 11550003 cmpne r5, r3
dbc4: 1afffffb bne dbb8 <_Heap_Walk+0xec>
block = block->next;
if(block != the_block) {
dbc8: e1530006 cmp r3, r6
dbcc: 0a000026 beq dc6c <_Heap_Walk+0x1a0>
if (do_dump || error) printk("\n");
dbd0: e3580000 cmp r8, #0 ; 0x0 <== NOT EXECUTED
dbd4: 1a000049 bne dd00 <_Heap_Walk+0x234> <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
dbd8: e59f0178 ldr r0, [pc, #376] ; dd58 <_Heap_Walk+0x28c> <== NOT EXECUTED
dbdc: e1a0100b mov r1, fp <== NOT EXECUTED
dbe0: ebffdbb0 bl 4aa8 <printk> <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
dbe4: e59f0170 ldr r0, [pc, #368] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED
dbe8: ebffdbae bl 4aa8 <printk> <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
dbec: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
dbf0: e1530007 cmp r3, r7 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
dbf4: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
dbf8: 8a000020 bhi dc80 <_Heap_Walk+0x1b4> <== NOT EXECUTED
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
dbfc: e1a00007 mov r0, r7
dc00: e5951010 ldr r1, [r5, #16]
dc04: eb002635 bl 174e0 <__umodsi3>
dc08: e3500000 cmp r0, #0 ; 0x0
dc0c: 1a000031 bne dcd8 <_Heap_Walk+0x20c>
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
dc10: e3580000 cmp r8, #0 ; 0x0
dc14: 1a000032 bne dce4 <_Heap_Walk+0x218>
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
dc18: e59d3000 ldr r3, [sp]
dc1c: e1530004 cmp r3, r4
dc20: 0a000041 beq dd2c <_Heap_Walk+0x260>
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
dc24: e5940004 ldr r0, [r4, #4]
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
dc28: e5951020 ldr r1, [r5, #32]
dc2c: e3c07001 bic r7, r0, #1 ; 0x1
dc30: e5952024 ldr r2, [r5, #36]
dc34: e0844007 add r4, r4, r7
dc38: e1540001 cmp r4, r1
dc3c: 33a03000 movcc r3, #0 ; 0x0
dc40: 23a03001 movcs r3, #1 ; 0x1
dc44: e1540002 cmp r4, r2
dc48: 83a03000 movhi r3, #0 ; 0x0
dc4c: e3530000 cmp r3, #0 ; 0x0
dc50: 0a000037 beq dd34 <_Heap_Walk+0x268>
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
dc54: e5943004 ldr r3, [r4, #4]
dc58: e3130001 tst r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
dc5c: e1a06009 mov r6, r9
dc60: e200a001 and sl, r0, #1 ; 0x1
dc64: e1a09004 mov r9, r4
dc68: 0affffbf beq db6c <_Heap_Walk+0xa0>
error = 1;
}
}
}
if (do_dump || error) printk("\n");
dc6c: e3580000 cmp r8, #0 ; 0x0
dc70: 1affffdb bne dbe4 <_Heap_Walk+0x118>
if (the_size < the_heap->min_block_size) {
dc74: e5953014 ldr r3, [r5, #20]
dc78: e1530007 cmp r3, r7
dc7c: 9affffde bls dbfc <_Heap_Walk+0x130>
printk("PASS: %d !block size is too small\n", source);
dc80: e59f00d8 ldr r0, [pc, #216] ; dd60 <_Heap_Walk+0x294> <== NOT EXECUTED
dc84: e1a0100b mov r1, fp <== NOT EXECUTED
dc88: ebffdb86 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
dc8c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
dc90: e59f00cc ldr r0, [pc, #204] ; dd64 <_Heap_Walk+0x298> <== NOT EXECUTED
dc94: e1a0100b mov r1, fp <== NOT EXECUTED
dc98: e1a02006 mov r2, r6 <== NOT EXECUTED
dc9c: ebffdb81 bl 4aa8 <printk> <== NOT EXECUTED
dca0: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
dca4: e5963004 ldr r3, [r6, #4]
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
dca8: e5950010 ldr r0, [r5, #16]
dcac: e3c32001 bic r2, r3, #1 ; 0x1
dcb0: e1500002 cmp r0, r2
dcb4: 01a00008 moveq r0, r8
dcb8: 0a000004 beq dcd0 <_Heap_Walk+0x204>
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
dcbc: e1a03000 mov r3, r0 <== NOT EXECUTED
dcc0: e1a0100b mov r1, fp <== NOT EXECUTED
dcc4: e59f009c ldr r0, [pc, #156] ; dd68 <_Heap_Walk+0x29c> <== NOT EXECUTED
dcc8: ebffdb76 bl 4aa8 <printk> <== NOT EXECUTED
dccc: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
dcd0: e28dd004 add sp, sp, #4 ; 0x4
dcd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
dcd8: e59f008c ldr r0, [pc, #140] ; dd6c <_Heap_Walk+0x2a0> <== NOT EXECUTED
dcdc: e1a0100b mov r1, fp <== NOT EXECUTED
dce0: ebffdb70 bl 4aa8 <printk> <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
dce4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
dce8: e59f0074 ldr r0, [pc, #116] ; dd64 <_Heap_Walk+0x298> <== NOT EXECUTED
dcec: e1a0100b mov r1, fp <== NOT EXECUTED
dcf0: e1a02006 mov r2, r6 <== NOT EXECUTED
dcf4: ebffdb6b bl 4aa8 <printk> <== NOT EXECUTED
dcf8: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
dcfc: eaffffe8 b dca4 <_Heap_Walk+0x1d8> <== NOT EXECUTED
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
dd00: e59f0054 ldr r0, [pc, #84] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED
dd04: ebffdb67 bl 4aa8 <printk> <== NOT EXECUTED
dd08: eaffffb2 b dbd8 <_Heap_Walk+0x10c> <== NOT EXECUTED
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
dd0c: e59f0048 ldr r0, [pc, #72] ; dd5c <_Heap_Walk+0x290> <== NOT EXECUTED
dd10: ebffdb64 bl 4aa8 <printk> <== NOT EXECUTED
dd14: eaffff9f b db98 <_Heap_Walk+0xcc> <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
dd18: e59f0050 ldr r0, [pc, #80] ; dd70 <_Heap_Walk+0x2a4> <== NOT EXECUTED
dd1c: e1a0100b mov r1, fp <== NOT EXECUTED
dd20: ebffdb60 bl 4aa8 <printk> <== NOT EXECUTED
dd24: e3a08001 mov r8, #1 ; 0x1 <== NOT EXECUTED
dd28: eaffff73 b dafc <_Heap_Walk+0x30> <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
dd2c: e59d6000 ldr r6, [sp]
dd30: eaffffdb b dca4 <_Heap_Walk+0x1d8>
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
dd34: e1a06009 mov r6, r9 <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
dd38: e1a02004 mov r2, r4 <== NOT EXECUTED
dd3c: e59f0030 ldr r0, [pc, #48] ; dd74 <_Heap_Walk+0x2a8> <== NOT EXECUTED
dd40: e1a0100b mov r1, fp <== NOT EXECUTED
dd44: ebffdb57 bl 4aa8 <printk> <== NOT EXECUTED
dd48: eaffffe5 b dce4 <_Heap_Walk+0x218> <== NOT EXECUTED
00004f3c <_IO_Manager_initialization>:
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
4f3c: e1520001 cmp r2, r1
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
4f40: e92d41f0 push {r4, r5, r6, r7, r8, lr}
4f44: e1a06001 mov r6, r1
4f48: e1a05002 mov r5, r2
4f4c: e1a08000 mov r8, r0
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
4f50: 8a000004 bhi 4f68 <_IO_Manager_initialization+0x2c>
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
4f54: e59f3078 ldr r3, [pc, #120] ; 4fd4 <_IO_Manager_initialization+0x98>
_IO_Number_of_drivers = number_of_drivers;
4f58: e59f2078 ldr r2, [pc, #120] ; 4fd8 <_IO_Manager_initialization+0x9c>
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
4f5c: e5830000 str r0, [r3]
_IO_Number_of_drivers = number_of_drivers;
4f60: e5821000 str r1, [r2]
4f64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
4f68: e1a04282 lsl r4, r2, #5 <== NOT EXECUTED
4f6c: e0444182 sub r4, r4, r2, lsl #3 <== NOT EXECUTED
4f70: e1a00004 mov r0, r4 <== NOT EXECUTED
4f74: eb000b84 bl 7d8c <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED
4f78: e59f7054 ldr r7, [pc, #84] ; 4fd4 <_IO_Manager_initialization+0x98><== NOT EXECUTED
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
4f7c: e59f3054 ldr r3, [pc, #84] ; 4fd8 <_IO_Manager_initialization+0x9c><== NOT EXECUTED
memset(
4f80: e1a02004 mov r2, r4 <== NOT EXECUTED
4f84: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
4f88: e5835000 str r5, [r3] <== NOT EXECUTED
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
4f8c: e5870000 str r0, [r7] <== NOT EXECUTED
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
4f90: eb001b11 bl bbdc <memset> <== NOT EXECUTED
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4f94: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
4f98: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
_IO_Driver_address_table[index] = driver_table[index];
4f9c: e3a05000 mov r5, #0 ; 0x0 <== NOT EXECUTED
4fa0: e5977000 ldr r7, [r7] <== NOT EXECUTED
4fa4: e1a0e005 mov lr, r5 <== NOT EXECUTED
4fa8: e088c00e add ip, r8, lr <== NOT EXECUTED
4fac: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
4fb0: e087400e add r4, r7, lr <== NOT EXECUTED
4fb4: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4fb8: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED
_IO_Driver_address_table[index] = driver_table[index];
4fbc: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4fc0: e1560005 cmp r6, r5 <== NOT EXECUTED
_IO_Driver_address_table[index] = driver_table[index];
4fc4: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4fc8: e28ee018 add lr, lr, #24 ; 0x18 <== NOT EXECUTED
4fcc: 8afffff5 bhi 4fa8 <_IO_Manager_initialization+0x6c> <== NOT EXECUTED
4fd0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000a3d4 <_Objects_API_maximum_class>:
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
a3d4: e2400001 sub r0, r0, #1 ; 0x1
a3d8: e3500003 cmp r0, #3 ; 0x3
a3dc: 979ff100 ldrls pc, [pc, r0, lsl #2]
a3e0: ea000003 b a3f4 <_Objects_API_maximum_class+0x20>
a3e4: 0000a414 .word 0x0000a414
a3e8: 0000a40c .word 0x0000a40c
a3ec: 0000a404 .word 0x0000a404 <== NOT EXECUTED
a3f0: 0000a3fc .word 0x0000a3fc <== NOT EXECUTED
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
a3f4: e3e00000 mvn r0, #0 ; 0x0
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
a3f8: e12fff1e bx lr
case OBJECTS_INTERNAL_API:
return OBJECTS_INTERNAL_CLASSES_LAST;
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
a3fc: e3a00008 mov r0, #8 ; 0x8
a400: e12fff1e bx lr
int _Objects_API_maximum_class(
uint32_t api
)
{
switch (api) {
a404: e3a0000c mov r0, #12 ; 0xc <== NOT EXECUTED
a408: e12fff1e bx lr <== NOT EXECUTED
a40c: e3a0000a mov r0, #10 ; 0xa
a410: e12fff1e bx lr
a414: e3a00002 mov r0, #2 ; 0x2
a418: e12fff1e bx lr
00005ae0 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5ae0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
5ae4: e1d0a0b8 ldrh sl, [r0, #8]
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5ae8: e1d091b0 ldrh r9, [r0, #16]
5aec: e159000a cmp r9, sl
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
5af0: e24dd014 sub sp, sp, #20 ; 0x14
5af4: e1a05000 mov r5, r0
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
5af8: 2a000071 bcs 5cc4 <_Objects_Extend_information+0x1e4>
5afc: e3a07000 mov r7, #0 ; 0x0
5b00: e5904014 ldr r4, [r0, #20]
5b04: e1a0800a mov r8, sl
5b08: e1a06007 mov r6, r7
5b0c: e3a0b001 mov fp, #1 ; 0x1
5b10: e3a00003 mov r0, #3 ; 0x3
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5b14: e5d53012 ldrb r3, [r5, #18]
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5b18: e0849009 add r9, r4, r9
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5b1c: e3530000 cmp r3, #0 ; 0x0
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
5b20: e58d9004 str r9, [sp, #4]
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
5b24: 1a000080 bne 5d2c <_Objects_Extend_information+0x24c>
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5b28: e59d3004 ldr r3, [sp, #4]
5b2c: e080000a add r0, r0, sl
5b30: e0800003 add r0, r0, r3
5b34: e1a00100 lsl r0, r0, #2
5b38: eb000893 bl 7d8c <_Workspace_Allocate_or_fatal_error>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5b3c: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5b40: e1a0210b lsl r2, fp, #2
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
5b44: e1a0c000 mov ip, r0
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5b48: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5b4c: e153000a cmp r3, sl
5b50: e0894002 add r4, r9, r2
5b54: 8a000080 bhi 5d5c <_Objects_Extend_information+0x27c>
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5b58: e35a0000 cmp sl, #0 ; 0x0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5b5c: 13a03000 movne r3, #0 ; 0x0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
5b60: 11a02003 movne r2, r3
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5b64: 0a000003 beq 5b78 <_Objects_Extend_information+0x98>
local_table[ index ] = NULL;
5b68: e7842103 str r2, [r4, r3, lsl #2]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
5b6c: e2833001 add r3, r3, #1 ; 0x1
5b70: e153000a cmp r3, sl
5b74: 3afffffb bcc 5b68 <_Objects_Extend_information+0x88>
5b78: e1a07107 lsl r7, r7, #2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5b7c: e3a00000 mov r0, #0 ; 0x0
inactive_per_block[block_count] = 0;
5b80: e7890007 str r0, [r9, r7]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5b84: e5953014 ldr r3, [r5, #20]
5b88: e0881003 add r1, r8, r3
5b8c: e1580001 cmp r8, r1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
5b90: e78c0007 str r0, [ip, r7]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5b94: 2a000006 bcs 5bb4 <_Objects_Extend_information+0xd4>
5b98: e1a03108 lsl r3, r8, #2
5b9c: e0842003 add r2, r4, r3
5ba0: e1a03008 mov r3, r8
index++ ) {
5ba4: e2833001 add r3, r3, #1 ; 0x1
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5ba8: e1530001 cmp r3, r1
index++ ) {
local_table[ index ] = NULL;
5bac: e4820004 str r0, [r2], #4
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
5bb0: 3afffffb bcc 5ba4 <_Objects_Extend_information+0xc4>
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
5bb4: e10f0000 mrs r0, CPSR
5bb8: e38030c0 orr r3, r0, #192 ; 0xc0
5bbc: e129f003 msr CPSR_fc, r3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
5bc0: e5953000 ldr r3, [r5]
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5bc4: e59de004 ldr lr, [sp, #4]
information->maximum_id = _Objects_Build_id(
5bc8: e1d510b4 ldrh r1, [r5, #4]
5bcc: e1a03c03 lsl r3, r3, #24
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5bd0: e1a0280e lsl r2, lr, #16
information->maximum_id = _Objects_Build_id(
5bd4: e3833801 orr r3, r3, #65536 ; 0x10000
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
5bd8: e1a02822 lsr r2, r2, #16
information->maximum_id = _Objects_Build_id(
5bdc: e1833d81 orr r3, r3, r1, lsl #27
5be0: e1833002 orr r3, r3, r2
5be4: e585300c str r3, [r5, #12]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
5be8: e5859030 str r9, [r5, #48]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
5bec: e5953034 ldr r3, [r5, #52]
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
5bf0: e585401c str r4, [r5, #28]
information->maximum = maximum;
5bf4: e1c521b0 strh r2, [r5, #16]
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
5bf8: e585c034 str ip, [r5, #52]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
5bfc: e129f000 msr CPSR_fc, r0
if ( old_tables )
5c00: e3530000 cmp r3, #0 ; 0x0
_Workspace_Free( old_tables );
5c04: 11a00003 movne r0, r3
5c08: 1b000857 blne 7d6c <_Workspace_Free>
5c0c: e5954014 ldr r4, [r5, #20]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
5c10: e5d53012 ldrb r3, [r5, #18]
5c14: e3530000 cmp r3, #0 ; 0x0
5c18: 0a000061 beq 5da4 <_Objects_Extend_information+0x2c4>
information->object_blocks[ block ] =
5c1c: e5953018 ldr r3, [r5, #24]
5c20: e0000493 mul r0, r3, r4
5c24: e5954034 ldr r4, [r5, #52]
5c28: eb000853 bl 7d7c <_Workspace_Allocate>
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5c2c: e5953034 ldr r3, [r5, #52]
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5c30: e7840106 str r0, [r4, r6, lsl #2]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5c34: e7931106 ldr r1, [r3, r6, lsl #2]
5c38: e3510000 cmp r1, #0 ; 0x0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
5c3c: e1a0a106 lsl sl, r6, #2
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
5c40: 0a00001d beq 5cbc <_Objects_Extend_information+0x1dc>
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
5c44: e28d7008 add r7, sp, #8 ; 0x8
5c48: e1a00007 mov r0, r7
5c4c: e2852014 add r2, r5, #20 ; 0x14
5c50: e892000c ldm r2, {r2, r3}
5c54: eb0010ab bl 9f08 <_Chain_Initialize>
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5c58: e1a04008 mov r4, r8
5c5c: e2856020 add r6, r5, #32 ; 0x20
5c60: ea000008 b 5c88 <_Objects_Extend_information+0x1a8>
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
5c64: e5953000 ldr r3, [r5]
5c68: e1d520b4 ldrh r2, [r5, #4]
5c6c: e1a03c03 lsl r3, r3, #24
5c70: e3833801 orr r3, r3, #65536 ; 0x10000
5c74: e1833d82 orr r3, r3, r2, lsl #27
5c78: e1833004 orr r3, r3, r4
5c7c: e58c3008 str r3, [ip, #8]
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5c80: ebfffd6f bl 5244 <_Chain_Append>
index++;
5c84: e2844001 add r4, r4, #1 ; 0x1
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5c88: e1a00007 mov r0, r7
5c8c: eb001090 bl 9ed4 <_Chain_Get>
5c90: e250c000 subs ip, r0, #0 ; 0x0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
5c94: e1a0100c mov r1, ip
5c98: e1a00006 mov r0, r6
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
5c9c: 1afffff0 bne 5c64 <_Objects_Extend_information+0x184>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
5ca0: e5953014 ldr r3, [r5, #20]
5ca4: e5952030 ldr r2, [r5, #48]
5ca8: e782300a str r3, [r2, sl]
information->inactive += information->allocation_size;
5cac: e1d512bc ldrh r1, [r5, #44]
5cb0: e5953014 ldr r3, [r5, #20]
5cb4: e0833001 add r3, r3, r1
5cb8: e1c532bc strh r3, [r5, #44]
}
5cbc: e28dd014 add sp, sp, #20 ; 0x14
5cc0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
5cc4: e5904014 ldr r4, [r0, #20]
5cc8: e1a00009 mov r0, r9
5ccc: e1a01004 mov r1, r4
5cd0: eb0030e3 bl 12064 <__aeabi_uidiv>
for ( ; block < block_count; block++ ) {
5cd4: e2507000 subs r7, r0, #0 ; 0x0
5cd8: 0a00003a beq 5dc8 <_Objects_Extend_information+0x2e8>
if ( information->object_blocks[ block ] == NULL )
5cdc: e5952034 ldr r2, [r5, #52]
5ce0: e5923000 ldr r3, [r2]
5ce4: e3530000 cmp r3, #0 ; 0x0
5ce8: 11a0800a movne r8, sl
5cec: 13a06000 movne r6, #0 ; 0x0
5cf0: 1a000003 bne 5d04 <_Objects_Extend_information+0x224>
5cf4: ea000033 b 5dc8 <_Objects_Extend_information+0x2e8> <== NOT EXECUTED
5cf8: e7923106 ldr r3, [r2, r6, lsl #2]
5cfc: e3530000 cmp r3, #0 ; 0x0
5d00: 0a000003 beq 5d14 <_Objects_Extend_information+0x234>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5d04: e2866001 add r6, r6, #1 ; 0x1
5d08: e1570006 cmp r7, r6
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
5d0c: e0888004 add r8, r8, r4
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5d10: 8afffff8 bhi 5cf8 <_Objects_Extend_information+0x218>
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
5d14: e1580009 cmp r8, r9
5d18: 3affffbc bcc 5c10 <_Objects_Extend_information+0x130>
5d1c: e287b001 add fp, r7, #1 ; 0x1
5d20: e1a0308b lsl r3, fp, #1
5d24: e083000b add r0, r3, fp
5d28: eaffff79 b 5b14 <_Objects_Extend_information+0x34>
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
5d2c: e080000a add r0, r0, sl
5d30: e0800009 add r0, r0, r9
5d34: e1a00100 lsl r0, r0, #2
5d38: eb00080f bl 7d7c <_Workspace_Allocate>
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
5d3c: e250c000 subs ip, r0, #0 ; 0x0
5d40: 0affffdd beq 5cbc <_Objects_Extend_information+0x1dc>
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5d44: e1d531b0 ldrh r3, [r5, #16]
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
5d48: e1a0210b lsl r2, fp, #2
5d4c: e08c9002 add r9, ip, r2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
5d50: e153000a cmp r3, sl
5d54: e0894002 add r4, r9, r2
5d58: 9affff7e bls 5b58 <_Objects_Extend_information+0x78>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
5d5c: e1a07107 lsl r7, r7, #2
5d60: e1a0000c mov r0, ip
5d64: e5951034 ldr r1, [r5, #52]
5d68: e1a02007 mov r2, r7
5d6c: e58dc000 str ip, [sp]
5d70: eb00175a bl bae0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
5d74: e5951030 ldr r1, [r5, #48]
5d78: e1a02007 mov r2, r7
5d7c: e1a00009 mov r0, r9
5d80: eb001756 bl bae0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
5d84: e1d521b0 ldrh r2, [r5, #16]
5d88: e08a2002 add r2, sl, r2
5d8c: e1a02102 lsl r2, r2, #2
5d90: e1a00004 mov r0, r4
5d94: e595101c ldr r1, [r5, #28]
5d98: eb001750 bl bae0 <memcpy>
5d9c: e59dc000 ldr ip, [sp]
5da0: eaffff75 b 5b7c <_Objects_Extend_information+0x9c>
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
5da4: e5953018 ldr r3, [r5, #24]
5da8: e0000493 mul r0, r3, r4
5dac: e5954034 ldr r4, [r5, #52]
5db0: eb0007f5 bl 7d8c <_Workspace_Allocate_or_fatal_error>
5db4: e5953034 ldr r3, [r5, #52]
5db8: e7840106 str r0, [r4, r6, lsl #2]
5dbc: e1a0a106 lsl sl, r6, #2
5dc0: e7931106 ldr r1, [r3, r6, lsl #2]
5dc4: eaffff9e b 5c44 <_Objects_Extend_information+0x164>
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
5dc8: e1a0800a mov r8, sl <== NOT EXECUTED
5dcc: e3a06000 mov r6, #0 ; 0x0 <== NOT EXECUTED
5dd0: eaffffcf b 5d14 <_Objects_Extend_information+0x234> <== NOT EXECUTED
00005ecc <_Objects_Get_isr_disable>:
#if defined(RTEMS_MULTIPROCESSING)
index = id - information->minimum_id + 1;
#else
/* index = _Objects_Get_index( id ); */
index = id & 0x0000ffff;
5ecc: e1a01801 lsl r1, r1, #16
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
5ed0: e52d4004 push {r4} ; (str r4, [sp, #-4]!)
#if defined(RTEMS_MULTIPROCESSING)
index = id - information->minimum_id + 1;
#else
/* index = _Objects_Get_index( id ); */
index = id & 0x0000ffff;
5ed4: e1a01821 lsr r1, r1, #16
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
5ed8: e1a04003 mov r4, r3
index = id & 0x0000ffff;
/* This should work but doesn't always :( */
/* index = (uint16_t ) id; */
#endif
_ISR_Disable( level );
5edc: e10fc000 mrs ip, CPSR
5ee0: e38c30c0 orr r3, ip, #192 ; 0xc0
5ee4: e129f003 msr CPSR_fc, r3
if ( information->maximum >= index ) {
5ee8: e1d031b0 ldrh r3, [r0, #16]
5eec: e1510003 cmp r1, r3
5ef0: 8a000008 bhi 5f18 <_Objects_Get_isr_disable+0x4c>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5ef4: e590301c ldr r3, [r0, #28]
5ef8: e7930101 ldr r0, [r3, r1, lsl #2]
5efc: e3500000 cmp r0, #0 ; 0x0
*location = OBJECTS_LOCAL;
5f00: 13a03000 movne r3, #0 ; 0x0
5f04: 15823000 strne r3, [r2]
*level_p = level;
5f08: 1584c000 strne ip, [r4]
/* index = (uint16_t ) id; */
#endif
_ISR_Disable( level );
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
5f0c: 0a000006 beq 5f2c <_Objects_Get_isr_disable+0x60>
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
5f10: e8bd0010 pop {r4}
5f14: e12fff1e bx lr
}
_ISR_Enable( level );
*location = OBJECTS_ERROR;
return NULL;
}
_ISR_Enable( level );
5f18: e129f00c msr CPSR_fc, ip
*location = OBJECTS_ERROR;
5f1c: e3a03001 mov r3, #1 ; 0x1
5f20: e5823000 str r3, [r2]
5f24: e3a00000 mov r0, #0 ; 0x0
5f28: eafffff8 b 5f10 <_Objects_Get_isr_disable+0x44>
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
*level_p = level;
return the_object;
}
_ISR_Enable( level );
5f2c: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
*location = OBJECTS_ERROR;
5f30: e3a03001 mov r3, #1 ; 0x1 <== NOT EXECUTED
5f34: e5823000 str r3, [r2] <== NOT EXECUTED
5f38: eafffff4 b 5f10 <_Objects_Get_isr_disable+0x44> <== NOT EXECUTED
0000607c <_Objects_Namespace_remove>:
)
{
/*
* If this is a string format name, then free the memory.
*/
if ( information->is_string && the_object->name.name_p )
607c: e5d03038 ldrb r3, [r0, #56]
6080: e3530000 cmp r3, #0 ; 0x0
void _Objects_Namespace_remove(
Objects_Information *information,
Objects_Control *the_object
)
{
6084: e92d4010 push {r4, lr}
6088: e1a04001 mov r4, r1
/*
* If this is a string format name, then free the memory.
*/
if ( information->is_string && the_object->name.name_p )
608c: 0a000002 beq 609c <_Objects_Namespace_remove+0x20>
6090: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
6094: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
6098: 1b000733 blne 7d6c <_Workspace_Free> <== NOT EXECUTED
/*
* Clear out either format.
*/
the_object->name.name_p = NULL;
609c: e3a03000 mov r3, #0 ; 0x0
the_object->name.name_u32 = 0;
60a0: e584300c str r3, [r4, #12]
}
60a4: e8bd8010 pop {r4, pc}
00007ec4 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
7ec4: e92d40f0 push {r4, r5, r6, r7, lr}
7ec8: e1a04000 mov r4, r0
7ecc: e1a07001 mov r7, r1
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
7ed0: e1a00002 mov r0, r2
7ed4: e1d413ba ldrh r1, [r4, #58]
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
7ed8: e1a05002 mov r5, r2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
7edc: eb001c4c bl f014 <strnlen>
if ( information->is_string ) {
7ee0: e5d43038 ldrb r3, [r4, #56]
7ee4: e3530000 cmp r3, #0 ; 0x0
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
7ee8: e2804001 add r4, r0, #1 ; 0x1
if ( information->is_string ) {
7eec: 1a00001a bne 7f5c <_Objects_Set_name+0x98>
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
7ef0: e3540000 cmp r4, #0 ; 0x0
7ef4: 03a00a02 moveq r0, #8192 ; 0x2000
7ef8: 02800020 addeq r0, r0, #32 ; 0x20
7efc: 01800800 orreq r0, r0, r0, lsl #16
7f00: 0a000012 beq 7f50 <_Objects_Set_name+0x8c>
7f04: e5d53000 ldrb r3, [r5]
7f08: e3540001 cmp r4, #1 ; 0x1
7f0c: e1a02c03 lsl r2, r3, #24
7f10: 03820602 orreq r0, r2, #2097152 ; 0x200000
7f14: 03800a02 orreq r0, r0, #8192 ; 0x2000
7f18: 03800020 orreq r0, r0, #32 ; 0x20
7f1c: 0a00000b beq 7f50 <_Objects_Set_name+0x8c>
7f20: e5d53001 ldrb r3, [r5, #1]
7f24: e3540002 cmp r4, #2 ; 0x2
7f28: e1822803 orr r2, r2, r3, lsl #16
7f2c: 03820a02 orreq r0, r2, #8192 ; 0x2000
7f30: 03800020 orreq r0, r0, #32 ; 0x20
7f34: 0a000005 beq 7f50 <_Objects_Set_name+0x8c>
7f38: e5d53002 ldrb r3, [r5, #2]
7f3c: e3540003 cmp r4, #3 ; 0x3
7f40: e1820403 orr r0, r2, r3, lsl #8
7f44: 15d53003 ldrbne r3, [r5, #3]
7f48: 03800020 orreq r0, r0, #32 ; 0x20
7f4c: 11800003 orrne r0, r0, r3
7f50: e587000c str r0, [r7, #12]
7f54: e3a00001 mov r0, #1 ; 0x1
);
}
return TRUE;
}
7f58: e8bd80f0 pop {r4, r5, r6, r7, pc}
length = strnlen( name, information->name_length ) + 1;
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
7f5c: e1a00004 mov r0, r4 <== NOT EXECUTED
7f60: eb000721 bl 9bec <_Workspace_Allocate> <== NOT EXECUTED
if ( !d )
7f64: e2506000 subs r6, r0, #0 ; 0x0 <== NOT EXECUTED
7f68: 01a00006 moveq r0, r6 <== NOT EXECUTED
7f6c: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
return FALSE;
if ( the_object->name.name_p ) {
7f70: e597000c ldr r0, [r7, #12] <== NOT EXECUTED
7f74: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
7f78: 0a000002 beq 7f88 <_Objects_Set_name+0xc4> <== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
7f7c: eb000716 bl 9bdc <_Workspace_Free> <== NOT EXECUTED
the_object->name.name_p = NULL;
7f80: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
7f84: e587300c str r3, [r7, #12] <== NOT EXECUTED
}
strncpy( d, name, length );
7f88: e1a01005 mov r1, r5 <== NOT EXECUTED
7f8c: e1a00006 mov r0, r6 <== NOT EXECUTED
7f90: e1a02004 mov r2, r4 <== NOT EXECUTED
7f94: eb001bdb bl ef08 <strncpy> <== NOT EXECUTED
d[ length ] = '\0';
7f98: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
7f9c: e7c63004 strb r3, [r6, r4] <== NOT EXECUTED
the_object->name.name_p = d;
7fa0: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
7fa4: e587600c str r6, [r7, #12] <== NOT EXECUTED
7fa8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000098f4 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
98f4: e92d4070 push {r4, r5, r6, lr}
Heap_Get_information_status status;
if ( !the_heap )
98f8: e2506000 subs r6, r0, #0 ; 0x0
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
98fc: e1a04001 mov r4, r1
Heap_Get_information_status status;
if ( !the_heap )
9900: 0a00000d beq 993c <_Protected_heap_Get_information+0x48>
return false;
if ( !the_info )
9904: e3510000 cmp r1, #0 ; 0x0
9908: 0a00000b beq 993c <_Protected_heap_Get_information+0x48>
return false;
_RTEMS_Lock_allocator();
990c: e59f5030 ldr r5, [pc, #48] ; 9944 <_Protected_heap_Get_information+0x50>
9910: e5950000 ldr r0, [r5]
9914: ebfff981 bl 7f20 <_API_Mutex_Lock>
status = _Heap_Get_information( the_heap, the_info );
9918: e1a01004 mov r1, r4
991c: e1a00006 mov r0, r6
9920: eb00100a bl d950 <_Heap_Get_information>
9924: e1a04000 mov r4, r0
_RTEMS_Unlock_allocator();
9928: e5950000 ldr r0, [r5]
992c: ebfff997 bl 7f90 <_API_Mutex_Unlock>
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
9930: e2740001 rsbs r0, r4, #1 ; 0x1
9934: 33a00000 movcc r0, #0 ; 0x0
9938: e8bd8070 pop {r4, r5, r6, pc}
993c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return true;
return false;
}
9940: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009d20 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
9d20: e92d4030 push {r4, r5, lr}
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
9d24: e59f5084 ldr r5, [pc, #132] ; 9db0 <_RTEMS_tasks_Create_extension+0x90>
9d28: e5953000 ldr r3, [r5]
9d2c: e5932040 ldr r2, [r3, #64]
9d30: e5d20004 ldrb r0, [r2, #4]
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
9d34: e3500000 cmp r0, #0 ; 0x0
9d38: 13a00060 movne r0, #96 ; 0x60
9d3c: 03a00020 moveq r0, #32 ; 0x20
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
9d40: e1a04001 mov r4, r1
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
9d44: ebfff80c bl 7d7c <_Workspace_Allocate>
if ( !api )
9d48: e3500000 cmp r0, #0 ; 0x0
9d4c: 08bd8030 popeq {r4, r5, pc}
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
9d50: e5951000 ldr r1, [r5]
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = true;
9d54: e3a03001 mov r3, #1 ; 0x1
9d58: e5c03008 strb r3, [r0, #8]
9d5c: e5912040 ldr r2, [r1, #64]
9d60: e5d23004 ldrb r3, [r2, #4]
9d64: e3530000 cmp r3, #0 ; 0x0
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
9d68: e3a03000 mov r3, #0 ; 0x0
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
9d6c: e5843114 str r3, [r4, #276]
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
9d70: e5840104 str r0, [r4, #260]
api->pending_events = EVENT_SETS_NONE_PENDING;
9d74: e5803000 str r3, [r0]
information->handler = NULL;
9d78: e580300c str r3, [r0, #12]
information->mode_set = RTEMS_DEFAULT_MODES;
9d7c: e5803010 str r3, [r0, #16]
information->signals_posted = 0;
9d80: e5803014 str r3, [r0, #20]
information->signals_pending = 0;
9d84: e5803018 str r3, [r0, #24]
information->nest_level = 0;
9d88: e580301c str r3, [r0, #28]
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
9d8c: 0a000005 beq 9da8 <_RTEMS_tasks_Create_extension+0x88>
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
9d90: e1a02003 mov r2, r3
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
9d94: e2833001 add r3, r3, #1 ; 0x1
9d98: e3530010 cmp r3, #16 ; 0x10
api->Notepads[i] = 0;
9d9c: e5802020 str r2, [r0, #32]
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
9da0: e2800004 add r0, r0, #4 ; 0x4
9da4: 1afffffa bne 9d94 <_RTEMS_tasks_Create_extension+0x74>
9da8: e3a00001 mov r0, #1 ; 0x1
api->Notepads[i] = 0;
}
return true;
}
9dac: e8bd8030 pop {r4, r5, pc}
00005640 <_TOD_Get>:
*/
void _TOD_Get(
struct timespec *time
)
{
5640: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
5644: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get(
struct timespec *time
)
{
5648: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
564c: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get(
struct timespec *time
)
{
5650: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume time checked by caller */
offset.tv_sec = 0;
5654: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
5658: e10f6000 mrs r6, CPSR
565c: e38630c0 orr r3, r6, #192 ; 0xc0
5660: e129f003 msr CPSR_fc, r3
*time = _TOD_Now;
if ( _Watchdog_Nanoseconds_since_tick_handler )
5664: e59f3038 ldr r3, [pc, #56] ; 56a4 <_TOD_Get+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5668: e59f2038 ldr r2, [pc, #56] ; 56a8 <_TOD_Get+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
566c: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5670: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
5674: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
/* _TOD_Now is a proper POSIX time */
_ISR_Disable( level );
*time = _TOD_Now;
5678: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
567c: 0a000002 beq 568c <_TOD_Get+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
5680: e1a0e00f mov lr, pc <== NOT EXECUTED
5684: e12fff11 bx r1 <== NOT EXECUTED
5688: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
568c: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( time, &offset );
5690: e1a00005 mov r0, r5
5694: e1a0100d mov r1, sp
5698: eb000813 bl 76ec <_Timespec_Add_to>
}
569c: e28dd008 add sp, sp, #8 ; 0x8
56a0: e8bd8070 pop {r4, r5, r6, pc}
0000a0b0 <_TOD_Get_uptime>:
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a0b0: e92d4070 push {r4, r5, r6, lr}
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a0b4: e3a03000 mov r3, #0 ; 0x0
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a0b8: e24dd008 sub sp, sp, #8 ; 0x8
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
offset.tv_nsec = 0;
a0bc: e58d3004 str r3, [sp, #4]
*/
void _TOD_Get_uptime(
struct timespec *uptime
)
{
a0c0: e1a05000 mov r5, r0
ISR_Level level;
struct timespec offset;
/* assume uptime checked by caller */
offset.tv_sec = 0;
a0c4: e58d3000 str r3, [sp]
offset.tv_nsec = 0;
_ISR_Disable( level );
a0c8: e10f6000 mrs r6, CPSR
a0cc: e38630c0 orr r3, r6, #192 ; 0xc0
a0d0: e129f003 msr CPSR_fc, r3
*uptime = _TOD_Uptime;
if ( _Watchdog_Nanoseconds_since_tick_handler )
a0d4: e59f3038 ldr r3, [pc, #56] ; a114 <_TOD_Get_uptime+0x64>
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a0d8: e59f2038 ldr r2, [pc, #56] ; a118 <_TOD_Get_uptime+0x68>
if ( _Watchdog_Nanoseconds_since_tick_handler )
a0dc: e5931000 ldr r1, [r3]
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a0e0: e8920018 ldm r2, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a0e4: e3510000 cmp r1, #0 ; 0x0
offset.tv_sec = 0;
offset.tv_nsec = 0;
_ISR_Disable( level );
*uptime = _TOD_Uptime;
a0e8: e8800018 stm r0, {r3, r4}
if ( _Watchdog_Nanoseconds_since_tick_handler )
a0ec: 0a000002 beq a0fc <_TOD_Get_uptime+0x4c>
offset.tv_nsec = (*_Watchdog_Nanoseconds_since_tick_handler)();
a0f0: e1a0e00f mov lr, pc <== NOT EXECUTED
a0f4: e12fff11 bx r1 <== NOT EXECUTED
a0f8: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
_ISR_Enable( level );
a0fc: e129f006 msr CPSR_fc, r6
_Timespec_Add_to( uptime, &offset );
a100: e1a00005 mov r0, r5
a104: e1a0100d mov r1, sp
a108: ebfff577 bl 76ec <_Timespec_Add_to>
}
a10c: e28dd008 add sp, sp, #8 ; 0x8
a110: e8bd8070 pop {r4, r5, r6, pc}
00005700 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
5700: e92d4010 push {r4, lr}
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
5704: e59f306c ldr r3, [pc, #108] ; 5778 <_TOD_Tickle_ticks+0x78>
5708: e5931000 ldr r1, [r3]
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
570c: e24dd008 sub sp, sp, #8 ; 0x8
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
tick.tv_sec = 0;
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
5710: e59fc064 ldr ip, [pc, #100] ; 577c <_TOD_Tickle_ticks+0x7c>
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
tick.tv_sec = 0;
5714: e28d4008 add r4, sp, #8 ; 0x8
{
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
5718: e1a03381 lsl r3, r1, #7
tick.tv_sec = 0;
571c: e3a02000 mov r2, #0 ; 0x0
5720: e5242008 str r2, [r4, #-8]!
{
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
5724: e0433101 sub r3, r3, r1, lsl #2
tick.tv_sec = 0;
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
5728: e59c2000 ldr r2, [ip]
{
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
572c: e0833001 add r3, r3, r1
5730: e1a03183 lsl r3, r3, #3
tick.tv_sec = 0;
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
5734: e2822001 add r2, r2, #1 ; 0x1
/* Update the timespec format uptime */
(void) _Timespec_Add_to( &_TOD_Uptime, &tick );
5738: e1a0100d mov r1, sp
573c: e59f003c ldr r0, [pc, #60] ; 5780 <_TOD_Tickle_ticks+0x80>
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
tick.tv_sec = 0;
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
5740: e58c2000 str r2, [ip]
{
struct timespec tick;
uint32_t seconds;
/* Convert the tick quantum to a timespec */
tick.tv_nsec = _TOD_Microseconds_per_tick * 1000;
5744: e58d3004 str r3, [sp, #4]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
(void) _Timespec_Add_to( &_TOD_Uptime, &tick );
5748: eb0007e7 bl 76ec <_Timespec_Add_to>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timespec_Add_to( &_TOD_Now, &tick );
574c: e1a0100d mov r1, sp
5750: e59f002c ldr r0, [pc, #44] ; 5784 <_TOD_Tickle_ticks+0x84>
5754: eb0007e4 bl 76ec <_Timespec_Add_to>
while ( seconds ) {
5758: e2504000 subs r4, r0, #0 ; 0x0
575c: 0a000003 beq 5770 <_TOD_Tickle_ticks+0x70>
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
5760: e59f0020 ldr r0, [pc, #32] ; 5788 <_TOD_Tickle_ticks+0x88>
5764: eb000959 bl 7cd0 <_Watchdog_Tickle>
5768: e2544001 subs r4, r4, #1 ; 0x1
576c: 1afffffb bne 5760 <_TOD_Tickle_ticks+0x60>
_Watchdog_Tickle_seconds();
seconds--;
}
}
5770: e28dd008 add sp, sp, #8 ; 0x8
5774: e8bd8010 pop {r4, pc}
000065c8 <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
65c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
* This routine allocates an internal thread.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
65cc: e59f60c0 ldr r6, [pc, #192] ; 6694 <_Thread_Create_idle+0xcc>
65d0: e24dd01c sub sp, sp, #28 ; 0x1c
65d4: e1a00006 mov r0, r6
65d8: ebfffd10 bl 5a20 <_Objects_Allocate>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
65dc: e59f80b4 ldr r8, [pc, #180] ; 6698 <_Thread_Create_idle+0xd0>
65e0: e5983000 ldr r3, [r8]
/*
* The entire workspace is zeroed during its initialization. Thus, all
* fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization.
*/
_Thread_Idle = _Thread_Internal_allocate();
65e4: e59f70b0 ldr r7, [pc, #176] ; 669c <_Thread_Create_idle+0xd4>
65e8: e2833001 add r3, r3, #1 ; 0x1
65ec: e5883000 str r3, [r8]
65f0: e5870000 str r0, [r7]
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
65f4: e59fa0a4 ldr sl, [pc, #164] ; 66a0 <_Thread_Create_idle+0xd8>
65f8: e59f20a4 ldr r2, [pc, #164] ; 66a4 <_Thread_Create_idle+0xdc>
65fc: e59a3000 ldr r3, [sl]
6600: e5930018 ldr r0, [r3, #24]
6604: e5923000 ldr r3, [r2]
6608: e59f2098 ldr r2, [pc, #152] ; 66a8 <_Thread_Create_idle+0xe0>
660c: e5d24000 ldrb r4, [r2]
6610: e3a05000 mov r5, #0 ; 0x0
6614: e58d4004 str r4, [sp, #4]
6618: e59f408c ldr r4, [pc, #140] ; 66ac <_Thread_Create_idle+0xe4>
661c: e1500003 cmp r0, r3
6620: 21a03000 movcs r3, r0
6624: e3a0c001 mov ip, #1 ; 0x1
6628: e5971000 ldr r1, [r7]
662c: e1a00006 mov r0, r6
6630: e1a02005 mov r2, r5
6634: e58dc008 str ip, [sp, #8]
6638: e58d4018 str r4, [sp, #24]
663c: e58d5000 str r5, [sp]
6640: e58d500c str r5, [sp, #12]
6644: e58d5010 str r5, [sp, #16]
6648: e58d5014 str r5, [sp, #20]
664c: eb0000b2 bl 691c <_Thread_Initialize>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
6650: e5984000 ldr r4, [r8]
6654: e2444001 sub r4, r4, #1 ; 0x1
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
6658: e5976000 ldr r6, [r7]
_Thread_Executing = _Thread_Idle;
_Thread_Start(
665c: e59a3000 ldr r3, [sl]
6660: e5884000 str r4, [r8]
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
6664: e59fc044 ldr ip, [pc, #68] ; 66b0 <_Thread_Create_idle+0xe8>
6668: e59f4044 ldr r4, [pc, #68] ; 66b4 <_Thread_Create_idle+0xec>
_Thread_Executing = _Thread_Idle;
_Thread_Start(
666c: e5932014 ldr r2, [r3, #20]
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
6670: e58c6000 str r6, [ip]
6674: e5846000 str r6, [r4]
_Thread_Executing = _Thread_Idle;
_Thread_Start(
6678: e1a01005 mov r1, r5
667c: e1a00006 mov r0, r6
6680: e1a03005 mov r3, r5
6684: e58d5000 str r5, [sp]
6688: eb0003b6 bl 7568 <_Thread_Start>
_Configuration_Table->idle_task,
NULL,
0
);
}
668c: e28dd01c add sp, sp, #28 ; 0x1c
6690: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00006850 <_Thread_Enable_dispatch>:
#if ( (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
6850: e59f3018 ldr r3, [pc, #24] ; 6870 <_Thread_Enable_dispatch+0x20>
6854: e5932000 ldr r2, [r3]
6858: e2422001 sub r2, r2, #1 ; 0x1
685c: e5832000 str r2, [r3]
6860: e5931000 ldr r1, [r3]
6864: e3510000 cmp r1, #0 ; 0x0
6868: 112fff1e bxne lr
return;
_Thread_Dispatch();
686c: eaffffa3 b 6700 <_Thread_Dispatch>
0000b170 <_Thread_Handler>:
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
b170: e59f3110 ldr r3, [pc, #272] ; b288 <_Thread_Handler+0x118>
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
b174: e92d4030 push {r4, r5, lr}
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
b178: e5935000 ldr r5, [r3]
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
b17c: e59520b8 ldr r2, [r5, #184]
_ISR_Set_level(level);
b180: e3a03000 mov r3, #0 ; 0x0
b184: e10f3000 mrs r3, CPSR
b188: e3c330c0 bic r3, r3, #192 ; 0xc0
b18c: e1833002 orr r3, r3, r2
b190: e121f003 msr CPSR_c, r3
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
b194: e59f20f0 ldr r2, [pc, #240] ; b28c <_Thread_Handler+0x11c>
doneConstructors = 1;
b198: e3a03001 mov r3, #1 ; 0x1
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
b19c: e5d24000 ldrb r4, [r2]
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
b1a0: e1a00005 mov r0, r5
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
doneConstructors = 1;
b1a4: e5c23000 strb r3, [r2]
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
b1a8: ebfff1aa bl 7858 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
b1ac: ebffeda7 bl 6850 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
b1b0: e3540000 cmp r4, #0 ; 0x0
b1b4: 0a000031 beq b280 <_Thread_Handler+0x110>
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
b1b8: e59530a0 ldr r3, [r5, #160]
b1bc: e3530003 cmp r3, #3 ; 0x3
b1c0: 979ff103 ldrls pc, [pc, r3, lsl #2]
b1c4: ea000008 b b1ec <_Thread_Handler+0x7c> <== NOT EXECUTED
b1c8: 0000b258 .word 0x0000b258 <== NOT EXECUTED
b1cc: 0000b230 .word 0x0000b230 <== NOT EXECUTED
b1d0: 0000b204 .word 0x0000b204 <== NOT EXECUTED
b1d4: 0000b1d8 .word 0x0000b1d8 <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
b1d8: e59500a8 ldr r0, [r5, #168] <== NOT EXECUTED
b1dc: e59510a4 ldr r1, [r5, #164] <== NOT EXECUTED
b1e0: e1a0e00f mov lr, pc <== NOT EXECUTED
b1e4: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
b1e8: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
b1ec: e1a00005 mov r0, r5 <== NOT EXECUTED
b1f0: ebfff1a8 bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
b1f4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
b1f8: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
b1fc: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
b200: ebffe9ec bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
b204: e28500a4 add r0, r5, #164 ; 0xa4 <== NOT EXECUTED
b208: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
b20c: e1a0e00f mov lr, pc <== NOT EXECUTED
b210: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
b214: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
b218: e1a00005 mov r0, r5 <== NOT EXECUTED
b21c: ebfff19d bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
b220: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
b224: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
b228: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
b22c: ebffe9e1 bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
b230: e59500a4 ldr r0, [r5, #164] <== NOT EXECUTED
b234: e1a0e00f mov lr, pc <== NOT EXECUTED
b238: e595f09c ldr pc, [r5, #156] <== NOT EXECUTED
b23c: e5850028 str r0, [r5, #40] <== NOT EXECUTED
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
b240: e1a00005 mov r0, r5 <== NOT EXECUTED
b244: ebfff193 bl 7898 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
b248: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
b24c: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
b250: e3a02006 mov r2, #6 ; 0x6 <== NOT EXECUTED
b254: ebffe9d7 bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
__main ();
#endif
switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
b258: e59500a8 ldr r0, [r5, #168]
b25c: e1a0e00f mov lr, pc
b260: e595f09c ldr pc, [r5, #156]
b264: e5850028 str r0, [r5, #40]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
b268: e1a00005 mov r0, r5
b26c: ebfff189 bl 7898 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
b270: e3a00000 mov r0, #0 ; 0x0
b274: e3a01001 mov r1, #1 ; 0x1
b278: e3a02006 mov r2, #6 ; 0x6
b27c: ebffe9cd bl 59b8 <_Internal_error_Occurred>
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
{
_init ();
b280: ebffd3a6 bl 120 <_init>
b284: eaffffcb b b1b8 <_Thread_Handler+0x48>
00006acc <_Thread_Handler_initialization>:
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!_Configuration_Table->stack_allocate_hook)
6acc: e59f20ec ldr r2, [pc, #236] ; 6bc0 <_Thread_Handler_initialization+0xf4>
6ad0: e592c000 ldr ip, [r2]
#if defined(RTEMS_MULTIPROCESSING)
,
uint32_t maximum_proxies
#endif
)
{
6ad4: e92d4030 push {r4, r5, lr}
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!_Configuration_Table->stack_allocate_hook)
6ad8: e28c2020 add r2, ip, #32 ; 0x20
6adc: e892000c ldm r2, {r2, r3}
6ae0: e2733001 rsbs r3, r3, #1 ; 0x1
6ae4: 33a03000 movcc r3, #0 ; 0x0
6ae8: e3520000 cmp r2, #0 ; 0x0
6aec: 11a05003 movne r5, r3
6af0: 02235001 eoreq r5, r3, #1 ; 0x1
6af4: e3550000 cmp r5, #0 ; 0x0
#if defined(RTEMS_MULTIPROCESSING)
,
uint32_t maximum_proxies
#endif
)
{
6af8: e24dd00c sub sp, sp, #12 ; 0xc
6afc: e1a0c000 mov ip, r0
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!_Configuration_Table->stack_allocate_hook)
6b00: 1a00002a bne 6bb0 <_Thread_Handler_initialization+0xe4>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
6b04: e59f40b8 ldr r4, [pc, #184] ; 6bc4 <_Thread_Handler_initialization+0xf8>
6b08: e5d40000 ldrb r0, [r4]
6b0c: e2800001 add r0, r0, #1 ; 0x1
6b10: e1a03200 lsl r3, r0, #4
6b14: e0430100 sub r0, r3, r0, lsl #2
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
6b18: e59f20a8 ldr r2, [pc, #168] ; 6bc8 <_Thread_Handler_initialization+0xfc>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
6b1c: e59f30a8 ldr r3, [pc, #168] ; 6bcc <_Thread_Handler_initialization+0x100>
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
6b20: e5821000 str r1, [r2]
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
6b24: e583c000 str ip, [r3]
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = FALSE;
6b28: e59f20a0 ldr r2, [pc, #160] ; 6bd0 <_Thread_Handler_initialization+0x104>
_Thread_Executing = NULL;
6b2c: e59f30a0 ldr r3, [pc, #160] ; 6bd4 <_Thread_Handler_initialization+0x108>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = FALSE;
6b30: e5c25000 strb r5, [r2]
_Thread_Executing = NULL;
6b34: e5835000 str r5, [r3]
_Thread_Heir = NULL;
6b38: e59f2098 ldr r2, [pc, #152] ; 6bd8 <_Thread_Handler_initialization+0x10c>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
6b3c: e59f3098 ldr r3, [pc, #152] ; 6bdc <_Thread_Handler_initialization+0x110>
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = FALSE;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
6b40: e5825000 str r5, [r2]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
6b44: e5835000 str r5, [r3]
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
6b48: eb00048f bl 7d8c <_Workspace_Allocate_or_fatal_error>
6b4c: e59f308c ldr r3, [pc, #140] ; 6be0 <_Thread_Handler_initialization+0x114>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
6b50: e5d41000 ldrb r1, [r4]
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
6b54: e5830000 str r0, [r3]
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
6b58: e1a02005 mov r2, r5
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
6b5c: e1a0c005 mov ip, r5
6b60: e2822001 add r2, r2, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6b64: e2803004 add r3, r0, #4 ; 0x4
6b68: e1520001 cmp r2, r1
6b6c: e8801008 stm r0, {r3, ip}
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
6b70: e5800008 str r0, [r0, #8]
6b74: e280000c add r0, r0, #12 ; 0xc
6b78: 9afffff8 bls 6b60 <_Thread_Handler_initialization+0x94>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
6b7c: e3a0c001 mov ip, #1 ; 0x1
6b80: e3a0ef46 mov lr, #280 ; 0x118
6b84: e3a04008 mov r4, #8 ; 0x8
6b88: e1a0100c mov r1, ip
6b8c: e59f0050 ldr r0, [pc, #80] ; 6be4 <_Thread_Handler_initialization+0x118>
6b90: e1a0200c mov r2, ip
6b94: e1a0300c mov r3, ip
6b98: e58de000 str lr, [sp]
6b9c: e58d4008 str r4, [sp, #8]
6ba0: e58dc004 str ip, [sp, #4]
6ba4: ebfffd01 bl 5fb0 <_Objects_Initialize_information>
FALSE, /* TRUE if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
6ba8: e28dd00c add sp, sp, #12 ; 0xc
6bac: e8bd8030 pop {r4, r5, pc}
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!_Configuration_Table->stack_allocate_hook)
== (!_Configuration_Table->stack_free_hook) ) )
_Internal_error_Occurred(
6bb0: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
6bb4: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
6bb8: e3a0200f mov r2, #15 ; 0xf <== NOT EXECUTED
6bbc: ebfffb7d bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
0000691c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
691c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
6920: e2526000 subs r6, r2, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
6924: e1a04003 mov r4, r3
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
6928: 13a03000 movne r3, #0 ; 0x0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
692c: e5dda02c ldrb sl, [sp, #44]
6930: e1a09000 mov r9, r0
6934: e1a05001 mov r5, r1
6938: e59d8028 ldr r8, [sp, #40]
693c: e59db030 ldr fp, [sp, #48]
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
6940: 15c130c0 strbne r3, [r1, #192]
6944: 11a0c004 movne ip, r4
6948: 11a02006 movne r2, r6
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
694c: 0a000034 beq 6a24 <_Thread_Initialize+0x108>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
6950: e59f416c ldr r4, [pc, #364] ; 6ac4 <_Thread_Initialize+0x1a8>
6954: e5940000 ldr r0, [r4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
6958: e3a06000 mov r6, #0 ; 0x0
695c: e3500000 cmp r0, #0 ; 0x0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
6960: e58520c8 str r2, [r5, #200]
the_stack->size = size;
6964: e585c0c4 str ip, [r5, #196]
6968: e5856050 str r6, [r5, #80]
the_watchdog->routine = routine;
696c: e5856064 str r6, [r5, #100]
the_watchdog->id = id;
6970: e5856068 str r6, [r5, #104]
the_watchdog->user_data = user_data;
6974: e585606c str r6, [r5, #108]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
6978: e5856100 str r6, [r5, #256]
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
697c: 05850110 streq r0, [r5, #272]
6980: 01a07000 moveq r7, r0
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
6984: 1a000033 bne 6a58 <_Thread_Initialize+0x13c>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6988: e59d3034 ldr r3, [sp, #52]
switch ( budget_algorithm ) {
698c: e35b0002 cmp fp, #2 ; 0x2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
6990: e58530b4 str r3, [r5, #180]
switch ( budget_algorithm ) {
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
6994: 059f312c ldreq r3, [pc, #300] ; 6ac8 <_Thread_Initialize+0x1ac>
6998: 05932000 ldreq r2, [r3]
699c: 05852078 streq r2, [r5, #120]
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
69a0: e59d3038 ldr r3, [sp, #56]
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
69a4: e3a04000 mov r4, #0 ; 0x0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
69a8: e3a06001 mov r6, #1 ; 0x1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
69ac: e58530b8 str r3, [r5, #184]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
69b0: e1a01008 mov r1, r8
69b4: e1a00005 mov r0, r5
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
69b8: e5c5a0ac strb sl, [r5, #172]
the_thread->Start.budget_algorithm = budget_algorithm;
69bc: e585b0b0 str fp, [r5, #176]
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
69c0: e5856010 str r6, [r5, #16]
the_thread->Wait.queue = NULL;
69c4: e5854044 str r4, [r5, #68]
the_thread->resource_count = 0;
69c8: e585401c str r4, [r5, #28]
the_thread->suspend_count = 0;
69cc: e5854070 str r4, [r5, #112]
the_thread->real_priority = priority;
69d0: e5858018 str r8, [r5, #24]
the_thread->Start.initial_priority = priority;
69d4: e58580bc str r8, [r5, #188]
_Thread_Set_priority( the_thread, priority );
69d8: eb000200 bl 71e0 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
69dc: e1d530b8 ldrh r3, [r5, #8]
69e0: e599201c ldr r2, [r9, #28]
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
the_thread->cpu_time_used.tv_nsec = 0;
69e4: e5854088 str r4, [r5, #136]
69e8: e7825103 str r5, [r2, r3, lsl #2]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
69ec: e59d303c ldr r3, [sp, #60]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
69f0: e1a00005 mov r0, r5
69f4: e585300c str r3, [r5, #12]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
69f8: e5854084 str r4, [r5, #132]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
69fc: eb0003cb bl 7930 <_User_extensions_Thread_create>
if ( !extension_status ) {
6a00: e1500004 cmp r0, r4
6a04: 1a000011 bne 6a50 <_Thread_Initialize+0x134>
if ( extensions_area )
6a08: e3570000 cmp r7, #0 ; 0x0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
6a0c: 11a00007 movne r0, r7 <== NOT EXECUTED
6a10: 1b0004d5 blne 7d6c <_Workspace_Free> <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6a14: e1a00005 mov r0, r5 <== NOT EXECUTED
6a18: eb0002ad bl 74d4 <_Thread_Stack_Free> <== NOT EXECUTED
6a1c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
6a20: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
6a24: e1a00001 mov r0, r1
6a28: e1a01004 mov r1, r4
6a2c: eb000288 bl 7454 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
6a30: e1540000 cmp r4, r0
6a34: 93a03000 movls r3, #0 ; 0x0
6a38: 83a03001 movhi r3, #1 ; 0x1
6a3c: e3500000 cmp r0, #0 ; 0x0
6a40: 03833001 orreq r3, r3, #1 ; 0x1
6a44: e3530000 cmp r3, #0 ; 0x0
6a48: e1a0c000 mov ip, r0
6a4c: 0a000014 beq 6aa4 <_Thread_Initialize+0x188>
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( !extension_status ) {
6a50: e1a00006 mov r0, r6
6a54: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
6a58: e2800001 add r0, r0, #1 ; 0x1 <== NOT EXECUTED
6a5c: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
6a60: eb0004c5 bl 7d7c <_Workspace_Allocate> <== NOT EXECUTED
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
6a64: e2507000 subs r7, r0, #0 ; 0x0 <== NOT EXECUTED
6a68: 0a000011 beq 6ab4 <_Thread_Initialize+0x198> <== NOT EXECUTED
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6a6c: e5943000 ldr r3, [r4] <== NOT EXECUTED
6a70: e3730001 cmn r3, #1 ; 0x1 <== NOT EXECUTED
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
6a74: e5857110 str r7, [r5, #272] <== NOT EXECUTED
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6a78: 0affffc2 beq 6988 <_Thread_Initialize+0x6c> <== NOT EXECUTED
6a7c: e1a02006 mov r2, r6 <== NOT EXECUTED
6a80: e1a01007 mov r1, r7 <== NOT EXECUTED
the_thread->extensions[i] = NULL;
6a84: e1a00006 mov r0, r6 <== NOT EXECUTED
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6a88: e5943000 ldr r3, [r4] <== NOT EXECUTED
the_thread->extensions[i] = NULL;
6a8c: e7810102 str r0, [r1, r2, lsl #2] <== NOT EXECUTED
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
6a90: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
6a94: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
6a98: e1530002 cmp r3, r2 <== NOT EXECUTED
6a9c: 8afffff9 bhi 6a88 <_Thread_Initialize+0x16c> <== NOT EXECUTED
6aa0: eaffffb8 b 6988 <_Thread_Initialize+0x6c> <== NOT EXECUTED
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
6aa4: e3a03001 mov r3, #1 ; 0x1
6aa8: e5c530c0 strb r3, [r5, #192]
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
6aac: e59520cc ldr r2, [r5, #204]
6ab0: eaffffa6 b 6950 <_Thread_Initialize+0x34>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
6ab4: e1a00005 mov r0, r5 <== NOT EXECUTED
6ab8: eb000285 bl 74d4 <_Thread_Stack_Free> <== NOT EXECUTED
6abc: e1a00007 mov r0, r7 <== NOT EXECUTED
6ac0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00007edc <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7edc: e5903010 ldr r3, [r0, #16]
7ee0: e3130001 tst r3, #1 ; 0x1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
7ee4: e92d4070 push {r4, r5, r6, lr}
7ee8: e1a04000 mov r4, r0
7eec: e1a05001 mov r5, r1
7ef0: e1a06002 mov r6, r2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
7ef4: 13a00000 movne r0, #0 ; 0x0
7ef8: 18bd8070 popne {r4, r5, r6, pc}
_Thread_Set_transient( the_thread );
7efc: eb000089 bl 8128 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
7f00: e1a02006 mov r2, r6
7f04: e1a01005 mov r1, r5
7f08: e1a00004 mov r0, r4
7f0c: eb000de4 bl b6a4 <_Thread_Reset>
_Thread_Load_environment( the_thread );
7f10: e1a00004 mov r0, r4
7f14: eb000cf8 bl b2fc <_Thread_Load_environment>
_Thread_Ready( the_thread );
7f18: e1a00004 mov r0, r4
7f1c: eb000d9b bl b590 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
7f20: e1a00004 mov r0, r4
7f24: eb000208 bl 874c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
7f28: e59f301c ldr r3, [pc, #28] ; 7f4c <_Thread_Restart+0x70>
7f2c: e5932000 ldr r2, [r3]
7f30: e1540002 cmp r4, r2
7f34: 13a00001 movne r0, #1 ; 0x1
7f38: 18bd8070 popne {r4, r5, r6, pc}
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
7f3c: e28400d0 add r0, r4, #208 ; 0xd0
7f40: eb00032e bl 8c00 <_CPU_Context_restore>
7f44: e3a00001 mov r0, #1 ; 0x1 <== NOT EXECUTED
return TRUE;
}
return FALSE;
}
7f48: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00008ce0 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
8ce0: e92d0030 push {r4, r5}
8ce4: e20110ff and r1, r1, #255 ; 0xff
8ce8: e1a04000 mov r4, r0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
8cec: e10f5000 mrs r5, CPSR
8cf0: e38530c0 orr r3, r5, #192 ; 0xc0
8cf4: e129f003 msr CPSR_fc, r3
if ( force == TRUE )
8cf8: e3510000 cmp r1, #0 ; 0x0
the_thread->suspend_count = 0;
8cfc: 13a03000 movne r3, #0 ; 0x0
8d00: 15803070 strne r3, [r0, #112]
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
if ( force == TRUE )
8d04: 1a000006 bne 8d24 <_Thread_Resume+0x44>
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8d08: e5903070 ldr r3, [r0, #112] <== NOT EXECUTED
8d0c: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8d10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
8d14: e5803070 str r3, [r0, #112] <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
8d18: 0a000001 beq 8d24 <_Thread_Resume+0x44> <== NOT EXECUTED
_ISR_Enable( level );
8d1c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
8d20: ea000003 b 8d34 <_Thread_Resume+0x54> <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
8d24: e5943010 ldr r3, [r4, #16]
if ( current_state & STATES_SUSPENDED ) {
8d28: e3130002 tst r3, #2 ; 0x2
8d2c: 1a000002 bne 8d3c <_Thread_Resume+0x5c>
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
8d30: e129f005 msr CPSR_fc, r5
}
8d34: e8bd0030 pop {r4, r5}
8d38: e12fff1e bx lr
8d3c: e3c33002 bic r3, r3, #2 ; 0x2
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8d40: e3530000 cmp r3, #0 ; 0x0
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
8d44: e5843010 str r3, [r4, #16]
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
8d48: 1afffff8 bne 8d30 <_Thread_Resume+0x50>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
8d4c: e5940090 ldr r0, [r4, #144]
8d50: e1d429b6 ldrh r2, [r4, #150]
8d54: e1d030b0 ldrh r3, [r0]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
8d58: e594108c ldr r1, [r4, #140]
8d5c: e1833002 orr r3, r3, r2
8d60: e1c030b0 strh r3, [r0]
_Priority_Major_bit_map |= the_priority_map->ready_major;
8d64: e59fc07c ldr ip, [pc, #124] ; 8de8 <_Thread_Resume+0x108>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
8d68: e2813004 add r3, r1, #4 ; 0x4
8d6c: e5843000 str r3, [r4]
8d70: e1dc20b0 ldrh r2, [ip]
8d74: e1d439b4 ldrh r3, [r4, #148]
old_last_node = the_chain->last;
8d78: e5910008 ldr r0, [r1, #8]
8d7c: e1822003 orr r2, r2, r3
the_chain->last = the_node;
8d80: e5814008 str r4, [r1, #8]
8d84: e1cc20b0 strh r2, [ip]
old_last_node->next = the_node;
the_node->previous = old_last_node;
8d88: e5840004 str r0, [r4, #4]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
8d8c: e5804000 str r4, [r0]
_ISR_Flash( level );
8d90: e10f3000 mrs r3, CPSR
8d94: e129f005 msr CPSR_fc, r5
8d98: e129f003 msr CPSR_fc, r3
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
8d9c: e59fc048 ldr ip, [pc, #72] ; 8dec <_Thread_Resume+0x10c>
8da0: e59c3000 ldr r3, [ip]
8da4: e5940014 ldr r0, [r4, #20]
8da8: e5932014 ldr r2, [r3, #20]
8dac: e1500002 cmp r0, r2
8db0: 2affffde bcs 8d30 <_Thread_Resume+0x50>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8db4: e59f3034 ldr r3, [pc, #52] ; 8df0 <_Thread_Resume+0x110>
8db8: e5932000 ldr r2, [r3]
8dbc: e5d21076 ldrb r1, [r2, #118]
8dc0: e3510000 cmp r1, #0 ; 0x0
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
8dc4: e58c4000 str r4, [ip]
if ( _Thread_Executing->is_preemptible ||
8dc8: 0a000003 beq 8ddc <_Thread_Resume+0xfc>
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
8dcc: e59f3020 ldr r3, [pc, #32] ; 8df4 <_Thread_Resume+0x114>
8dd0: e3a02001 mov r2, #1 ; 0x1
8dd4: e5c32000 strb r2, [r3]
8dd8: eaffffd4 b 8d30 <_Thread_Resume+0x50>
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
8ddc: e3500000 cmp r0, #0 ; 0x0
8de0: 1affffd2 bne 8d30 <_Thread_Resume+0x50>
8de4: eafffff8 b 8dcc <_Thread_Resume+0xec> <== NOT EXECUTED
000073b8 <_Thread_Set_transient>:
*/
void _Thread_Set_transient(
Thread_Control *the_thread
)
{
73b8: e92d0030 push {r4, r5}
ISR_Level level;
uint32_t old_state;
Chain_Control *ready;
ready = the_thread->ready;
73bc: e590408c ldr r4, [r0, #140]
_ISR_Disable( level );
73c0: e10f5000 mrs r5, CPSR
73c4: e38530c0 orr r3, r5, #192 ; 0xc0
73c8: e129f003 msr CPSR_fc, r3
old_state = the_thread->current_state;
73cc: e590c010 ldr ip, [r0, #16]
the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
73d0: e38c3004 orr r3, ip, #4 ; 0x4
if ( _States_Is_ready( old_state ) ) {
73d4: e35c0000 cmp ip, #0 ; 0x0
ready = the_thread->ready;
_ISR_Disable( level );
old_state = the_thread->current_state;
the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
73d8: e5803010 str r3, [r0, #16]
if ( _States_Is_ready( old_state ) ) {
73dc: 1a000007 bne 7400 <_Thread_Set_transient+0x48>
if ( _Chain_Has_only_one_node( ready ) ) {
73e0: e5942000 ldr r2, [r4]
73e4: e5943008 ldr r3, [r4, #8]
73e8: e1520003 cmp r2, r3
73ec: 0a000006 beq 740c <_Thread_Set_transient+0x54>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
73f0: e5902004 ldr r2, [r0, #4] <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
73f4: e5903000 ldr r3, [r0] <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
previous->next = next;
73f8: e5823000 str r3, [r2] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
73fc: e5832004 str r2, [r3, #4] <== NOT EXECUTED
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
}
_ISR_Enable( level );
7400: e129f005 msr CPSR_fc, r5
}
7404: e8bd0030 pop {r4, r5}
7408: e12fff1e bx lr
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
740c: e5901090 ldr r1, [r0, #144]
7410: e1d029ba ldrh r2, [r0, #154]
7414: e1d130b0 ldrh r3, [r1]
7418: e0033002 and r3, r3, r2
741c: e1c130b0 strh r3, [r1]
if ( *the_priority_map->minor == 0 )
7420: e1d120b0 ldrh r2, [r1]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
7424: e2843004 add r3, r4, #4 ; 0x4
7428: e3520000 cmp r2, #0 ; 0x0
742c: e8841008 stm r4, {r3, ip}
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
7430: e5844008 str r4, [r4, #8]
7434: 1afffff1 bne 7400 <_Thread_Set_transient+0x48>
_Priority_Major_bit_map &= the_priority_map->block_major;
7438: e59f1010 ldr r1, [pc, #16] ; 7450 <_Thread_Set_transient+0x98><== NOT EXECUTED
743c: e1d029b8 ldrh r2, [r0, #152] <== NOT EXECUTED
7440: e1d130b0 ldrh r3, [r1] <== NOT EXECUTED
7444: e0033002 and r3, r3, r2 <== NOT EXECUTED
7448: e1c130b0 strh r3, [r1] <== NOT EXECUTED
744c: eaffffeb b 7400 <_Thread_Set_transient+0x48> <== NOT EXECUTED
00007454 <_Thread_Stack_Allocate>:
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7454: e59f3070 ldr r3, [pc, #112] ; 74cc <_Thread_Stack_Allocate+0x78>
7458: e5932000 ldr r2, [r3]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
745c: e59f306c ldr r3, [pc, #108] ; 74d0 <_Thread_Stack_Allocate+0x7c>
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7460: e592c020 ldr ip, [r2, #32]
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
7464: e5932000 ldr r2, [r3]
7468: e92d4030 push {r4, r5, lr}
746c: e1510002 cmp r1, r2
7470: 21a04001 movcs r4, r1
7474: 31a04002 movcc r4, r2
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7478: e35c0000 cmp ip, #0 ; 0x0
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
747c: e1a05000 mov r5, r0
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
7480: 0a000008 beq 74a8 <_Thread_Stack_Allocate+0x54>
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
7484: e1a00004 mov r0, r4 <== NOT EXECUTED
7488: e1a0e00f mov lr, pc <== NOT EXECUTED
748c: e12fff1c bx ip <== NOT EXECUTED
7490: e1a03000 mov r3, r0 <== NOT EXECUTED
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
7494: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7498: 11a00004 movne r0, r4 <== NOT EXECUTED
749c: 03a00000 moveq r0, #0 ; 0x0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
74a0: e58530cc str r3, [r5, #204] <== NOT EXECUTED
return the_stack_size;
}
74a4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uint32_t _Stack_Adjust_size (
size_t size
)
{
return size + CPU_STACK_ALIGNMENT;
74a8: e2844004 add r4, r4, #4 ; 0x4
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
74ac: e1a00004 mov r0, r4
74b0: eb000231 bl 7d7c <_Workspace_Allocate>
74b4: e1a03000 mov r3, r0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
74b8: e3530000 cmp r3, #0 ; 0x0
74bc: 11a00004 movne r0, r4
74c0: 03a00000 moveq r0, #0 ; 0x0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
74c4: e58530cc str r3, [r5, #204]
return the_stack_size;
}
74c8: e8bd8030 pop {r4, r5, pc}
000074d4 <_Thread_Stack_Free>:
{
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
74d4: e5d030c0 ldrb r3, [r0, #192]
74d8: e3530000 cmp r3, #0 ; 0x0
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
74dc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
74e0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
74e4: e59f3028 ldr r3, [pc, #40] ; 7514 <_Thread_Stack_Free+0x40>
74e8: e5932000 ldr r2, [r3]
74ec: e5923024 ldr r3, [r2, #36]
74f0: e3530000 cmp r3, #0 ; 0x0
74f4: 0a000003 beq 7508 <_Thread_Stack_Free+0x34>
(*_Configuration_Table->stack_free_hook)(
74f8: e59000c8 ldr r0, [r0, #200] <== NOT EXECUTED
74fc: e1a0e00f mov lr, pc <== NOT EXECUTED
7500: e12fff13 bx r3 <== NOT EXECUTED
7504: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
7508: e59000c8 ldr r0, [r0, #200]
}
750c: e49de004 pop {lr} ; (ldr lr, [sp], #4)
if ( _Configuration_Table->stack_free_hook )
(*_Configuration_Table->stack_free_hook)(
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
7510: ea000215 b 7d6c <_Workspace_Free>
000075b0 <_Thread_Tickle_timeslice>:
void _Thread_Tickle_timeslice( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
75b0: e59f3084 ldr r3, [pc, #132] ; 763c <_Thread_Tickle_timeslice+0x8c>
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
75b4: e92d4010 push {r4, lr}
Thread_Control *executing;
executing = _Thread_Executing;
75b8: e5934000 ldr r4, [r3]
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
75bc: e5d42076 ldrb r2, [r4, #118]
75c0: e3520000 cmp r2, #0 ; 0x0
75c4: 08bd8010 popeq {r4, pc}
return;
if ( !_States_Is_ready( executing->current_state ) )
75c8: e5943010 ldr r3, [r4, #16]
75cc: e3530000 cmp r3, #0 ; 0x0
75d0: 18bd8010 popne {r4, pc}
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
75d4: e594307c ldr r3, [r4, #124]
75d8: e3530001 cmp r3, #1 ; 0x1
75dc: 38bd8010 popcc {r4, pc}
75e0: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
75e4: 9a00000a bls 7614 <_Thread_Tickle_timeslice+0x64> <== NOT EXECUTED
75e8: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
75ec: 18bd8010 popne {r4, pc} <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
75f0: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
75f4: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
75f8: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
75fc: e5843078 str r3, [r4, #120] <== NOT EXECUTED
7600: 18bd8010 popne {r4, pc} <== NOT EXECUTED
(*executing->budget_callout)( executing );
7604: e1a00004 mov r0, r4 <== NOT EXECUTED
7608: e1a0e00f mov lr, pc <== NOT EXECUTED
760c: e594f080 ldr pc, [r4, #128] <== NOT EXECUTED
7610: e8bd8010 pop {r4, pc} <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
7614: e5943078 ldr r3, [r4, #120] <== NOT EXECUTED
7618: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
761c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7620: e5843078 str r3, [r4, #120] <== NOT EXECUTED
7624: c8bd8010 popgt {r4, pc} <== NOT EXECUTED
_Thread_Reset_timeslice();
7628: eb000c83 bl a83c <_Thread_Reset_timeslice> <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
762c: e59f300c ldr r3, [pc, #12] ; 7640 <_Thread_Tickle_timeslice+0x90><== NOT EXECUTED
7630: e5932000 ldr r2, [r3] <== NOT EXECUTED
7634: e5842078 str r2, [r4, #120] <== NOT EXECUTED
7638: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00007644 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
7644: e59f3094 ldr r3, [pc, #148] ; 76e0 <_Thread_Yield_processor+0x9c><== NOT EXECUTED
7648: e5930000 ldr r0, [r3] <== NOT EXECUTED
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
764c: e52d4004 push {r4} ; (str r4, [sp, #-4]!) <== NOT EXECUTED
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
7650: e590c08c ldr ip, [r0, #140] <== NOT EXECUTED
_ISR_Disable( level );
7654: e10f4000 mrs r4, CPSR <== NOT EXECUTED
7658: e38430c0 orr r3, r4, #192 ; 0xc0 <== NOT EXECUTED
765c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( !_Chain_Has_only_one_node( ready ) ) {
7660: e59c2000 ldr r2, [ip] <== NOT EXECUTED
7664: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
7668: e1520003 cmp r2, r3 <== NOT EXECUTED
766c: 0a000016 beq 76cc <_Thread_Yield_processor+0x88> <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
7670: e8900006 ldm r0, {r1, r2} <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
7674: e28c3004 add r3, ip, #4 ; 0x4 <== NOT EXECUTED
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
7678: e5821000 str r1, [r2] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
767c: e5812004 str r2, [r1, #4] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
7680: e5803000 str r3, [r0] <== NOT EXECUTED
old_last_node = the_chain->last;
7684: e59c3008 ldr r3, [ip, #8] <== NOT EXECUTED
the_chain->last = the_node;
7688: e58c0008 str r0, [ip, #8] <== NOT EXECUTED
old_last_node->next = the_node;
the_node->previous = old_last_node;
768c: e5803004 str r3, [r0, #4] <== NOT EXECUTED
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
7690: e5830000 str r0, [r3] <== NOT EXECUTED
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
7694: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7698: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
769c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
76a0: e59f103c ldr r1, [pc, #60] ; 76e4 <_Thread_Yield_processor+0xa0><== NOT EXECUTED
76a4: e5913000 ldr r3, [r1] <== NOT EXECUTED
76a8: e1500003 cmp r0, r3 <== NOT EXECUTED
_Thread_Heir = (Thread_Control *) ready->first;
76ac: 059c3000 ldreq r3, [ip] <== NOT EXECUTED
76b0: 05813000 streq r3, [r1] <== NOT EXECUTED
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
76b4: e59f302c ldr r3, [pc, #44] ; 76e8 <_Thread_Yield_processor+0xa4><== NOT EXECUTED
76b8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
76bc: e5c32000 strb r2, [r3] <== NOT EXECUTED
_ISR_Enable( level );
76c0: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
}
76c4: e8bd0010 pop {r4} <== NOT EXECUTED
76c8: e12fff1e bx lr <== NOT EXECUTED
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
76cc: e59f3010 ldr r3, [pc, #16] ; 76e4 <_Thread_Yield_processor+0xa0><== NOT EXECUTED
76d0: e5932000 ldr r2, [r3] <== NOT EXECUTED
76d4: e1500002 cmp r0, r2 <== NOT EXECUTED
76d8: 1afffff5 bne 76b4 <_Thread_Yield_processor+0x70> <== NOT EXECUTED
76dc: eafffff7 b 76c0 <_Thread_Yield_processor+0x7c> <== NOT EXECUTED
00006238 <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
6238: e5913050 ldr r3, [r1, #80] <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
623c: e92d4010 push {r4, lr} <== NOT EXECUTED
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
6240: e3530002 cmp r3, #2 ; 0x2 <== NOT EXECUTED
void _Thread_blocking_operation_Cancel(
Thread_blocking_operation_States sync_state,
Thread_Control *the_thread,
ISR_Level level
)
{
6244: e1a04001 mov r4, r1 <== NOT EXECUTED
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
6248: e3a01000 mov r1, #0 ; 0x0 <== NOT EXECUTED
624c: e5841044 str r1, [r4, #68] <== NOT EXECUTED
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
6250: 0a000006 beq 6270 <_Thread_blocking_operation_Cancel+0x38> <== NOT EXECUTED
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
6254: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
6258: e3a01201 mov r1, #268435456 ; 0x10000000 <== NOT EXECUTED
625c: e2811bff add r1, r1, #261120 ; 0x3fc00 <== NOT EXECUTED
6260: e1a00004 mov r0, r4 <== NOT EXECUTED
6264: e2811ffe add r1, r1, #1016 ; 0x3f8 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
6268: e8bd4010 pop {r4, lr} <== NOT EXECUTED
626c: ea000070 b 6434 <_Thread_Clear_state> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
6270: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
6274: e5843050 str r3, [r4, #80] <== NOT EXECUTED
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
6278: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
627c: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
6280: eb000667 bl 7c24 <_Watchdog_Remove> <== NOT EXECUTED
6284: eafffff3 b 6258 <_Thread_blocking_operation_Cancel+0x20> <== NOT EXECUTED
00006e1c <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6e1c: e92d07f0 push {r4, r5, r6, r7, r8, r9, sl}
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6e20: e281303c add r3, r1, #60 ; 0x3c
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
6e24: e5914014 ldr r4, [r1, #20]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6e28: e1a07001 mov r7, r1
6e2c: e1a08000 mov r8, r0
6e30: e5813038 str r3, [r1, #56]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
6e34: e2810038 add r0, r1, #56 ; 0x38
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
6e38: e3a01000 mov r1, #0 ; 0x0
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
6e3c: e3140020 tst r4, #32 ; 0x20
6e40: e587103c str r1, [r7, #60]
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
6e44: e1a01324 lsr r1, r4, #6
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
6e48: e1a0a002 mov sl, r2
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
6e4c: 11a02201 lslne r2, r1, #4
6e50: 10423101 subne r3, r2, r1, lsl #2
6e54: 10882003 addne r2, r8, r3
the_chain->last = _Chain_Head(the_chain);
6e58: e5870040 str r0, [r7, #64]
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
6e5c: e5986038 ldr r6, [r8, #56]
6e60: 159f91d4 ldrne r9, [pc, #468] ; 703c <_Thread_queue_Enqueue_priority+0x220>
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
6e64: 12820008 addne r0, r2, #8 ; 0x8
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
6e68: 1a000028 bne 6f10 <_Thread_queue_Enqueue_priority+0xf4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
6e6c: e1a03081 lsl r3, r1, #1
6e70: e0833001 add r3, r3, r1
6e74: e2833001 add r3, r3, #1 ; 0x1
6e78: e1a02201 lsl r2, r1, #4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
6e7c: e0422101 sub r2, r2, r1, lsl #2
6e80: e1a03103 lsl r3, r3, #2
6e84: e0880003 add r0, r8, r3
6e88: e0882002 add r2, r8, r2
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
6e8c: e10f5000 mrs r5, CPSR
6e90: e38530c0 orr r3, r5, #192 ; 0xc0
6e94: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->first;
6e98: e5921000 ldr r1, [r2]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6e9c: e1510000 cmp r1, r0
6ea0: 1a00000f bne 6ee4 <_Thread_queue_Enqueue_priority+0xc8>
6ea4: ea000061 b 7030 <_Thread_queue_Enqueue_priority+0x214>
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
6ea8: e5911000 ldr r1, [r1]
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
6eac: e1510000 cmp r1, r0
6eb0: 0a00000e beq 6ef0 <_Thread_queue_Enqueue_priority+0xd4>
break;
search_priority = search_thread->current_priority;
6eb4: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6eb8: e154000c cmp r4, ip
6ebc: 9a00000b bls 6ef0 <_Thread_queue_Enqueue_priority+0xd4>
break;
#endif
_ISR_Flash( level );
6ec0: e10f3000 mrs r3, CPSR
6ec4: e129f005 msr CPSR_fc, r5
6ec8: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6ecc: e5913010 ldr r3, [r1, #16]
6ed0: e1160003 tst r6, r3
6ed4: 0a000049 beq 7000 <_Thread_queue_Enqueue_priority+0x1e4>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
6ed8: e5911000 ldr r1, [r1]
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6edc: e1510000 cmp r1, r0
6ee0: 0a000002 beq 6ef0 <_Thread_queue_Enqueue_priority+0xd4>
search_priority = search_thread->current_priority;
6ee4: e591c014 ldr ip, [r1, #20]
if ( priority <= search_priority )
6ee8: e154000c cmp r4, ip
6eec: 8affffed bhi 6ea8 <_Thread_queue_Enqueue_priority+0x8c>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6ef0: e1a06005 mov r6, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6ef4: e5980030 ldr r0, [r8, #48]
6ef8: e3500001 cmp r0, #1 ; 0x1
6efc: 0a000034 beq 6fd4 <_Thread_queue_Enqueue_priority+0x1b8>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
6f00: e58a6000 str r6, [sl] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
6f04: e8bd07f0 pop {r4, r5, r6, r7, r8, r9, sl}
6f08: e12fff1e bx lr
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
6f0c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6f10: e5d93000 ldrb r3, [r9]
6f14: e283c001 add ip, r3, #1 ; 0x1
_ISR_Disable( level );
6f18: e10f5000 mrs r5, CPSR
6f1c: e38530c0 orr r3, r5, #192 ; 0xc0
6f20: e129f003 msr CPSR_fc, r3
search_thread = (Thread_Control *) header->last;
6f24: e5901000 ldr r1, [r0]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6f28: e1520001 cmp r2, r1
6f2c: 0a000018 beq 6f94 <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
6f30: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
6f34: e154000c cmp r4, ip
6f38: 2a000015 bcs 6f94 <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
6f3c: e5911004 ldr r1, [r1, #4]
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
6f40: e1520001 cmp r2, r1
6f44: 1a00000f bne 6f88 <_Thread_queue_Enqueue_priority+0x16c>
6f48: ea000011 b 6f94 <_Thread_queue_Enqueue_priority+0x178>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
6f4c: e10f3000 mrs r3, CPSR
6f50: e129f005 msr CPSR_fc, r5
6f54: e129f003 msr CPSR_fc, r3
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
6f58: e5913010 ldr r3, [r1, #16]
6f5c: e1160003 tst r6, r3
6f60: 0affffe9 beq 6f0c <_Thread_queue_Enqueue_priority+0xf0>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
6f64: e5911004 ldr r1, [r1, #4]
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6f68: e1510002 cmp r1, r2
6f6c: 0a000008 beq 6f94 <_Thread_queue_Enqueue_priority+0x178>
search_priority = search_thread->current_priority;
6f70: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
6f74: e154000c cmp r4, ip
6f78: 2a000005 bcs 6f94 <_Thread_queue_Enqueue_priority+0x178>
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
6f7c: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
6f80: e1510002 cmp r1, r2 <== NOT EXECUTED
6f84: 0a000002 beq 6f94 <_Thread_queue_Enqueue_priority+0x178> <== NOT EXECUTED
break;
search_priority = search_thread->current_priority;
6f88: e591c014 ldr ip, [r1, #20]
if ( priority >= search_priority )
6f8c: e154000c cmp r4, ip
6f90: 3affffed bcc 6f4c <_Thread_queue_Enqueue_priority+0x130>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
6f94: e5980030 ldr r0, [r8, #48]
6f98: e3500001 cmp r0, #1 ; 0x1
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
6f9c: e1a06005 mov r6, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
6fa0: 1affffd6 bne 6f00 <_Thread_queue_Enqueue_priority+0xe4>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
6fa4: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
6fa8: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
6fac: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
6fb0: 0a000014 beq 7008 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
6fb4: e5913000 ldr r3, [r1]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
6fb8: e5871004 str r1, [r7, #4]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
6fbc: e5873000 str r3, [r7]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
6fc0: e5878044 str r8, [r7, #68]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
6fc4: e5817000 str r7, [r1]
next_node->previous = the_node;
6fc8: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
6fcc: e129f005 msr CPSR_fc, r5
6fd0: eaffffcb b 6f04 <_Thread_queue_Enqueue_priority+0xe8>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
6fd4: e3a03000 mov r3, #0 ; 0x0
if ( priority == search_priority )
6fd8: e154000c cmp r4, ip
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
6fdc: e5883030 str r3, [r8, #48]
if ( priority == search_priority )
6fe0: 0a000008 beq 7008 <_Thread_queue_Enqueue_priority+0x1ec>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
6fe4: e5913004 ldr r3, [r1, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
6fe8: e887000a stm r7, {r1, r3}
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
6fec: e5878044 str r8, [r7, #68]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
6ff0: e5837000 str r7, [r3]
search_node->previous = the_node;
6ff4: e5817004 str r7, [r1, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
6ff8: e129f005 msr CPSR_fc, r5
6ffc: eaffffc0 b 6f04 <_Thread_queue_Enqueue_priority+0xe8>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
7000: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
7004: eaffffa0 b 6e8c <_Thread_queue_Enqueue_priority+0x70> <== NOT EXECUTED
7008: e281303c add r3, r1, #60 ; 0x3c
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
700c: e5932004 ldr r2, [r3, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7010: e5873000 str r3, [r7]
the_node->previous = previous_node;
7014: e5872004 str r2, [r7, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7018: e5878044 str r8, [r7, #68]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
701c: e5827000 str r7, [r2]
search_node->previous = the_node;
7020: e5837004 str r7, [r3, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
7024: e129f006 msr CPSR_fc, r6
7028: e3a00001 mov r0, #1 ; 0x1
702c: eaffffb4 b 6f04 <_Thread_queue_Enqueue_priority+0xe8>
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7030: e1a06005 mov r6, r5
7034: e3e0c000 mvn ip, #0 ; 0x0
7038: eaffffad b 6ef4 <_Thread_queue_Enqueue_priority+0xd8>
0000b290 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
b290: e92d4010 push {r4, lr}
b294: e1a04001 mov r4, r1
ISR_Level level;
_ISR_Disable( level );
b298: e10f0000 mrs r0, CPSR
b29c: e38030c0 orr r3, r0, #192 ; 0xc0
b2a0: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
b2a4: e5913010 ldr r3, [r1, #16]
b2a8: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
b2ac: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
b2b0: e3c33c41 bic r3, r3, #16640 ; 0x4100
b2b4: e3c3301f bic r3, r3, #31 ; 0x1f
b2b8: e3530000 cmp r3, #0 ; 0x0
b2bc: 0a00000f beq b300 <_Thread_queue_Extract_fifo+0x70>
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
b2c0: e5913050 ldr r3, [r1, #80]
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
b2c4: e5942004 ldr r2, [r4, #4]
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
b2c8: e5911000 ldr r1, [r1]
b2cc: e3530002 cmp r3, #2 ; 0x2
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
b2d0: e3a03000 mov r3, #0 ; 0x0
previous = the_node->previous;
next->previous = previous;
previous->next = next;
b2d4: e5821000 str r1, [r2]
b2d8: e5843044 str r3, [r4, #68]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
b2dc: e5812004 str r2, [r1, #4]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
b2e0: 0a000008 beq b308 <_Thread_queue_Extract_fifo+0x78>
_ISR_Enable( level );
b2e4: e129f000 msr CPSR_fc, r0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
b2e8: e3a01201 mov r1, #268435456 ; 0x10000000
b2ec: e2811bff add r1, r1, #261120 ; 0x3fc00
b2f0: e1a00004 mov r0, r4
b2f4: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
b2f8: e8bd4010 pop {r4, lr}
b2fc: eaffec4c b 6434 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
b300: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
b304: e8bd8010 pop {r4, pc} <== NOT EXECUTED
b308: e3a03003 mov r3, #3 ; 0x3
b30c: e5843050 str r3, [r4, #80]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
b310: e129f000 msr CPSR_fc, r0
(void) _Watchdog_Remove( &the_thread->Timer );
b314: e2840048 add r0, r4, #72 ; 0x48
b318: ebfff241 bl 7c24 <_Watchdog_Remove>
b31c: eafffff1 b b2e8 <_Thread_queue_Extract_fifo+0x58>
0000a5f8 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
a5f8: e92d4070 push {r4, r5, r6, lr}
a5fc: e1a04001 mov r4, r1
a600: e20260ff and r6, r2, #255 ; 0xff
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
a604: e10fc000 mrs ip, CPSR
a608: e38c30c0 orr r3, ip, #192 ; 0xc0
a60c: e129f003 msr CPSR_fc, r3
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
a610: e5913010 ldr r3, [r1, #16]
a614: e3c334ff bic r3, r3, #-16777216 ; 0xff000000
a618: e3c3373f bic r3, r3, #16515072 ; 0xfc0000
a61c: e3c33c41 bic r3, r3, #16640 ; 0x4100
a620: e3c3301f bic r3, r3, #31 ; 0x1f
a624: e3530000 cmp r3, #0 ; 0x0
a628: 0a000023 beq a6bc <_Thread_queue_Extract_priority_helper+0xc4>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
a62c: e5911038 ldr r1, [r1, #56]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a630: e284303c add r3, r4, #60 ; 0x3c
a634: e1510003 cmp r1, r3
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
a638: e894000c ldm r4, {r2, r3}
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
a63c: 05823004 streq r3, [r2, #4]
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
a640: 05832000 streq r2, [r3]
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
a644: 0a00000e beq a684 <_Thread_queue_Extract_priority_helper+0x8c>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
a648: e5945040 ldr r5, [r4, #64]
new_second_node = new_first_node->next;
a64c: e5910000 ldr r0, [r1]
previous_node->next = new_first_node;
next_node->previous = new_first_node;
a650: e5821004 str r1, [r2, #4]
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
a654: e5831000 str r1, [r3]
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
a658: e881000c stm r1, {r2, r3}
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
a65c: e5942038 ldr r2, [r4, #56]
a660: e5943040 ldr r3, [r4, #64]
a664: e1520003 cmp r2, r3
a668: 0a000005 beq a684 <_Thread_queue_Extract_priority_helper+0x8c>
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a66c: e281203c add r2, r1, #60 ; 0x3c
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
new_second_node->previous =
a670: e2813038 add r3, r1, #56 ; 0x38
a674: e5803004 str r3, [r0, #4]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
a678: e5810038 str r0, [r1, #56]
new_first_thread->Wait.Block2n.last = last_node;
a67c: e5815040 str r5, [r1, #64]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
a680: e5852000 str r2, [r5]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
a684: e3560000 cmp r6, #0 ; 0x0
a688: 1a000009 bne a6b4 <_Thread_queue_Extract_priority_helper+0xbc>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
a68c: e5943050 ldr r3, [r4, #80]
a690: e3530002 cmp r3, #2 ; 0x2
a694: 0a00000a beq a6c4 <_Thread_queue_Extract_priority_helper+0xcc>
_ISR_Enable( level );
a698: e129f00c msr CPSR_fc, ip
a69c: e3a01201 mov r1, #268435456 ; 0x10000000
a6a0: e2811bff add r1, r1, #261120 ; 0x3fc00
a6a4: e1a00004 mov r0, r4
a6a8: e2811ffe add r1, r1, #1016 ; 0x3f8
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
a6ac: e8bd4070 pop {r4, r5, r6, lr}
a6b0: eaffef5f b 6434 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
a6b4: e129f00c msr CPSR_fc, ip
a6b8: e8bd8070 pop {r4, r5, r6, pc}
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
a6bc: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
a6c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
a6c4: e3a03003 mov r3, #3 ; 0x3 <== NOT EXECUTED
a6c8: e5843050 str r3, [r4, #80] <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
a6cc: e129f00c msr CPSR_fc, ip <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
a6d0: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED
a6d4: ebfff552 bl 7c24 <_Watchdog_Remove> <== NOT EXECUTED
a6d8: eaffffef b a69c <_Thread_queue_Extract_priority_helper+0xa4><== NOT EXECUTED
0000a6dc <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
a6dc: e1a01000 mov r1, r0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
a6e0: e5900044 ldr r0, [r0, #68]
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
a6e4: e590c030 ldr ip, [r0, #48]
a6e8: e35c0000 cmp ip, #0 ; 0x0
a6ec: 0a000003 beq a700 <_Thread_queue_Process_timeout+0x24>
a6f0: e59f302c ldr r3, [pc, #44] ; a724 <_Thread_queue_Process_timeout+0x48><== NOT EXECUTED
a6f4: e5932000 ldr r2, [r3] <== NOT EXECUTED
a6f8: e1510002 cmp r1, r2 <== NOT EXECUTED
a6fc: 0a000002 beq a70c <_Thread_queue_Process_timeout+0x30> <== NOT EXECUTED
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a700: e590303c ldr r3, [r0, #60]
a704: e5813034 str r3, [r1, #52]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
a708: eaffffb4 b a5e0 <_Thread_queue_Extract>
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
a70c: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a710: 1590303c ldrne r3, [r0, #60] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a714: 13a02002 movne r2, #2 ; 0x2 <== NOT EXECUTED
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
a718: 15813034 strne r3, [r1, #52] <== NOT EXECUTED
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
a71c: 15802030 strne r2, [r0, #48] <== NOT EXECUTED
a720: e12fff1e bx lr <== NOT EXECUTED
00012c24 <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c28: e59f01cc ldr r0, [pc, #460] ; 12dfc <_Timer_Server_body+0x1d8>
12c2c: e59f81cc ldr r8, [pc, #460] ; 12e00 <_Timer_Server_body+0x1dc>
12c30: e5902000 ldr r2, [r0]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c34: e59f01c8 ldr r0, [pc, #456] ; 12e04 <_Timer_Server_body+0x1e0>
12c38: e5983000 ldr r3, [r8]
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
12c3c: e24dd00c sub sp, sp, #12 ; 0xc
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c40: e59f91c0 ldr r9, [pc, #448] ; 12e08 <_Timer_Server_body+0x1e4>
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c44: e59fb1c0 ldr fp, [pc, #448] ; 12e0c <_Timer_Server_body+0x1e8>
12c48: e5901000 ldr r1, [r0]
12c4c: e2833001 add r3, r3, #1 ; 0x1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c50: e28d5004 add r5, sp, #4 ; 0x4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12c54: e3a04000 mov r4, #0 ; 0x0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
12c58: e1a0600d mov r6, sp
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
12c5c: e5892000 str r2, [r9]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
12c60: e58b1000 str r1, [fp]
12c64: e5883000 str r3, [r8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12c68: e58d5000 str r5, [sp]
the_chain->permanent_null = NULL;
12c6c: e98d2010 stmib sp, {r4, sp}
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
12c70: ebffffce bl 12bb0 <_Timer_Server_process_insertions>
_Thread_Enable_dispatch();
12c74: eb000b48 bl 1599c <_Thread_Enable_dispatch>
12c78: e59fa190 ldr sl, [pc, #400] ; 12e10 <_Timer_Server_body+0x1ec>
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12c7c: e1a07004 mov r7, r4
12c80: e5983000 ldr r3, [r8]
12c84: e2833001 add r3, r3, #1 ; 0x1
12c88: e5883000 str r3, [r8]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
12c8c: e3a01008 mov r1, #8 ; 0x8
12c90: e59a0000 ldr r0, [sl]
12c94: eb000e27 bl 16538 <_Thread_Set_state>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12c98: e59f2174 ldr r2, [pc, #372] ; 12e14 <_Timer_Server_body+0x1f0>
_Timer_Server_reset_ticks_timer();
12c9c: e59f0174 ldr r0, [pc, #372] ; 12e18 <_Timer_Server_body+0x1f4>
12ca0: e5923000 ldr r3, [r2]
12ca4: e1530000 cmp r3, r0
12ca8: 0a000006 beq 12cc8 <_Timer_Server_body+0xa4>
12cac: e59f215c ldr r2, [pc, #348] ; 12e10 <_Timer_Server_body+0x1ec>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cb0: e5933010 ldr r3, [r3, #16]
12cb4: e5921000 ldr r1, [r2]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cb8: e59f015c ldr r0, [pc, #348] ; 12e1c <_Timer_Server_body+0x1f8>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cbc: e5813054 str r3, [r1, #84]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12cc0: e2811048 add r1, r1, #72 ; 0x48
12cc4: eb0010ff bl 170c8 <_Watchdog_Insert>
12cc8: e59f0150 ldr r0, [pc, #336] ; 12e20 <_Timer_Server_body+0x1fc>
_Timer_Server_reset_seconds_timer();
12ccc: e59f2150 ldr r2, [pc, #336] ; 12e24 <_Timer_Server_body+0x200>
12cd0: e5903000 ldr r3, [r0]
12cd4: e1530002 cmp r3, r2
12cd8: 0a000004 beq 12cf0 <_Timer_Server_body+0xcc>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12cdc: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12ce0: e59f1140 ldr r1, [pc, #320] ; 12e28 <_Timer_Server_body+0x204><== NOT EXECUTED
12ce4: e59f0140 ldr r0, [pc, #320] ; 12e2c <_Timer_Server_body+0x208><== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12ce8: e581300c str r3, [r1, #12] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12cec: eb0010f5 bl 170c8 <_Watchdog_Insert> <== NOT EXECUTED
_Thread_Enable_dispatch();
12cf0: eb000b29 bl 1599c <_Thread_Enable_dispatch>
12cf4: e5983000 ldr r3, [r8]
12cf8: e2833001 add r3, r3, #1 ; 0x1
12cfc: e5883000 str r3, [r8]
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
12d00: e59a0000 ldr r0, [sl]
12d04: e2800048 add r0, r0, #72 ; 0x48
12d08: eb00115d bl 17284 <_Watchdog_Remove>
_Timer_Server_stop_seconds_timer();
12d0c: e59f0114 ldr r0, [pc, #276] ; 12e28 <_Timer_Server_body+0x204>
12d10: eb00115b bl 17284 <_Watchdog_Remove>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d14: e59f30e0 ldr r3, [pc, #224] ; 12dfc <_Timer_Server_body+0x1d8>
if ( snapshot >= _Timer_Server_ticks_last_time )
12d18: e5991000 ldr r1, [r9]
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
12d1c: e593c000 ldr ip, [r3]
if ( snapshot >= _Timer_Server_ticks_last_time )
12d20: e15c0001 cmp ip, r1
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d24: 31e03001 mvncc r3, r1
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
12d28: 2061100c rsbcs r1, r1, ip
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
12d2c: 3083100c addcc r1, r3, ip
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d30: e59f00dc ldr r0, [pc, #220] ; 12e14 <_Timer_Server_body+0x1f0>
12d34: e1a0200d mov r2, sp
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
12d38: e589c000 str ip, [r9]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
12d3c: eb0010b3 bl 17010 <_Watchdog_Adjust_to_chain>
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d40: e59f00bc ldr r0, [pc, #188] ; 12e04 <_Timer_Server_body+0x1e0>
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d44: e59b2000 ldr r2, [fp]
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
12d48: e5904000 ldr r4, [r0]
if ( snapshot > _Timer_Server_seconds_last_time ) {
12d4c: e1540002 cmp r4, r2
12d50: 8a00001f bhi 12dd4 <_Timer_Server_body+0x1b0>
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
12d54: 3a000023 bcc 12de8 <_Timer_Server_body+0x1c4>
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
}
_Timer_Server_seconds_last_time = snapshot;
12d58: e58b4000 str r4, [fp]
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12d5c: ebffff93 bl 12bb0 <_Timer_Server_process_insertions>
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
12d60: eb000b0d bl 1599c <_Thread_Enable_dispatch>
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12d64: e10f1000 mrs r1, CPSR
12d68: e38130c0 orr r3, r1, #192 ; 0xc0
12d6c: e129f003 msr CPSR_fc, r3
12d70: e59d2000 ldr r2, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12d74: e1550002 cmp r5, r2
12d78: 0a000013 beq 12dcc <_Timer_Server_body+0x1a8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d7c: e5923000 ldr r3, [r2]
the_chain->first = new_first;
12d80: e58d3000 str r3, [sp]
new_first->previous = _Chain_Head(the_chain);
12d84: e5836004 str r6, [r3, #4]
12d88: ea000002 b 12d98 <_Timer_Server_body+0x174>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
12d8c: e5933000 ldr r3, [r3] <== NOT EXECUTED
the_chain->first = new_first;
12d90: e58d3000 str r3, [sp] <== NOT EXECUTED
new_first->previous = _Chain_Head(the_chain);
12d94: e5836004 str r6, [r3, #4] <== NOT EXECUTED
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
12d98: e5827008 str r7, [r2, #8]
_ISR_Enable( level );
12d9c: e129f001 msr CPSR_fc, r1
(*watch->routine)( watch->id, watch->user_data );
12da0: e2820020 add r0, r2, #32 ; 0x20
12da4: e8900003 ldm r0, {r0, r1}
12da8: e1a0e00f mov lr, pc
12dac: e592f01c ldr pc, [r2, #28]
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
12db0: e10f1000 mrs r1, CPSR
12db4: e38130c0 orr r3, r1, #192 ; 0xc0
12db8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
12dbc: e59d3000 ldr r3, [sp]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
12dc0: e1550003 cmp r5, r3
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
12dc4: e1a02003 mov r2, r3
12dc8: 1affffef bne 12d8c <_Timer_Server_body+0x168>
if ( watch == NULL ) {
_ISR_Enable( level );
12dcc: e129f001 msr CPSR_fc, r1
12dd0: eaffffaa b 12c80 <_Timer_Server_body+0x5c>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
12dd4: e0621004 rsb r1, r2, r4
12dd8: e59f0040 ldr r0, [pc, #64] ; 12e20 <_Timer_Server_body+0x1fc>
12ddc: e1a0200d mov r2, sp
12de0: eb00108a bl 17010 <_Watchdog_Adjust_to_chain>
12de4: eaffffdb b 12d58 <_Timer_Server_body+0x134>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
12de8: e0642002 rsb r2, r4, r2 <== NOT EXECUTED
12dec: e59f002c ldr r0, [pc, #44] ; 12e20 <_Timer_Server_body+0x1fc><== NOT EXECUTED
12df0: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
12df4: eb001056 bl 16f54 <_Watchdog_Adjust> <== NOT EXECUTED
12df8: eaffffd6 b 12d58 <_Timer_Server_body+0x134> <== NOT EXECUTED
00012bb0 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
12bb0: e52de004 push {lr} ; (str lr, [sp, #-4]!)
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bb4: e59f005c ldr r0, [pc, #92] ; 12c18 <_Timer_Server_process_insertions+0x68>
12bb8: eb000283 bl 135cc <_Chain_Get>
if ( the_timer == NULL )
12bbc: e3500000 cmp r0, #0 ; 0x0
12bc0: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
12bc4: e5903038 ldr r3, [r0, #56]
12bc8: e3530001 cmp r3, #1 ; 0x1
12bcc: 0a00000c beq 12c04 <_Timer_Server_process_insertions+0x54>
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
12bd0: e3530003 cmp r3, #3 ; 0x3 <== NOT EXECUTED
12bd4: 0a000005 beq 12bf0 <_Timer_Server_process_insertions+0x40> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bd8: ebfffff4 bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
12bdc: e59f0034 ldr r0, [pc, #52] ; 12c18 <_Timer_Server_process_insertions+0x68>
12be0: eb000279 bl 135cc <_Chain_Get>
if ( the_timer == NULL )
12be4: e3500000 cmp r0, #0 ; 0x0
12be8: 1afffff5 bne 12bc4 <_Timer_Server_process_insertions+0x14>
12bec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
12bf0: e2801010 add r1, r0, #16 ; 0x10 <== NOT EXECUTED
12bf4: e59f0020 ldr r0, [pc, #32] ; 12c1c <_Timer_Server_process_insertions+0x6c><== NOT EXECUTED
12bf8: eb001132 bl 170c8 <_Watchdog_Insert> <== NOT EXECUTED
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12bfc: ebffffeb bl 12bb0 <_Timer_Server_process_insertions> <== NOT EXECUTED
12c00: eafffff5 b 12bdc <_Timer_Server_process_insertions+0x2c> <== NOT EXECUTED
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
12c04: e2801010 add r1, r0, #16 ; 0x10
12c08: e59f0010 ldr r0, [pc, #16] ; 12c20 <_Timer_Server_process_insertions+0x70>
12c0c: eb00112d bl 170c8 <_Watchdog_Insert>
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
12c10: ebffffe6 bl 12bb0 <_Timer_Server_process_insertions>
12c14: eafffff0 b 12bdc <_Timer_Server_process_insertions+0x2c>
000095ac <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
95ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
95b0: e3a0c5ee mov ip, #998244352 ; 0x3b800000 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
95b4: e5907000 ldr r7, [r0] <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
95b8: e28cc96b add ip, ip, #1753088 ; 0x1ac000 <== NOT EXECUTED
95bc: e28ccc0a add ip, ip, #2560 ; 0xa00 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
95c0: e1a08fc7 asr r8, r7, #31 <== NOT EXECUTED
t *= TOD_NANOSECONDS_PER_SECOND;
95c4: e086579c umull r5, r6, ip, r7 <== NOT EXECUTED
95c8: e026689c mla r6, ip, r8, r6 <== NOT EXECUTED
t += time->tv_nsec;
95cc: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
95d0: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
95d4: e0950003 adds r0, r5, r3 <== NOT EXECUTED
95d8: e1a07001 mov r7, r1 <== NOT EXECUTED
95dc: e3a08000 mov r8, #0 ; 0x0 <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
95e0: e1a0a002 mov sl, r2 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
95e4: e0a61004 adc r1, r6, r4 <== NOT EXECUTED
95e8: e1a02007 mov r2, r7 <== NOT EXECUTED
95ec: e1a03008 mov r3, r8 <== NOT EXECUTED
95f0: eb0033c5 bl 1650c <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
95f4: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
95f8: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
95fc: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
9600: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
9604: e1a04000 mov r4, r0 <== NOT EXECUTED
9608: e1a05001 mov r5, r1 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
960c: eb0033be bl 1650c <__udivdi3> <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
9610: e3a025ee mov r2, #998244352 ; 0x3b800000 <== NOT EXECUTED
9614: e282296b add r2, r2, #1753088 ; 0x1ac000 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
9618: e58a0000 str r0, [sl] <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
961c: e1a01005 mov r1, r5 <== NOT EXECUTED
9620: e1a00004 mov r0, r4 <== NOT EXECUTED
9624: e2822c0a add r2, r2, #2560 ; 0xa00 <== NOT EXECUTED
9628: e3a03000 mov r3, #0 ; 0x0 <== NOT EXECUTED
962c: eb0034fe bl 16a2c <__umoddi3> <== NOT EXECUTED
9630: e58a0004 str r0, [sl, #4] <== NOT EXECUTED
}
9634: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00009c88 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
9c88: e92d4010 push {r4, lr}
9c8c: e1a04000 mov r4, r0
_Chain_Extract( &the_extension->Node );
9c90: eb0009d9 bl c3fc <_Chain_Extract>
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
9c94: e5943024 ldr r3, [r4, #36]
9c98: e3530000 cmp r3, #0 ; 0x0
9c9c: 08bd8010 popeq {r4, pc}
_Chain_Extract( &the_extension->Switch.Node );
9ca0: e2840008 add r0, r4, #8 ; 0x8 <== NOT EXECUTED
}
9ca4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
_Chain_Extract( &the_extension->Switch.Node );
9ca8: ea0009d3 b c3fc <_Chain_Extract> <== NOT EXECUTED
000098d4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
98d4: e92d41f0 push {r4, r5, r6, r7, r8, lr}
98d8: e1a07000 mov r7, r0
98dc: e1a04002 mov r4, r2
ISR_Level level;
_ISR_Disable( level );
98e0: e10fc000 mrs ip, CPSR
98e4: e38c30c0 orr r3, ip, #192 ; 0xc0
98e8: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
98ec: e1a06000 mov r6, r0
98f0: e4960004 ldr r0, [r6], #4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
98f4: e1500006 cmp r0, r6
98f8: 0a000019 beq 9964 <_Watchdog_Adjust+0x90>
switch ( direction ) {
98fc: e3510000 cmp r1, #0 ; 0x0
9900: 1a000019 bne 996c <_Watchdog_Adjust+0x98>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
9904: e3520000 cmp r2, #0 ; 0x0
9908: 0a000015 beq 9964 <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
990c: e5905010 ldr r5, [r0, #16]
9910: e1520005 cmp r2, r5
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
9914: e1a01000 mov r1, r0
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
9918: 23a08001 movcs r8, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
991c: 2a000005 bcs 9938 <_Watchdog_Adjust+0x64>
9920: ea000017 b 9984 <_Watchdog_Adjust+0xb0> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
9924: e0544005 subs r4, r4, r5
9928: 0a00000d beq 9964 <_Watchdog_Adjust+0x90>
if ( units < _Watchdog_First( header )->delta_interval ) {
992c: e5915010 ldr r5, [r1, #16]
9930: e1550004 cmp r5, r4
9934: 8a000012 bhi 9984 <_Watchdog_Adjust+0xb0>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
9938: e5818010 str r8, [r1, #16]
_ISR_Enable( level );
993c: e129f00c msr CPSR_fc, ip
_Watchdog_Tickle( header );
9940: e1a00007 mov r0, r7
9944: eb0000ab bl 9bf8 <_Watchdog_Tickle>
_ISR_Disable( level );
9948: e10fc000 mrs ip, CPSR
994c: e38c30c0 orr r3, ip, #192 ; 0xc0
9950: e129f003 msr CPSR_fc, r3
9954: e5973000 ldr r3, [r7]
if ( _Chain_Is_empty( header ) )
9958: e1560003 cmp r6, r3
995c: e1a01003 mov r1, r3
9960: 1affffef bne 9924 <_Watchdog_Adjust+0x50>
}
break;
}
}
_ISR_Enable( level );
9964: e129f00c msr CPSR_fc, ip
}
9968: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
996c: e3510001 cmp r1, #1 ; 0x1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
9970: 05903010 ldreq r3, [r0, #16]
9974: 00833002 addeq r3, r3, r2
9978: 05803010 streq r3, [r0, #16]
}
break;
}
}
_ISR_Enable( level );
997c: e129f00c msr CPSR_fc, ip
}
9980: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
9984: e0643005 rsb r3, r4, r5
9988: e5813010 str r3, [r1, #16]
998c: eafffff4 b 9964 <_Watchdog_Adjust+0x90>
00007a68 <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7a68: e59f3144 ldr r3, [pc, #324] ; 7bb4 <_Watchdog_Insert+0x14c><== NOT EXECUTED
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
7a6c: e92d01f0 push {r4, r5, r6, r7, r8} <== NOT EXECUTED
7a70: e1a04001 mov r4, r1 <== NOT EXECUTED
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
7a74: e5935000 ldr r5, [r3] <== NOT EXECUTED
_ISR_Disable( level );
7a78: e10f6000 mrs r6, CPSR <== NOT EXECUTED
7a7c: e38630c0 orr r3, r6, #192 ; 0xc0 <== NOT EXECUTED
7a80: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/*
* 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 ) {
7a84: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
7a88: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7a8c: 1a000041 bne 7b98 <_Watchdog_Insert+0x130> <== NOT EXECUTED
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
7a90: e59f8120 ldr r8, [pc, #288] ; 7bb8 <_Watchdog_Insert+0x150><== NOT EXECUTED
7a94: e5983000 ldr r3, [r8] <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7a98: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
_Watchdog_Sync_count++;
7a9c: e2833001 add r3, r3, #1 ; 0x1 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
7aa0: e5812008 str r2, [r1, #8] <== NOT EXECUTED
_Watchdog_Sync_count++;
7aa4: e5883000 str r3, [r8] <== NOT EXECUTED
7aa8: e59f710c ldr r7, [pc, #268] ; 7bbc <_Watchdog_Insert+0x154><== NOT EXECUTED
restart:
delta_interval = the_watchdog->initial;
7aac: e594c00c ldr ip, [r4, #12] <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7ab0: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
7ab4: e5902000 ldr r2, [r0] <== NOT EXECUTED
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7ab8: 0a000023 beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED
7abc: e5923000 ldr r3, [r2] <== NOT EXECUTED
7ac0: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7ac4: 0a000020 beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED
break;
if ( delta_interval < after->delta_interval ) {
7ac8: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7acc: e15c0001 cmp ip, r1 <== NOT EXECUTED
7ad0: 3a000032 bcc 7ba0 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
7ad4: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7ad8: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7adc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7ae0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7ae4: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
7ae8: 1a000023 bne 7b7c <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7aec: e5973000 ldr r3, [r7] <== NOT EXECUTED
7af0: e1550003 cmp r5, r3 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7af4: 2061c00c rsbcs ip, r1, ip <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7af8: 2a000010 bcs 7b40 <_Watchdog_Insert+0xd8> <== NOT EXECUTED
7afc: ea00002a b 7bac <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b00: e5923000 ldr r3, [r2] <== NOT EXECUTED
7b04: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
7b08: 0a00000f beq 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED
break;
if ( delta_interval < after->delta_interval ) {
7b0c: e5921010 ldr r1, [r2, #16] <== NOT EXECUTED
7b10: e151000c cmp r1, ip <== NOT EXECUTED
7b14: 8a000021 bhi 7ba0 <_Watchdog_Insert+0x138> <== NOT EXECUTED
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
7b18: e10f3000 mrs r3, CPSR <== NOT EXECUTED
7b1c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7b20: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7b24: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
7b28: e3530001 cmp r3, #1 ; 0x1 <== NOT EXECUTED
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
7b2c: e061c00c rsb ip, r1, ip <== NOT EXECUTED
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
7b30: 1a000011 bne 7b7c <_Watchdog_Insert+0x114> <== NOT EXECUTED
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
7b34: e5973000 ldr r3, [r7] <== NOT EXECUTED
7b38: e1550003 cmp r5, r3 <== NOT EXECUTED
7b3c: 3a00001a bcc 7bac <_Watchdog_Insert+0x144> <== NOT EXECUTED
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
7b40: e35c0000 cmp ip, #0 ; 0x0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7b44: e5922000 ldr r2, [r2] <== NOT EXECUTED
7b48: 1affffec bne 7b00 <_Watchdog_Insert+0x98> <== NOT EXECUTED
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
7b4c: e5921004 ldr r1, [r2, #4] <== NOT EXECUTED
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
7b50: e59f3068 ldr r3, [pc, #104] ; 7bc0 <_Watchdog_Insert+0x158><== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
7b54: e5910000 ldr r0, [r1] <== NOT EXECUTED
7b58: e5932000 ldr r2, [r3] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
7b5c: e3a03002 mov r3, #2 ; 0x2 <== NOT EXECUTED
after_node->next = the_node;
7b60: e5814000 str r4, [r1] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
7b64: e5841004 str r1, [r4, #4] <== NOT EXECUTED
7b68: e5842014 str r2, [r4, #20] <== NOT EXECUTED
7b6c: e5843008 str r3, [r4, #8] <== NOT EXECUTED
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
7b70: e584c010 str ip, [r4, #16] <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
7b74: e5804004 str r4, [r0, #4] <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
7b78: e5840000 str r0, [r4] <== NOT EXECUTED
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
7b7c: e5875000 str r5, [r7] <== NOT EXECUTED
_Watchdog_Sync_count--;
7b80: e5983000 ldr r3, [r8] <== NOT EXECUTED
7b84: e2433001 sub r3, r3, #1 ; 0x1 <== NOT EXECUTED
7b88: e5883000 str r3, [r8] <== NOT EXECUTED
_ISR_Enable( level );
7b8c: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
}
7b90: e8bd01f0 pop {r4, r5, r6, r7, r8} <== NOT EXECUTED
7b94: e12fff1e bx lr <== NOT EXECUTED
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
7b98: e129f006 msr CPSR_fc, r6 <== NOT EXECUTED
7b9c: eafffffb b 7b90 <_Watchdog_Insert+0x128> <== NOT EXECUTED
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
7ba0: e06c3001 rsb r3, ip, r1 <== NOT EXECUTED
7ba4: e5823010 str r3, [r2, #16] <== NOT EXECUTED
7ba8: eaffffe7 b 7b4c <_Watchdog_Insert+0xe4> <== NOT EXECUTED
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
7bac: e5875000 str r5, [r7] <== NOT EXECUTED
7bb0: eaffffbd b 7aac <_Watchdog_Insert+0x44> <== NOT EXECUTED
00007c24 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
7c24: e92d0030 push {r4, r5} <== NOT EXECUTED
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
7c28: e10f5000 mrs r5, CPSR <== NOT EXECUTED
7c2c: e38530c0 orr r3, r5, #192 ; 0xc0 <== NOT EXECUTED
7c30: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
previous_state = the_watchdog->state;
7c34: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED
switch ( previous_state ) {
7c38: e35c0001 cmp ip, #1 ; 0x1 <== NOT EXECUTED
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
7c3c: 03a03000 moveq r3, #0 ; 0x0 <== NOT EXECUTED
7c40: 05803008 streq r3, [r0, #8] <== NOT EXECUTED
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7c44: 0a000000 beq 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED
7c48: 2a000006 bcs 7c68 <_Watchdog_Remove+0x44> <== NOT EXECUTED
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
7c4c: e59f306c ldr r3, [pc, #108] ; 7cc0 <_Watchdog_Remove+0x9c> <== NOT EXECUTED
7c50: e5932000 ldr r2, [r3] <== NOT EXECUTED
7c54: e5802018 str r2, [r0, #24] <== NOT EXECUTED
_ISR_Enable( level );
7c58: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
return( previous_state );
}
7c5c: e1a0000c mov r0, ip <== NOT EXECUTED
7c60: e8bd0030 pop {r4, r5} <== NOT EXECUTED
7c64: e12fff1e bx lr <== NOT EXECUTED
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
7c68: e35c0003 cmp ip, #3 ; 0x3 <== NOT EXECUTED
7c6c: 8afffff6 bhi 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
7c70: e5904000 ldr r4, [r0] <== NOT EXECUTED
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7c74: e5943000 ldr r3, [r4] <== NOT EXECUTED
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7c78: e3a02000 mov r2, #0 ; 0x0 <== NOT EXECUTED
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
7c7c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
next_watchdog->delta_interval += the_watchdog->delta_interval;
7c80: 15943010 ldrne r3, [r4, #16] <== NOT EXECUTED
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
7c84: e5802008 str r2, [r0, #8] <== NOT EXECUTED
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
next_watchdog->delta_interval += the_watchdog->delta_interval;
7c88: 15902010 ldrne r2, [r0, #16] <== NOT EXECUTED
7c8c: 10833002 addne r3, r3, r2 <== NOT EXECUTED
7c90: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if ( _Watchdog_Sync_count )
7c94: e59f3028 ldr r3, [pc, #40] ; 7cc4 <_Watchdog_Remove+0xa0> <== NOT EXECUTED
7c98: e5932000 ldr r2, [r3] <== NOT EXECUTED
7c9c: e3520000 cmp r2, #0 ; 0x0 <== NOT EXECUTED
_Watchdog_Sync_level = _ISR_Nest_level;
7ca0: 159f3020 ldrne r3, [pc, #32] ; 7cc8 <_Watchdog_Remove+0xa4><== NOT EXECUTED
7ca4: 159f2020 ldrne r2, [pc, #32] ; 7ccc <_Watchdog_Remove+0xa8><== NOT EXECUTED
7ca8: 15931000 ldrne r1, [r3] <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
7cac: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
7cb0: 15821000 strne r1, [r2] <== NOT EXECUTED
next->previous = previous;
previous->next = next;
7cb4: e5834000 str r4, [r3] <== NOT EXECUTED
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
7cb8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
7cbc: eaffffe2 b 7c4c <_Watchdog_Remove+0x28> <== NOT EXECUTED
00007d7c <_Workspace_Allocate>:
* _Workspace_Allocate
*/
void *_Workspace_Allocate(
size_t size
)
{
7d7c: e1a01000 mov r1, r0
return _Heap_Allocate( &_Workspace_Area, size );
7d80: e59f0000 ldr r0, [pc, #0] ; 7d88 <_Workspace_Allocate+0xc>
7d84: ea0008e4 b a11c <_Heap_Allocate>
00007d6c <_Workspace_Free>:
* _Workspace_Free
*/
bool _Workspace_Free(
void *block
)
{
7d6c: e1a01000 mov r1, r0 <== NOT EXECUTED
return _Heap_Free( &_Workspace_Area, block );
7d70: e59f0000 ldr r0, [pc, #0] ; 7d78 <_Workspace_Free+0xc> <== NOT EXECUTED
7d74: ea00091a b a1e4 <_Heap_Free> <== NOT EXECUTED
00007db4 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7db4: e92d4030 push {r4, r5, lr}
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7db8: e2504000 subs r4, r0, #0 ; 0x0
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
7dbc: e1a05001 mov r5, r1
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
7dc0: 0a000010 beq 7e08 <_Workspace_Handler_initialization+0x54>
7dc4: e214c003 ands ip, r4, #3 ; 0x3
7dc8: 1a00000e bne 7e08 <_Workspace_Handler_initialization+0x54>
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
7dcc: e59f3054 ldr r3, [pc, #84] ; 7e28 <_Workspace_Handler_initialization+0x74>
7dd0: e5932000 ldr r2, [r3]
7dd4: e5d21028 ldrb r1, [r2, #40]
7dd8: e3510000 cmp r1, #0 ; 0x0
7ddc: 1a00000d bne 7e18 <_Workspace_Handler_initialization+0x64>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
7de0: e1a01004 mov r1, r4
7de4: e1a02005 mov r2, r5
7de8: e59f003c ldr r0, [pc, #60] ; 7e2c <_Workspace_Handler_initialization+0x78>
7dec: e3a03004 mov r3, #4 ; 0x4
7df0: ebfff665 bl 578c <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
7df4: e3500000 cmp r0, #0 ; 0x0
7df8: 18bd8030 popne {r4, r5, pc}
_Internal_error_Occurred(
7dfc: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
7e00: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
7e04: ebfff6eb bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
7e08: e3a00000 mov r0, #0 ; 0x0
7e0c: e3a01001 mov r1, #1 ; 0x1
7e10: e3a02002 mov r2, #2 ; 0x2
7e14: ebfff6e7 bl 59b8 <_Internal_error_Occurred>
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
7e18: e1a0100c mov r1, ip <== NOT EXECUTED
7e1c: e1a02005 mov r2, r5 <== NOT EXECUTED
7e20: eb000f6d bl bbdc <memset> <== NOT EXECUTED
7e24: eaffffed b 7de0 <_Workspace_Handler_initialization+0x2c> <== NOT EXECUTED
00003f0c <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
3f0c: e92d4010 push {r4, lr}
if ( !time_buffer )
3f10: e2514000 subs r4, r1, #0 ; 0x0
3f14: 03a00009 moveq r0, #9 ; 0x9
3f18: 08bd8010 popeq {r4, pc}
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
3f1c: e3500004 cmp r0, #4 ; 0x4
3f20: 979ff100 ldrls pc, [pc, r0, lsl #2]
3f24: ea000004 b 3f3c <rtems_clock_get+0x30>
3f28: 00003f44 .word 0x00003f44
3f2c: 00003f50 .word 0x00003f50
3f30: 3f5c .short 0x3f5c
3f32: 0000 .short 0x0000
3f34: 00003f6c .word 0x00003f6c
3f38: 00003f7c .word 0x00003f7c
3f3c: e3a0000a mov r0, #10 ; 0xa
3f40: e8bd8010 pop {r4, pc}
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3f44: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f48: e8bd4010 pop {r4, lr}
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
3f4c: ea000027 b 3ff0 <rtems_clock_get_tod>
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3f50: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f54: e8bd4010 pop {r4, lr}
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
3f58: ea00000a b 3f88 <rtems_clock_get_seconds_since_epoch>
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
3f5c: eb00001f bl 3fe0 <rtems_clock_get_ticks_since_boot>
3f60: e5840000 str r0, [r4]
3f64: e3a00000 mov r0, #0 ; 0x0
3f68: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
3f6c: eb000013 bl 3fc0 <rtems_clock_get_ticks_per_second>
3f70: e5840000 str r0, [r4]
3f74: e3a00000 mov r0, #0 ; 0x0
3f78: e8bd8010 pop {r4, pc}
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3f7c: e1a00004 mov r0, r4
break;
}
return RTEMS_INVALID_NUMBER;
}
3f80: e8bd4010 pop {r4, lr}
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
3f84: ea00004c b 40bc <rtems_clock_get_tod_timeval>
00003fc0 <rtems_clock_get_ticks_per_second>:
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/score/watchdog.h>
rtems_interval rtems_clock_get_ticks_per_second(void)
{
3fc0: e59f3014 ldr r3, [pc, #20] ; 3fdc <rtems_clock_get_ticks_per_second+0x1c><== NOT EXECUTED
3fc4: e3a0093d mov r0, #999424 ; 0xf4000 <== NOT EXECUTED
3fc8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3fcc: e5931000 ldr r1, [r3] <== NOT EXECUTED
3fd0: e2800d09 add r0, r0, #576 ; 0x240 <== NOT EXECUTED
3fd4: eb003822 bl 12064 <__aeabi_uidiv> <== NOT EXECUTED
return TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick;
}
3fd8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
...
00003ff0 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
3ff0: e92d4030 push {r4, r5, lr}
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
3ff4: e2505000 subs r5, r0, #0 ; 0x0
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
3ff8: e24dd034 sub sp, sp, #52 ; 0x34
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
3ffc: 02800009 addeq r0, r0, #9 ; 0x9
4000: 0a000028 beq 40a8 <rtems_clock_get_tod+0xb8>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
4004: e59f30a4 ldr r3, [pc, #164] ; 40b0 <rtems_clock_get_tod+0xc0>
4008: e5d32000 ldrb r2, [r3]
400c: e3520000 cmp r2, #0 ; 0x0
4010: 03a0000b moveq r0, #11 ; 0xb
4014: 0a000023 beq 40a8 <rtems_clock_get_tod+0xb8>
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
4018: e10f4000 mrs r4, CPSR
401c: e38430c0 orr r3, r4, #192 ; 0xc0
4020: e129f003 msr CPSR_fc, r3
_TOD_Get( &now );
4024: e28d0024 add r0, sp, #36 ; 0x24
4028: eb000584 bl 5640 <_TOD_Get>
_ISR_Enable(level);
402c: e129f004 msr CPSR_fc, r4
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
4030: e59f107c ldr r1, [pc, #124] ; 40b4 <rtems_clock_get_tod+0xc4>
4034: e59d3028 ldr r3, [sp, #40]
4038: e0820391 umull r0, r2, r1, r3
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
403c: e59d3024 ldr r3, [sp, #36]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
4040: e1a02322 lsr r2, r2, #6
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
4044: e1a0100d mov r1, sp
4048: e28d002c add r0, sp, #44 ; 0x2c
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
404c: e58d302c str r3, [sp, #44]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
4050: e58d2030 str r2, [sp, #48]
4054: eb001e9f bl bad8 <gmtime_r>
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
4058: e59d2014 ldr r2, [sp, #20]
tmbuf->month = time.tm_mon + 1;
405c: e59d3010 ldr r3, [sp, #16]
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
4060: e2822e76 add r2, r2, #1888 ; 0x760
4064: e282200c add r2, r2, #12 ; 0xc
tmbuf->month = time.tm_mon + 1;
4068: e2833001 add r3, r3, #1 ; 0x1
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
406c: e885000c stm r5, {r2, r3}
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
4070: e59d200c ldr r2, [sp, #12]
tmbuf->hour = time.tm_hour;
4074: e59d3008 ldr r3, [sp, #8]
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
4078: e5852008 str r2, [r5, #8]
tmbuf->hour = time.tm_hour;
407c: e585300c str r3, [r5, #12]
tmbuf->minute = time.tm_min;
4080: e59d2004 ldr r2, [sp, #4]
tmbuf->second = time.tm_sec;
4084: e59d3000 ldr r3, [sp]
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
4088: e5852010 str r2, [r5, #16]
tmbuf->second = time.tm_sec;
408c: e5853014 str r3, [r5, #20]
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
4090: e59f2020 ldr r2, [pc, #32] ; 40b8 <rtems_clock_get_tod+0xc8>
4094: e59d0030 ldr r0, [sp, #48]
4098: e5921000 ldr r1, [r2]
409c: eb0037f0 bl 12064 <__aeabi_uidiv>
40a0: e5850018 str r0, [r5, #24]
40a4: e3a00000 mov r0, #0 ; 0x0
return RTEMS_SUCCESSFUL;
}
40a8: e28dd034 add sp, sp, #52 ; 0x34
40ac: e8bd8030 pop {r4, r5, pc}
00004d90 <rtems_initialize_data_structures>:
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(
rtems_configuration_table *configuration_table
)
{
4d90: e92d40f0 push {r4, r5, r6, r7, lr}
4d94: e1a06000 mov r6, r0
/*
* Dispatching and interrupts are disabled until the end of the
* initialization sequence. This prevents an inadvertent context
* switch before the executive is initialized.
*/
_ISR_Disable( bsp_level );
4d98: e10f2000 mrs r2, CPSR
4d9c: e38230c0 orr r3, r2, #192 ; 0xc0
4da0: e129f003 msr CPSR_fc, r3
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
4da4: e3500000 cmp r0, #0 ; 0x0
4da8: 0a000033 beq 4e7c <rtems_initialize_data_structures+0xec>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4dac: e59f30d4 ldr r3, [pc, #212] ; 4e88 <rtems_initialize_data_structures+0xf8>
RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization (
bool is_multiprocessing
)
{
_System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION;
4db0: e59f70d4 ldr r7, [pc, #212] ; 4e8c <rtems_initialize_data_structures+0xfc>
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4db4: e59f00d4 ldr r0, [pc, #212] ; 4e90 <rtems_initialize_data_structures+0x100>
);
/*
* Provide pointers just for later convenience.
*/
_Configuration_Table = configuration_table;
4db8: e5836000 str r6, [r3]
4dbc: e3a04000 mov r4, #0 ; 0x0
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize( _Thread_Dispatch );
4dc0: eb000c70 bl 7f88 <_CPU_Initialize>
4dc4: e5874000 str r4, [r7]
/*
* Do this as early as possible to insure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
4dc8: eb00140b bl 9dfc <_Debug_Manager_initialization>
_API_extensions_Initialization();
4dcc: eb00009f bl 5050 <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem.
*/
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
4dd0: e59f30bc ldr r3, [pc, #188] ; 4e94 <rtems_initialize_data_structures+0x104>
4dd4: e3a05001 mov r5, #1 ; 0x1
/*
* Before this is called, we are not allowed to allocate memory
* from the Workspace because it is not initialized.
*/
_Workspace_Handler_initialization(
4dd8: e8960003 ldm r6, {r0, r1}
4ddc: e5835000 str r5, [r3]
4de0: eb000bf3 bl 7db4 <_Workspace_Handler_initialization>
(void *)configuration_table->work_space_start,
configuration_table->work_space_size
);
_User_extensions_Handler_initialization(
4de4: e2860038 add r0, r6, #56 ; 0x38
4de8: e8900003 ldm r0, {r0, r1}
4dec: eb000a72 bl 77bc <_User_extensions_Handler_initialization>
configuration_table->number_of_initial_extensions,
configuration_table->User_extension_table
);
_ISR_Handler_initialization();
4df0: eb000302 bl 5a00 <_ISR_Handler_initialization>
_Objects_Handler_initialization(
4df4: eb0004cf bl 6138 <_Objects_Handler_initialization>
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4df8: e59f3098 ldr r3, [pc, #152] ; 4e98 <rtems_initialize_data_structures+0x108>
4dfc: e59f2098 ldr r2, [pc, #152] ; 4e9c <rtems_initialize_data_structures+0x10c>
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e00: e1a00005 mov r0, r5
_Configuration_MP_table->maximum_nodes,
_Configuration_MP_table->maximum_global_objects
#endif
);
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
4e04: e5832004 str r2, [r3, #4]
/*
* Initialize the internal allocator Mutex
*/
_API_Mutex_Initialization( 1 );
4e08: eb0000f2 bl 51d8 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
4e0c: e59f008c ldr r0, [pc, #140] ; 4ea0 <rtems_initialize_data_structures+0x110>
4e10: eb0000c6 bl 5130 <_API_Mutex_Allocate>
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
4e14: e59f3088 ldr r3, [pc, #136] ; 4ea4 <rtems_initialize_data_structures+0x114>
4e18: e1c340b0 strh r4, [r3]
4e1c: e59f3084 ldr r3, [pc, #132] ; 4ea8 <rtems_initialize_data_structures+0x118>
for ( index=0 ; index <16 ; index++ )
_Priority_Bit_map[ index ] = 0;
4e20: e3a02000 mov r2, #0 ; 0x0
4e24: e18320b4 strh r2, [r3, r4]
4e28: e2844002 add r4, r4, #2 ; 0x2
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
size_t index;
_Priority_Major_bit_map = 0;
for ( index=0 ; index <16 ; index++ )
4e2c: e3540020 cmp r4, #32 ; 0x20
4e30: 1afffffa bne 4e20 <rtems_initialize_data_structures+0x90>
_Priority_Handler_initialization();
_Watchdog_Handler_initialization();
4e34: eb000b62 bl 7bc4 <_Watchdog_Handler_initialization>
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
4e38: e596000c ldr r0, [r6, #12]
4e3c: eb00021a bl 56ac <_TOD_Handler_initialization>
_Thread_Handler_initialization(
4e40: e5961008 ldr r1, [r6, #8]
4e44: e5960010 ldr r0, [r6, #16]
4e48: eb00071f bl 6acc <_Thread_Handler_initialization>
);
#endif
/* MANAGERS */
_RTEMS_API_Initialize( configuration_table );
4e4c: e1a00006 mov r0, r6
4e50: eb000061 bl 4fdc <_RTEMS_API_Initialize>
_Extension_Manager_initialization( configuration_table->maximum_extensions );
4e54: e5960008 ldr r0, [r6, #8]
4e58: eb000013 bl 4eac <_Extension_Manager_initialization>
_IO_Manager_initialization(
4e5c: e596202c ldr r2, [r6, #44]
4e60: e5960034 ldr r0, [r6, #52]
4e64: e5961030 ldr r1, [r6, #48]
4e68: eb000033 bl 4f3c <_IO_Manager_initialization>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
4e6c: e3a03001 mov r3, #1 ; 0x1
4e70: e5873000 str r3, [r7]
_Thread_Create_idle();
/*
* Scheduling can properly occur now as long as we avoid dispatching.
*/
}
4e74: e8bd40f0 pop {r4, r5, r6, r7, lr}
*
* At this point all API extensions are in place. After the call to
* _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set.
*/
_Thread_Create_idle();
4e78: ea0005d2 b 65c8 <_Thread_Create_idle>
/*
* Make sure the parameters were not NULL.
*/
if ( configuration_table == NULL )
_Internal_error_Occurred(
4e7c: e1a02000 mov r2, r0 <== NOT EXECUTED
4e80: e3a01001 mov r1, #1 ; 0x1 <== NOT EXECUTED
4e84: eb0002cb bl 59b8 <_Internal_error_Occurred> <== NOT EXECUTED
000062dc <rtems_io_register_driver>:
{
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62dc: e251c000 subs ip, r1, #0 ; 0x0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
62e0: e92d00f0 push {r4, r5, r6, r7}
62e4: e1a06000 mov r6, r0
62e8: e1a07002 mov r7, r2
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
62ec: 0a00003e beq 63ec <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
62f0: e3520000 cmp r2, #0 ; 0x0
62f4: 0a00003c beq 63ec <rtems_io_register_driver+0x110>
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
62f8: e59c3000 ldr r3, [ip]
62fc: e3530000 cmp r3, #0 ; 0x0
6300: 0a000036 beq 63e0 <rtems_io_register_driver+0x104>
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
6304: e3a03000 mov r3, #0 ; 0x0
6308: e5873000 str r3, [r7]
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
630c: e59f20e0 ldr r2, [pc, #224] ; 63f4 <rtems_io_register_driver+0x118>
6310: e5922000 ldr r2, [r2]
6314: e1520006 cmp r2, r6
6318: 93a0000a movls r0, #10 ; 0xa
631c: 9a00002b bls 63d0 <rtems_io_register_driver+0xf4>
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
6320: e3560000 cmp r6, #0 ; 0x0
6324: 1a00001d bne 63a0 <rtems_io_register_driver+0xc4>
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6328: e2526001 subs r6, r2, #1 ; 0x1
632c: 0a000029 beq 63d8 <rtems_io_register_driver+0xfc>
6330: e1a03282 lsl r3, r2, #5
6334: e0433182 sub r3, r3, r2, lsl #3
6338: e59f20b8 ldr r2, [pc, #184] ; 63f8 <rtems_io_register_driver+0x11c>
633c: e5921000 ldr r1, [r2]
6340: e2433018 sub r3, r3, #24 ; 0x18
6344: e0811003 add r1, r1, r3
6348: ea000002 b 6358 <rtems_io_register_driver+0x7c>
634c: e2566001 subs r6, r6, #1 ; 0x1
6350: e2411018 sub r1, r1, #24 ; 0x18
6354: 0a00001f beq 63d8 <rtems_io_register_driver+0xfc>
if ( !_IO_Driver_address_table[major].initialization_entry &&
6358: e5913000 ldr r3, [r1]
635c: e3530000 cmp r3, #0 ; 0x0
* in use.
*/
if ( major == 0 ) {
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
6360: e1a05001 mov r5, r1
if ( !_IO_Driver_address_table[major].initialization_entry &&
6364: 1afffff8 bne 634c <rtems_io_register_driver+0x70>
6368: e5913004 ldr r3, [r1, #4]
636c: e3530000 cmp r3, #0 ; 0x0
6370: 1afffff5 bne 634c <rtems_io_register_driver+0x70>
if ( _IO_Driver_address_table[major].initialization_entry ||
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
6374: e8bc000f ldm ip!, {r0, r1, r2, r3}
6378: e1a04005 mov r4, r5
637c: e8a4000f stmia r4!, {r0, r1, r2, r3}
6380: e89c0003 ldm ip, {r0, r1}
6384: e8840003 stm r4, {r0, r1}
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
6388: e3a01000 mov r1, #0 ; 0x0
638c: e1a00006 mov r0, r6
6390: e1a02001 mov r2, r1
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
6394: e5876000 str r6, [r7]
return rtems_io_initialize( major, 0, NULL );
}
6398: e8bd00f0 pop {r4, r5, r6, r7}
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
639c: eaffff58 b 6104 <rtems_io_initialize>
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
63a0: e59f2050 ldr r2, [pc, #80] ; 63f8 <rtems_io_register_driver+0x11c>
63a4: e1a03286 lsl r3, r6, #5
63a8: e5921000 ldr r1, [r2]
63ac: e0433186 sub r3, r3, r6, lsl #3
63b0: e7912003 ldr r2, [r1, r3]
63b4: e3520000 cmp r2, #0 ; 0x0
63b8: e0815003 add r5, r1, r3
63bc: 1a000002 bne 63cc <rtems_io_register_driver+0xf0>
63c0: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
63c4: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
63c8: 0affffe9 beq 6374 <rtems_io_register_driver+0x98> <== NOT EXECUTED
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63cc: e3a0000c mov r0, #12 ; 0xc
}
63d0: e8bd00f0 pop {r4, r5, r6, r7}
63d4: e12fff1e bx lr
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63d8: e3a00005 mov r0, #5 ; 0x5
63dc: eafffffb b 63d0 <rtems_io_register_driver+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
63e0: e59c3004 ldr r3, [ip, #4]
63e4: e3530000 cmp r3, #0 ; 0x0
63e8: 1affffc5 bne 6304 <rtems_io_register_driver+0x28>
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
63ec: e3a00009 mov r0, #9 ; 0x9
63f0: eafffff6 b 63d0 <rtems_io_register_driver+0xf4>
0000ba60 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ba60: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
ba64: e2515000 subs r5, r1, #0 ; 0x0 <== NOT EXECUTED
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ba68: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
ba6c: 03a00009 moveq r0, #9 ; 0x9 <== NOT EXECUTED
ba70: 0a000007 beq ba94 <rtems_rate_monotonic_get_statistics+0x34><== NOT EXECUTED
ba74: e1a01000 mov r1, r0 <== NOT EXECUTED
ba78: e1a0200d mov r2, sp <== NOT EXECUTED
ba7c: e59f004c ldr r0, [pc, #76] ; bad0 <rtems_rate_monotonic_get_statistics+0x70><== NOT EXECUTED
ba80: ebfff054 bl 7bd8 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ba84: e59d6000 ldr r6, [sp] <== NOT EXECUTED
ba88: e3560000 cmp r6, #0 ; 0x0 <== NOT EXECUTED
ba8c: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
ba90: 0a000001 beq ba9c <rtems_rate_monotonic_get_statistics+0x3c><== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ba94: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
ba98: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
ba9c: e280c054 add ip, r0, #84 ; 0x54 <== NOT EXECUTED
baa0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
baa4: e1a04005 mov r4, r5 <== NOT EXECUTED
baa8: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
baac: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
bab0: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
bab4: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
bab8: e8a4000f stmia r4!, {r0, r1, r2, r3} <== NOT EXECUTED
babc: e89c0003 ldm ip, {r0, r1} <== NOT EXECUTED
bac0: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
_Thread_Enable_dispatch();
bac4: ebfff288 bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED
bac8: e1a00006 mov r0, r6 <== NOT EXECUTED
bacc: eafffff0 b ba94 <rtems_rate_monotonic_get_statistics+0x34> <== NOT EXECUTED
0000bad4 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
bad4: e92d4070 push {r4, r5, r6, lr}
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
bad8: e2515000 subs r5, r1, #0 ; 0x0
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
badc: e24dd00c sub sp, sp, #12 ; 0xc
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
bae0: 03a00009 moveq r0, #9 ; 0x9
bae4: 0a000016 beq bb44 <rtems_rate_monotonic_get_status+0x70>
bae8: e1a01000 mov r1, r0
baec: e28d2008 add r2, sp, #8 ; 0x8
baf0: e59f0084 ldr r0, [pc, #132] ; bb7c <rtems_rate_monotonic_get_status+0xa8>
baf4: ebfff037 bl 7bd8 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
baf8: e59d3008 ldr r3, [sp, #8]
bafc: e3530000 cmp r3, #0 ; 0x0
bb00: e1a06000 mov r6, r0
bb04: 13a00004 movne r0, #4 ; 0x4
bb08: 1a00000d bne bb44 <rtems_rate_monotonic_get_status+0x70>
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
bb0c: e5963050 ldr r3, [r6, #80] <== NOT EXECUTED
bb10: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
bb14: 01a02003 moveq r2, r3 <== NOT EXECUTED
bb18: 15932008 ldrne r2, [r3, #8] <== NOT EXECUTED
status->state = the_period->state;
bb1c: e5963038 ldr r3, [r6, #56] <== NOT EXECUTED
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
bb20: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
bb24: e885000c stm r5, {r2, r3} <== NOT EXECUTED
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
bb28: 1a000007 bne bb4c <rtems_rate_monotonic_get_status+0x78> <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
status->executed_since_last_period.tv_nsec = 0;
bb2c: e5853014 str r3, [r5, #20] <== NOT EXECUTED
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
bb30: e5853008 str r3, [r5, #8] <== NOT EXECUTED
status->since_last_period.tv_nsec = 0;
bb34: e585300c str r3, [r5, #12] <== NOT EXECUTED
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
bb38: e5853010 str r3, [r5, #16] <== NOT EXECUTED
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
bb3c: ebfff26a bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED
bb40: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
bb44: e28dd00c add sp, sp, #12 ; 0xc
bb48: e8bd8070 pop {r4, r5, r6, pc}
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
bb4c: e1a0000d mov r0, sp <== NOT EXECUTED
bb50: ebffed9a bl 71c0 <_TOD_Get_uptime> <== NOT EXECUTED
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
bb54: e2860044 add r0, r6, #68 ; 0x44 <== NOT EXECUTED
bb58: e1a0100d mov r1, sp <== NOT EXECUTED
bb5c: e2852008 add r2, r5, #8 ; 0x8 <== NOT EXECUTED
bb60: ebfff6ce bl 96a0 <_Timespec_Subtract> <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
bb64: e1a0100d mov r1, sp <== NOT EXECUTED
bb68: e2852010 add r2, r5, #16 ; 0x10 <== NOT EXECUTED
bb6c: e59f000c ldr r0, [pc, #12] ; bb80 <rtems_rate_monotonic_get_status+0xac><== NOT EXECUTED
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
bb70: e1a0400d mov r4, sp <== NOT EXECUTED
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
bb74: ebfff6c9 bl 96a0 <_Timespec_Subtract> <== NOT EXECUTED
bb78: eaffffef b bb3c <rtems_rate_monotonic_get_status+0x68> <== NOT EXECUTED
00005d48 <rtems_rate_monotonic_report_statistics>:
}
}
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
5d48: e59f1004 ldr r1, [pc, #4] ; 5d54 <rtems_rate_monotonic_report_statistics+0xc><== NOT EXECUTED
5d4c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
5d50: eaffff71 b 5b1c <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
00005b1c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b1c: 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 )
5b20: e2516000 subs r6, r1, #0 ; 0x0 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5b24: e24dd070 sub sp, sp, #112 ; 0x70 <== NOT EXECUTED
5b28: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
5b2c: 0a000042 beq 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
5b30: e59f11e4 ldr r1, [pc, #484] ; 5d1c <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
5b34: e1a0e00f mov lr, pc <== NOT EXECUTED
5b38: e12fff16 bx r6 <== NOT EXECUTED
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
5b3c: e59f11dc ldr r1, [pc, #476] ; 5d20 <rtems_rate_monotonic_report_statistics_with_plugin+0x204><== NOT EXECUTED
5b40: e1a00007 mov r0, r7 <== NOT EXECUTED
5b44: e1a0e00f mov lr, pc <== NOT EXECUTED
5b48: e12fff16 bx r6 <== NOT EXECUTED
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
5b4c: e59f11d0 ldr r1, [pc, #464] ; 5d24 <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== NOT EXECUTED
5b50: e1a00007 mov r0, r7 <== NOT EXECUTED
5b54: e1a0e00f mov lr, pc <== NOT EXECUTED
5b58: e12fff16 bx r6 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
5b5c: e59f81c4 ldr r8, [pc, #452] ; 5d28 <rtems_rate_monotonic_report_statistics_with_plugin+0x20c><== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
5b60: e59f11c4 ldr r1, [pc, #452] ; 5d2c <rtems_rate_monotonic_report_statistics_with_plugin+0x210><== NOT EXECUTED
5b64: e1a00007 mov r0, r7 <== NOT EXECUTED
5b68: e1a0e00f mov lr, pc <== NOT EXECUTED
5b6c: e12fff16 bx r6 <== NOT EXECUTED
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
5b70: e1a00007 mov r0, r7 <== NOT EXECUTED
5b74: e59f11b4 ldr r1, [pc, #436] ; 5d30 <rtems_rate_monotonic_report_statistics_with_plugin+0x214><== NOT EXECUTED
5b78: e1a0e00f mov lr, pc <== NOT EXECUTED
5b7c: e12fff16 bx r6 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
5b80: e5985008 ldr r5, [r8, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5b84: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
5b88: e1550003 cmp r5, r3 <== NOT EXECUTED
5b8c: 8a00002a bhi 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
_Timespec_Divide_by_integer(
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5b90: e59fa19c ldr sl, [pc, #412] ; 5d34 <rtems_rate_monotonic_report_statistics_with_plugin+0x218><== NOT EXECUTED
5b94: e28d9010 add r9, sp, #16 ; 0x10 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5b98: e28db060 add fp, sp, #96 ; 0x60 <== NOT EXECUTED
5b9c: ea000003 b 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== 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 ;
5ba0: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5ba4: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
5ba8: e1530005 cmp r3, r5 <== NOT EXECUTED
5bac: 3a000022 bcc 5c3c <rtems_rate_monotonic_report_statistics_with_plugin+0x120><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
5bb0: e1a00005 mov r0, r5 <== NOT EXECUTED
5bb4: e1a01009 mov r1, r9 <== NOT EXECUTED
5bb8: eb0017a8 bl ba60 <rtems_rate_monotonic_get_statistics> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
5bbc: e2504000 subs r4, r0, #0 ; 0x0 <== NOT EXECUTED
5bc0: 1afffff6 bne 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
5bc4: e28d1048 add r1, sp, #72 ; 0x48 <== NOT EXECUTED
5bc8: e1a00005 mov r0, r5 <== NOT EXECUTED
5bcc: eb0017c0 bl bad4 <rtems_rate_monotonic_get_status> <== NOT EXECUTED
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
5bd0: e59d0048 ldr r0, [sp, #72] <== NOT EXECUTED
5bd4: e3500000 cmp r0, #0 ; 0x0 <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
name[ 0 ] = '\0';
5bd8: e5cd406b strb r4, [sp, #107] <== NOT EXECUTED
if ( the_status.owner ) {
5bdc: 1a00004a bne 5d0c <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
5be0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5be4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
5be8: e58d3000 str r3, [sp] <== NOT EXECUTED
5bec: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
5bf0: e28d306b add r3, sp, #107 ; 0x6b <== NOT EXECUTED
5bf4: e1a02005 mov r2, r5 <== NOT EXECUTED
5bf8: e59f1138 ldr r1, [pc, #312] ; 5d38 <rtems_rate_monotonic_report_statistics_with_plugin+0x21c><== NOT EXECUTED
5bfc: e1a00007 mov r0, r7 <== NOT EXECUTED
5c00: e1a0e00f mov lr, pc <== NOT EXECUTED
5c04: e12fff16 bx r6 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
5c0c: e2531000 subs r1, r3, #0 ; 0x0 <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c10: e28d0028 add r0, sp, #40 ; 0x28 <== NOT EXECUTED
5c14: e1a0200b mov r2, fp <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
5c18: 1a000009 bne 5c44 <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NOT EXECUTED
(*print)( context, "\n" );
5c1c: e1a00007 mov r0, r7 <== NOT EXECUTED
5c20: e59f1114 ldr r1, [pc, #276] ; 5d3c <rtems_rate_monotonic_report_statistics_with_plugin+0x220><== NOT EXECUTED
5c24: e1a0e00f mov lr, pc <== NOT EXECUTED
5c28: e12fff16 bx r6 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
5c2c: e598300c ldr r3, [r8, #12] <== NOT EXECUTED
id++ ) {
5c30: e2855001 add r5, r5, #1 ; 0x1 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
5c34: e1530005 cmp r3, r5 <== NOT EXECUTED
5c38: 2affffdc bcs 5bb0 <rtems_rate_monotonic_report_statistics_with_plugin+0x94><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
5c3c: e28dd070 add sp, sp, #112 ; 0x70 <== NOT EXECUTED
5c40: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
5c44: eb000e58 bl 95ac <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
5c48: e59d1024 ldr r1, [sp, #36] <== NOT EXECUTED
5c4c: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5c50: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5c54: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
5c58: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5c5c: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5c60: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5c64: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5c68: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
5c6c: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5c70: e58d2000 str r2, [sp] <== NOT EXECUTED
5c74: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5c78: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5c7c: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5c80: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5c84: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5c88: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5c8c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
5c90: e59f10a8 ldr r1, [pc, #168] ; 5d40 <rtems_rate_monotonic_report_statistics_with_plugin+0x224><== NOT EXECUTED
5c94: e1a00007 mov r0, r7 <== NOT EXECUTED
5c98: e1a0e00f mov lr, pc <== NOT EXECUTED
5c9c: e12fff16 bx r6 <== NOT EXECUTED
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
5ca0: e28d0040 add r0, sp, #64 ; 0x40 <== NOT EXECUTED
5ca4: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
5ca8: e1a0200b mov r2, fp <== NOT EXECUTED
5cac: eb000e3e bl 95ac <_Timespec_Divide_by_integer> <== NOT EXECUTED
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
5cb0: e59d103c ldr r1, [sp, #60] <== NOT EXECUTED
5cb4: e0c2c19a smull ip, r2, sl, r1 <== NOT EXECUTED
5cb8: e59d0064 ldr r0, [sp, #100] <== NOT EXECUTED
5cbc: e59d3034 ldr r3, [sp, #52] <== NOT EXECUTED
5cc0: e0cce09a smull lr, ip, sl, r0 <== NOT EXECUTED
5cc4: e0c4e39a smull lr, r4, sl, r3 <== NOT EXECUTED
5cc8: e1a01fc1 asr r1, r1, #31 <== NOT EXECUTED
5ccc: e0611342 rsb r1, r1, r2, asr #6 <== NOT EXECUTED
5cd0: e59d2038 ldr r2, [sp, #56] <== NOT EXECUTED
5cd4: e1a00fc0 asr r0, r0, #31 <== NOT EXECUTED
5cd8: e58d2000 str r2, [sp] <== NOT EXECUTED
5cdc: e59d2060 ldr r2, [sp, #96] <== NOT EXECUTED
5ce0: e060034c rsb r0, r0, ip, asr #6 <== NOT EXECUTED
5ce4: e1a03fc3 asr r3, r3, #31 <== NOT EXECUTED
5ce8: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
5cec: e58d000c str r0, [sp, #12] <== NOT EXECUTED
5cf0: e0633344 rsb r3, r3, r4, asr #6 <== NOT EXECUTED
5cf4: e59d2030 ldr r2, [sp, #48] <== NOT EXECUTED
5cf8: e1a00007 mov r0, r7 <== NOT EXECUTED
5cfc: e59f1040 ldr r1, [pc, #64] ; 5d44 <rtems_rate_monotonic_report_statistics_with_plugin+0x228><== NOT EXECUTED
5d00: e1a0e00f mov lr, pc <== NOT EXECUTED
5d04: e12fff16 bx r6 <== NOT EXECUTED
5d08: eaffffa4 b 5ba0 <rtems_rate_monotonic_report_statistics_with_plugin+0x84><== NOT EXECUTED
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
5d0c: e28d206b add r2, sp, #107 ; 0x6b <== NOT EXECUTED
5d10: e3a01005 mov r1, #5 ; 0x5 <== NOT EXECUTED
5d14: eb000070 bl 5edc <rtems_object_get_name> <== NOT EXECUTED
5d18: eaffffb0 b 5be0 <rtems_rate_monotonic_report_statistics_with_plugin+0xc4><== NOT EXECUTED
00005d58 <rtems_rate_monotonic_reset_all_statistics>:
5d58: e59f3040 ldr r3, [pc, #64] ; 5da0 <rtems_rate_monotonic_reset_all_statistics+0x48><== NOT EXECUTED
5d5c: e5932000 ldr r2, [r3] <== NOT EXECUTED
5d60: e2822001 add r2, r2, #1 ; 0x1 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
5d64: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5d68: 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 ;
5d6c: e59f5030 ldr r5, [pc, #48] ; 5da4 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NOT EXECUTED
5d70: e5954008 ldr r4, [r5, #8] <== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
5d74: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
5d78: e1540003 cmp r4, r3 <== NOT EXECUTED
5d7c: 8a000005 bhi 5d98 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
5d80: e1a00004 mov r0, r4 <== NOT EXECUTED
5d84: eb000007 bl 5da8 <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 ;
5d88: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
id++ ) {
5d8c: e2844001 add r4, r4, #1 ; 0x1 <== NOT EXECUTED
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
5d90: e1530004 cmp r3, r4 <== NOT EXECUTED
5d94: 2afffff9 bcs 5d80 <rtems_rate_monotonic_reset_all_statistics+0x28><== NOT EXECUTED
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
5d98: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
5d9c: ea0009d2 b 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED
00005da8 <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
Objects_Id id
)
{
5da8: e92d4010 push {r4, lr} <== NOT EXECUTED
5dac: e24dd004 sub sp, sp, #4 ; 0x4 <== NOT EXECUTED
5db0: e1a01000 mov r1, r0 <== NOT EXECUTED
5db4: e1a0200d mov r2, sp <== NOT EXECUTED
5db8: e59f005c ldr r0, [pc, #92] ; 5e1c <rtems_rate_monotonic_reset_statistics+0x74><== NOT EXECUTED
5dbc: eb000785 bl 7bd8 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
5dc0: e59d4000 ldr r4, [sp] <== NOT EXECUTED
5dc4: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
5dc8: 13a00004 movne r0, #4 ; 0x4 <== NOT EXECUTED
5dcc: 1a000010 bne 5e14 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
5dd0: e3e03102 mvn r3, #-2147483648 ; 0x80000000 <== NOT EXECUTED
5dd4: e5803078 str r3, [r0, #120] <== NOT EXECUTED
5dd8: e5804054 str r4, [r0, #84] <== NOT EXECUTED
5ddc: e5804058 str r4, [r0, #88] <== NOT EXECUTED
5de0: e5804064 str r4, [r0, #100] <== NOT EXECUTED
5de4: e5804068 str r4, [r0, #104] <== NOT EXECUTED
5de8: e580406c str r4, [r0, #108] <== NOT EXECUTED
5dec: e5804070 str r4, [r0, #112] <== NOT EXECUTED
5df0: e580407c str r4, [r0, #124] <== NOT EXECUTED
5df4: e5804080 str r4, [r0, #128] <== NOT EXECUTED
5df8: e5804084 str r4, [r0, #132] <== NOT EXECUTED
5dfc: e5804088 str r4, [r0, #136] <== NOT EXECUTED
5e00: e580305c str r3, [r0, #92] <== NOT EXECUTED
5e04: e5803060 str r3, [r0, #96] <== NOT EXECUTED
5e08: e5803074 str r3, [r0, #116] <== NOT EXECUTED
_Thread_Enable_dispatch();
5e0c: eb0009b6 bl 84ec <_Thread_Enable_dispatch> <== NOT EXECUTED
5e10: e1a00004 mov r0, r4 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5e14: e28dd004 add sp, sp, #4 ; 0x4 <== NOT EXECUTED
5e18: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000110cc <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110cc: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
110d0: e2517000 subs r7, r1, #0 ; 0x0
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
110d4: e1a04000 mov r4, r0
110d8: e24dd008 sub sp, sp, #8 ; 0x8
110dc: e1a06002 mov r6, r2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
110e0: 03a04009 moveq r4, #9 ; 0x9
110e4: 0a000020 beq 1116c <rtems_region_extend+0xa0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
110e8: e59f80a0 ldr r8, [pc, #160] ; 11190 <rtems_region_extend+0xc4>
110ec: e5980000 ldr r0, [r8]
110f0: eb000902 bl 13500 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
110f4: e1a01004 mov r1, r4
110f8: e59f0094 ldr r0, [pc, #148] ; 11194 <rtems_region_extend+0xc8>
110fc: e1a0200d mov r2, sp
11100: eb000fcf bl 15044 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
11104: e59d4000 ldr r4, [sp]
11108: e3540000 cmp r4, #0 ; 0x0
1110c: e1a05000 mov r5, r0
11110: 1a000018 bne 11178 <rtems_region_extend+0xac>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
11114: e1a01007 mov r1, r7
11118: e1a02006 mov r2, r6
1111c: e2800068 add r0, r0, #104 ; 0x68
11120: e28d3004 add r3, sp, #4 ; 0x4
11124: eb000c14 bl 1417c <_Heap_Extend>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11128: e3500001 cmp r0, #1 ; 0x1
1112c: 03a04009 moveq r4, #9 ; 0x9
11130: 0a00000b beq 11164 <rtems_region_extend+0x98>
11134: 2a000007 bcs 11158 <rtems_region_extend+0x8c>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11138: e59d1004 ldr r1, [sp, #4]
1113c: e5952054 ldr r2, [r5, #84]
the_region->maximum_segment_size += amount_extended;
11140: e595305c ldr r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11144: e0822001 add r2, r2, r1
the_region->maximum_segment_size += amount_extended;
11148: e0833001 add r3, r3, r1
1114c: e585305c str r3, [r5, #92]
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
11150: e5852054 str r2, [r5, #84]
11154: ea000002 b 11164 <rtems_region_extend+0x98>
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
11158: e3500002 cmp r0, #2 ; 0x2
1115c: 0a000009 beq 11188 <rtems_region_extend+0xbc>
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11160: e3a04019 mov r4, #25 ; 0x19 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11164: e5980000 ldr r0, [r8]
11168: eb000900 bl 13570 <_API_Mutex_Unlock>
return return_status;
}
1116c: e1a00004 mov r0, r4
11170: e28dd008 add sp, sp, #8 ; 0x8
11174: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
11178: e3540001 cmp r4, #1 ; 0x1
1117c: 03a04004 moveq r4, #4 ; 0x4
11180: 1afffff6 bne 11160 <rtems_region_extend+0x94>
11184: eafffff6 b 11164 <rtems_region_extend+0x98>
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
11188: e3a04018 mov r4, #24 ; 0x18
1118c: eafffff4 b 11164 <rtems_region_extend+0x98>
000114b4 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114b8: e253a000 subs sl, r3, #0 ; 0x0
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
114bc: e24dd010 sub sp, sp, #16 ; 0x10
114c0: e1a04000 mov r4, r0
114c4: e1a05001 mov r5, r1
114c8: e1a06002 mov r6, r2
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
114cc: 0a000028 beq 11574 <rtems_region_resize_segment+0xc0>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
114d0: e59f70b4 ldr r7, [pc, #180] ; 1158c <rtems_region_resize_segment+0xd8>
114d4: e5970000 ldr r0, [r7]
114d8: eb000808 bl 13500 <_API_Mutex_Lock>
114dc: e1a01004 mov r1, r4
114e0: e59f00a8 ldr r0, [pc, #168] ; 11590 <rtems_region_resize_segment+0xdc>
114e4: e28d2008 add r2, sp, #8 ; 0x8
114e8: eb000ed5 bl 15044 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
114ec: e59d3008 ldr r3, [sp, #8]
114f0: e3530000 cmp r3, #0 ; 0x0
114f4: e1a08000 mov r8, r0
114f8: 0a000007 beq 1151c <rtems_region_resize_segment+0x68>
114fc: e3530001 cmp r3, #1 ; 0x1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
11500: e5970000 ldr r0, [r7]
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
11504: 03a04004 moveq r4, #4 ; 0x4
11508: 13a04019 movne r4, #25 ; 0x19
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
1150c: eb000817 bl 13570 <_API_Mutex_Unlock>
return return_status;
}
11510: e1a00004 mov r0, r4
11514: e28dd010 add sp, sp, #16 ; 0x10
11518: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
1151c: e1a01005 mov r1, r5
11520: e28d3004 add r3, sp, #4 ; 0x4
11524: e28dc00c add ip, sp, #12 ; 0xc
11528: e1a02006 mov r2, r6
1152c: e2800068 add r0, r0, #104 ; 0x68
11530: e58dc000 str ip, [sp]
11534: eb000c9b bl 147a8 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11538: e59d3004 ldr r3, [sp, #4]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
1153c: e2505000 subs r5, r0, #0 ; 0x0
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
11540: e58a3000 str r3, [sl]
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
11544: 1a000005 bne 11560 <rtems_region_resize_segment+0xac>
11548: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED
1154c: e3540000 cmp r4, #0 ; 0x0 <== NOT EXECUTED
11550: 1a000009 bne 1157c <rtems_region_resize_segment+0xc8> <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
11554: e5970000 ldr r0, [r7] <== NOT EXECUTED
11558: eb000804 bl 13570 <_API_Mutex_Unlock> <== NOT EXECUTED
1155c: eaffffeb b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
11560: e5970000 ldr r0, [r7]
11564: eb000801 bl 13570 <_API_Mutex_Unlock>
return
11568: e3550001 cmp r5, #1 ; 0x1
1156c: 03a0400d moveq r4, #13 ; 0xd
11570: 0affffe6 beq 11510 <rtems_region_resize_segment+0x5c>
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
11574: e3a04009 mov r4, #9 ; 0x9
11578: eaffffe4 b 11510 <rtems_region_resize_segment+0x5c>
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
1157c: e1a00008 mov r0, r8 <== NOT EXECUTED
11580: eb001f16 bl 191e0 <_Region_Process_queue> <== NOT EXECUTED
11584: e1a04005 mov r4, r5 <== NOT EXECUTED
11588: eaffffe0 b 11510 <rtems_region_resize_segment+0x5c> <== NOT EXECUTED
0000456c <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
456c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
4570: e250a000 subs sl, r0, #0 ; 0x0
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
4574: e24dd018 sub sp, sp, #24 ; 0x18
4578: e1a06001 mov r6, r1
457c: e1a04002 mov r4, r2
4580: e1a08003 mov r8, r3
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
4584: 02800003 addeq r0, r0, #3 ; 0x3
4588: 0a000037 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_INVALID_NAME;
if ( !id )
458c: e59d3038 ldr r3, [sp, #56]
4590: e3530000 cmp r3, #0 ; 0x0
4594: 03a00009 moveq r0, #9 ; 0x9
4598: 0a000033 beq 466c <rtems_semaphore_create+0x100>
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
459c: e21230c0 ands r3, r2, #192 ; 0xc0
45a0: 02025030 andeq r5, r2, #48 ; 0x30
45a4: 1a000032 bne 4674 <rtems_semaphore_create+0x108>
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 ) )
45a8: e3550000 cmp r5, #0 ; 0x0
45ac: 0a000002 beq 45bc <rtems_semaphore_create+0x50>
45b0: e3560001 cmp r6, #1 ; 0x1
45b4: 83a0000a movhi r0, #10 ; 0xa
45b8: 8a00002b bhi 466c <rtems_semaphore_create+0x100>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45bc: e59f218c ldr r2, [pc, #396] ; 4750 <rtems_semaphore_create+0x1e4>
45c0: e5923000 ldr r3, [r2]
45c4: e2833001 add r3, r3, #1 ; 0x1
45c8: e5823000 str r3, [r2]
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
45cc: e59f9180 ldr r9, [pc, #384] ; 4754 <rtems_semaphore_create+0x1e8>
45d0: e1a00009 mov r0, r9
45d4: eb000511 bl 5a20 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
45d8: e2507000 subs r7, r0, #0 ; 0x0
45dc: 0a000048 beq 4704 <rtems_semaphore_create+0x198>
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
45e0: e3550000 cmp r5, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
45e4: e5874010 str r4, [r7, #16]
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
45e8: 0a00002e beq 46a8 <rtems_semaphore_create+0x13c>
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45ec: e3140040 tst r4, #64 ; 0x40
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45f0: 13a03002 movne r3, #2 ; 0x2
45f4: 158d3008 strne r3, [sp, #8]
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
45f8: 1a000007 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
45fc: e3140080 tst r4, #128 ; 0x80
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4600: 13a03003 movne r3, #3 ; 0x3
4604: 158d3008 strne r3, [sp, #8]
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
4608: 1a000003 bne 461c <rtems_semaphore_create+0xb0>
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
else if ( _Attributes_Is_priority( attribute_set ) )
460c: e2143004 ands r3, r4, #4 ; 0x4
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
4610: 13a03001 movne r3, #1 ; 0x1
4614: 158d3008 strne r3, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
4618: 058d3008 streq r3, [sp, #8]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
461c: e3550010 cmp r5, #16 ; 0x10
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4620: 13a03002 movne r3, #2 ; 0x2
the_mutex_attributes.only_owner_release = FALSE;
4624: 13a02000 movne r2, #0 ; 0x0
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4628: 158d3000 strne r3, [sp]
the_mutex_attributes.only_owner_release = FALSE;
462c: 15cd2004 strbne r2, [sp, #4]
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4630: 0a000036 beq 4710 <rtems_semaphore_create+0x1a4>
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
4634: e3560001 cmp r6, #1 ; 0x1
4638: 13a02000 movne r2, #0 ; 0x0
463c: 03a02001 moveq r2, #1 ; 0x1
4640: e2870014 add r0, r7, #20 ; 0x14
4644: e1a0100d mov r1, sp
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
4648: e58d800c str r8, [sp, #12]
mutex_status = _CORE_mutex_Initialize(
464c: eb000308 bl 5274 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
4650: e3500006 cmp r0, #6 ; 0x6
4654: 1a000020 bne 46dc <rtems_semaphore_create+0x170>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
4658: e59f00f4 ldr r0, [pc, #244] ; 4754 <rtems_semaphore_create+0x1e8><== NOT EXECUTED
465c: e1a01007 mov r1, r7 <== NOT EXECUTED
4660: eb0005db bl 5dd4 <_Objects_Free> <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4664: eb000879 bl 6850 <_Thread_Enable_dispatch> <== NOT EXECUTED
4668: e3a00013 mov r0, #19 ; 0x13 <== NOT EXECUTED
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
466c: e28dd018 add sp, sp, #24 ; 0x18
4670: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
4674: e2025030 and r5, r2, #48 ; 0x30
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4678: e3550010 cmp r5, #16 ; 0x10
467c: 0a000003 beq 4690 <rtems_semaphore_create+0x124>
4680: e3550020 cmp r5, #32 ; 0x20
4684: 0a000001 beq 4690 <rtems_semaphore_create+0x124>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4688: e3a0000b mov r0, #11 ; 0xb
468c: eafffff6 b 466c <rtems_semaphore_create+0x100>
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
4690: e3140004 tst r4, #4 ; 0x4
4694: 0afffffb beq 4688 <rtems_semaphore_create+0x11c>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
4698: e35300c0 cmp r3, #192 ; 0xc0
469c: 1affffc1 bne 45a8 <rtems_semaphore_create+0x3c>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46a0: e3a0000b mov r0, #11 ; 0xb
46a4: eafffff0 b 466c <rtems_semaphore_create+0x100>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
46a8: e3140004 tst r4, #4 ; 0x4
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46ac: 13a03001 movne r3, #1 ; 0x1
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46b0: e3a0c000 mov ip, #0 ; 0x0
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46b4: 158d3014 strne r3, [sp, #20]
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46b8: e1a02006 mov r2, r6
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46bc: e3e03000 mvn r3, #0 ; 0x0
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46c0: e2870014 add r0, r7, #20 ; 0x14
46c4: e28d1010 add r1, sp, #16 ; 0x10
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
else
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
46c8: 058d5014 streq r5, [sp, #20]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
46cc: e58d3010 str r3, [sp, #16]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
46d0: e58dc00c str ip, [sp, #12]
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46d4: e58dc000 str ip, [sp]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46d8: eb0003b9 bl 55c4 <_CORE_semaphore_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46dc: e5971008 ldr r1, [r7, #8]
46e0: e599201c ldr r2, [r9, #28]
46e4: e1a03801 lsl r3, r1, #16
46e8: e7827723 str r7, [r2, r3, lsr #14]
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
46ec: e59d3038 ldr r3, [sp, #56]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
46f0: e587a00c str sl, [r7, #12]
46f4: e5831000 str r1, [r3]
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
46f8: eb000854 bl 6850 <_Thread_Enable_dispatch>
46fc: e3a00000 mov r0, #0 ; 0x0
4700: eaffffd9 b 466c <rtems_semaphore_create+0x100>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
4704: eb000851 bl 6850 <_Thread_Enable_dispatch>
4708: e3a00005 mov r0, #5 ; 0x5
470c: eaffffd6 b 466c <rtems_semaphore_create+0x100>
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
4710: e59d2008 ldr r2, [sp, #8]
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
4714: e3a03000 mov r3, #0 ; 0x0
4718: e58d3000 str r3, [sp]
switch ( the_mutex_attributes.discipline ) {
471c: e3520003 cmp r2, #3 ; 0x3
4720: 979ff102 ldrls pc, [pc, r2, lsl #2]
4724: eaffffc2 b 4634 <rtems_semaphore_create+0xc8> <== NOT EXECUTED
4728: 00004744 .word 0x00004744 <== NOT EXECUTED
472c: 00004744 .word 0x00004744 <== NOT EXECUTED
4730: 00004738 .word 0x00004738 <== NOT EXECUTED
4734: 00004738 .word 0x00004738 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
4738: e3a03001 mov r3, #1 ; 0x1
473c: e5cd3004 strb r3, [sp, #4]
4740: eaffffbb b 4634 <rtems_semaphore_create+0xc8>
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
4744: e3a03000 mov r3, #0 ; 0x0
4748: e5cd3004 strb r3, [sp, #4]
474c: eaffffb8 b 4634 <rtems_semaphore_create+0xc8>
000118bc <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
118bc: e52de004 push {lr} ; (str lr, [sp, #-4]!)
118c0: e24dd004 sub sp, sp, #4 ; 0x4
118c4: e1a01000 mov r1, r0
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
118c8: e1a0200d mov r2, sp
118cc: e59f004c ldr r0, [pc, #76] ; 11920 <rtems_semaphore_flush+0x64>
118d0: eb000dec bl 15088 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
118d4: e59d1000 ldr r1, [sp]
118d8: e3510000 cmp r1, #0 ; 0x0
118dc: 13a00004 movne r0, #4 ; 0x4
118e0: 1a000008 bne 11908 <rtems_semaphore_flush+0x4c>
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
118e4: e5903010 ldr r3, [r0, #16]
118e8: e2133030 ands r3, r3, #48 ; 0x30
118ec: 1a000007 bne 11910 <rtems_semaphore_flush+0x54>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
118f0: e2800014 add r0, r0, #20 ; 0x14 <== NOT EXECUTED
118f4: e1a01003 mov r1, r3 <== NOT EXECUTED
118f8: e3a02001 mov r2, #1 ; 0x1 <== NOT EXECUTED
118fc: eb00093d bl 13df8 <_CORE_semaphore_Flush> <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
11900: eb001025 bl 1599c <_Thread_Enable_dispatch>
11904: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
11908: e28dd004 add sp, sp, #4 ; 0x4
1190c: e8bd8000 pop {pc}
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
11910: e2800014 add r0, r0, #20 ; 0x14
11914: e3a02001 mov r2, #1 ; 0x1
11918: eb000862 bl 13aa8 <_CORE_mutex_Flush>
1191c: eafffff7 b 11900 <rtems_semaphore_flush+0x44>
00013cc4 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
13cc4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
13cc8: e59f2028 ldr r2, [pc, #40] ; 13cf8 <rtems_shutdown_executive+0x34>
13ccc: e5923000 ldr r3, [r2]
13cd0: e3530004 cmp r3, #4 ; 0x4
*/
void rtems_shutdown_executive(
uint32_t result
)
{
13cd4: e24dd030 sub sp, sp, #48 ; 0x30
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
13cd8: 0a000004 beq 13cf0 <rtems_shutdown_executive+0x2c>
13cdc: e3a03004 mov r3, #4 ; 0x4
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
13ce0: e1a0000d mov r0, sp
13ce4: e59f1010 ldr r1, [pc, #16] ; 13cfc <rtems_shutdown_executive+0x38>
13ce8: e5823000 str r3, [r2]
13cec: ebffd04f bl 7e30 <_CPU_Context_switch>
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
}
13cf0: e28dd030 add sp, sp, #48 ; 0x30 <== NOT EXECUTED
13cf4: e8bd8000 pop {pc} <== NOT EXECUTED
000124c8 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
124c8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
124cc: e2518000 subs r8, r1, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
124d0: e1a06000 mov r6, r0
124d4: e24dd004 sub sp, sp, #4 ; 0x4
124d8: e1a05002 mov r5, r2
124dc: e1a07003 mov r7, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
124e0: 03a0000a moveq r0, #10 ; 0xa
124e4: 0a000020 beq 1256c <rtems_timer_fire_after+0xa4>
return RTEMS_INVALID_NUMBER;
if ( !routine )
124e8: e3520000 cmp r2, #0 ; 0x0
124ec: 03a00009 moveq r0, #9 ; 0x9
124f0: 0a00001d beq 1256c <rtems_timer_fire_after+0xa4>
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
124f4: e59f0088 ldr r0, [pc, #136] ; 12584 <rtems_timer_fire_after+0xbc>
124f8: e1a01006 mov r1, r6
124fc: e1a0200d mov r2, sp
12500: eb000ae0 bl 15088 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
12504: e59d3000 ldr r3, [sp]
12508: e3530000 cmp r3, #0 ; 0x0
1250c: e1a04000 mov r4, r0
12510: 13a00004 movne r0, #4 ; 0x4
12514: 1a000014 bne 1256c <rtems_timer_fire_after+0xa4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12518: e284a010 add sl, r4, #16 ; 0x10
1251c: e1a0000a mov r0, sl
12520: eb001357 bl 17284 <_Watchdog_Remove>
_ISR_Disable( level );
12524: e10f2000 mrs r2, CPSR
12528: e38230c0 orr r3, r2, #192 ; 0xc0
1252c: 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 ) {
12530: e5943018 ldr r3, [r4, #24]
12534: e3530000 cmp r3, #0 ; 0x0
12538: 1a00000d bne 12574 <rtems_timer_fire_after+0xac>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
1253c: e5843018 str r3, [r4, #24]
the_watchdog->routine = routine;
12540: e584502c str r5, [r4, #44]
the_watchdog->id = id;
12544: e5846030 str r6, [r4, #48]
the_watchdog->user_data = user_data;
12548: e5847034 str r7, [r4, #52]
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
1254c: e5843038 str r3, [r4, #56]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
12550: e129f002 msr CPSR_fc, r2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12554: e59f002c ldr r0, [pc, #44] ; 12588 <rtems_timer_fire_after+0xc0>
12558: e1a0100a mov r1, sl
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
1255c: e584801c str r8, [r4, #28]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
12560: eb0012d8 bl 170c8 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
12564: eb000d0c bl 1599c <_Thread_Enable_dispatch>
12568: e3a00000 mov r0, #0 ; 0x0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1256c: e28dd004 add sp, sp, #4 ; 0x4
12570: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
12574: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
_Thread_Enable_dispatch();
12578: eb000d07 bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED
1257c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
12580: eafffff9 b 1256c <rtems_timer_fire_after+0xa4> <== NOT EXECUTED
0001258c <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1258c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
12590: e59fc0d4 ldr ip, [pc, #212] ; 1266c <rtems_timer_fire_when+0xe0>
12594: e5dc4000 ldrb r4, [ip]
12598: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
1259c: e1a07000 mov r7, r0
125a0: e24dd004 sub sp, sp, #4 ; 0x4
125a4: e1a04001 mov r4, r1
125a8: e1a06002 mov r6, r2
125ac: e1a09003 mov r9, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
125b0: 03a0000b moveq r0, #11 ; 0xb
125b4: 1a000001 bne 125c0 <rtems_timer_fire_when+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
125b8: e28dd004 add sp, sp, #4 ; 0x4
125bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
125c0: e1a00001 mov r0, r1
125c4: ebfff52d bl fa80 <_TOD_Validate>
125c8: e3500000 cmp r0, #0 ; 0x0
125cc: 0a000009 beq 125f8 <rtems_timer_fire_when+0x6c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
125d0: e3560000 cmp r6, #0 ; 0x0
125d4: 03a00009 moveq r0, #9 ; 0x9
125d8: 0afffff6 beq 125b8 <rtems_timer_fire_when+0x2c>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
125dc: e1a00004 mov r0, r4
125e0: ebfff4ec bl f998 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch )
125e4: e59fb084 ldr fp, [pc, #132] ; 12670 <rtems_timer_fire_when+0xe4>
125e8: e59b3000 ldr r3, [fp]
125ec: e1500003 cmp r0, r3
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
125f0: e1a0a000 mov sl, r0
if ( seconds <= _TOD_Seconds_since_epoch )
125f4: 8a000001 bhi 12600 <rtems_timer_fire_when+0x74>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
125f8: e3a00014 mov r0, #20 ; 0x14 <== NOT EXECUTED
125fc: eaffffed b 125b8 <rtems_timer_fire_when+0x2c> <== NOT EXECUTED
12600: e59f006c ldr r0, [pc, #108] ; 12674 <rtems_timer_fire_when+0xe8>
12604: e1a01007 mov r1, r7
12608: e1a0200d mov r2, sp
1260c: eb000a9d bl 15088 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
12610: e59d8000 ldr r8, [sp]
12614: e3580000 cmp r8, #0 ; 0x0
12618: e1a05000 mov r5, r0
1261c: 13a00004 movne r0, #4 ; 0x4
12620: 1affffe4 bne 125b8 <rtems_timer_fire_when+0x2c>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12624: e2854010 add r4, r5, #16 ; 0x10
12628: e1a00004 mov r0, r4
1262c: eb001314 bl 17284 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
12630: e5857030 str r7, [r5, #48]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12634: e59b3000 ldr r3, [fp]
the_timer->the_class = TIMER_TIME_OF_DAY;
12638: e3a02002 mov r2, #2 ; 0x2
1263c: e063300a rsb r3, r3, sl
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
12640: e59f0030 ldr r0, [pc, #48] ; 12678 <rtems_timer_fire_when+0xec>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
12644: e585301c str r3, [r5, #28]
12648: e5852038 str r2, [r5, #56]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1264c: e1a01004 mov r1, r4
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
12650: e585602c str r6, [r5, #44]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
12654: e5859034 str r9, [r5, #52]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12658: e5858018 str r8, [r5, #24]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
1265c: eb001299 bl 170c8 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
12660: eb000ccd bl 1599c <_Thread_Enable_dispatch>
12664: e1a00008 mov r0, r8
12668: eaffffd2 b 125b8 <rtems_timer_fire_when+0x2c>
000129cc <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
129cc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
129d0: e3500000 cmp r0, #0 ; 0x0
129d4: e24dd010 sub sp, sp, #16 ; 0x10
129d8: e1a07001 mov r7, r1
129dc: e1a06002 mov r6, r2
129e0: 1a000002 bne 129f0 <rtems_timer_initiate_server+0x24>
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
129e4: e3a00013 mov r0, #19 ; 0x13
}
return status;
}
129e8: e28dd010 add sp, sp, #16 ; 0x10
129ec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
129f0: e59f3144 ldr r3, [pc, #324] ; 12b3c <rtems_timer_initiate_server+0x170>
129f4: e5d32000 ldrb r2, [r3]
129f8: e1500002 cmp r0, r2
129fc: 8a00004a bhi 12b2c <rtems_timer_initiate_server+0x160>
12a00: e1a08000 mov r8, r0 <== NOT EXECUTED
12a04: e59f3134 ldr r3, [pc, #308] ; 12b40 <rtems_timer_initiate_server+0x174>
12a08: e5932000 ldr r2, [r3]
12a0c: e2822001 add r2, r2, #1 ; 0x1
12a10: e5832000 str r2, [r3]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
12a14: e59fa128 ldr sl, [pc, #296] ; 12b44 <rtems_timer_initiate_server+0x178>
12a18: e5da5000 ldrb r5, [sl]
initialized = true;
12a1c: e3a03001 mov r3, #1 ; 0x1
12a20: e5ca3000 strb r3, [sl]
_Thread_Enable_dispatch();
12a24: eb000bdc bl 1599c <_Thread_Enable_dispatch>
if ( tmpInitialized )
12a28: e3550000 cmp r5, #0 ; 0x0
12a2c: 13a0000e movne r0, #14 ; 0xe
12a30: 1affffec bne 129e8 <rtems_timer_initiate_server+0x1c>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12a34: e59f410c ldr r4, [pc, #268] ; 12b48 <rtems_timer_initiate_server+0x17c>
12a38: e284c004 add ip, r4, #4 ; 0x4
12a3c: e584c000 str ip, [r4]
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
12a40: e386e902 orr lr, r6, #32768 ; 0x8000
12a44: e28dc00c add ip, sp, #12 ; 0xc
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12a48: e5844008 str r4, [r4, #8]
12a4c: e1a01008 mov r1, r8
12a50: e58de000 str lr, [sp]
12a54: e58dc004 str ip, [sp, #4]
12a58: e1a02007 mov r2, r7
12a5c: e59f00e8 ldr r0, [pc, #232] ; 12b4c <rtems_timer_initiate_server+0x180>
12a60: e3a03c01 mov r3, #256 ; 0x100
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12a64: e5845004 str r5, [r4, #4]
12a68: ebfffc60 bl 11bf0 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a6c: e3500000 cmp r0, #0 ; 0x0
initialized = false;
12a70: 15ca5000 strbne r5, [sl]
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
12a74: 1affffdb bne 129e8 <rtems_timer_initiate_server+0x1c>
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12a78: e59d200c ldr r2, [sp, #12]
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
12a7c: e59fc0cc ldr ip, [pc, #204] ; 12b50 <rtems_timer_initiate_server+0x184>
12a80: e1a03802 lsl r3, r2, #16
12a84: e58d2008 str r2, [sp, #8]
12a88: e1dc21b0 ldrh r2, [ip, #16]
12a8c: e1a01823 lsr r1, r3, #16
12a90: e1520001 cmp r2, r1
12a94: 259c301c ldrcs r3, [ip, #28]
12a98: 27939101 ldrcs r9, [r3, r1, lsl #2]
the_watchdog->routine = routine;
12a9c: e59f30b0 ldr r3, [pc, #176] ; 12b54 <rtems_timer_initiate_server+0x188>
12aa0: 31a09000 movcc r9, r0
12aa4: e5893064 str r3, [r9, #100]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
12aa8: e59fe0a8 ldr lr, [pc, #168] ; 12b58 <rtems_timer_initiate_server+0x18c>
12aac: e59f30a8 ldr r3, [pc, #168] ; 12b5c <rtems_timer_initiate_server+0x190>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ab0: e59f40a8 ldr r4, [pc, #168] ; 12b60 <rtems_timer_initiate_server+0x194>
the_watchdog->id = id;
12ab4: e59f50a8 ldr r5, [pc, #168] ; 12b64 <rtems_timer_initiate_server+0x198>
12ab8: e59d2008 ldr r2, [sp, #8]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12abc: e59f60a4 ldr r6, [pc, #164] ; 12b68 <rtems_timer_initiate_server+0x19c>
12ac0: e583e000 str lr, [r3]
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12ac4: e59fc0a0 ldr ip, [pc, #160] ; 12b6c <rtems_timer_initiate_server+0x1a0>
the_watchdog->routine = routine;
12ac8: e59f3084 ldr r3, [pc, #132] ; 12b54 <rtems_timer_initiate_server+0x188>
the_chain->permanent_null = NULL;
12acc: e3a0b000 mov fp, #0 ; 0x0
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12ad0: e1a00002 mov r0, r2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12ad4: e2847004 add r7, r4, #4 ; 0x4
12ad8: e2858004 add r8, r5, #4 ; 0x4
the_watchdog->id = id;
12adc: e5892068 str r2, [r9, #104]
the_watchdog->user_data = user_data;
12ae0: e589b06c str fp, [r9, #108]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12ae4: e589b050 str fp, [r9, #80]
12ae8: e59f1080 ldr r1, [pc, #128] ; 12b70 <rtems_timer_initiate_server+0x1a4>
12aec: e1a0200b mov r2, fp
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
12af0: e58c9000 str r9, [ip]
12af4: e5847000 str r7, [r4]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12af8: e5844008 str r4, [r4, #8]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
12afc: e5858000 str r8, [r5]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
12b00: e5855008 str r5, [r5, #8]
the_watchdog->routine = routine;
12b04: e586301c str r3, [r6, #28]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
12b08: e586b024 str fp, [r6, #36]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
12b0c: e584b004 str fp, [r4, #4]
12b10: e585b004 str fp, [r5, #4]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12b14: e586b008 str fp, [r6, #8]
the_watchdog->routine = routine;
the_watchdog->id = id;
12b18: e5860020 str r0, [r6, #32]
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
/*
* Start the timer server
*/
status = rtems_task_start(
12b1c: ebfffd8e bl 1215c <rtems_task_start>
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
12b20: e3500000 cmp r0, #0 ; 0x0
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
12b24: 15cab000 strbne fp, [sl]
12b28: eaffffae b 129e8 <rtems_timer_initiate_server+0x1c>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
12b2c: e3700001 cmn r0, #1 ; 0x1
12b30: 03a08000 moveq r8, #0 ; 0x0
12b34: 0affffb2 beq 12a04 <rtems_timer_initiate_server+0x38>
12b38: eaffffa9 b 129e4 <rtems_timer_initiate_server+0x18>
00012714 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
12714: e92d4030 push {r4, r5, lr}
12718: e24dd004 sub sp, sp, #4 ; 0x4
1271c: e1a01000 mov r1, r0
12720: e1a0200d mov r2, sp
12724: e59f00a8 ldr r0, [pc, #168] ; 127d4 <rtems_timer_reset+0xc0>
12728: eb000a56 bl 15088 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1272c: e59d3000 ldr r3, [sp]
12730: e3530000 cmp r3, #0 ; 0x0
12734: e1a04000 mov r4, r0
12738: 13a00004 movne r0, #4 ; 0x4
1273c: 1a00000a bne 1276c <rtems_timer_reset+0x58>
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
12740: e5943038 ldr r3, [r4, #56]
12744: e3530004 cmp r3, #4 ; 0x4
12748: 979ff103 ldrls pc, [pc, r3, lsl #2]
1274c: ea000011 b 12798 <rtems_timer_reset+0x84> <== NOT EXECUTED
12750: 000127b0 .word 0x000127b0 <== NOT EXECUTED
12754: 00012774 .word 0x00012774 <== NOT EXECUTED
12758: 000127a4 .word 0x000127a4 <== NOT EXECUTED
1275c: 000127a4 .word 0x000127a4 <== NOT EXECUTED
12760: 000127a4 .word 0x000127a4 <== NOT EXECUTED
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
12764: eb000c8c bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED
12768: e3a0000e mov r0, #14 ; 0xe <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
1276c: e28dd004 add sp, sp, #4 ; 0x4
12770: e8bd8030 pop {r4, r5, pc}
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
12774: e59f505c ldr r5, [pc, #92] ; 127d8 <rtems_timer_reset+0xc4><== NOT EXECUTED
12778: e5953000 ldr r3, [r5] <== NOT EXECUTED
1277c: e3530000 cmp r3, #0 ; 0x0 <== NOT EXECUTED
12780: 0afffff7 beq 12764 <rtems_timer_reset+0x50> <== NOT EXECUTED
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
12784: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12788: eb0012bd bl 17284 <_Watchdog_Remove> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
1278c: e1a00004 mov r0, r4 <== NOT EXECUTED
12790: e1a0e00f mov lr, pc <== NOT EXECUTED
12794: e595f000 ldr pc, [r5] <== NOT EXECUTED
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
12798: eb000c7f bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED
1279c: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
127a0: eafffff1 b 1276c <rtems_timer_reset+0x58> <== NOT EXECUTED
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
127a4: eb000c7c bl 1599c <_Thread_Enable_dispatch>
127a8: e3a0000b mov r0, #11 ; 0xb
127ac: eaffffee b 1276c <rtems_timer_reset+0x58>
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
127b0: e2844010 add r4, r4, #16 ; 0x10
127b4: e1a00004 mov r0, r4
127b8: eb0012b1 bl 17284 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
127bc: e59f0018 ldr r0, [pc, #24] ; 127dc <rtems_timer_reset+0xc8>
127c0: e1a01004 mov r1, r4
127c4: eb00123f bl 170c8 <_Watchdog_Insert>
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
127c8: eb000c73 bl 1599c <_Thread_Enable_dispatch>
127cc: e3a00000 mov r0, #0 ; 0x0
127d0: eaffffe5 b 1276c <rtems_timer_reset+0x58>
000127e0 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127e0: e92d41f0 push {r4, r5, r6, r7, r8, lr}
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
127e4: e59fc0d0 ldr ip, [pc, #208] ; 128bc <rtems_timer_server_fire_after+0xdc>
127e8: e59c4000 ldr r4, [ip]
127ec: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
127f0: e1a07000 mov r7, r0
127f4: e24dd004 sub sp, sp, #4 ; 0x4
127f8: e1a06001 mov r6, r1
127fc: e1a05002 mov r5, r2
12800: e1a08003 mov r8, r3
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
12804: 03a0000e moveq r0, #14 ; 0xe
12808: 0a000005 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INCORRECT_STATE;
if ( !routine )
1280c: e3520000 cmp r2, #0 ; 0x0
12810: 03a00009 moveq r0, #9 ; 0x9
12814: 0a000002 beq 12824 <rtems_timer_server_fire_after+0x44>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
12818: e3510000 cmp r1, #0 ; 0x0
1281c: 03a0000a moveq r0, #10 ; 0xa
12820: 1a000001 bne 1282c <rtems_timer_server_fire_after+0x4c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12824: e28dd004 add sp, sp, #4 ; 0x4
12828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
1282c: e59f008c ldr r0, [pc, #140] ; 128c0 <rtems_timer_server_fire_after+0xe0>
12830: e1a01007 mov r1, r7
12834: e1a0200d mov r2, sp
12838: eb000a12 bl 15088 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1283c: e59d3000 ldr r3, [sp]
12840: e3530000 cmp r3, #0 ; 0x0
12844: e1a04000 mov r4, r0
12848: 13a00004 movne r0, #4 ; 0x4
1284c: 1afffff4 bne 12824 <rtems_timer_server_fire_after+0x44>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12850: e2840010 add r0, r4, #16 ; 0x10
12854: eb00128a bl 17284 <_Watchdog_Remove>
_ISR_Disable( level );
12858: e10f1000 mrs r1, CPSR
1285c: e38130c0 orr r3, r1, #192 ; 0xc0
12860: 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 ) {
12864: e5942018 ldr r2, [r4, #24]
12868: e3520000 cmp r2, #0 ; 0x0
1286c: 1a00000e bne 128ac <rtems_timer_server_fire_after+0xcc>
/*
* 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;
12870: e3a03001 mov r3, #1 ; 0x1
12874: e5843038 str r3, [r4, #56]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
12878: e5842018 str r2, [r4, #24]
the_watchdog->routine = routine;
1287c: e584502c str r5, [r4, #44]
the_watchdog->id = id;
12880: e5847030 str r7, [r4, #48]
the_watchdog->user_data = user_data;
12884: e5848034 str r8, [r4, #52]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
12888: e584601c str r6, [r4, #28]
_ISR_Enable( level );
1288c: e129f001 msr CPSR_fc, r1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12890: e59f302c ldr r3, [pc, #44] ; 128c4 <rtems_timer_server_fire_after+0xe4>
12894: e1a00004 mov r0, r4
12898: e1a0e00f mov lr, pc
1289c: e593f000 ldr pc, [r3]
_Thread_Enable_dispatch();
128a0: eb000c3d bl 1599c <_Thread_Enable_dispatch>
128a4: e3a00000 mov r0, #0 ; 0x0
128a8: eaffffdd b 12824 <rtems_timer_server_fire_after+0x44>
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
128ac: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED
_Thread_Enable_dispatch();
128b0: eb000c39 bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED
128b4: e3a00000 mov r0, #0 ; 0x0 <== NOT EXECUTED
128b8: eaffffd9 b 12824 <rtems_timer_server_fire_after+0x44> <== NOT EXECUTED
000128c8 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128c8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128cc: e59fc0e4 ldr ip, [pc, #228] ; 129b8 <rtems_timer_server_fire_when+0xf0>
128d0: e59c4000 ldr r4, [ip]
128d4: e3540000 cmp r4, #0 ; 0x0
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
128d8: e1a06000 mov r6, r0
128dc: e24dd004 sub sp, sp, #4 ; 0x4
128e0: e1a04001 mov r4, r1
128e4: e1a05002 mov r5, r2
128e8: e1a0a003 mov sl, r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
128ec: 03a0000e moveq r0, #14 ; 0xe
128f0: 0a00000c beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
128f4: e59f30c0 ldr r3, [pc, #192] ; 129bc <rtems_timer_server_fire_when+0xf4>
128f8: e5d32000 ldrb r2, [r3]
128fc: e3520000 cmp r2, #0 ; 0x0
12900: 03a0000b moveq r0, #11 ; 0xb
12904: 0a000007 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_NOT_DEFINED;
if ( !routine )
12908: e3550000 cmp r5, #0 ; 0x0
1290c: 03a00009 moveq r0, #9 ; 0x9
12910: 0a000004 beq 12928 <rtems_timer_server_fire_when+0x60>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
12914: e1a00001 mov r0, r1
12918: ebfff458 bl fa80 <_TOD_Validate>
1291c: e3500000 cmp r0, #0 ; 0x0
12920: 1a000002 bne 12930 <rtems_timer_server_fire_when+0x68>
*/
(*_Timer_Server_schedule_operation)( the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
12924: e3a00014 mov r0, #20 ; 0x14
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
12928: e28dd004 add sp, sp, #4 ; 0x4
1292c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12930: e1a00004 mov r0, r4
12934: ebfff417 bl f998 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch )
12938: e59f9080 ldr r9, [pc, #128] ; 129c0 <rtems_timer_server_fire_when+0xf8>
1293c: e5993000 ldr r3, [r9]
12940: e1500003 cmp r0, r3
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
12944: e1a08000 mov r8, r0
if ( seconds <= _TOD_Seconds_since_epoch )
12948: 9afffff5 bls 12924 <rtems_timer_server_fire_when+0x5c>
1294c: e59f0070 ldr r0, [pc, #112] ; 129c4 <rtems_timer_server_fire_when+0xfc>
12950: e1a01006 mov r1, r6
12954: e1a0200d mov r2, sp
12958: eb0009ca bl 15088 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
1295c: e59d7000 ldr r7, [sp]
12960: e3570000 cmp r7, #0 ; 0x0
12964: e1a04000 mov r4, r0
12968: 13a00004 movne r0, #4 ; 0x4
1296c: 1affffed bne 12928 <rtems_timer_server_fire_when+0x60>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
12970: e2840010 add r0, r4, #16 ; 0x10 <== NOT EXECUTED
12974: eb001242 bl 17284 <_Watchdog_Remove> <== NOT EXECUTED
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
12978: e5846030 str r6, [r4, #48] <== NOT EXECUTED
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
1297c: e5993000 ldr r3, [r9] <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
12980: e3a02003 mov r2, #3 ; 0x3 <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12984: e0633008 rsb r3, r3, r8 <== NOT EXECUTED
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12988: e1a00004 mov r0, r4 <== NOT EXECUTED
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
1298c: e5842038 str r2, [r4, #56] <== NOT EXECUTED
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
12990: e584301c str r3, [r4, #28] <== NOT EXECUTED
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
12994: e584502c str r5, [r4, #44] <== NOT EXECUTED
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
12998: e59f3028 ldr r3, [pc, #40] ; 129c8 <rtems_timer_server_fire_when+0x100><== NOT EXECUTED
the_watchdog->id = id;
the_watchdog->user_data = user_data;
1299c: e584a034 str sl, [r4, #52] <== NOT EXECUTED
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
129a0: e5847018 str r7, [r4, #24] <== NOT EXECUTED
129a4: e1a0e00f mov lr, pc <== NOT EXECUTED
129a8: e593f000 ldr pc, [r3] <== NOT EXECUTED
_Thread_Enable_dispatch();
129ac: eb000bfa bl 1599c <_Thread_Enable_dispatch> <== NOT EXECUTED
129b0: e1a00007 mov r0, r7 <== NOT EXECUTED
129b4: eaffffdb b 12928 <rtems_timer_server_fire_when+0x60> <== NOT EXECUTED