RTEMS 4.10Annotated Report
Tue Feb 8 17:18:53 2011
300061f4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
300061f4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
300061f8: e1a04001 mov r4, r1
300061fc: 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 ) ) {
30006200: e1a0100d mov r1, sp
30006204: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
30006208: e1a08002 mov r8, r2
3000620c: 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 ) ) {
30006210: eb00006f bl 300063d4 <_POSIX_Mutex_Get>
30006214: e3500000 cmp r0, #0
30006218: 0a000032 beq 300062e8 <_POSIX_Condition_variables_Wait_support+0xf4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
3000621c: e59f30d0 ldr r3, [pc, #208] ; 300062f4 <_POSIX_Condition_variables_Wait_support+0x100>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
30006220: e1a0100d mov r1, sp
30006224: e5932000 ldr r2, [r3]
30006228: e1a00006 mov r0, r6
3000622c: e2422001 sub r2, r2, #1
30006230: e5832000 str r2, [r3]
30006234: ebffff7d bl 30006030 <_POSIX_Condition_variables_Get>
switch ( location ) {
30006238: e59d3000 ldr r3, [sp]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
3000623c: e1a0a000 mov sl, r0
switch ( location ) {
30006240: e3530000 cmp r3, #0
30006244: 1a000027 bne 300062e8 <_POSIX_Condition_variables_Wait_support+0xf4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
30006248: e5903014 ldr r3, [r0, #20]
3000624c: e3530000 cmp r3, #0
30006250: 0a000004 beq 30006268 <_POSIX_Condition_variables_Wait_support+0x74>
30006254: e5942000 ldr r2, [r4]
30006258: e1530002 cmp r3, r2
3000625c: 0a000001 beq 30006268 <_POSIX_Condition_variables_Wait_support+0x74>
_Thread_Enable_dispatch();
30006260: eb000be3 bl 300091f4 <_Thread_Enable_dispatch>
30006264: ea00001f b 300062e8 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
30006268: e1a00004 mov r0, r4
3000626c: eb0000de bl 300065ec <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
30006270: e3570000 cmp r7, #0
30006274: 1a000015 bne 300062d0 <_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;
30006278: e59f5078 ldr r5, [pc, #120] ; 300062f8 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
3000627c: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
30006280: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
30006284: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
30006288: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
3000628c: 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;
30006290: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
30006294: 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;
30006298: 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;
3000629c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
300062a0: e1a00002 mov r0, r2
300062a4: e58a1048 str r1, [sl, #72] ; 0x48
300062a8: e59f204c ldr r2, [pc, #76] ; 300062fc <_POSIX_Condition_variables_Wait_support+0x108>
300062ac: e1a01008 mov r1, r8
300062b0: eb000d08 bl 300096d8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
300062b4: eb000bce bl 300091f4 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
300062b8: e5953000 ldr r3, [r5]
300062bc: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
300062c0: e3550074 cmp r5, #116 ; 0x74
300062c4: 13550000 cmpne r5, #0
300062c8: 0a000002 beq 300062d8 <_POSIX_Condition_variables_Wait_support+0xe4>
300062cc: ea000006 b 300062ec <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
300062d0: eb000bc7 bl 300091f4 <_Thread_Enable_dispatch>
300062d4: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
300062d8: e1a00004 mov r0, r4
300062dc: eb0000a3 bl 30006570 <pthread_mutex_lock>
if ( mutex_status )
300062e0: e3500000 cmp r0, #0
300062e4: 0a000000 beq 300062ec <_POSIX_Condition_variables_Wait_support+0xf8>
300062e8: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
300062ec: e1a00005 mov r0, r5
300062f0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
30007718 <_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
)
{
30007718: 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;
3000771c: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
30007720: e281503c add r5, r1, #60 ; 0x3c
30007724: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
30007728: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
3000772c: 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 ) )
30007730: 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 ];
30007734: 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;
30007738: e581503c str r5, [r1, #60] ; 0x3c
3000773c: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
30007740: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
30007744: 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 ];
30007748: 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;
3000774c: 159f8154 ldrne r8, [pc, #340] ; 300078a8 <_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 ) )
30007750: 1a000023 bne 300077e4 <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30007754: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
30007758: e10f5000 mrs r5, CPSR
3000775c: e3854080 orr r4, r5, #128 ; 0x80
30007760: 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;
30007764: e3e06000 mvn r6, #0
30007768: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
3000776c: ea00000b b 300077a0 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
30007770: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
30007774: e1530006 cmp r3, r6
30007778: 9a00000a bls 300077a8 <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
3000777c: e10fa000 mrs sl, CPSR
30007780: e129f005 msr CPSR_fc, r5
30007784: 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) ) {
30007788: e594a010 ldr sl, [r4, #16]
3000778c: e117000a tst r7, sl
30007790: 1a000001 bne 3000779c <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007794: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
30007798: eaffffee b 30007758 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
3000779c: 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 ) ) {
300077a0: e1540008 cmp r4, r8
300077a4: 1afffff1 bne 30007770 <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
300077a8: e5907030 ldr r7, [r0, #48] ; 0x30
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 ) ) {
300077ac: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
300077b0: e3570001 cmp r7, #1
300077b4: 1a000038 bne 3000789c <_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 )
300077b8: 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;
300077bc: e3a03000 mov r3, #0
300077c0: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
300077c4: 0a00002a beq 30007874 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
300077c8: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
300077cc: e5814000 str r4, [r1]
the_node->previous = previous_node;
300077d0: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
300077d4: 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;
300077d8: e5831000 str r1, [r3]
search_node->previous = the_node;
300077dc: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
300077e0: ea000021 b 3000786c <_Thread_queue_Enqueue_priority+0x154>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
300077e4: e5d86000 ldrb r6, [r8]
300077e8: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300077ec: e10f5000 mrs r5, CPSR
300077f0: e3854080 orr r4, r5, #128 ; 0x80
300077f4: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
300077f8: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
300077fc: ea00000b b 30007830 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
30007800: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
30007804: e1530006 cmp r3, r6
30007808: 2a00000a bcs 30007838 <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
3000780c: e10fa000 mrs sl, CPSR
30007810: e129f005 msr CPSR_fc, r5
30007814: 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) ) {
30007818: e594a010 ldr sl, [r4, #16]
3000781c: e117000a tst r7, sl
30007820: 1a000001 bne 3000782c <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30007824: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
30007828: eaffffed b 300077e4 <_Thread_queue_Enqueue_priority+0xcc> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
3000782c: 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 ) ) {
30007830: e154000c cmp r4, ip
30007834: 1afffff1 bne 30007800 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007838: e5907030 ldr r7, [r0, #48] ; 0x30
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 ) ) {
3000783c: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
30007840: e3570001 cmp r7, #1
30007844: 1a000014 bne 3000789c <_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 )
30007848: 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;
3000784c: e3a03000 mov r3, #0
30007850: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
30007854: 0a000006 beq 30007874 <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
30007858: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
3000785c: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007860: 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;
30007864: e5841000 str r1, [r4]
next_node->previous = the_node;
30007868: e5831004 str r1, [r3, #4]
3000786c: e129f005 msr CPSR_fc, r5
30007870: ea000007 b 30007894 <_Thread_queue_Enqueue_priority+0x17c>
30007874: 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;
30007878: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
3000787c: e5814000 str r4, [r1]
the_node->previous = previous_node;
30007880: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
30007884: 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;
30007888: e5831000 str r1, [r3]
search_node->previous = the_node;
3000788c: e5841004 str r1, [r4, #4]
30007890: e129f00c msr CPSR_fc, ip
30007894: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
30007898: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
3000789c: e5900030 ldr r0, [r0, #48] ; 0x30
* 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;
300078a0: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
}
300078a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
3001517c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
3001517c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
30015180: e24dd020 sub sp, sp, #32
30015184: e28d3014 add r3, sp, #20
30015188: 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;
3001518c: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
30015190: e283a004 add sl, r3, #4
30015194: 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);
30015198: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
3001519c: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300151a0: e2803040 add r3, r0, #64 ; 0x40
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
300151a4: e1a04000 mov r4, r0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300151a8: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
300151ac: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
300151b0: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
300151b4: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
300151b8: e58d5010 str r5, [sp, #16]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300151bc: 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 );
300151c0: e2807068 add r7, r0, #104 ; 0x68
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
300151c4: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
300151c8: e58d3000 str r3, [sp]
{
/*
* 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;
300151cc: e28d2014 add r2, sp, #20
300151d0: 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;
300151d4: e59f2168 ldr r2, [pc, #360] ; 30015344 <_Timer_server_Body+0x1c8>
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300151d8: e1a0000b mov r0, fp
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
300151dc: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
300151e0: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300151e4: e1a02005 mov r2, r5
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
300151e8: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
300151ec: e0611003 rsb r1, r1, r3
300151f0: eb001078 bl 300193d8 <_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();
300151f4: e59f314c ldr r3, [pc, #332] ; 30015348 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
300151f8: 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();
300151fc: 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 ) {
30015200: e1560002 cmp r6, r2
30015204: 9a000004 bls 3001521c <_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 );
30015208: e0621006 rsb r1, r2, r6
3001520c: e1a00007 mov r0, r7
30015210: e1a02005 mov r2, r5
30015214: eb00106f bl 300193d8 <_Watchdog_Adjust_to_chain>
30015218: ea000003 b 3001522c <_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 );
3001521c: 30662002 rsbcc r2, r6, r2
30015220: 31a00007 movcc r0, r7
30015224: 33a01001 movcc r1, #1
30015228: 3b001042 blcc 30019338 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
3001522c: 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 );
30015230: e5940078 ldr r0, [r4, #120] ; 0x78
30015234: eb000245 bl 30015b50 <_Chain_Get>
if ( timer == NULL ) {
30015238: e2501000 subs r1, r0, #0
3001523c: 0a00000a beq 3001526c <_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 ) {
30015240: e5913038 ldr r3, [r1, #56] ; 0x38
30015244: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
30015248: 02811010 addeq r1, r1, #16
3001524c: 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 ) {
30015250: 0a000003 beq 30015264 <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
30015254: e3530003 cmp r3, #3
30015258: 1afffff4 bne 30015230 <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
3001525c: e2811010 add r1, r1, #16
30015260: e1a00007 mov r0, r7
30015264: eb001088 bl 3001948c <_Watchdog_Insert>
30015268: eafffff0 b 30015230 <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3001526c: e10f3000 mrs r3, CPSR
30015270: e3832080 orr r2, r3, #128 ; 0x80
30015274: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
30015278: e59d2014 ldr r2, [sp, #20]
3001527c: e152000a cmp r2, sl
30015280: 1a000005 bne 3001529c <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
30015284: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
30015288: 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 ) ) {
3001528c: e59d3008 ldr r3, [sp, #8]
30015290: e1530008 cmp r3, r8
30015294: 1a000002 bne 300152a4 <_Timer_server_Body+0x128>
30015298: ea000015 b 300152f4 <_Timer_server_Body+0x178>
3001529c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
300152a0: eaffffcb b 300151d4 <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
300152a4: e10f2000 mrs r2, CPSR
300152a8: e3823080 orr r3, r2, #128 ; 0x80
300152ac: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
300152b0: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
300152b4: e1530008 cmp r3, r8
300152b8: 0a00000b beq 300152ec <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
300152bc: 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 ) {
300152c0: e3530000 cmp r3, #0
the_chain->first = new_first;
300152c4: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
300152c8: e5815004 str r5, [r1, #4]
300152cc: 0a000006 beq 300152ec <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
300152d0: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
300152d4: 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 );
300152d8: e5930020 ldr r0, [r3, #32]
300152dc: e5931024 ldr r1, [r3, #36] ; 0x24
300152e0: e1a0e00f mov lr, pc
300152e4: e593f01c ldr pc, [r3, #28]
}
300152e8: eaffffed b 300152a4 <_Timer_server_Body+0x128>
300152ec: e129f002 msr CPSR_fc, r2
300152f0: eaffffb5 b 300151cc <_Timer_server_Body+0x50>
300152f4: e59f3050 ldr r3, [pc, #80] ; 3001534c <_Timer_server_Body+0x1d0>
} else {
ts->active = false;
300152f8: e5c4907c strb r9, [r4, #124] ; 0x7c
300152fc: e5932000 ldr r2, [r3]
30015300: e2822001 add r2, r2, #1
30015304: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
30015308: e3a01008 mov r1, #8
3001530c: e5940000 ldr r0, [r4]
30015310: eb000da9 bl 300189bc <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
30015314: e1a00004 mov r0, r4
30015318: ebffff6b bl 300150cc <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
3001531c: e1a00004 mov r0, r4
30015320: ebffff7f bl 30015124 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
30015324: eb000b0b bl 30017f58 <_Thread_Enable_dispatch>
ts->active = true;
30015328: e3a03001 mov r3, #1
3001532c: 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 );
30015330: e59d0004 ldr r0, [sp, #4]
30015334: eb0010ad bl 300195f0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
30015338: e59d0000 ldr r0, [sp]
3001533c: eb0010ab bl 300195f0 <_Watchdog_Remove>
30015340: eaffffa1 b 300151cc <_Timer_server_Body+0x50>