RTEMS 4.10.2Annotated Report
Tue Dec 13 20:08:21 2011
00000448 <_Barrier_Manager_initialization>:
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
}
448: e12fff1e bx lr
0000ad80 <_CORE_mutex_Seize_interrupt_trylock>:
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
ad80: e59f3110 ldr r3, [pc, #272] ; ae98 <_CORE_mutex_Seize_interrupt_trylock+0x118>
ad84: e5933000 ldr r3, [r3]
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
ad88: e3a02000 mov r2, #0
ad8c: e5832034 str r2, [r3, #52] ; 0x34
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
ad90: e590c050 ldr ip, [r0, #80] ; 0x50
ad94: e15c0002 cmp ip, r2
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
ad98: e52de004 push {lr} ; (str lr, [sp, #-4]!)
ad9c: 0a00002a beq ae4c <_CORE_mutex_Seize_interrupt_trylock+0xcc>
the_mutex->lock = CORE_MUTEX_LOCKED;
ada0: e5802050 str r2, [r0, #80] ; 0x50
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
ada4: e5902048 ldr r2, [r0, #72] ; 0x48
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;
ada8: e593c008 ldr ip, [r3, #8]
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
adac: e3520002 cmp r2, #2
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;
adb0: e580c060 str ip, [r0, #96] ; 0x60
the_mutex->nest_count = 1;
adb4: e3a0c001 mov ip, #1
adb8: e580c054 str ip, [r0, #84] ; 0x54
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;
adbc: e580305c str r3, [r0, #92] ; 0x5c
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
adc0: 0a000001 beq adcc <_CORE_mutex_Seize_interrupt_trylock+0x4c>
adc4: e3520003 cmp r2, #3
adc8: 1a00002c bne ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100>
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
adcc: e593c01c ldr ip, [r3, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
add0: e3520003 cmp r2, #3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
add4: e28c2001 add r2, ip, #1
add8: e583201c str r2, [r3, #28]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
addc: 1a000027 bne ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
ade0: e590204c ldr r2, [r0, #76] ; 0x4c
current = executing->current_priority;
ade4: e593c014 ldr ip, [r3, #20]
if ( current == ceiling ) {
ade8: e15c0002 cmp ip, r2
adec: 0a000023 beq ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
adf0: 9a00000b bls ae24 <_CORE_mutex_Seize_interrupt_trylock+0xa4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
adf4: e59f30a0 ldr r3, [pc, #160] ; ae9c <_CORE_mutex_Seize_interrupt_trylock+0x11c>
adf8: e5932000 ldr r2, [r3]
adfc: e2822001 add r2, r2, #1
ae00: e5832000 str r2, [r3]
ae04: e5913000 ldr r3, [r1]
ae08: e129f003 msr CPSR_fc, r3
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
_Thread_Change_priority(
ae0c: e3a02000 mov r2, #0
ae10: e590104c ldr r1, [r0, #76] ; 0x4c
ae14: e590005c ldr r0, [r0, #92] ; 0x5c
ae18: ebffef45 bl 6b34 <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
ae1c: ebfff0a5 bl 70b8 <_Thread_Enable_dispatch>
ae20: ea000018 b ae88 <_CORE_mutex_Seize_interrupt_trylock+0x108>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
ae24: e3a02006 mov r2, #6
ae28: e5832034 str r2, [r3, #52] ; 0x34
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
ae2c: e3a02000 mov r2, #0
ae30: e5802054 str r2, [r0, #84] ; 0x54
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
ae34: e2822001 add r2, r2, #1
ae38: e5802050 str r2, [r0, #80] ; 0x50
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
ae3c: e593201c ldr r2, [r3, #28]
ae40: e2422001 sub r2, r2, #1
ae44: e583201c str r2, [r3, #28]
ae48: ea00000c b ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100>
/*
* 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 ) ) {
ae4c: e590205c ldr r2, [r0, #92] ; 0x5c
ae50: e1520003 cmp r2, r3
ae54: 1a00000d bne ae90 <_CORE_mutex_Seize_interrupt_trylock+0x110>
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
ae58: e5903040 ldr r3, [r0, #64] ; 0x40
ae5c: e3530000 cmp r3, #0
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
ae60: 05903054 ldreq r3, [r0, #84] ; 0x54
ae64: 02833001 addeq r3, r3, #1
ae68: 05803054 streq r3, [r0, #84] ; 0x54
* 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 ) {
ae6c: 0a000003 beq ae80 <_CORE_mutex_Seize_interrupt_trylock+0x100>
ae70: e3530001 cmp r3, #1
ae74: 1a000005 bne ae90 <_CORE_mutex_Seize_interrupt_trylock+0x110>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
ae78: e3a03002 mov r3, #2 <== NOT EXECUTED
ae7c: e5823034 str r3, [r2, #52] ; 0x34 <== NOT EXECUTED
ae80: e5913000 ldr r3, [r1]
ae84: e129f003 msr CPSR_fc, r3
ae88: e3a00000 mov r0, #0
ae8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
ae90: e3a00001 mov r0, #1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
ae94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000044c <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
}
44c: e12fff1e bx lr
00000450 <_Event_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
}
450: e12fff1e bx lr
0000046c <_Extension_Manager_initialization>:
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
}
46c: e12fff1e bx lr
00000454 <_Message_queue_Manager_initialization>:
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
}
454: e12fff1e bx lr
00000458 <_Partition_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
}
458: e12fff1e bx lr
00000468 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
}
468: e12fff1e bx lr
0000045c <_Region_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
}
45c: e12fff1e bx lr
00007614 <_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
)
{
7614: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
7618: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
761c: e281503c add r5, r1, #60 ; 0x3c
7620: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
7624: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
7628: e281c038 add ip, r1, #56 ; 0x38
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 ) )
762c: e3130020 tst r3, #32
_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 ];
7630: e1a04323 lsr r4, r3, #6
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
7634: e581503c str r5, [r1, #60] ; 0x3c
7638: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
763c: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
7640: e5907038 ldr r7, [r0, #56] ; 0x38
_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 ];
7644: e02c0495 mla ip, r5, r4, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
7648: 159f8154 ldrne r8, [pc, #340] ; 77a4 <_Thread_queue_Enqueue_priority+0x190>
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 ) )
764c: 1a000023 bne 76e0 <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
7650: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7654: e10f5000 mrs r5, CPSR
7658: e3854080 orr r4, r5, #128 ; 0x80
765c: e129f004 msr CPSR_fc, r4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
7660: e3e06000 mvn r6, #0
7664: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7668: ea00000b b 769c <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
766c: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
7670: e1530006 cmp r3, r6
7674: 9a00000a bls 76a4 <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7678: e10fa000 mrs sl, CPSR
767c: e129f005 msr CPSR_fc, r5
7680: e129f00a msr CPSR_fc, sl
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7684: e594a010 ldr sl, [r4, #16]
7688: e117000a tst r7, sl
768c: 1a000001 bne 7698 <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7690: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
7694: eaffffee b 7654 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7698: e5944000 ldr r4, [r4]
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 ) ) {
769c: e1540008 cmp r4, r8
76a0: 1afffff1 bne 766c <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
76a4: e590c030 ldr ip, [r0, #48] ; 0x30
76a8: e35c0001 cmp ip, #1
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 ) ) {
76ac: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
76b0: 1a000038 bne 7798 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
76b4: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
76b8: e3a03000 mov r3, #0
76bc: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
76c0: 0a00002a beq 7770 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
76c4: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
76c8: e5814000 str r4, [r1]
the_node->previous = previous_node;
76cc: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
76d0: e5810044 str r0, [r1, #68] ; 0x44
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;
76d4: e5831000 str r1, [r3]
search_node->previous = the_node;
76d8: e5841004 str r1, [r4, #4]
76dc: ea000021 b 7768 <_Thread_queue_Enqueue_priority+0x154>
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
76e0: e5d86000 ldrb r6, [r8]
76e4: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
76e8: e10f5000 mrs r5, CPSR
76ec: e3854080 orr r4, r5, #128 ; 0x80
76f0: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
76f4: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
76f8: ea00000b b 772c <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
76fc: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
7700: e1530006 cmp r3, r6
7704: 2a00000a bcs 7734 <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7708: e10fa000 mrs sl, CPSR
770c: e129f005 msr CPSR_fc, r5
7710: e129f00a msr CPSR_fc, sl
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
7714: e594a010 ldr sl, [r4, #16]
7718: e117000a tst r7, sl
771c: 1a000001 bne 7728 <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7720: e129f005 msr CPSR_fc, r5
7724: eaffffed b 76e0 <_Thread_queue_Enqueue_priority+0xcc>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
7728: e5944004 ldr r4, [r4, #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 ) ) {
772c: e154000c cmp r4, ip
7730: 1afffff1 bne 76fc <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7734: e590c030 ldr ip, [r0, #48] ; 0x30
7738: e35c0001 cmp ip, #1
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 ) ) {
773c: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7740: 1a000014 bne 7798 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7744: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7748: e3a03000 mov r3, #0
774c: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7750: 0a000006 beq 7770 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
7754: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7758: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
775c: e5810044 str r0, [r1, #68] ; 0x44
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;
7760: e5841000 str r1, [r4]
next_node->previous = the_node;
7764: e5831004 str r1, [r3, #4]
7768: e129f005 msr CPSR_fc, r5
776c: ea000007 b 7790 <_Thread_queue_Enqueue_priority+0x17c>
7770: e284403c add r4, r4, #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;
7774: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7778: e5814000 str r4, [r1]
the_node->previous = previous_node;
777c: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7780: e5810044 str r0, [r1, #68] ; 0x44
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;
7784: e5831000 str r1, [r3]
search_node->previous = the_node;
7788: e5841004 str r1, [r4, #4]
778c: e129f00c msr CPSR_fc, ip
7790: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7794: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
7798: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
779c: e5900030 ldr r0, [r0, #48] ; 0x30
}
77a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00000464 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
}
464: e12fff1e bx lr
00015138 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
15138: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1513c: e24dd020 sub sp, sp, #32
15140: e28d3014 add r3, sp, #20
15144: e28d5008 add r5, sp, #8
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
15148: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1514c: e283a004 add sl, r3, #4
15150: e2858004 add r8, r5, #4
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
15154: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15158: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1515c: e2803040 add r3, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15160: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
15164: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15168: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
1516c: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
15170: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15174: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
15178: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
1517c: e1a04000 mov r4, r0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15180: e280b030 add fp, r0, #48 ; 0x30
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15184: e2807068 add r7, r0, #104 ; 0x68
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
15188: e28d2014 add r2, sp, #20
1518c: e5842078 str r2, [r4, #120] ; 0x78
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
15190: e59f2168 ldr r2, [pc, #360] ; 15300 <_Timer_server_Body+0x1c8>
15194: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
15198: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1519c: e1a02005 mov r2, r5
151a0: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
151a4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
151a8: e1a0000b mov r0, fp
151ac: eb000ff2 bl 1917c <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
151b0: e59f314c ldr r3, [pc, #332] ; 15304 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
151b4: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
151b8: e5936000 ldr r6, [r3]
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
151bc: e1560002 cmp r6, r2
151c0: 9a000004 bls 151d8 <_Timer_server_Body+0xa0>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
151c4: e0621006 rsb r1, r2, r6
151c8: e1a00007 mov r0, r7
151cc: e1a02005 mov r2, r5
151d0: eb000fe9 bl 1917c <_Watchdog_Adjust_to_chain>
151d4: ea000003 b 151e8 <_Timer_server_Body+0xb0>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
151d8: 30662002 rsbcc r2, r6, r2
151dc: 31a00007 movcc r0, r7
151e0: 33a01001 movcc r1, #1
151e4: 3b000fbc blcc 190dc <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
151e8: e5846074 str r6, [r4, #116] ; 0x74
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
151ec: e5940078 ldr r0, [r4, #120] ; 0x78
151f0: eb000221 bl 15a7c <_Chain_Get>
if ( timer == NULL ) {
151f4: e2501000 subs r1, r0, #0
151f8: 0a00000a beq 15228 <_Timer_server_Body+0xf0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
151fc: e5913038 ldr r3, [r1, #56] ; 0x38
15200: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
15204: 02811010 addeq r1, r1, #16
15208: 01a0000b moveq r0, fp
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1520c: 0a000003 beq 15220 <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
15210: e3530003 cmp r3, #3
15214: 1afffff4 bne 151ec <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
15218: e2811010 add r1, r1, #16
1521c: e1a00007 mov r0, r7
15220: eb001002 bl 19230 <_Watchdog_Insert>
15224: eafffff0 b 151ec <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15228: e10f3000 mrs r3, CPSR
1522c: e3832080 orr r2, r3, #128 ; 0x80
15230: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
15234: e59d2014 ldr r2, [sp, #20]
15238: e152000a cmp r2, sl
1523c: 1a000005 bne 15258 <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
15240: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15244: e129f003 msr CPSR_fc, r3
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
15248: e59d3008 ldr r3, [sp, #8]
1524c: e1530008 cmp r3, r8
15250: 1a000002 bne 15260 <_Timer_server_Body+0x128>
15254: ea000015 b 152b0 <_Timer_server_Body+0x178>
15258: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
1525c: eaffffcb b 15190 <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15260: e10f2000 mrs r2, CPSR
15264: e3823080 orr r3, r2, #128 ; 0x80
15268: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1526c: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
15270: e1530008 cmp r3, r8
15274: 0a00000b beq 152a8 <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
15278: e5931000 ldr r1, [r3]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
1527c: e3530000 cmp r3, #0
the_chain->first = new_first;
15280: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
15284: e5815004 str r5, [r1, #4]
15288: 0a000006 beq 152a8 <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
1528c: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15290: e129f002 msr CPSR_fc, r2
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
15294: e2830020 add r0, r3, #32
15298: e8900003 ldm r0, {r0, r1}
1529c: e1a0e00f mov lr, pc
152a0: e593f01c ldr pc, [r3, #28]
}
152a4: eaffffed b 15260 <_Timer_server_Body+0x128>
152a8: e129f002 msr CPSR_fc, r2
152ac: eaffffb5 b 15188 <_Timer_server_Body+0x50>
} else {
ts->active = false;
152b0: e5c4907c strb r9, [r4, #124] ; 0x7c
152b4: e59f304c ldr r3, [pc, #76] ; 15308 <_Timer_server_Body+0x1d0>
152b8: e5932000 ldr r2, [r3]
152bc: e2822001 add r2, r2, #1
152c0: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
152c4: e3a01008 mov r1, #8
152c8: e5940000 ldr r0, [r4]
152cc: eb000d38 bl 187b4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
152d0: e1a00004 mov r0, r4
152d4: ebffff6b bl 15088 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
152d8: e1a00004 mov r0, r4
152dc: ebffff7f bl 150e0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
152e0: eb000aa4 bl 17d78 <_Thread_Enable_dispatch>
ts->active = true;
152e4: e3a03001 mov r3, #1
152e8: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
152ec: e59d0004 ldr r0, [sp, #4]
152f0: eb001026 bl 19390 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
152f4: e59d0000 ldr r0, [sp]
152f8: eb001024 bl 19390 <_Watchdog_Remove>
152fc: eaffffa1 b 15188 <_Timer_server_Body+0x50>