RTEMS 4.10Annotated Report
Fri May 21 16:41:13 2010
0200b590 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
200b590: 9d e3 bf a0 save %sp, -96, %sp
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
200b594: 03 00 80 6a sethi %hi(0x201a800), %g1
200b598: c2 00 60 70 ld [ %g1 + 0x70 ], %g1 ! 201a870 <_Thread_Executing>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
200b59c: c0 20 60 34 clr [ %g1 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
200b5a0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
200b5a4: 80 a0 a0 00 cmp %g2, 0
200b5a8: 22 80 00 31 be,a 200b66c <_CORE_mutex_Seize_interrupt_trylock+0xdc>
200b5ac: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
the_mutex->lock = CORE_MUTEX_LOCKED;
200b5b0: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200b5b4: c6 00 60 08 ld [ %g1 + 8 ], %g3
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200b5b8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
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;
200b5bc: c6 26 20 60 st %g3, [ %i0 + 0x60 ]
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;
200b5c0: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
200b5c4: 86 10 20 01 mov 1, %g3
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200b5c8: 80 a0 a0 02 cmp %g2, 2
200b5cc: 02 80 00 05 be 200b5e0 <_CORE_mutex_Seize_interrupt_trylock+0x50>
200b5d0: c6 26 20 54 st %g3, [ %i0 + 0x54 ]
200b5d4: 80 a0 a0 03 cmp %g2, 3
200b5d8: 12 80 00 07 bne 200b5f4 <_CORE_mutex_Seize_interrupt_trylock+0x64>
200b5dc: 01 00 00 00 nop
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200b5e0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200b5e4: 80 a0 a0 03 cmp %g2, 3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200b5e8: 84 00 e0 01 add %g3, 1, %g2
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200b5ec: 02 80 00 03 be 200b5f8 <_CORE_mutex_Seize_interrupt_trylock+0x68>
200b5f0: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
200b5f4: 30 80 00 2d b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
200b5f8: c4 06 20 4c ld [ %i0 + 0x4c ], %g2
current = executing->current_priority;
200b5fc: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
if ( current == ceiling ) {
200b600: 80 a0 c0 02 cmp %g3, %g2
200b604: 12 80 00 03 bne 200b610 <_CORE_mutex_Seize_interrupt_trylock+0x80>
200b608: 01 00 00 00 nop
_ISR_Enable( *level_p );
200b60c: 30 80 00 27 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
200b610: 08 80 00 0f bleu 200b64c <_CORE_mutex_Seize_interrupt_trylock+0xbc>
200b614: 84 10 20 06 mov 6, %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200b618: 03 00 80 69 sethi %hi(0x201a400), %g1
200b61c: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201a7b0 <_Thread_Dispatch_disable_level>
200b620: 84 00 a0 01 inc %g2
200b624: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
200b628: 7f ff da e6 call 20021c0 <sparc_enable_interrupts>
200b62c: d0 06 40 00 ld [ %i1 ], %o0
_Thread_Change_priority(
200b630: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
200b634: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
200b638: 7f ff ef cd call 200756c <_Thread_Change_priority>
200b63c: 94 10 20 00 clr %o2
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
200b640: 7f ff f1 56 call 2007b98 <_Thread_Enable_dispatch>
200b644: b0 10 20 00 clr %i0
200b648: 30 80 00 1b b,a 200b6b4 <_CORE_mutex_Seize_interrupt_trylock+0x124>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
200b64c: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b650: 84 10 20 01 mov 1, %g2
the_mutex->nest_count = 0; /* undo locking above */
200b654: c0 26 20 54 clr [ %i0 + 0x54 ]
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b658: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
200b65c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
200b660: 84 00 bf ff add %g2, -1, %g2
200b664: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
200b668: 30 80 00 10 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118>
/*
* 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 ) ) {
200b66c: 80 a0 80 01 cmp %g2, %g1
200b670: 12 80 00 13 bne 200b6bc <_CORE_mutex_Seize_interrupt_trylock+0x12c>
200b674: 01 00 00 00 nop
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200b678: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200b67c: 80 a0 60 00 cmp %g1, 0
200b680: 22 80 00 07 be,a 200b69c <_CORE_mutex_Seize_interrupt_trylock+0x10c>
200b684: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200b688: 80 a0 60 01 cmp %g1, 1
200b68c: 12 80 00 0c bne 200b6bc <_CORE_mutex_Seize_interrupt_trylock+0x12c>
200b690: 82 10 20 02 mov 2, %g1
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;
200b694: 10 80 00 05 b 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118><== NOT EXECUTED
200b698: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED
* 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++;
200b69c: 82 00 60 01 inc %g1
200b6a0: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( *level_p );
200b6a4: 30 80 00 01 b,a 200b6a8 <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
200b6a8: 7f ff da c6 call 20021c0 <sparc_enable_interrupts>
200b6ac: d0 06 40 00 ld [ %i1 ], %o0
200b6b0: b0 10 20 00 clr %i0
200b6b4: 81 c7 e0 08 ret
200b6b8: 81 e8 00 00 restore
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
200b6bc: 81 c7 e0 08 ret
200b6c0: 91 e8 20 01 restore %g0, 1, %o0
02007c78 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007c78: 9d e3 bf a0 save %sp, -96, %sp
2007c7c: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
2007c80: c0 26 61 60 clr [ %i1 + 0x160 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007c84: e0 00 40 00 ld [ %g1 ], %l0
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
2007c88: c0 26 61 64 clr [ %i1 + 0x164 ]
2007c8c: c0 26 61 68 clr [ %i1 + 0x168 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
2007c90: c0 26 61 5c clr [ %i1 + 0x15c ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007c94: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
2007c98: 90 10 00 19 mov %i1, %o0
2007c9c: 40 00 02 a2 call 2008724 <_Thread_Stack_Allocate>
2007ca0: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
2007ca4: 80 a2 00 1b cmp %o0, %i3
2007ca8: 0a 80 00 04 bcs 2007cb8 <_Thread_Initialize+0x40>
2007cac: 80 a2 20 00 cmp %o0, 0
2007cb0: 32 80 00 04 bne,a 2007cc0 <_Thread_Initialize+0x48>
2007cb4: c2 06 60 cc ld [ %i1 + 0xcc ], %g1
2007cb8: 81 c7 e0 08 ret
2007cbc: 91 e8 20 00 restore %g0, 0, %o0
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
the_stack->size = size;
2007cc0: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2007cc4: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2007cc8: 80 8f 20 ff btst 0xff, %i4
2007ccc: 02 80 00 08 be 2007cec <_Thread_Initialize+0x74>
2007cd0: a4 10 20 00 clr %l2
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
2007cd4: 90 10 20 88 mov 0x88, %o0
2007cd8: 40 00 04 c1 call 2008fdc <_Workspace_Allocate>
2007cdc: b6 10 20 00 clr %i3
if ( !fp_area )
2007ce0: a4 92 20 00 orcc %o0, 0, %l2
2007ce4: 22 80 00 3e be,a 2007ddc <_Thread_Initialize+0x164>
2007ce8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007cec: 03 00 80 6a sethi %hi(0x201a800), %g1
2007cf0: d0 00 60 50 ld [ %g1 + 0x50 ], %o0 ! 201a850 <_Thread_Maximum_extensions>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
2007cf4: e4 26 61 58 st %l2, [ %i1 + 0x158 ]
the_thread->Start.fp_context = fp_area;
2007cf8: e4 26 60 c8 st %l2, [ %i1 + 0xc8 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007cfc: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
2007d00: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
2007d04: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
2007d08: c0 26 60 6c clr [ %i1 + 0x6c ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007d0c: 80 a2 20 00 cmp %o0, 0
2007d10: 02 80 00 08 be 2007d30 <_Thread_Initialize+0xb8>
2007d14: b6 10 20 00 clr %i3
extensions_area = _Workspace_Allocate(
2007d18: 90 02 20 01 inc %o0
2007d1c: 40 00 04 b0 call 2008fdc <_Workspace_Allocate>
2007d20: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
2007d24: b6 92 20 00 orcc %o0, 0, %i3
2007d28: 22 80 00 2d be,a 2007ddc <_Thread_Initialize+0x164>
2007d2c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
2007d30: 80 a6 e0 00 cmp %i3, 0
2007d34: 02 80 00 0c be 2007d64 <_Thread_Initialize+0xec>
2007d38: f6 26 61 6c st %i3, [ %i1 + 0x16c ]
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
2007d3c: 03 00 80 6a sethi %hi(0x201a800), %g1
2007d40: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 201a850 <_Thread_Maximum_extensions>
2007d44: 10 80 00 05 b 2007d58 <_Thread_Initialize+0xe0>
2007d48: 82 10 20 00 clr %g1
the_thread->extensions[i] = NULL;
2007d4c: 87 28 60 02 sll %g1, 2, %g3
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
2007d50: 82 00 60 01 inc %g1
the_thread->extensions[i] = NULL;
2007d54: c0 21 00 03 clr [ %g4 + %g3 ]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
2007d58: 80 a0 40 02 cmp %g1, %g2
2007d5c: 28 bf ff fc bleu,a 2007d4c <_Thread_Initialize+0xd4>
2007d60: c8 06 61 6c ld [ %i1 + 0x16c ], %g4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
2007d64: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007d68: 92 10 00 1d mov %i5, %o1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
2007d6c: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ]
the_thread->Start.budget_callout = budget_callout;
2007d70: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007d74: 90 10 00 19 mov %i1, %o0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007d78: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
2007d7c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2007d80: e2 2e 60 ac stb %l1, [ %i1 + 0xac ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
2007d84: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
2007d88: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
2007d8c: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
2007d90: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
2007d94: c0 26 60 1c clr [ %i1 + 0x1c ]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
2007d98: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007d9c: 40 00 01 c0 call 200849c <_Thread_Set_priority>
2007da0: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007da4: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
2007da8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
2007dac: 83 28 60 02 sll %g1, 2, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2007db0: e0 26 60 0c st %l0, [ %i1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007db4: f2 20 80 01 st %i1, [ %g2 + %g1 ]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
2007db8: c0 26 60 84 clr [ %i1 + 0x84 ]
2007dbc: c0 26 60 88 clr [ %i1 + 0x88 ]
* 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 );
2007dc0: 90 10 00 19 mov %i1, %o0
2007dc4: 40 00 03 7a call 2008bac <_User_extensions_Thread_create>
2007dc8: b0 10 20 01 mov 1, %i0
if ( extension_status )
2007dcc: 80 8a 20 ff btst 0xff, %o0
2007dd0: 12 80 00 27 bne 2007e6c <_Thread_Initialize+0x1f4>
2007dd4: 01 00 00 00 nop
return true;
failed:
if ( the_thread->libc_reent )
2007dd8: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
2007ddc: 80 a2 20 00 cmp %o0, 0
2007de0: 22 80 00 05 be,a 2007df4 <_Thread_Initialize+0x17c>
2007de4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
_Workspace_Free( the_thread->libc_reent );
2007de8: 40 00 04 86 call 2009000 <_Workspace_Free>
2007dec: 01 00 00 00 nop
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2007df0: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
2007df4: 80 a2 20 00 cmp %o0, 0
2007df8: 22 80 00 05 be,a 2007e0c <_Thread_Initialize+0x194>
2007dfc: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
2007e00: 40 00 04 80 call 2009000 <_Workspace_Free>
2007e04: 01 00 00 00 nop
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2007e08: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
2007e0c: 80 a2 20 00 cmp %o0, 0
2007e10: 22 80 00 05 be,a 2007e24 <_Thread_Initialize+0x1ac>
2007e14: d0 06 61 68 ld [ %i1 + 0x168 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
2007e18: 40 00 04 7a call 2009000 <_Workspace_Free> <== NOT EXECUTED
2007e1c: 01 00 00 00 nop <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
2007e20: d0 06 61 68 ld [ %i1 + 0x168 ], %o0 <== NOT EXECUTED
2007e24: 80 a2 20 00 cmp %o0, 0
2007e28: 02 80 00 05 be 2007e3c <_Thread_Initialize+0x1c4>
2007e2c: 80 a6 e0 00 cmp %i3, 0
_Workspace_Free( the_thread->API_Extensions[i] );
2007e30: 40 00 04 74 call 2009000 <_Workspace_Free> <== NOT EXECUTED
2007e34: 01 00 00 00 nop <== NOT EXECUTED
if ( extensions_area )
2007e38: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
2007e3c: 02 80 00 05 be 2007e50 <_Thread_Initialize+0x1d8>
2007e40: 80 a4 a0 00 cmp %l2, 0
(void) _Workspace_Free( extensions_area );
2007e44: 40 00 04 6f call 2009000 <_Workspace_Free>
2007e48: 90 10 00 1b mov %i3, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
2007e4c: 80 a4 a0 00 cmp %l2, 0
2007e50: 02 80 00 05 be 2007e64 <_Thread_Initialize+0x1ec>
2007e54: 90 10 00 19 mov %i1, %o0
(void) _Workspace_Free( fp_area );
2007e58: 40 00 04 6a call 2009000 <_Workspace_Free>
2007e5c: 90 10 00 12 mov %l2, %o0
#endif
_Thread_Stack_Free( the_thread );
2007e60: 90 10 00 19 mov %i1, %o0
2007e64: 40 00 02 47 call 2008780 <_Thread_Stack_Free>
2007e68: b0 10 20 00 clr %i0
return false;
}
2007e6c: 81 c7 e0 08 ret
2007e70: 81 e8 00 00 restore
02008190 <_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
)
{
2008190: 9d e3 bf a0 save %sp, -96, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
2008194: e0 06 60 14 ld [ %i1 + 0x14 ], %l0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2008198: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
200819c: c0 26 60 3c clr [ %i1 + 0x3c ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
20081a0: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
20081a4: 82 06 60 38 add %i1, 0x38, %g1
20081a8: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
20081ac: 2d 00 80 67 sethi %hi(0x2019c00), %l6
_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 ];
20081b0: 83 34 20 06 srl %l0, 6, %g1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
20081b4: 80 8c 20 20 btst 0x20, %l0
_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 ];
20081b8: a7 28 60 04 sll %g1, 4, %l3
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
20081bc: ac 15 a1 14 or %l6, 0x114, %l6
_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 ];
20081c0: 83 28 60 02 sll %g1, 2, %g1
block_state = the_thread_queue->state;
20081c4: ea 06 20 38 ld [ %i0 + 0x38 ], %l5
_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 ];
20081c8: a6 24 c0 01 sub %l3, %g1, %l3
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
20081cc: 12 80 00 28 bne 200826c <_Thread_queue_Enqueue_priority+0xdc>
20081d0: a6 06 00 13 add %i0, %l3, %l3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20081d4: ac 04 e0 04 add %l3, 4, %l6
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
20081d8: 7f ff e7 f6 call 20021b0 <sparc_disable_interrupts>
20081dc: 01 00 00 00 nop
20081e0: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->first;
20081e4: a8 10 3f ff mov -1, %l4
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
20081e8: 10 80 00 10 b 2008228 <_Thread_queue_Enqueue_priority+0x98>
20081ec: e2 04 c0 00 ld [ %l3 ], %l1
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
20081f0: 80 a4 00 14 cmp %l0, %l4
20081f4: 28 80 00 11 bleu,a 2008238 <_Thread_queue_Enqueue_priority+0xa8>
20081f8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
20081fc: 7f ff e7 f1 call 20021c0 <sparc_enable_interrupts>
2008200: 90 10 00 12 mov %l2, %o0
2008204: 7f ff e7 eb call 20021b0 <sparc_disable_interrupts>
2008208: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
200820c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
2008210: 80 8d 40 01 btst %l5, %g1
2008214: 32 80 00 05 bne,a 2008228 <_Thread_queue_Enqueue_priority+0x98>
2008218: e2 04 40 00 ld [ %l1 ], %l1
_ISR_Enable( level );
200821c: 7f ff e7 e9 call 20021c0 <sparc_enable_interrupts> <== NOT EXECUTED
2008220: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
goto restart_forward_search;
2008224: 30 bf ff ed b,a 20081d8 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED
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 ) ) {
2008228: 80 a4 40 16 cmp %l1, %l6
200822c: 32 bf ff f1 bne,a 20081f0 <_Thread_queue_Enqueue_priority+0x60>
2008230: e8 04 60 14 ld [ %l1 + 0x14 ], %l4
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
2008234: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2008238: 80 a0 60 01 cmp %g1, 1
200823c: 12 80 00 3c bne 200832c <_Thread_queue_Enqueue_priority+0x19c>
2008240: 90 10 00 12 mov %l2, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2008244: 80 a4 00 14 cmp %l0, %l4
2008248: 02 80 00 2e be 2008300 <_Thread_queue_Enqueue_priority+0x170>
200824c: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
2008250: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2008254: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
2008258: c2 26 60 04 st %g1, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
200825c: f0 26 60 44 st %i0, [ %i1 + 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;
2008260: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
2008264: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008268: 30 80 00 2d b,a 200831c <_Thread_queue_Enqueue_priority+0x18c>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
200826c: 7f ff e7 d1 call 20021b0 <sparc_disable_interrupts>
2008270: e8 0d 80 00 ldub [ %l6 ], %l4
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2008274: a8 05 20 01 inc %l4
_ISR_Disable( level );
2008278: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
200827c: 10 80 00 10 b 20082bc <_Thread_queue_Enqueue_priority+0x12c>
2008280: e2 04 e0 08 ld [ %l3 + 8 ], %l1
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
2008284: 80 a4 00 14 cmp %l0, %l4
2008288: 3a 80 00 11 bcc,a 20082cc <_Thread_queue_Enqueue_priority+0x13c>
200828c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
2008290: 7f ff e7 cc call 20021c0 <sparc_enable_interrupts>
2008294: 90 10 00 12 mov %l2, %o0
2008298: 7f ff e7 c6 call 20021b0 <sparc_disable_interrupts>
200829c: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
20082a0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
20082a4: 80 8d 40 01 btst %l5, %g1
20082a8: 32 80 00 05 bne,a 20082bc <_Thread_queue_Enqueue_priority+0x12c>
20082ac: e2 04 60 04 ld [ %l1 + 4 ], %l1
_ISR_Enable( level );
20082b0: 7f ff e7 c4 call 20021c0 <sparc_enable_interrupts>
20082b4: 90 10 00 12 mov %l2, %o0
goto restart_reverse_search;
20082b8: 30 bf ff ed b,a 200826c <_Thread_queue_Enqueue_priority+0xdc>
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 ) ) {
20082bc: 80 a4 40 13 cmp %l1, %l3
20082c0: 32 bf ff f1 bne,a 2008284 <_Thread_queue_Enqueue_priority+0xf4>
20082c4: e8 04 60 14 ld [ %l1 + 0x14 ], %l4
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
20082c8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
20082cc: 80 a0 60 01 cmp %g1, 1
20082d0: 12 80 00 17 bne 200832c <_Thread_queue_Enqueue_priority+0x19c>
20082d4: 90 10 00 12 mov %l2, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
20082d8: 80 a4 00 14 cmp %l0, %l4
20082dc: 02 80 00 09 be 2008300 <_Thread_queue_Enqueue_priority+0x170>
20082e0: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
20082e4: c2 04 40 00 ld [ %l1 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
20082e8: e2 26 60 04 st %l1, [ %i1 + 4 ]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
20082ec: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
20082f0: f0 26 60 44 st %i0, [ %i1 + 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;
20082f4: f2 24 40 00 st %i1, [ %l1 ]
next_node->previous = the_node;
20082f8: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
20082fc: 30 80 00 08 b,a 200831c <_Thread_queue_Enqueue_priority+0x18c>
2008300: a2 04 60 3c add %l1, 0x3c, %l1
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;
2008304: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2008308: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
200830c: c2 26 60 04 st %g1, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
2008310: f0 26 60 44 st %i0, [ %i1 + 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;
2008314: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
2008318: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
200831c: 7f ff e7 a9 call 20021c0 <sparc_enable_interrupts>
2008320: b0 10 20 01 mov 1, %i0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008324: 81 c7 e0 08 ret
2008328: 81 e8 00 00 restore
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
200832c: f0 06 20 30 ld [ %i0 + 0x30 ], %i0
* 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;
2008330: d0 26 80 00 st %o0, [ %i2 ]
return the_thread_queue->sync_state;
}
2008334: 81 c7 e0 08 ret
2008338: 81 e8 00 00 restore
02015554 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
2015554: 9d e3 bf 88 save %sp, -120, %sp
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2015558: 35 00 80 ec sethi %hi(0x203b000), %i2
201555c: b2 07 bf f4 add %fp, -12, %i1
2015560: ac 07 bf f8 add %fp, -8, %l6
2015564: a2 07 bf e8 add %fp, -24, %l1
2015568: a6 07 bf ec add %fp, -20, %l3
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
201556c: 37 00 80 ec sethi %hi(0x203b000), %i3
2015570: 2b 00 80 ec sethi %hi(0x203b000), %l5
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2015574: c0 27 bf f8 clr [ %fp + -8 ]
2015578: c0 27 bf ec clr [ %fp + -20 ]
the_chain->last = _Chain_Head(the_chain);
201557c: f2 27 bf fc st %i1, [ %fp + -4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2015580: ec 27 bf f4 st %l6, [ %fp + -12 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2015584: e2 27 bf f0 st %l1, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2015588: e6 27 bf e8 st %l3, [ %fp + -24 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
201558c: b4 16 a3 44 or %i2, 0x344, %i2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
2015590: b6 16 e2 84 or %i3, 0x284, %i3
2015594: aa 15 61 f0 or %l5, 0x1f0, %l5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2015598: a8 06 20 30 add %i0, 0x30, %l4
/*
* 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 );
201559c: a4 06 20 68 add %i0, 0x68, %l2
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
20155a0: b8 06 20 08 add %i0, 8, %i4
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
20155a4: ba 06 20 40 add %i0, 0x40, %i5
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
20155a8: ae 10 20 01 mov 1, %l7
{
/*
* 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;
20155ac: f2 26 20 78 st %i1, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
20155b0: c2 06 80 00 ld [ %i2 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
20155b4: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
20155b8: 94 10 00 11 mov %l1, %o2
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
20155bc: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
20155c0: 92 20 40 09 sub %g1, %o1, %o1
20155c4: 40 00 11 2c call 2019a74 <_Watchdog_Adjust_to_chain>
20155c8: 90 10 00 14 mov %l4, %o0
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
20155cc: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
20155d0: e0 06 c0 00 ld [ %i3 ], %l0
/*
* 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 ) {
20155d4: 80 a4 00 0a cmp %l0, %o2
20155d8: 08 80 00 06 bleu 20155f0 <_Timer_server_Body+0x9c>
20155dc: 92 24 00 0a sub %l0, %o2, %o1
/*
* 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 );
20155e0: 90 10 00 12 mov %l2, %o0
20155e4: 40 00 11 24 call 2019a74 <_Watchdog_Adjust_to_chain>
20155e8: 94 10 00 11 mov %l1, %o2
20155ec: 30 80 00 06 b,a 2015604 <_Timer_server_Body+0xb0>
} else if ( snapshot < last_snapshot ) {
20155f0: 1a 80 00 05 bcc 2015604 <_Timer_server_Body+0xb0>
20155f4: 94 22 80 10 sub %o2, %l0, %o2
/*
* 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 );
20155f8: 90 10 00 12 mov %l2, %o0
20155fc: 40 00 10 f7 call 20199d8 <_Watchdog_Adjust>
2015600: 92 10 20 01 mov 1, %o1
}
watchdogs->last_snapshot = snapshot;
2015604: e0 26 20 74 st %l0, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2015608: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
201560c: 40 00 02 61 call 2015f90 <_Chain_Get>
2015610: 01 00 00 00 nop
if ( timer == NULL ) {
2015614: 80 a2 20 00 cmp %o0, 0
2015618: 02 80 00 0f be 2015654 <_Timer_server_Body+0x100>
201561c: 01 00 00 00 nop
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2015620: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2015624: 80 a0 60 01 cmp %g1, 1
2015628: 12 80 00 05 bne 201563c <_Timer_server_Body+0xe8>
201562c: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2015630: 92 02 20 10 add %o0, 0x10, %o1
2015634: 10 80 00 05 b 2015648 <_Timer_server_Body+0xf4>
2015638: 90 10 00 14 mov %l4, %o0
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
201563c: 12 bf ff f3 bne 2015608 <_Timer_server_Body+0xb4>
2015640: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2015644: 90 10 00 12 mov %l2, %o0
2015648: 40 00 11 40 call 2019b48 <_Watchdog_Insert>
201564c: 01 00 00 00 nop
2015650: 30 bf ff ee b,a 2015608 <_Timer_server_Body+0xb4>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
2015654: 7f ff e5 06 call 200ea6c <sparc_disable_interrupts>
2015658: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
201565c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2015660: 80 a0 40 16 cmp %g1, %l6
2015664: 12 80 00 0a bne 201568c <_Timer_server_Body+0x138>
2015668: 01 00 00 00 nop
ts->insert_chain = NULL;
201566c: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2015670: 7f ff e5 03 call 200ea7c <sparc_enable_interrupts>
2015674: 01 00 00 00 nop
_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 ) ) {
2015678: c2 07 bf e8 ld [ %fp + -24 ], %g1
201567c: 80 a0 40 13 cmp %g1, %l3
2015680: 12 80 00 06 bne 2015698 <_Timer_server_Body+0x144>
2015684: 01 00 00 00 nop
2015688: 30 80 00 1a b,a 20156f0 <_Timer_server_Body+0x19c>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
201568c: 7f ff e4 fc call 200ea7c <sparc_enable_interrupts> <== NOT EXECUTED
2015690: 01 00 00 00 nop <== NOT EXECUTED
2015694: 30 bf ff c7 b,a 20155b0 <_Timer_server_Body+0x5c> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
2015698: 7f ff e4 f5 call 200ea6c <sparc_disable_interrupts>
201569c: 01 00 00 00 nop
20156a0: 84 10 00 08 mov %o0, %g2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
20156a4: e0 07 bf e8 ld [ %fp + -24 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
20156a8: 80 a4 00 13 cmp %l0, %l3
20156ac: 02 80 00 0e be 20156e4 <_Timer_server_Body+0x190>
20156b0: 80 a4 20 00 cmp %l0, 0
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
20156b4: c2 04 00 00 ld [ %l0 ], %g1
the_chain->first = new_first;
20156b8: c2 27 bf e8 st %g1, [ %fp + -24 ]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
20156bc: 02 80 00 0a be 20156e4 <_Timer_server_Body+0x190>
20156c0: e2 20 60 04 st %l1, [ %g1 + 4 ]
watchdog->state = WATCHDOG_INACTIVE;
20156c4: c0 24 20 08 clr [ %l0 + 8 ]
_ISR_Enable( level );
20156c8: 7f ff e4 ed call 200ea7c <sparc_enable_interrupts>
20156cc: 01 00 00 00 nop
/*
* 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 );
20156d0: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
20156d4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
20156d8: 9f c0 40 00 call %g1
20156dc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
}
20156e0: 30 bf ff ee b,a 2015698 <_Timer_server_Body+0x144>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
20156e4: 7f ff e4 e6 call 200ea7c <sparc_enable_interrupts>
20156e8: 90 10 00 02 mov %g2, %o0
20156ec: 30 bf ff b0 b,a 20155ac <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
20156f0: c0 2e 20 7c clrb [ %i0 + 0x7c ]
20156f4: c2 05 40 00 ld [ %l5 ], %g1
20156f8: 82 00 60 01 inc %g1
20156fc: c2 25 40 00 st %g1, [ %l5 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
2015700: d0 06 00 00 ld [ %i0 ], %o0
2015704: 40 00 0e 24 call 2018f94 <_Thread_Set_state>
2015708: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
201570c: 7f ff ff 68 call 20154ac <_Timer_server_Reset_interval_system_watchdog>
2015710: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2015714: 7f ff ff 7b call 2015500 <_Timer_server_Reset_tod_system_watchdog>
2015718: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
201571c: 40 00 0b 54 call 201846c <_Thread_Enable_dispatch>
2015720: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2015724: 90 10 00 1c mov %i4, %o0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
2015728: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
201572c: 40 00 11 64 call 2019cbc <_Watchdog_Remove>
2015730: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2015734: 40 00 11 62 call 2019cbc <_Watchdog_Remove>
2015738: 90 10 00 1d mov %i5, %o0
201573c: 30 bf ff 9c b,a 20155ac <_Timer_server_Body+0x58>