RTEMS 4.10Annotated Report
Thu May 27 20:08:20 2010
00005aa4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
5aa4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
5aa8: e1a04001 mov r4, r1
5aac: e1a06000 mov r6, r0
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
5ab0: e1a0100d mov r1, sp
5ab4: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
5ab8: e1a08002 mov r8, r2
5abc: e20370ff and r7, r3, #255 ; 0xff
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
5ac0: eb00006f bl 5c84 <_POSIX_Mutex_Get>
5ac4: e3500000 cmp r0, #0
5ac8: 0a000032 beq 5b98 <_POSIX_Condition_variables_Wait_support+0xf4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
5acc: e59f30d0 ldr r3, [pc, #208] ; 5ba4 <_POSIX_Condition_variables_Wait_support+0x100>
5ad0: e5932000 ldr r2, [r3]
5ad4: e2422001 sub r2, r2, #1
5ad8: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
5adc: e1a0100d mov r1, sp
5ae0: e1a00006 mov r0, r6
5ae4: ebffff7c bl 58dc <_POSIX_Condition_variables_Get>
switch ( location ) {
5ae8: e59d3000 ldr r3, [sp]
5aec: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
5af0: e1a0a000 mov sl, r0
switch ( location ) {
5af4: 1a000027 bne 5b98 <_POSIX_Condition_variables_Wait_support+0xf4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
5af8: e5903014 ldr r3, [r0, #20]
5afc: e3530000 cmp r3, #0
5b00: 0a000004 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74>
5b04: e5942000 ldr r2, [r4]
5b08: e1530002 cmp r3, r2
5b0c: 0a000001 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74>
_Thread_Enable_dispatch();
5b10: eb000bd9 bl 8a7c <_Thread_Enable_dispatch>
5b14: ea00001f b 5b98 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
5b18: e1a00004 mov r0, r4
5b1c: eb0000de bl 5e9c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
5b20: e3570000 cmp r7, #0
5b24: 1a000015 bne 5b80 <_POSIX_Condition_variables_Wait_support+0xdc>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
5b28: e59f5078 ldr r5, [pc, #120] ; 5ba8 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
5b2c: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
5b30: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
5b34: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
5b38: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
5b3c: e5961000 ldr r1, [r6]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
5b40: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
5b44: e5831020 str r1, [r3, #32]
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;
5b48: e3a01001 mov r1, #1
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
5b4c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
5b50: e1a00002 mov r0, r2
5b54: e58a1048 str r1, [sl, #72] ; 0x48
5b58: e59f204c ldr r2, [pc, #76] ; 5bac <_POSIX_Condition_variables_Wait_support+0x108>
5b5c: e1a01008 mov r1, r8
5b60: eb000cfe bl 8f60 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
5b64: eb000bc4 bl 8a7c <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
5b68: e5953000 ldr r3, [r5]
5b6c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
5b70: e3550074 cmp r5, #116 ; 0x74
5b74: 13550000 cmpne r5, #0
5b78: 0a000002 beq 5b88 <_POSIX_Condition_variables_Wait_support+0xe4>
5b7c: ea000006 b 5b9c <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
5b80: eb000bbd bl 8a7c <_Thread_Enable_dispatch>
5b84: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
5b88: e1a00004 mov r0, r4
5b8c: eb0000a3 bl 5e20 <pthread_mutex_lock>
if ( mutex_status )
5b90: e3500000 cmp r0, #0
5b94: 0a000000 beq 5b9c <_POSIX_Condition_variables_Wait_support+0xf8>
5b98: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
5b9c: e1a00005 mov r0, r5
5ba0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
00006f2c <_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
)
{
6f2c: 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;
6f30: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
6f34: e281503c add r5, r1, #60 ; 0x3c
6f38: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
6f3c: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
6f40: 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 ) )
6f44: 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 ];
6f48: 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;
6f4c: e581503c str r5, [r1, #60] ; 0x3c
6f50: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
6f54: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
6f58: 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 ];
6f5c: 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;
6f60: 159f8154 ldrne r8, [pc, #340] ; 70bc <_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 ) )
6f64: 1a000023 bne 6ff8 <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
6f68: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
6f6c: e10f5000 mrs r5, CPSR
6f70: e3854080 orr r4, r5, #128 ; 0x80
6f74: 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;
6f78: e3e06000 mvn r6, #0
6f7c: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f80: ea00000b b 6fb4 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
6f84: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
6f88: e1530006 cmp r3, r6
6f8c: 9a00000a bls 6fbc <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
6f90: e10fa000 mrs sl, CPSR
6f94: e129f005 msr CPSR_fc, r5
6f98: 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) ) {
6f9c: e594a010 ldr sl, [r4, #16]
6fa0: e117000a tst r7, sl
6fa4: 1a000001 bne 6fb0 <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
6fa8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
6fac: eaffffee b 6f6c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
6fb0: 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 ) ) {
6fb4: e1540008 cmp r4, r8
6fb8: 1afffff1 bne 6f84 <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6fbc: e590c030 ldr ip, [r0, #48] ; 0x30
6fc0: 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 ) ) {
6fc4: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
6fc8: 1a000038 bne 70b0 <_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 )
6fcc: 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;
6fd0: e3a03000 mov r3, #0
6fd4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
6fd8: 0a00002a beq 7088 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
6fdc: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
6fe0: e5814000 str r4, [r1]
the_node->previous = previous_node;
6fe4: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
6fe8: 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;
6fec: e5831000 str r1, [r3]
search_node->previous = the_node;
6ff0: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
6ff4: ea000021 b 7080 <_Thread_queue_Enqueue_priority+0x154>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
6ff8: e5d86000 ldrb r6, [r8]
6ffc: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7000: e10f5000 mrs r5, CPSR
7004: e3854080 orr r4, r5, #128 ; 0x80
7008: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
700c: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7010: ea00000b b 7044 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7014: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
7018: e1530006 cmp r3, r6
701c: 2a00000a bcs 704c <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7020: e10fa000 mrs sl, CPSR
7024: e129f005 msr CPSR_fc, r5
7028: 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) ) {
702c: e594a010 ldr sl, [r4, #16]
7030: e117000a tst r7, sl
7034: 1a000001 bne 7040 <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
7038: e129f005 msr CPSR_fc, r5
703c: eaffffed b 6ff8 <_Thread_queue_Enqueue_priority+0xcc>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
7040: 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 ) ) {
7044: e154000c cmp r4, ip
7048: 1afffff1 bne 7014 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
704c: e590c030 ldr ip, [r0, #48] ; 0x30
7050: 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 ) ) {
7054: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
7058: 1a000014 bne 70b0 <_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 )
705c: 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;
7060: e3a03000 mov r3, #0
7064: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
7068: 0a000006 beq 7088 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
706c: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
7070: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7074: 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;
7078: e5841000 str r1, [r4]
next_node->previous = the_node;
707c: e5831004 str r1, [r3, #4]
7080: e129f005 msr CPSR_fc, r5
7084: ea000007 b 70a8 <_Thread_queue_Enqueue_priority+0x17c>
7088: 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;
708c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7090: e5814000 str r4, [r1]
the_node->previous = previous_node;
7094: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
7098: 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;
709c: e5831000 str r1, [r3]
search_node->previous = the_node;
70a0: e5841004 str r1, [r4, #4]
70a4: e129f00c msr CPSR_fc, ip
70a8: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
70ac: 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;
70b0: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
70b4: e5900030 ldr r0, [r0, #48] ; 0x30
}
70b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00014a24 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
14a24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
14a28: e24dd020 sub sp, sp, #32
14a2c: e28d3014 add r3, sp, #20
14a30: 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;
14a34: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
14a38: e283a004 add sl, r3, #4
14a3c: 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);
14a40: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a44: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a48: e2803040 add r3, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
14a4c: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
14a50: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
14a54: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
14a58: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
14a5c: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a60: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a64: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
14a68: e1a04000 mov r4, r0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a6c: 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 );
14a70: 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;
14a74: e28d2014 add r2, sp, #20
14a78: 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;
14a7c: e59f2168 ldr r2, [pc, #360] ; 14bec <_Timer_server_Body+0x1c8>
14a80: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
14a84: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a88: e1a02005 mov r2, r5
14a8c: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
14a90: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a94: e1a0000b mov r0, fp
14a98: eb00106c bl 18c50 <_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();
14a9c: e59f314c ldr r3, [pc, #332] ; 14bf0 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
14aa0: 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();
14aa4: 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 ) {
14aa8: e1560002 cmp r6, r2
14aac: 9a000004 bls 14ac4 <_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 );
14ab0: e0621006 rsb r1, r2, r6
14ab4: e1a00007 mov r0, r7
14ab8: e1a02005 mov r2, r5
14abc: eb001063 bl 18c50 <_Watchdog_Adjust_to_chain>
14ac0: ea000003 b 14ad4 <_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 );
14ac4: 30662002 rsbcc r2, r6, r2
14ac8: 31a00007 movcc r0, r7
14acc: 33a01001 movcc r1, #1
14ad0: 3b001036 blcc 18bb0 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
14ad4: 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 );
14ad8: e5940078 ldr r0, [r4, #120] ; 0x78
14adc: eb00023b bl 153d0 <_Chain_Get>
if ( timer == NULL ) {
14ae0: e2501000 subs r1, r0, #0
14ae4: 0a00000a beq 14b14 <_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 ) {
14ae8: e5913038 ldr r3, [r1, #56] ; 0x38
14aec: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
14af0: 02811010 addeq r1, r1, #16
14af4: 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 ) {
14af8: 0a000003 beq 14b0c <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
14afc: e3530003 cmp r3, #3
14b00: 1afffff4 bne 14ad8 <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
14b04: e2811010 add r1, r1, #16
14b08: e1a00007 mov r0, r7
14b0c: eb00107c bl 18d04 <_Watchdog_Insert>
14b10: eafffff0 b 14ad8 <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
14b14: e10f3000 mrs r3, CPSR
14b18: e3832080 orr r2, r3, #128 ; 0x80
14b1c: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
14b20: e59d2014 ldr r2, [sp, #20]
14b24: e152000a cmp r2, sl
14b28: 1a000005 bne 14b44 <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
14b2c: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
14b30: 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 ) ) {
14b34: e59d3008 ldr r3, [sp, #8]
14b38: e1530008 cmp r3, r8
14b3c: 1a000002 bne 14b4c <_Timer_server_Body+0x128>
14b40: ea000015 b 14b9c <_Timer_server_Body+0x178>
14b44: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
14b48: eaffffcb b 14a7c <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
14b4c: e10f2000 mrs r2, CPSR
14b50: e3823080 orr r3, r2, #128 ; 0x80
14b54: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
14b58: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
14b5c: e1530008 cmp r3, r8
14b60: 0a00000b beq 14b94 <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
14b64: 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 ) {
14b68: e3530000 cmp r3, #0
the_chain->first = new_first;
14b6c: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
14b70: e5815004 str r5, [r1, #4]
14b74: 0a000006 beq 14b94 <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
14b78: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
14b7c: 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 );
14b80: e2830020 add r0, r3, #32
14b84: e8900003 ldm r0, {r0, r1}
14b88: e1a0e00f mov lr, pc
14b8c: e593f01c ldr pc, [r3, #28]
}
14b90: eaffffed b 14b4c <_Timer_server_Body+0x128>
14b94: e129f002 msr CPSR_fc, r2
14b98: eaffffb5 b 14a74 <_Timer_server_Body+0x50>
} else {
ts->active = false;
14b9c: e5c4907c strb r9, [r4, #124] ; 0x7c
14ba0: e59f304c ldr r3, [pc, #76] ; 14bf4 <_Timer_server_Body+0x1d0>
14ba4: e5932000 ldr r2, [r3]
14ba8: e2822001 add r2, r2, #1
14bac: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
14bb0: e3a01008 mov r1, #8
14bb4: e5940000 ldr r0, [r4]
14bb8: eb000d9f bl 1823c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
14bbc: e1a00004 mov r0, r4
14bc0: ebffff6b bl 14974 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
14bc4: e1a00004 mov r0, r4
14bc8: ebffff7f bl 149cc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
14bcc: eb000b01 bl 177d8 <_Thread_Enable_dispatch>
ts->active = true;
14bd0: e3a03001 mov r3, #1
14bd4: 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 );
14bd8: e59d0004 ldr r0, [sp, #4]
14bdc: eb0010a1 bl 18e68 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14be0: e59d0000 ldr r0, [sp]
14be4: eb00109f bl 18e68 <_Watchdog_Remove>
14be8: eaffffa1 b 14a74 <_Timer_server_Body+0x50>