RTEMS 4.10Annotated Report
Thu May 27 18:49:28 2010
400062b4 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
400062b4: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
400062b8: 23 10 00 70 sethi %hi(0x4001c000), %l1
400062bc: e0 04 63 34 ld [ %l1 + 0x334 ], %l0 ! 4001c334 <_API_extensions_List>
400062c0: a2 14 63 34 or %l1, 0x334, %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
400062c4: a2 04 60 04 add %l1, 4, %l1
400062c8: 80 a4 00 11 cmp %l0, %l1
400062cc: 02 80 00 09 be 400062f0 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
400062d0: 01 00 00 00 nop
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
400062d4: c2 04 20 08 ld [ %l0 + 8 ], %g1
400062d8: 9f c0 40 00 call %g1
400062dc: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
400062e0: e0 04 00 00 ld [ %l0 ], %l0
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
400062e4: 80 a4 00 11 cmp %l0, %l1
400062e8: 32 bf ff fc bne,a 400062d8 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
400062ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
400062f0: 81 c7 e0 08 ret
400062f4: 81 e8 00 00 restore
400062f8 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
400062f8: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
400062fc: 23 10 00 70 sethi %hi(0x4001c000), %l1
40006300: e0 04 63 34 ld [ %l1 + 0x334 ], %l0 ! 4001c334 <_API_extensions_List>
40006304: a2 14 63 34 or %l1, 0x334, %l1
40006308: a2 04 60 04 add %l1, 4, %l1
4000630c: 80 a4 00 11 cmp %l0, %l1
40006310: 02 80 00 0a be 40006338 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
40006314: 25 10 00 70 sethi %hi(0x4001c000), %l2
40006318: a4 14 a1 ac or %l2, 0x1ac, %l2 ! 4001c1ac <_Thread_Executing>
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
4000631c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
40006320: 9f c0 40 00 call %g1
40006324: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
40006328: e0 04 00 00 ld [ %l0 ], %l0
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4000632c: 80 a4 00 11 cmp %l0, %l1
40006330: 32 bf ff fc bne,a 40006320 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN
40006334: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
40006338: 81 c7 e0 08 ret
4000633c: 81 e8 00 00 restore
40016cac <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
40016cac: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
40016cb0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
40016cb4: a0 10 00 18 mov %i0, %l0
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
40016cb8: 80 a0 40 1a cmp %g1, %i2
40016cbc: 0a 80 00 17 bcs 40016d18 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
40016cc0: b0 10 20 01 mov 1, %i0
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
40016cc4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
40016cc8: 80 a0 60 00 cmp %g1, 0
40016ccc: 02 80 00 0a be 40016cf4 <_CORE_message_queue_Broadcast+0x48>
40016cd0: a4 10 20 00 clr %l2
*count = 0;
40016cd4: c0 27 40 00 clr [ %i5 ]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
40016cd8: 81 c7 e0 08 ret
40016cdc: 91 e8 20 00 restore %g0, 0, %o0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
40016ce0: d0 04 60 2c ld [ %l1 + 0x2c ], %o0
40016ce4: 40 00 23 f0 call 4001fca4 <memcpy>
40016ce8: a4 04 a0 01 inc %l2
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
40016cec: c2 04 60 28 ld [ %l1 + 0x28 ], %g1
40016cf0: f4 20 40 00 st %i2, [ %g1 ]
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
40016cf4: 40 00 0a 4d call 40019628 <_Thread_queue_Dequeue>
40016cf8: 90 10 00 10 mov %l0, %o0
40016cfc: 92 10 00 19 mov %i1, %o1
40016d00: a2 10 00 08 mov %o0, %l1
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
40016d04: 80 a2 20 00 cmp %o0, 0
40016d08: 12 bf ff f6 bne 40016ce0 <_CORE_message_queue_Broadcast+0x34>
40016d0c: 94 10 00 1a mov %i2, %o2
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
40016d10: e4 27 40 00 st %l2, [ %i5 ]
40016d14: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
40016d18: 81 c7 e0 08 ret
40016d1c: 81 e8 00 00 restore
4001066c <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
4001066c: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
40010670: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
40010674: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
40010678: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4001067c: 80 8e e0 03 btst 3, %i3
40010680: 02 80 00 09 be 400106a4 <_CORE_message_queue_Initialize+0x38>
40010684: a2 10 00 1b mov %i3, %l1
allocated_message_size += sizeof(uint32_t);
40010688: a2 06 e0 04 add %i3, 4, %l1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4001068c: a2 0c 7f fc and %l1, -4, %l1
}
if (allocated_message_size < maximum_message_size)
40010690: 80 a6 c0 11 cmp %i3, %l1
40010694: 08 80 00 05 bleu 400106a8 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN
40010698: a0 04 60 10 add %l1, 0x10, %l0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
4001069c: 81 c7 e0 08 ret
400106a0: 91 e8 20 00 restore %g0, 0, %o0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
400106a4: a0 04 60 10 add %l1, 0x10, %l0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
400106a8: 92 10 00 1a mov %i2, %o1
400106ac: 40 00 4c 9b call 40023918 <.umul>
400106b0: 90 10 00 10 mov %l0, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
400106b4: 80 a2 00 11 cmp %o0, %l1
400106b8: 0a bf ff f9 bcs 4001069c <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN
400106bc: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
400106c0: 40 00 0c 23 call 4001374c <_Workspace_Allocate>
400106c4: 01 00 00 00 nop
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
400106c8: 80 a2 20 00 cmp %o0, 0
400106cc: 02 bf ff f4 be 4001069c <_CORE_message_queue_Initialize+0x30>
400106d0: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
400106d4: 92 10 00 08 mov %o0, %o1
400106d8: 94 10 00 1a mov %i2, %o2
400106dc: 90 06 20 60 add %i0, 0x60, %o0
400106e0: 40 00 14 8a call 40015908 <_Chain_Initialize>
400106e4: 96 10 00 10 mov %l0, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
400106e8: c2 06 40 00 ld [ %i1 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
400106ec: c0 26 20 54 clr [ %i0 + 0x54 ]
400106f0: 82 18 60 01 xor %g1, 1, %g1
400106f4: 80 a0 00 01 cmp %g0, %g1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
400106f8: 82 06 20 54 add %i0, 0x54, %g1
400106fc: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
40010700: 82 06 20 50 add %i0, 0x50, %g1
40010704: 90 10 00 18 mov %i0, %o0
40010708: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
4001070c: 92 60 3f ff subx %g0, -1, %o1
40010710: 94 10 20 80 mov 0x80, %o2
40010714: 96 10 20 06 mov 6, %o3
40010718: 40 00 08 cc call 40012a48 <_Thread_queue_Initialize>
4001071c: b0 10 20 01 mov 1, %i0
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
40010720: 81 c7 e0 08 ret
40010724: 81 e8 00 00 restore
400065ec <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
400065ec: 9d e3 bf a0 save %sp, -96, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
400065f0: 21 10 00 70 sethi %hi(0x4001c000), %l0
400065f4: c2 04 20 f0 ld [ %l0 + 0xf0 ], %g1 ! 4001c0f0 <_Thread_Dispatch_disable_level>
400065f8: 80 a0 60 00 cmp %g1, 0
400065fc: 02 80 00 05 be 40006610 <_CORE_mutex_Seize+0x24>
40006600: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
40006604: 80 8e a0 ff btst 0xff, %i2
40006608: 12 80 00 1a bne 40006670 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN
4000660c: 03 10 00 70 sethi %hi(0x4001c000), %g1
40006610: 90 10 00 18 mov %i0, %o0
40006614: 40 00 14 33 call 4000b6e0 <_CORE_mutex_Seize_interrupt_trylock>
40006618: 92 07 a0 54 add %fp, 0x54, %o1
4000661c: 80 a2 20 00 cmp %o0, 0
40006620: 02 80 00 12 be 40006668 <_CORE_mutex_Seize+0x7c>
40006624: 80 8e a0 ff btst 0xff, %i2
40006628: 02 80 00 1a be 40006690 <_CORE_mutex_Seize+0xa4>
4000662c: 01 00 00 00 nop
40006630: c4 04 20 f0 ld [ %l0 + 0xf0 ], %g2
40006634: 03 10 00 70 sethi %hi(0x4001c000), %g1
40006638: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001c1ac <_Thread_Executing>
4000663c: f2 20 60 20 st %i1, [ %g1 + 0x20 ]
40006640: f0 20 60 44 st %i0, [ %g1 + 0x44 ]
40006644: 82 00 a0 01 add %g2, 1, %g1
40006648: c2 24 20 f0 st %g1, [ %l0 + 0xf0 ]
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;
4000664c: 82 10 20 01 mov 1, %g1
40006650: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
40006654: 7f ff ed a6 call 40001cec <sparc_enable_interrupts>
40006658: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
4000665c: 90 10 00 18 mov %i0, %o0
40006660: 7f ff ff c0 call 40006560 <_CORE_mutex_Seize_interrupt_blocking>
40006664: 92 10 00 1b mov %i3, %o1
40006668: 81 c7 e0 08 ret
4000666c: 81 e8 00 00 restore
40006670: c2 00 62 90 ld [ %g1 + 0x290 ], %g1
40006674: 80 a0 60 01 cmp %g1, 1
40006678: 28 bf ff e7 bleu,a 40006614 <_CORE_mutex_Seize+0x28>
4000667c: 90 10 00 18 mov %i0, %o0
40006680: 90 10 20 00 clr %o0
40006684: 92 10 20 00 clr %o1
40006688: 40 00 01 a6 call 40006d20 <_Internal_error_Occurred>
4000668c: 94 10 20 13 mov 0x13, %o2
40006690: 7f ff ed 97 call 40001cec <sparc_enable_interrupts>
40006694: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
40006698: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000669c: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001c1ac <_Thread_Executing>
400066a0: 84 10 20 01 mov 1, %g2
400066a4: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
400066a8: 81 c7 e0 08 ret
400066ac: 81 e8 00 00 restore
4000b6e0 <_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
)
{
4000b6e0: 9d e3 bf a0 save %sp, -96, %sp
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
4000b6e4: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000b6e8: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001c1ac <_Thread_Executing>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4000b6ec: c0 20 60 34 clr [ %g1 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4000b6f0: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
4000b6f4: 80 a0 a0 00 cmp %g2, 0
4000b6f8: 22 80 00 13 be,a 4000b744 <_CORE_mutex_Seize_interrupt_trylock+0x64>
4000b6fc: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
the_mutex->lock = CORE_MUTEX_LOCKED;
4000b700: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
4000b704: 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;
4000b708: 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;
4000b70c: 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;
4000b710: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4000b714: 86 10 20 01 mov 1, %g3
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4000b718: 80 a0 a0 02 cmp %g2, 2
4000b71c: 02 80 00 0f be 4000b758 <_CORE_mutex_Seize_interrupt_trylock+0x78>
4000b720: c6 26 20 54 st %g3, [ %i0 + 0x54 ]
4000b724: 80 a0 a0 03 cmp %g2, 3
4000b728: 22 80 00 1f be,a 4000b7a4 <_CORE_mutex_Seize_interrupt_trylock+0xc4>
4000b72c: da 00 60 1c ld [ %g1 + 0x1c ], %o5
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4000b730: d0 06 40 00 ld [ %i1 ], %o0
4000b734: 7f ff d9 6e call 40001cec <sparc_enable_interrupts>
4000b738: b0 10 20 00 clr %i0
4000b73c: 81 c7 e0 08 ret
4000b740: 81 e8 00 00 restore
/*
* 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 ) ) {
4000b744: 80 a0 40 02 cmp %g1, %g2
4000b748: 22 80 00 0c be,a 4000b778 <_CORE_mutex_Seize_interrupt_trylock+0x98>
4000b74c: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
4000b750: 81 c7 e0 08 ret
4000b754: 91 e8 20 01 restore %g0, 1, %o0
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4000b758: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
4000b75c: 84 00 a0 01 inc %g2
4000b760: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4000b764: d0 06 40 00 ld [ %i1 ], %o0
4000b768: 7f ff d9 61 call 40001cec <sparc_enable_interrupts>
4000b76c: b0 10 20 00 clr %i0
4000b770: 81 c7 e0 08 ret
4000b774: 81 e8 00 00 restore
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4000b778: 80 a0 a0 00 cmp %g2, 0
4000b77c: 12 80 00 2b bne 4000b828 <_CORE_mutex_Seize_interrupt_trylock+0x148>
4000b780: 80 a0 a0 01 cmp %g2, 1
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
4000b784: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
4000b788: 82 00 60 01 inc %g1
4000b78c: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( *level_p );
4000b790: d0 06 40 00 ld [ %i1 ], %o0
4000b794: 7f ff d9 56 call 40001cec <sparc_enable_interrupts>
4000b798: b0 10 20 00 clr %i0
4000b79c: 81 c7 e0 08 ret
4000b7a0: 81 e8 00 00 restore
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
4000b7a4: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4000b7a8: 88 03 60 01 add %o5, 1, %g4
4000b7ac: c8 20 60 1c st %g4, [ %g1 + 0x1c ]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
4000b7b0: c8 06 20 4c ld [ %i0 + 0x4c ], %g4
current = executing->current_priority;
if ( current == ceiling ) {
4000b7b4: 80 a1 00 02 cmp %g4, %g2
4000b7b8: 02 80 00 24 be 4000b848 <_CORE_mutex_Seize_interrupt_trylock+0x168>
4000b7bc: 01 00 00 00 nop
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
4000b7c0: 1a 80 00 11 bcc 4000b804 <_CORE_mutex_Seize_interrupt_trylock+0x124>
4000b7c4: 84 10 20 06 mov 6, %g2 ! 6 <PROM_START+0x6>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4000b7c8: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000b7cc: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
4000b7d0: 84 00 a0 01 inc %g2
4000b7d4: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
4000b7d8: 7f ff d9 45 call 40001cec <sparc_enable_interrupts>
4000b7dc: d0 06 40 00 ld [ %i1 ], %o0
_Thread_Change_priority(
4000b7e0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
4000b7e4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
4000b7e8: 94 10 20 00 clr %o2
4000b7ec: 7f ff ef b8 call 400076cc <_Thread_Change_priority>
4000b7f0: b0 10 20 00 clr %i0
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
4000b7f4: 7f ff f1 36 call 40007ccc <_Thread_Enable_dispatch>
4000b7f8: 01 00 00 00 nop
4000b7fc: 81 c7 e0 08 ret
4000b800: 81 e8 00 00 restore
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4000b804: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4000b808: c6 26 20 50 st %g3, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
4000b80c: c0 26 20 54 clr [ %i0 + 0x54 ]
executing->resource_count--; /* undo locking above */
4000b810: da 20 60 1c st %o5, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
4000b814: d0 06 40 00 ld [ %i1 ], %o0
4000b818: 7f ff d9 35 call 40001cec <sparc_enable_interrupts>
4000b81c: b0 10 20 00 clr %i0
4000b820: 81 c7 e0 08 ret
4000b824: 81 e8 00 00 restore
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4000b828: 12 bf ff ca bne 4000b750 <_CORE_mutex_Seize_interrupt_trylock+0x70><== ALWAYS TAKEN
4000b82c: 84 10 20 02 mov 2, %g2
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;
4000b830: c4 20 60 34 st %g2, [ %g1 + 0x34 ] <== NOT EXECUTED
_ISR_Enable( *level_p );
4000b834: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
4000b838: 7f ff d9 2d call 40001cec <sparc_enable_interrupts> <== NOT EXECUTED
4000b83c: b0 10 20 00 clr %i0 <== NOT EXECUTED
4000b840: 81 c7 e0 08 ret <== NOT EXECUTED
4000b844: 81 e8 00 00 restore <== NOT EXECUTED
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
4000b848: d0 06 40 00 ld [ %i1 ], %o0
4000b84c: 7f ff d9 28 call 40001cec <sparc_enable_interrupts>
4000b850: b0 10 20 00 clr %i0
4000b854: 81 c7 e0 08 ret
4000b858: 81 e8 00 00 restore
4000684c <_CORE_semaphore_Surrender>:
CORE_semaphore_Status _CORE_semaphore_Surrender(
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
)
{
4000684c: 9d e3 bf a0 save %sp, -96, %sp
40006850: a0 10 00 18 mov %i0, %l0
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
40006854: b0 10 20 00 clr %i0
40006858: 40 00 06 05 call 4000806c <_Thread_queue_Dequeue>
4000685c: 90 10 00 10 mov %l0, %o0
40006860: 80 a2 20 00 cmp %o0, 0
40006864: 02 80 00 04 be 40006874 <_CORE_semaphore_Surrender+0x28>
40006868: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
4000686c: 81 c7 e0 08 ret
40006870: 81 e8 00 00 restore
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
40006874: 7f ff ed 1a call 40001cdc <sparc_disable_interrupts>
40006878: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
4000687c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
40006880: c4 04 20 40 ld [ %l0 + 0x40 ], %g2
40006884: 80 a0 40 02 cmp %g1, %g2
40006888: 1a 80 00 05 bcc 4000689c <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
4000688c: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
40006890: 82 00 60 01 inc %g1
40006894: b0 10 20 00 clr %i0
40006898: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
4000689c: 7f ff ed 14 call 40001cec <sparc_enable_interrupts>
400068a0: 01 00 00 00 nop
}
return status;
}
400068a4: 81 c7 e0 08 ret
400068a8: 81 e8 00 00 restore
4000b6a8 <_Chain_Initialize>:
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
4000b6a8: c0 22 20 04 clr [ %o0 + 4 ]
next = starting_address;
while ( count-- ) {
4000b6ac: 80 a2 a0 00 cmp %o2, 0
4000b6b0: 02 80 00 08 be 4000b6d0 <_Chain_Initialize+0x28> <== NEVER TAKEN
4000b6b4: 82 10 00 08 mov %o0, %g1
current->next = next;
next->previous = current;
4000b6b8: c2 22 60 04 st %g1, [ %o1 + 4 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
4000b6bc: d2 20 40 00 st %o1, [ %g1 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4000b6c0: 94 82 bf ff addcc %o2, -1, %o2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
4000b6c4: 82 10 00 09 mov %o1, %g1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4000b6c8: 12 bf ff fc bne 4000b6b8 <_Chain_Initialize+0x10>
4000b6cc: 92 02 40 0b add %o1, %o3, %o1
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
4000b6d0: 84 02 20 04 add %o0, 4, %g2
4000b6d4: c4 20 40 00 st %g2, [ %g1 ]
the_chain->last = current;
}
4000b6d8: 81 c3 e0 08 retl
4000b6dc: c2 22 20 08 st %g1, [ %o0 + 8 ]
40005428 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
40005428: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
4000542c: 03 10 00 70 sethi %hi(0x4001c000), %g1
40005430: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001c1ac <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
40005434: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
40005438: 7f ff f2 29 call 40001cdc <sparc_disable_interrupts>
4000543c: e4 04 21 5c ld [ %l0 + 0x15c ], %l2
pending_events = api->pending_events;
40005440: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
40005444: a2 8e 00 01 andcc %i0, %g1, %l1
40005448: 02 80 00 07 be 40005464 <_Event_Seize+0x3c>
4000544c: 80 8e 60 01 btst 1, %i1
40005450: 80 a6 00 11 cmp %i0, %l1
40005454: 02 80 00 23 be 400054e0 <_Event_Seize+0xb8>
40005458: 80 8e 60 02 btst 2, %i1
4000545c: 12 80 00 21 bne 400054e0 <_Event_Seize+0xb8> <== ALWAYS TAKEN
40005460: 80 8e 60 01 btst 1, %i1
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
40005464: 12 80 00 18 bne 400054c4 <_Event_Seize+0x9c>
40005468: 82 10 20 01 mov 1, %g1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
4000546c: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
executing->Wait.count = (uint32_t) event_in;
40005470: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
40005474: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40005478: 33 10 00 70 sethi %hi(0x4001c000), %i1
4000547c: c2 26 63 78 st %g1, [ %i1 + 0x378 ] ! 4001c378 <_Event_Sync_state>
_ISR_Enable( level );
40005480: 7f ff f2 1b call 40001cec <sparc_enable_interrupts>
40005484: 01 00 00 00 nop
if ( ticks ) {
40005488: 80 a6 a0 00 cmp %i2, 0
4000548c: 32 80 00 1c bne,a 400054fc <_Event_Seize+0xd4>
40005490: c2 04 20 08 ld [ %l0 + 8 ], %g1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
40005494: 90 10 00 10 mov %l0, %o0
40005498: 40 00 0c 76 call 40008670 <_Thread_Set_state>
4000549c: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
400054a0: 7f ff f2 0f call 40001cdc <sparc_disable_interrupts>
400054a4: 01 00 00 00 nop
sync_state = _Event_Sync_state;
400054a8: f0 06 63 78 ld [ %i1 + 0x378 ], %i0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
400054ac: c0 26 63 78 clr [ %i1 + 0x378 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
400054b0: 80 a6 20 01 cmp %i0, 1
400054b4: 02 80 00 1f be 40005530 <_Event_Seize+0x108>
400054b8: b2 10 00 10 mov %l0, %i1
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
400054bc: 40 00 08 6d call 40007670 <_Thread_blocking_operation_Cancel>
400054c0: 95 e8 00 08 restore %g0, %o0, %o2
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
400054c4: 7f ff f2 0a call 40001cec <sparc_enable_interrupts>
400054c8: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
400054cc: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
400054d0: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
400054d4: e2 26 c0 00 st %l1, [ %i3 ]
400054d8: 81 c7 e0 08 ret
400054dc: 81 e8 00 00 restore
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
400054e0: 82 28 40 11 andn %g1, %l1, %g1
400054e4: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
400054e8: 7f ff f2 01 call 40001cec <sparc_enable_interrupts>
400054ec: 01 00 00 00 nop
*event_out = seized_events;
400054f0: e2 26 c0 00 st %l1, [ %i3 ]
return;
400054f4: 81 c7 e0 08 ret
400054f8: 81 e8 00 00 restore
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
400054fc: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
40005500: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40005504: 03 10 00 15 sethi %hi(0x40005400), %g1
40005508: 82 10 62 dc or %g1, 0x2dc, %g1 ! 400056dc <_Event_Timeout>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4000550c: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40005510: c0 24 20 6c clr [ %l0 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40005514: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40005518: 11 10 00 70 sethi %hi(0x4001c000), %o0
4000551c: 92 04 20 48 add %l0, 0x48, %o1
40005520: 40 00 0e 59 call 40008e84 <_Watchdog_Insert>
40005524: 90 12 21 cc or %o0, 0x1cc, %o0
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
40005528: 10 bf ff dc b 40005498 <_Event_Seize+0x70>
4000552c: 90 10 00 10 mov %l0, %o0
_ISR_Disable( level );
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
_ISR_Enable( level );
40005530: 7f ff f1 ef call 40001cec <sparc_enable_interrupts>
40005534: 91 e8 00 08 restore %g0, %o0, %o0
40005594 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
40005594: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
40005598: e0 06 21 5c ld [ %i0 + 0x15c ], %l0
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
4000559c: 7f ff f1 d0 call 40001cdc <sparc_disable_interrupts>
400055a0: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
400055a4: a2 10 00 08 mov %o0, %l1
pending_events = api->pending_events;
400055a8: c4 04 00 00 ld [ %l0 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
400055ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
400055b0: 86 88 40 02 andcc %g1, %g2, %g3
400055b4: 02 80 00 3e be 400056ac <_Event_Surrender+0x118>
400055b8: 09 10 00 70 sethi %hi(0x4001c000), %g4
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
400055bc: c8 01 21 88 ld [ %g4 + 0x188 ], %g4 ! 4001c188 <_ISR_Nest_level>
400055c0: 80 a1 20 00 cmp %g4, 0
400055c4: 12 80 00 1d bne 40005638 <_Event_Surrender+0xa4>
400055c8: 09 10 00 70 sethi %hi(0x4001c000), %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
400055cc: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
400055d0: 80 89 21 00 btst 0x100, %g4
400055d4: 02 80 00 34 be 400056a4 <_Event_Surrender+0x110>
400055d8: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
400055dc: 02 80 00 04 be 400055ec <_Event_Surrender+0x58>
400055e0: 80 8c a0 02 btst 2, %l2
400055e4: 02 80 00 30 be 400056a4 <_Event_Surrender+0x110> <== NEVER TAKEN
400055e8: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
400055ec: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
400055f0: 84 28 80 03 andn %g2, %g3, %g2
400055f4: c4 24 00 00 st %g2, [ %l0 ]
the_thread->Wait.count = 0;
400055f8: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
400055fc: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
40005600: 7f ff f1 bb call 40001cec <sparc_enable_interrupts>
40005604: 90 10 00 11 mov %l1, %o0
40005608: 7f ff f1 b5 call 40001cdc <sparc_disable_interrupts>
4000560c: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
40005610: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
40005614: 80 a0 60 02 cmp %g1, 2
40005618: 02 80 00 27 be 400056b4 <_Event_Surrender+0x120>
4000561c: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
40005620: 90 10 00 11 mov %l1, %o0
40005624: 7f ff f1 b2 call 40001cec <sparc_enable_interrupts>
40005628: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4000562c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
40005630: 40 00 08 ab call 400078dc <_Thread_Clear_state>
40005634: 81 e8 00 00 restore
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
40005638: c8 01 21 ac ld [ %g4 + 0x1ac ], %g4
4000563c: 80 a6 00 04 cmp %i0, %g4
40005640: 32 bf ff e4 bne,a 400055d0 <_Event_Surrender+0x3c>
40005644: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
40005648: 09 10 00 70 sethi %hi(0x4001c000), %g4
4000564c: da 01 23 78 ld [ %g4 + 0x378 ], %o5 ! 4001c378 <_Event_Sync_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
40005650: 80 a3 60 02 cmp %o5, 2
40005654: 02 80 00 07 be 40005670 <_Event_Surrender+0xdc> <== NEVER TAKEN
40005658: 80 a0 40 03 cmp %g1, %g3
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4000565c: da 01 23 78 ld [ %g4 + 0x378 ], %o5
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
40005660: 80 a3 60 01 cmp %o5, 1
40005664: 32 bf ff db bne,a 400055d0 <_Event_Surrender+0x3c>
40005668: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
4000566c: 80 a0 40 03 cmp %g1, %g3
40005670: 02 80 00 04 be 40005680 <_Event_Surrender+0xec>
40005674: 80 8c a0 02 btst 2, %l2
40005678: 02 80 00 09 be 4000569c <_Event_Surrender+0x108> <== NEVER TAKEN
4000567c: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40005680: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
40005684: 84 28 80 03 andn %g2, %g3, %g2
40005688: c4 24 00 00 st %g2, [ %l0 ]
the_thread->Wait.count = 0;
4000568c: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40005690: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
40005694: 82 10 20 03 mov 3, %g1
40005698: c2 21 23 78 st %g1, [ %g4 + 0x378 ]
}
_ISR_Enable( level );
4000569c: 7f ff f1 94 call 40001cec <sparc_enable_interrupts>
400056a0: 91 e8 00 11 restore %g0, %l1, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
400056a4: 7f ff f1 92 call 40001cec <sparc_enable_interrupts>
400056a8: 91 e8 00 11 restore %g0, %l1, %o0
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
400056ac: 7f ff f1 90 call 40001cec <sparc_enable_interrupts>
400056b0: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
400056b4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
400056b8: 7f ff f1 8d call 40001cec <sparc_enable_interrupts>
400056bc: 90 10 00 11 mov %l1, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
400056c0: 40 00 0e 5e call 40009038 <_Watchdog_Remove>
400056c4: 90 06 20 48 add %i0, 0x48, %o0
400056c8: 33 04 00 ff sethi %hi(0x1003fc00), %i1
400056cc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
400056d0: 40 00 08 83 call 400078dc <_Thread_Clear_state>
400056d4: 81 e8 00 00 restore
400056dc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
400056dc: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
400056e0: 90 10 00 18 mov %i0, %o0
400056e4: 40 00 09 88 call 40007d04 <_Thread_Get>
400056e8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
400056ec: c2 07 bf fc ld [ %fp + -4 ], %g1
400056f0: 80 a0 60 00 cmp %g1, 0
400056f4: 12 80 00 15 bne 40005748 <_Event_Timeout+0x6c> <== NEVER TAKEN
400056f8: a0 10 00 08 mov %o0, %l0
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
400056fc: 7f ff f1 78 call 40001cdc <sparc_disable_interrupts>
40005700: 01 00 00 00 nop
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
40005704: 03 10 00 70 sethi %hi(0x4001c000), %g1
40005708: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001c1ac <_Thread_Executing>
4000570c: 80 a4 00 01 cmp %l0, %g1
40005710: 02 80 00 10 be 40005750 <_Event_Timeout+0x74>
40005714: c0 24 20 24 clr [ %l0 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
40005718: 82 10 20 06 mov 6, %g1
4000571c: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
_ISR_Enable( level );
40005720: 7f ff f1 73 call 40001cec <sparc_enable_interrupts>
40005724: 01 00 00 00 nop
40005728: 90 10 00 10 mov %l0, %o0
4000572c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
40005730: 40 00 08 6b call 400078dc <_Thread_Clear_state>
40005734: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
40005738: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000573c: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
40005740: 84 00 bf ff add %g2, -1, %g2
40005744: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
40005748: 81 c7 e0 08 ret
4000574c: 81 e8 00 00 restore
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
40005750: 03 10 00 70 sethi %hi(0x4001c000), %g1
40005754: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 4001c378 <_Event_Sync_state>
40005758: 80 a0 a0 01 cmp %g2, 1
4000575c: 32 bf ff f0 bne,a 4000571c <_Event_Timeout+0x40>
40005760: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
40005764: 84 10 20 02 mov 2, %g2
40005768: c4 20 63 78 st %g2, [ %g1 + 0x378 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
4000576c: 10 bf ff ec b 4000571c <_Event_Timeout+0x40>
40005770: 82 10 20 06 mov 6, %g1
4000b954 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4000b954: 9d e3 bf 98 save %sp, -104, %sp
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
4000b958: a8 06 60 04 add %i1, 4, %l4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4000b95c: a0 10 00 18 mov %i0, %l0
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4000b960: 80 a6 40 14 cmp %i1, %l4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4000b964: e4 06 20 08 ld [ %i0 + 8 ], %l2
4000b968: 18 80 00 72 bgu 4000bb30 <_Heap_Allocate_aligned_with_boundary+0x1dc>
4000b96c: fa 06 20 10 ld [ %i0 + 0x10 ], %i5
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4000b970: 80 a6 e0 00 cmp %i3, 0
4000b974: 12 80 00 6d bne 4000bb28 <_Heap_Allocate_aligned_with_boundary+0x1d4>
4000b978: 80 a6 40 1b cmp %i1, %i3
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4000b97c: 80 a4 00 12 cmp %l0, %l2
4000b980: 02 80 00 6f be 4000bb3c <_Heap_Allocate_aligned_with_boundary+0x1e8>
4000b984: a2 10 20 00 clr %l1
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000b988: 82 10 20 04 mov 4, %g1
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4000b98c: b8 07 60 07 add %i5, 7, %i4
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000b990: 82 20 40 19 sub %g1, %i1, %g1
4000b994: 10 80 00 09 b 4000b9b8 <_Heap_Allocate_aligned_with_boundary+0x64>
4000b998: c2 27 bf fc st %g1, [ %fp + -4 ]
boundary
);
}
}
if ( alloc_begin != 0 ) {
4000b99c: 80 a6 20 00 cmp %i0, 0
4000b9a0: 32 80 00 54 bne,a 4000baf0 <_Heap_Allocate_aligned_with_boundary+0x19c><== ALWAYS TAKEN
4000b9a4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
break;
}
block = block->next;
4000b9a8: e4 04 a0 08 ld [ %l2 + 8 ], %l2
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4000b9ac: 80 a4 00 12 cmp %l0, %l2
4000b9b0: 22 80 00 57 be,a 4000bb0c <_Heap_Allocate_aligned_with_boundary+0x1b8>
4000b9b4: b0 10 20 00 clr %i0
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4000b9b8: e6 04 a0 04 ld [ %l2 + 4 ], %l3
4000b9bc: 80 a5 00 13 cmp %l4, %l3
4000b9c0: 1a bf ff fa bcc 4000b9a8 <_Heap_Allocate_aligned_with_boundary+0x54>
4000b9c4: a2 04 60 01 inc %l1
if ( alignment == 0 ) {
4000b9c8: 80 a6 a0 00 cmp %i2, 0
4000b9cc: 02 bf ff f4 be 4000b99c <_Heap_Allocate_aligned_with_boundary+0x48>
4000b9d0: b0 04 a0 08 add %l2, 8, %i0
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000b9d4: c2 07 bf fc ld [ %fp + -4 ], %g1
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4000b9d8: ee 04 20 14 ld [ %l0 + 0x14 ], %l7
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4000b9dc: a6 0c ff fe and %l3, -2, %l3
4000b9e0: a6 04 80 13 add %l2, %l3, %l3
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000b9e4: b0 00 40 13 add %g1, %l3, %i0
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4000b9e8: 82 27 00 17 sub %i4, %l7, %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4000b9ec: 90 10 00 18 mov %i0, %o0
4000b9f0: a6 00 40 13 add %g1, %l3, %l3
4000b9f4: 40 00 2f 8f call 40017830 <.urem>
4000b9f8: 92 10 00 1a mov %i2, %o1
4000b9fc: b0 26 00 08 sub %i0, %o0, %i0
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4000ba00: 80 a4 c0 18 cmp %l3, %i0
4000ba04: 1a 80 00 06 bcc 4000ba1c <_Heap_Allocate_aligned_with_boundary+0xc8>
4000ba08: ac 04 a0 08 add %l2, 8, %l6
4000ba0c: 90 10 00 13 mov %l3, %o0
4000ba10: 40 00 2f 88 call 40017830 <.urem>
4000ba14: 92 10 00 1a mov %i2, %o1
4000ba18: b0 24 c0 08 sub %l3, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4000ba1c: 80 a6 e0 00 cmp %i3, 0
4000ba20: 02 80 00 24 be 4000bab0 <_Heap_Allocate_aligned_with_boundary+0x15c>
4000ba24: 80 a5 80 18 cmp %l6, %i0
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4000ba28: a6 06 00 19 add %i0, %i1, %l3
4000ba2c: 92 10 00 1b mov %i3, %o1
4000ba30: 40 00 2f 80 call 40017830 <.urem>
4000ba34: 90 10 00 13 mov %l3, %o0
4000ba38: 90 24 c0 08 sub %l3, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4000ba3c: 80 a4 c0 08 cmp %l3, %o0
4000ba40: 08 80 00 1b bleu 4000baac <_Heap_Allocate_aligned_with_boundary+0x158>
4000ba44: 80 a6 00 08 cmp %i0, %o0
4000ba48: 1a 80 00 1a bcc 4000bab0 <_Heap_Allocate_aligned_with_boundary+0x15c>
4000ba4c: 80 a5 80 18 cmp %l6, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4000ba50: aa 05 80 19 add %l6, %i1, %l5
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4000ba54: 80 a5 40 08 cmp %l5, %o0
4000ba58: 28 80 00 09 bleu,a 4000ba7c <_Heap_Allocate_aligned_with_boundary+0x128>
4000ba5c: b0 22 00 19 sub %o0, %i1, %i0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
4000ba60: 10 bf ff d3 b 4000b9ac <_Heap_Allocate_aligned_with_boundary+0x58>
4000ba64: e4 04 a0 08 ld [ %l2 + 8 ], %l2
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4000ba68: 1a 80 00 11 bcc 4000baac <_Heap_Allocate_aligned_with_boundary+0x158>
4000ba6c: 80 a5 40 08 cmp %l5, %o0
if ( boundary_line < boundary_floor ) {
4000ba70: 38 bf ff cf bgu,a 4000b9ac <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN
4000ba74: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED
return 0;
}
alloc_begin = boundary_line - alloc_size;
4000ba78: b0 22 00 19 sub %o0, %i1, %i0
4000ba7c: 92 10 00 1a mov %i2, %o1
4000ba80: 40 00 2f 6c call 40017830 <.urem>
4000ba84: 90 10 00 18 mov %i0, %o0
4000ba88: 92 10 00 1b mov %i3, %o1
4000ba8c: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4000ba90: a6 06 00 19 add %i0, %i1, %l3
4000ba94: 40 00 2f 67 call 40017830 <.urem>
4000ba98: 90 10 00 13 mov %l3, %o0
4000ba9c: 90 24 c0 08 sub %l3, %o0, %o0
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4000baa0: 80 a4 c0 08 cmp %l3, %o0
4000baa4: 18 bf ff f1 bgu 4000ba68 <_Heap_Allocate_aligned_with_boundary+0x114>
4000baa8: 80 a6 00 08 cmp %i0, %o0
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4000baac: 80 a5 80 18 cmp %l6, %i0
4000bab0: 18 bf ff be bgu 4000b9a8 <_Heap_Allocate_aligned_with_boundary+0x54>
4000bab4: 82 10 3f f8 mov -8, %g1
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4000bab8: 90 10 00 18 mov %i0, %o0
4000babc: a6 20 40 12 sub %g1, %l2, %l3
4000bac0: 92 10 00 1d mov %i5, %o1
4000bac4: 40 00 2f 5b call 40017830 <.urem>
4000bac8: a6 04 c0 18 add %l3, %i0, %l3
if ( free_size >= min_block_size || free_size == 0 ) {
4000bacc: 90 a4 c0 08 subcc %l3, %o0, %o0
4000bad0: 02 bf ff b4 be 4000b9a0 <_Heap_Allocate_aligned_with_boundary+0x4c>
4000bad4: 80 a6 20 00 cmp %i0, 0
4000bad8: 80 a5 c0 08 cmp %l7, %o0
4000badc: 18 bf ff b3 bgu 4000b9a8 <_Heap_Allocate_aligned_with_boundary+0x54>
4000bae0: 80 a6 20 00 cmp %i0, 0
boundary
);
}
}
if ( alloc_begin != 0 ) {
4000bae4: 22 bf ff b2 be,a 4000b9ac <_Heap_Allocate_aligned_with_boundary+0x58><== NEVER TAKEN
4000bae8: e4 04 a0 08 ld [ %l2 + 8 ], %l2 <== NOT EXECUTED
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4000baec: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000baf0: 92 10 00 12 mov %l2, %o1
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4000baf4: 82 00 40 11 add %g1, %l1, %g1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000baf8: 96 10 00 19 mov %i1, %o3
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4000bafc: c2 24 20 4c st %g1, [ %l0 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000bb00: 90 10 00 10 mov %l0, %o0
4000bb04: 7f ff ec 36 call 40006bdc <_Heap_Block_allocate>
4000bb08: 94 10 00 18 mov %i0, %o2
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4000bb0c: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
4000bb10: 80 a0 40 11 cmp %g1, %l1
4000bb14: 1a 80 00 08 bcc 4000bb34 <_Heap_Allocate_aligned_with_boundary+0x1e0>
4000bb18: 01 00 00 00 nop
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4000bb1c: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
4000bb20: 81 c7 e0 08 ret
4000bb24: 81 e8 00 00 restore
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4000bb28: 08 80 00 07 bleu 4000bb44 <_Heap_Allocate_aligned_with_boundary+0x1f0>
4000bb2c: 80 a6 a0 00 cmp %i2, 0
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4000bb30: b0 10 20 00 clr %i0
}
return (void *) alloc_begin;
}
4000bb34: 81 c7 e0 08 ret
4000bb38: 81 e8 00 00 restore
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4000bb3c: 10 bf ff f4 b 4000bb0c <_Heap_Allocate_aligned_with_boundary+0x1b8>
4000bb40: b0 10 20 00 clr %i0
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4000bb44: 22 bf ff 8e be,a 4000b97c <_Heap_Allocate_aligned_with_boundary+0x28>
4000bb48: b4 10 00 1d mov %i5, %i2
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4000bb4c: 10 bf ff 8d b 4000b980 <_Heap_Allocate_aligned_with_boundary+0x2c>
4000bb50: 80 a4 00 12 cmp %l0, %l2
40011308 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
40011308: 9d e3 bf a0 save %sp, -96, %sp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
4001130c: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
40011310: a0 10 00 18 mov %i0, %l0
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
40011314: 80 a6 40 01 cmp %i1, %g1
40011318: 0a 80 00 2a bcs 400113c0 <_Heap_Extend+0xb8>
4001131c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
40011320: 80 a6 40 01 cmp %i1, %g1
40011324: 12 80 00 25 bne 400113b8 <_Heap_Extend+0xb0>
40011328: b0 10 20 02 mov 2, %i0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4001132c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
40011330: b4 06 40 1a add %i1, %i2, %i2
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
40011334: b2 26 80 11 sub %i2, %l1, %i1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
40011338: f4 24 20 1c st %i2, [ %l0 + 0x1c ]
extend_size = new_heap_area_end
4001133c: b2 06 7f f8 add %i1, -8, %i1
40011340: 7f ff cb fc call 40004330 <.urem>
40011344: 90 10 00 19 mov %i1, %o0
40011348: 90 26 40 08 sub %i1, %o0, %o0
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
4001134c: d0 26 c0 00 st %o0, [ %i3 ]
if( extend_size >= heap->min_block_size ) {
40011350: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
40011354: 80 a0 40 08 cmp %g1, %o0
40011358: 18 80 00 18 bgu 400113b8 <_Heap_Extend+0xb0> <== NEVER TAKEN
4001135c: b0 10 20 00 clr %i0
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
40011360: c2 04 60 04 ld [ %l1 + 4 ], %g1
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
40011364: c4 04 20 20 ld [ %l0 + 0x20 ], %g2
40011368: 82 08 60 01 and %g1, 1, %g1
4001136c: 82 12 00 01 or %o0, %g1, %g1
40011370: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40011374: 82 02 00 11 add %o0, %l1, %g1
40011378: 84 20 80 01 sub %g2, %g1, %g2
4001137c: 84 10 a0 01 or %g2, 1, %g2
40011380: c4 20 60 04 st %g2, [ %g1 + 4 ]
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
40011384: c6 04 20 40 ld [ %l0 + 0x40 ], %g3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
40011388: f2 04 20 2c ld [ %l0 + 0x2c ], %i1
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
4001138c: c4 04 20 50 ld [ %l0 + 0x50 ], %g2
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
40011390: c2 24 20 24 st %g1, [ %l0 + 0x24 ]
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
40011394: 82 00 e0 01 add %g3, 1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
40011398: 90 06 40 08 add %i1, %o0, %o0
++stats->used_blocks;
4001139c: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
--stats->frees; /* Do not count subsequent call as actual free() */
400113a0: 82 00 bf ff add %g2, -1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
400113a4: d0 24 20 2c st %o0, [ %l0 + 0x2c ]
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
400113a8: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
400113ac: 90 10 00 10 mov %l0, %o0
400113b0: 7f ff e9 70 call 4000b970 <_Heap_Free>
400113b4: 92 04 60 08 add %l1, 8, %o1
}
return HEAP_EXTEND_SUCCESSFUL;
}
400113b8: 81 c7 e0 08 ret
400113bc: 81 e8 00 00 restore
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
400113c0: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
400113c4: 80 a6 40 02 cmp %i1, %g2
400113c8: 0a bf ff d6 bcs 40011320 <_Heap_Extend+0x18>
400113cc: b0 10 20 01 mov 1, %i0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
400113d0: 81 c7 e0 08 ret
400113d4: 81 e8 00 00 restore
4000bb54 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4000bb54: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4000bb58: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
4000bb5c: 40 00 2f 35 call 40017830 <.urem>
4000bb60: 90 10 00 19 mov %i1, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4000bb64: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4000bb68: b2 06 7f f8 add %i1, -8, %i1
4000bb6c: 90 26 40 08 sub %i1, %o0, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000bb70: 80 a2 00 01 cmp %o0, %g1
4000bb74: 0a 80 00 36 bcs 4000bc4c <_Heap_Free+0xf8>
4000bb78: 01 00 00 00 nop
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4000bb7c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000bb80: 80 a2 00 03 cmp %o0, %g3
4000bb84: 18 80 00 32 bgu 4000bc4c <_Heap_Free+0xf8>
4000bb88: 01 00 00 00 nop
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4000bb8c: da 02 20 04 ld [ %o0 + 4 ], %o5
4000bb90: 88 0b 7f fe and %o5, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000bb94: 84 02 00 04 add %o0, %g4, %g2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000bb98: 80 a0 40 02 cmp %g1, %g2
4000bb9c: 18 80 00 2c bgu 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bba0: 80 a0 c0 02 cmp %g3, %g2
4000bba4: 0a 80 00 2a bcs 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bba8: 01 00 00 00 nop
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4000bbac: d8 00 a0 04 ld [ %g2 + 4 ], %o4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4000bbb0: 80 8b 20 01 btst 1, %o4
4000bbb4: 02 80 00 26 be 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bbb8: 96 0b 3f fe and %o4, -2, %o3
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4000bbbc: 80 a0 c0 02 cmp %g3, %g2
4000bbc0: 02 80 00 06 be 4000bbd8 <_Heap_Free+0x84>
4000bbc4: 98 10 20 00 clr %o4
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4000bbc8: 98 00 80 0b add %g2, %o3, %o4
4000bbcc: d8 03 20 04 ld [ %o4 + 4 ], %o4
4000bbd0: 98 0b 20 01 and %o4, 1, %o4
4000bbd4: 98 1b 20 01 xor %o4, 1, %o4
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4000bbd8: 80 8b 60 01 btst 1, %o5
4000bbdc: 12 80 00 1e bne 4000bc54 <_Heap_Free+0x100>
4000bbe0: 80 8b 20 ff btst 0xff, %o4
uintptr_t const prev_size = block->prev_size;
4000bbe4: d4 02 00 00 ld [ %o0 ], %o2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000bbe8: 9a 22 00 0a sub %o0, %o2, %o5
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000bbec: 80 a0 40 0d cmp %g1, %o5
4000bbf0: 18 80 00 17 bgu 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bbf4: 80 a0 c0 0d cmp %g3, %o5
4000bbf8: 0a 80 00 15 bcs 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bbfc: 01 00 00 00 nop
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
4000bc00: c2 03 60 04 ld [ %o5 + 4 ], %g1
4000bc04: 80 88 60 01 btst 1, %g1
4000bc08: 02 80 00 11 be 4000bc4c <_Heap_Free+0xf8> <== NEVER TAKEN
4000bc0c: 80 8b 20 ff btst 0xff, %o4
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4000bc10: 22 80 00 3a be,a 4000bcf8 <_Heap_Free+0x1a4>
4000bc14: 94 01 00 0a add %g4, %o2, %o2
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4000bc18: c6 06 20 38 ld [ %i0 + 0x38 ], %g3
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4000bc1c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4000bc20: c4 00 a0 08 ld [ %g2 + 8 ], %g2
4000bc24: 86 00 ff ff add %g3, -1, %g3
4000bc28: c6 26 20 38 st %g3, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4000bc2c: 96 01 00 0b add %g4, %o3, %o3
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4000bc30: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
4000bc34: 94 02 c0 0a add %o3, %o2, %o2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4000bc38: c4 20 60 08 st %g2, [ %g1 + 8 ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4000bc3c: d4 23 40 0a st %o2, [ %o5 + %o2 ]
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4000bc40: 94 12 a0 01 or %o2, 1, %o2
4000bc44: 10 80 00 10 b 4000bc84 <_Heap_Free+0x130>
4000bc48: d4 23 60 04 st %o2, [ %o5 + 4 ]
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4000bc4c: 81 c7 e0 08 ret
4000bc50: 91 e8 20 00 restore %g0, 0, %o0
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4000bc54: 02 80 00 17 be 4000bcb0 <_Heap_Free+0x15c>
4000bc58: 82 11 20 01 or %g4, 1, %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4000bc5c: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4000bc60: c4 00 a0 08 ld [ %g2 + 8 ], %g2
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4000bc64: c2 22 20 0c st %g1, [ %o0 + 0xc ]
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4000bc68: c4 22 20 08 st %g2, [ %o0 + 8 ]
uintptr_t const size = block_size + next_block_size;
4000bc6c: 96 02 c0 04 add %o3, %g4, %o3
new_block->prev = prev;
next->prev = new_block;
4000bc70: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4000bc74: d6 22 00 0b st %o3, [ %o0 + %o3 ]
prev->next = new_block;
4000bc78: d0 20 60 08 st %o0, [ %g1 + 8 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4000bc7c: 96 12 e0 01 or %o3, 1, %o3
4000bc80: d6 22 20 04 st %o3, [ %o0 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4000bc84: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
4000bc88: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
4000bc8c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4000bc90: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
stats->free_size += block_size;
4000bc94: 88 00 c0 04 add %g3, %g4, %g4
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4000bc98: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
stats->free_size += block_size;
4000bc9c: c8 26 20 30 st %g4, [ %i0 + 0x30 ]
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
4000bca0: 82 00 60 01 inc %g1
4000bca4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
return( true );
4000bca8: 81 c7 e0 08 ret
4000bcac: 91 e8 20 01 restore %g0, 1, %o0
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4000bcb0: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000bcb4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4000bcb8: c6 06 20 08 ld [ %i0 + 8 ], %g3
4000bcbc: 82 08 7f fe and %g1, -2, %g1
next_block->prev_size = block_size;
4000bcc0: c8 22 00 04 st %g4, [ %o0 + %g4 ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000bcc4: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4000bcc8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
new_block->next = next;
4000bccc: c6 22 20 08 st %g3, [ %o0 + 8 ]
new_block->prev = block_before;
4000bcd0: f0 22 20 0c st %i0, [ %o0 + 0xc ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4000bcd4: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4000bcd8: 82 00 60 01 inc %g1
block_before->next = new_block;
next->prev = new_block;
4000bcdc: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4000bce0: d0 26 20 08 st %o0, [ %i0 + 8 ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4000bce4: 80 a0 40 02 cmp %g1, %g2
4000bce8: 08 bf ff e7 bleu 4000bc84 <_Heap_Free+0x130>
4000bcec: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
4000bcf0: 10 bf ff e5 b 4000bc84 <_Heap_Free+0x130>
4000bcf4: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4000bcf8: 82 12 a0 01 or %o2, 1, %g1
4000bcfc: c2 23 60 04 st %g1, [ %o5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000bd00: c2 00 a0 04 ld [ %g2 + 4 ], %g1
next_block->prev_size = size;
4000bd04: d4 22 00 04 st %o2, [ %o0 + %g4 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000bd08: 82 08 7f fe and %g1, -2, %g1
4000bd0c: 10 bf ff de b 4000bc84 <_Heap_Free+0x130>
4000bd10: c2 20 a0 04 st %g1, [ %g2 + 4 ]
400113d8 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
400113d8: 9d e3 bf a0 save %sp, -96, %sp
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
400113dc: c2 06 20 08 ld [ %i0 + 8 ], %g1
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
400113e0: c0 26 40 00 clr [ %i1 ]
info->largest = 0;
400113e4: c0 26 60 04 clr [ %i1 + 4 ]
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
400113e8: 80 a6 00 01 cmp %i0, %g1
400113ec: 02 80 00 13 be 40011438 <_Heap_Get_free_information+0x60> <== NEVER TAKEN
400113f0: c0 26 60 08 clr [ %i1 + 8 ]
400113f4: 88 10 20 01 mov 1, %g4
400113f8: 10 80 00 03 b 40011404 <_Heap_Get_free_information+0x2c>
400113fc: 86 10 20 00 clr %g3
40011400: 88 10 00 02 mov %g2, %g4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
40011404: c4 00 60 04 ld [ %g1 + 4 ], %g2
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
if ( info->largest < the_size )
40011408: da 06 60 04 ld [ %i1 + 4 ], %o5
4001140c: 84 08 bf fe and %g2, -2, %g2
40011410: 80 a3 40 02 cmp %o5, %g2
40011414: 1a 80 00 03 bcc 40011420 <_Heap_Get_free_information+0x48>
40011418: 86 00 c0 02 add %g3, %g2, %g3
info->largest = the_size;
4001141c: c4 26 60 04 st %g2, [ %i1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
40011420: c2 00 60 08 ld [ %g1 + 8 ], %g1
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
40011424: 80 a6 00 01 cmp %i0, %g1
40011428: 12 bf ff f6 bne 40011400 <_Heap_Get_free_information+0x28>
4001142c: 84 01 20 01 add %g4, 1, %g2
40011430: c6 26 60 08 st %g3, [ %i1 + 8 ]
40011434: c8 26 40 00 st %g4, [ %i1 ]
40011438: 81 c7 e0 08 ret
4001143c: 81 e8 00 00 restore
40011440 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
40011440: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
40011444: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
40011448: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
4001144c: c0 26 40 00 clr [ %i1 ]
the_info->Free.total = 0;
40011450: c0 26 60 08 clr [ %i1 + 8 ]
the_info->Free.largest = 0;
40011454: c0 26 60 04 clr [ %i1 + 4 ]
the_info->Used.number = 0;
40011458: c0 26 60 0c clr [ %i1 + 0xc ]
the_info->Used.total = 0;
4001145c: c0 26 60 14 clr [ %i1 + 0x14 ]
the_info->Used.largest = 0;
40011460: c0 26 60 10 clr [ %i1 + 0x10 ]
while ( the_block != end ) {
40011464: 80 a0 40 02 cmp %g1, %g2
40011468: 02 80 00 1a be 400114d0 <_Heap_Get_information+0x90> <== NEVER TAKEN
4001146c: 86 10 20 08 mov 8, %g3
40011470: da 00 60 04 ld [ %g1 + 4 ], %o5
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
40011474: 92 06 60 0c add %i1, 0xc, %o1
40011478: 88 0b 7f fe and %o5, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4001147c: 82 00 40 04 add %g1, %g4, %g1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
40011480: da 00 60 04 ld [ %g1 + 4 ], %o5
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
40011484: 80 8b 60 01 btst 1, %o5
40011488: 12 80 00 03 bne 40011494 <_Heap_Get_information+0x54>
4001148c: 86 10 00 09 mov %o1, %g3
40011490: 86 10 00 19 mov %i1, %g3
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
40011494: d4 00 c0 00 ld [ %g3 ], %o2
info->total += the_size;
40011498: d6 00 e0 08 ld [ %g3 + 8 ], %o3
if ( info->largest < the_size )
4001149c: d8 00 e0 04 ld [ %g3 + 4 ], %o4
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
400114a0: 94 02 a0 01 inc %o2
info->total += the_size;
400114a4: 96 02 c0 04 add %o3, %g4, %o3
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
400114a8: d4 20 c0 00 st %o2, [ %g3 ]
info->total += the_size;
if ( info->largest < the_size )
400114ac: 80 a3 00 04 cmp %o4, %g4
400114b0: 1a 80 00 03 bcc 400114bc <_Heap_Get_information+0x7c>
400114b4: d6 20 e0 08 st %o3, [ %g3 + 8 ]
info->largest = the_size;
400114b8: c8 20 e0 04 st %g4, [ %g3 + 4 ]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
400114bc: 80 a0 80 01 cmp %g2, %g1
400114c0: 12 bf ff ef bne 4001147c <_Heap_Get_information+0x3c>
400114c4: 88 0b 7f fe and %o5, -2, %g4
400114c8: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
400114cc: 86 00 e0 08 add %g3, 8, %g3
/*
* Handle the last dummy block. Don't consider this block to be
* "used" as client never allocated it. Make 'Used.total' contain this
* blocks' overhead though.
*/
the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
400114d0: c6 26 60 14 st %g3, [ %i1 + 0x14 ]
}
400114d4: 81 c7 e0 08 ret
400114d8: 81 e8 00 00 restore
4001a0e0 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
4001a0e0: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4001a0e4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
4001a0e8: 7f ff f5 d2 call 40017830 <.urem>
4001a0ec: 90 10 00 19 mov %i1, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4001a0f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4001a0f4: 84 06 7f f8 add %i1, -8, %g2
4001a0f8: 84 20 80 08 sub %g2, %o0, %g2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4001a0fc: 80 a0 80 01 cmp %g2, %g1
4001a100: 0a 80 00 16 bcs 4001a158 <_Heap_Size_of_alloc_area+0x78>
4001a104: 01 00 00 00 nop
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4001a108: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4001a10c: 80 a0 80 03 cmp %g2, %g3
4001a110: 18 80 00 12 bgu 4001a158 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
4001a114: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4001a118: c8 00 a0 04 ld [ %g2 + 4 ], %g4
4001a11c: 88 09 3f fe and %g4, -2, %g4
4001a120: 84 00 80 04 add %g2, %g4, %g2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4001a124: 80 a0 40 02 cmp %g1, %g2
4001a128: 18 80 00 0c bgu 4001a158 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
4001a12c: 80 a0 c0 02 cmp %g3, %g2
4001a130: 0a 80 00 0a bcs 4001a158 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
4001a134: 01 00 00 00 nop
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
4001a138: c2 00 a0 04 ld [ %g2 + 4 ], %g1
4001a13c: 80 88 60 01 btst 1, %g1
4001a140: 02 80 00 06 be 4001a158 <_Heap_Size_of_alloc_area+0x78> <== NEVER TAKEN
4001a144: 84 20 80 19 sub %g2, %i1, %g2
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
4001a148: 84 00 a0 04 add %g2, 4, %g2
4001a14c: c4 26 80 00 st %g2, [ %i2 ]
return true;
4001a150: 81 c7 e0 08 ret
4001a154: 91 e8 20 01 restore %g0, 1, %o0
}
4001a158: 81 c7 e0 08 ret
4001a15c: 91 e8 20 00 restore %g0, 0, %o0
40007b54 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
40007b54: 9d e3 bf 88 save %sp, -120, %sp
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
40007b58: 25 10 00 20 sethi %hi(0x40008000), %l2
40007b5c: 80 8e a0 ff btst 0xff, %i2
40007b60: a4 14 a1 54 or %l2, 0x154, %l2
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
40007b64: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
uintptr_t const min_block_size = heap->min_block_size;
40007b68: e6 06 20 14 ld [ %i0 + 0x14 ], %l3
Heap_Block *const last_block = heap->last_block;
40007b6c: e8 06 20 24 ld [ %i0 + 0x24 ], %l4
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
40007b70: 12 80 00 04 bne 40007b80 <_Heap_Walk+0x2c>
40007b74: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
40007b78: 25 10 00 1e sethi %hi(0x40007800), %l2
40007b7c: a4 14 a3 4c or %l2, 0x34c, %l2 ! 40007b4c <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
40007b80: 03 10 00 7a sethi %hi(0x4001e800), %g1
40007b84: c2 00 62 80 ld [ %g1 + 0x280 ], %g1 ! 4001ea80 <_System_state_Current>
40007b88: 80 a0 60 03 cmp %g1, 3
40007b8c: 22 80 00 04 be,a 40007b9c <_Heap_Walk+0x48>
40007b90: da 06 20 18 ld [ %i0 + 0x18 ], %o5
block = next_block;
}
return true;
}
40007b94: 81 c7 e0 08 ret
40007b98: 91 e8 20 01 restore %g0, 1, %o0
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
40007b9c: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
40007ba0: c4 06 20 08 ld [ %i0 + 8 ], %g2
40007ba4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
40007ba8: 90 10 00 19 mov %i1, %o0
40007bac: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
40007bb0: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
40007bb4: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
40007bb8: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
40007bbc: e8 23 a0 64 st %l4, [ %sp + 0x64 ]
40007bc0: 92 10 20 00 clr %o1
40007bc4: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007bc8: 96 10 00 15 mov %l5, %o3
40007bcc: 94 12 a2 00 or %o2, 0x200, %o2
40007bd0: 9f c4 80 00 call %l2
40007bd4: 98 10 00 13 mov %l3, %o4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
40007bd8: 80 a5 60 00 cmp %l5, 0
40007bdc: 02 80 00 36 be 40007cb4 <_Heap_Walk+0x160>
40007be0: 80 8d 60 07 btst 7, %l5
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
40007be4: 12 80 00 3c bne 40007cd4 <_Heap_Walk+0x180>
40007be8: 90 10 00 13 mov %l3, %o0
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
40007bec: 7f ff e7 b6 call 40001ac4 <.urem>
40007bf0: 92 10 00 15 mov %l5, %o1
40007bf4: 80 a2 20 00 cmp %o0, 0
40007bf8: 12 80 00 40 bne 40007cf8 <_Heap_Walk+0x1a4>
40007bfc: 90 04 20 08 add %l0, 8, %o0
);
return false;
}
if (
40007c00: 7f ff e7 b1 call 40001ac4 <.urem>
40007c04: 92 10 00 15 mov %l5, %o1
40007c08: 80 a2 20 00 cmp %o0, 0
40007c0c: 32 80 00 44 bne,a 40007d1c <_Heap_Walk+0x1c8>
40007c10: 90 10 00 19 mov %i1, %o0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
40007c14: ec 04 20 04 ld [ %l0 + 4 ], %l6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
40007c18: ae 8d a0 01 andcc %l6, 1, %l7
40007c1c: 22 80 00 48 be,a 40007d3c <_Heap_Walk+0x1e8>
40007c20: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( first_block->prev_size != page_size ) {
40007c24: d6 04 00 00 ld [ %l0 ], %o3
40007c28: 80 a5 40 0b cmp %l5, %o3
40007c2c: 32 80 00 1a bne,a 40007c94 <_Heap_Walk+0x140>
40007c30: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
40007c34: c2 05 20 04 ld [ %l4 + 4 ], %g1
40007c38: 82 08 7f fe and %g1, -2, %g1
40007c3c: 82 05 00 01 add %l4, %g1, %g1
40007c40: c2 00 60 04 ld [ %g1 + 4 ], %g1
40007c44: 80 88 60 01 btst 1, %g1
40007c48: 22 80 01 23 be,a 400080d4 <_Heap_Walk+0x580>
40007c4c: 90 10 00 19 mov %i1, %o0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007c50: e2 06 20 08 ld [ %i0 + 8 ], %l1
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
40007c54: 80 a6 00 11 cmp %i0, %l1
40007c58: 02 80 00 6f be 40007e14 <_Heap_Walk+0x2c0>
40007c5c: f4 06 20 10 ld [ %i0 + 0x10 ], %i2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
40007c60: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
40007c64: 80 a7 00 11 cmp %i4, %l1
40007c68: 28 80 00 3c bleu,a 40007d58 <_Heap_Walk+0x204> <== ALWAYS TAKEN
40007c6c: f6 06 20 24 ld [ %i0 + 0x24 ], %i3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
40007c70: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
40007c74: 96 10 00 11 mov %l1, %o3
40007c78: 92 10 20 01 mov 1, %o1
40007c7c: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007c80: b0 10 20 00 clr %i0
40007c84: 9f c4 80 00 call %l2
40007c88: 94 12 a3 a8 or %o2, 0x3a8, %o2
40007c8c: 81 c7 e0 08 ret
40007c90: 81 e8 00 00 restore
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
40007c94: 98 10 00 15 mov %l5, %o4
40007c98: 92 10 20 01 mov 1, %o1
40007c9c: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007ca0: b0 10 20 00 clr %i0
40007ca4: 9f c4 80 00 call %l2
40007ca8: 94 12 a3 60 or %o2, 0x360, %o2
40007cac: 81 c7 e0 08 ret
40007cb0: 81 e8 00 00 restore
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
40007cb4: 90 10 00 19 mov %i1, %o0
40007cb8: 92 10 20 01 mov 1, %o1
40007cbc: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007cc0: b0 10 20 00 clr %i0
40007cc4: 9f c4 80 00 call %l2
40007cc8: 94 12 a2 98 or %o2, 0x298, %o2
40007ccc: 81 c7 e0 08 ret
40007cd0: 81 e8 00 00 restore
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
40007cd4: 90 10 00 19 mov %i1, %o0
40007cd8: 96 10 00 15 mov %l5, %o3
40007cdc: 92 10 20 01 mov 1, %o1
40007ce0: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007ce4: b0 10 20 00 clr %i0
40007ce8: 9f c4 80 00 call %l2
40007cec: 94 12 a2 b0 or %o2, 0x2b0, %o2
40007cf0: 81 c7 e0 08 ret
40007cf4: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
40007cf8: 90 10 00 19 mov %i1, %o0
40007cfc: 96 10 00 13 mov %l3, %o3
40007d00: 92 10 20 01 mov 1, %o1
40007d04: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007d08: b0 10 20 00 clr %i0
40007d0c: 9f c4 80 00 call %l2
40007d10: 94 12 a2 d0 or %o2, 0x2d0, %o2
40007d14: 81 c7 e0 08 ret
40007d18: 81 e8 00 00 restore
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
40007d1c: 96 10 00 10 mov %l0, %o3
40007d20: 92 10 20 01 mov 1, %o1
40007d24: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007d28: b0 10 20 00 clr %i0
40007d2c: 9f c4 80 00 call %l2
40007d30: 94 12 a2 f8 or %o2, 0x2f8, %o2
40007d34: 81 c7 e0 08 ret
40007d38: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
40007d3c: 92 10 20 01 mov 1, %o1
40007d40: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40007d44: b0 10 20 00 clr %i0
40007d48: 9f c4 80 00 call %l2
40007d4c: 94 12 a3 30 or %o2, 0x330, %o2
40007d50: 81 c7 e0 08 ret
40007d54: 81 e8 00 00 restore
40007d58: 80 a6 c0 11 cmp %i3, %l1
40007d5c: 0a bf ff c6 bcs 40007c74 <_Heap_Walk+0x120> <== NEVER TAKEN
40007d60: 90 10 00 19 mov %i1, %o0
);
return false;
}
if (
40007d64: 90 04 60 08 add %l1, 8, %o0
40007d68: 7f ff e7 57 call 40001ac4 <.urem>
40007d6c: 92 10 00 1a mov %i2, %o1
40007d70: 80 a2 20 00 cmp %o0, 0
40007d74: 12 80 00 df bne 400080f0 <_Heap_Walk+0x59c> <== NEVER TAKEN
40007d78: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
40007d7c: c2 04 60 04 ld [ %l1 + 4 ], %g1
40007d80: 82 08 7f fe and %g1, -2, %g1
40007d84: 82 04 40 01 add %l1, %g1, %g1
40007d88: c2 00 60 04 ld [ %g1 + 4 ], %g1
40007d8c: 80 88 60 01 btst 1, %g1
40007d90: 12 80 00 ea bne 40008138 <_Heap_Walk+0x5e4> <== NEVER TAKEN
40007d94: 96 10 00 11 mov %l1, %o3
);
return false;
}
if ( free_block->prev != prev_block ) {
40007d98: d8 04 60 0c ld [ %l1 + 0xc ], %o4
40007d9c: 80 a6 00 0c cmp %i0, %o4
40007da0: 02 80 00 19 be 40007e04 <_Heap_Walk+0x2b0> <== ALWAYS TAKEN
40007da4: ba 10 00 11 mov %l1, %i5
40007da8: 30 80 00 dc b,a 40008118 <_Heap_Walk+0x5c4> <== NOT EXECUTED
40007dac: 0a bf ff b2 bcs 40007c74 <_Heap_Walk+0x120>
40007db0: 90 10 00 19 mov %i1, %o0
40007db4: 80 a6 c0 11 cmp %i3, %l1
40007db8: 0a bf ff b0 bcs 40007c78 <_Heap_Walk+0x124> <== NEVER TAKEN
40007dbc: 96 10 00 11 mov %l1, %o3
);
return false;
}
if (
40007dc0: 90 04 60 08 add %l1, 8, %o0
40007dc4: 7f ff e7 40 call 40001ac4 <.urem>
40007dc8: 92 10 00 1a mov %i2, %o1
40007dcc: 80 a2 20 00 cmp %o0, 0
40007dd0: 32 80 00 c8 bne,a 400080f0 <_Heap_Walk+0x59c>
40007dd4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
40007dd8: c2 04 60 04 ld [ %l1 + 4 ], %g1
40007ddc: 82 08 7f fe and %g1, -2, %g1
40007de0: 82 00 40 11 add %g1, %l1, %g1
40007de4: c2 00 60 04 ld [ %g1 + 4 ], %g1
40007de8: 80 88 60 01 btst 1, %g1
40007dec: 32 80 00 d2 bne,a 40008134 <_Heap_Walk+0x5e0>
40007df0: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( free_block->prev != prev_block ) {
40007df4: d8 04 60 0c ld [ %l1 + 0xc ], %o4
40007df8: 80 a3 00 1d cmp %o4, %i5
40007dfc: 12 80 00 c5 bne 40008110 <_Heap_Walk+0x5bc>
40007e00: ba 10 00 11 mov %l1, %i5
return false;
}
prev_block = free_block;
free_block = free_block->next;
40007e04: e2 04 60 08 ld [ %l1 + 8 ], %l1
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
40007e08: 80 a6 00 11 cmp %i0, %l1
40007e0c: 12 bf ff e8 bne 40007dac <_Heap_Walk+0x258>
40007e10: 80 a4 40 1c cmp %l1, %i4
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
40007e14: 80 a5 00 10 cmp %l4, %l0
40007e18: 02 bf ff 5f be 40007b94 <_Heap_Walk+0x40> <== NEVER TAKEN
40007e1c: 37 10 00 70 sethi %hi(0x4001c000), %i3
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007e20: 35 10 00 70 sethi %hi(0x4001c000), %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007e24: 39 10 00 70 sethi %hi(0x4001c000), %i4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007e28: ba 10 00 15 mov %l5, %i5
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
40007e2c: b6 16 e0 50 or %i3, 0x50, %i3
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007e30: b4 16 a0 68 or %i2, 0x68, %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007e34: b8 17 21 68 or %i4, 0x168, %i4
40007e38: aa 10 00 14 mov %l4, %l5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
40007e3c: ac 0d bf fe and %l6, -2, %l6
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
40007e40: 80 a5 e0 00 cmp %l7, 0
40007e44: 02 80 00 16 be 40007e9c <_Heap_Walk+0x348>
40007e48: a2 05 80 10 add %l6, %l0, %l1
(*printer)(
40007e4c: 90 10 00 19 mov %i1, %o0
40007e50: 92 10 20 00 clr %o1
40007e54: 94 10 00 1b mov %i3, %o2
40007e58: 96 10 00 10 mov %l0, %o3
40007e5c: 9f c4 80 00 call %l2
40007e60: 98 10 00 16 mov %l6, %o4
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
40007e64: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
40007e68: 80 a0 40 11 cmp %g1, %l1
40007e6c: 28 80 00 18 bleu,a 40007ecc <_Heap_Walk+0x378> <== ALWAYS TAKEN
40007e70: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
40007e74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
40007e78: 96 10 00 10 mov %l0, %o3
40007e7c: 98 10 00 11 mov %l1, %o4
40007e80: 92 10 20 01 mov 1, %o1
40007e84: 15 10 00 70 sethi %hi(0x4001c000), %o2
40007e88: b0 10 20 00 clr %i0
40007e8c: 9f c4 80 00 call %l2
40007e90: 94 12 a0 90 or %o2, 0x90, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
40007e94: 81 c7 e0 08 ret
40007e98: 81 e8 00 00 restore
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007e9c: da 04 00 00 ld [ %l0 ], %o5
40007ea0: 90 10 00 19 mov %i1, %o0
40007ea4: 92 10 20 00 clr %o1
40007ea8: 94 10 00 1a mov %i2, %o2
40007eac: 96 10 00 10 mov %l0, %o3
40007eb0: 9f c4 80 00 call %l2
40007eb4: 98 10 00 16 mov %l6, %o4
40007eb8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
40007ebc: 80 a0 40 11 cmp %g1, %l1
40007ec0: 18 bf ff ee bgu 40007e78 <_Heap_Walk+0x324> <== NEVER TAKEN
40007ec4: 90 10 00 19 mov %i1, %o0
40007ec8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40007ecc: 80 a0 40 11 cmp %g1, %l1
40007ed0: 0a bf ff ea bcs 40007e78 <_Heap_Walk+0x324>
40007ed4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
40007ed8: 90 10 00 16 mov %l6, %o0
40007edc: 7f ff e6 fa call 40001ac4 <.urem>
40007ee0: 92 10 00 1d mov %i5, %o1
40007ee4: 80 a2 20 00 cmp %o0, 0
40007ee8: 12 80 00 5d bne 4000805c <_Heap_Walk+0x508>
40007eec: 80 a4 c0 16 cmp %l3, %l6
);
return false;
}
if ( block_size < min_block_size ) {
40007ef0: 18 80 00 65 bgu 40008084 <_Heap_Walk+0x530>
40007ef4: 80 a4 00 11 cmp %l0, %l1
);
return false;
}
if ( next_block_begin <= block_begin ) {
40007ef8: 3a 80 00 6e bcc,a 400080b0 <_Heap_Walk+0x55c>
40007efc: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
40007f00: c2 04 60 04 ld [ %l1 + 4 ], %g1
40007f04: 80 88 60 01 btst 1, %g1
40007f08: 12 80 00 40 bne 40008008 <_Heap_Walk+0x4b4>
40007f0c: 80 a5 40 11 cmp %l5, %l1
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
40007f10: e8 04 20 04 ld [ %l0 + 4 ], %l4
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
40007f14: d8 04 20 0c ld [ %l0 + 0xc ], %o4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007f18: c2 06 20 08 ld [ %i0 + 8 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
40007f1c: ac 0d 3f fe and %l4, -2, %l6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007f20: 1b 10 00 70 sethi %hi(0x4001c000), %o5
40007f24: 80 a0 40 0c cmp %g1, %o4
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
40007f28: c6 06 20 0c ld [ %i0 + 0xc ], %g3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40007f2c: ae 04 00 16 add %l0, %l6, %l7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007f30: 02 80 00 07 be 40007f4c <_Heap_Walk+0x3f8>
40007f34: 9a 13 61 58 or %o5, 0x158, %o5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
40007f38: 1b 10 00 70 sethi %hi(0x4001c000), %o5
40007f3c: 80 a3 00 18 cmp %o4, %i0
40007f40: 02 80 00 03 be 40007f4c <_Heap_Walk+0x3f8>
40007f44: 9a 13 61 70 or %o5, 0x170, %o5
40007f48: 9a 10 00 1c mov %i4, %o5
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
40007f4c: c2 04 20 08 ld [ %l0 + 8 ], %g1
40007f50: 05 10 00 70 sethi %hi(0x4001c000), %g2
40007f54: 80 a0 c0 01 cmp %g3, %g1
40007f58: 02 80 00 07 be 40007f74 <_Heap_Walk+0x420>
40007f5c: 84 10 a1 80 or %g2, 0x180, %g2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007f60: 05 10 00 70 sethi %hi(0x4001c000), %g2
40007f64: 80 a0 40 18 cmp %g1, %i0
40007f68: 02 80 00 03 be 40007f74 <_Heap_Walk+0x420>
40007f6c: 84 10 a1 90 or %g2, 0x190, %g2
40007f70: 84 10 00 1c mov %i4, %g2
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
40007f74: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40007f78: c4 23 a0 60 st %g2, [ %sp + 0x60 ]
40007f7c: 90 10 00 19 mov %i1, %o0
40007f80: 92 10 20 00 clr %o1
40007f84: 15 10 00 70 sethi %hi(0x4001c000), %o2
40007f88: 96 10 00 10 mov %l0, %o3
40007f8c: 9f c4 80 00 call %l2
40007f90: 94 12 a1 a0 or %o2, 0x1a0, %o2
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
40007f94: da 05 c0 00 ld [ %l7 ], %o5
40007f98: 80 a5 80 0d cmp %l6, %o5
40007f9c: 02 80 00 0c be 40007fcc <_Heap_Walk+0x478>
40007fa0: 90 10 00 19 mov %i1, %o0
(*printer)(
40007fa4: ee 23 a0 5c st %l7, [ %sp + 0x5c ]
40007fa8: 96 10 00 10 mov %l0, %o3
40007fac: 98 10 00 16 mov %l6, %o4
40007fb0: 92 10 20 01 mov 1, %o1
40007fb4: 15 10 00 70 sethi %hi(0x4001c000), %o2
40007fb8: b0 10 20 00 clr %i0
40007fbc: 9f c4 80 00 call %l2
40007fc0: 94 12 a1 d0 or %o2, 0x1d0, %o2
40007fc4: 81 c7 e0 08 ret
40007fc8: 81 e8 00 00 restore
);
return false;
}
if ( !prev_used ) {
40007fcc: 80 8d 20 01 btst 1, %l4
40007fd0: 02 80 00 1c be 40008040 <_Heap_Walk+0x4ec>
40007fd4: 96 10 00 10 mov %l0, %o3
40007fd8: c2 06 20 08 ld [ %i0 + 8 ], %g1
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
40007fdc: 80 a0 40 18 cmp %g1, %i0
40007fe0: 12 80 00 07 bne 40007ffc <_Heap_Walk+0x4a8> <== ALWAYS TAKEN
40007fe4: 80 a0 40 10 cmp %g1, %l0
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
40007fe8: 10 80 00 0f b 40008024 <_Heap_Walk+0x4d0> <== NOT EXECUTED
40007fec: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
40007ff0: 80 a0 40 18 cmp %g1, %i0
40007ff4: 02 80 00 0a be 4000801c <_Heap_Walk+0x4c8>
40007ff8: 80 a0 40 10 cmp %g1, %l0
if ( free_block == block ) {
40007ffc: 32 bf ff fd bne,a 40007ff0 <_Heap_Walk+0x49c>
40008000: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
40008004: 80 a5 40 11 cmp %l5, %l1
40008008: 02 bf fe e3 be 40007b94 <_Heap_Walk+0x40>
4000800c: a0 10 00 11 mov %l1, %l0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
40008010: ec 04 60 04 ld [ %l1 + 4 ], %l6
40008014: 10 bf ff 8a b 40007e3c <_Heap_Walk+0x2e8>
40008018: ae 0d a0 01 and %l6, 1, %l7
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4000801c: 90 10 00 19 mov %i1, %o0
40008020: 96 10 00 10 mov %l0, %o3
40008024: 92 10 20 01 mov 1, %o1
40008028: 15 10 00 70 sethi %hi(0x4001c000), %o2
4000802c: b0 10 20 00 clr %i0
40008030: 9f c4 80 00 call %l2
40008034: 94 12 a2 40 or %o2, 0x240, %o2
40008038: 81 c7 e0 08 ret
4000803c: 81 e8 00 00 restore
return false;
}
if ( !prev_used ) {
(*printer)(
40008040: 92 10 20 01 mov 1, %o1
40008044: 15 10 00 70 sethi %hi(0x4001c000), %o2
40008048: b0 10 20 00 clr %i0
4000804c: 9f c4 80 00 call %l2
40008050: 94 12 a2 10 or %o2, 0x210, %o2
40008054: 81 c7 e0 08 ret
40008058: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
4000805c: 90 10 00 19 mov %i1, %o0
40008060: 96 10 00 10 mov %l0, %o3
40008064: 98 10 00 16 mov %l6, %o4
40008068: 92 10 20 01 mov 1, %o1
4000806c: 15 10 00 70 sethi %hi(0x4001c000), %o2
40008070: b0 10 20 00 clr %i0
40008074: 9f c4 80 00 call %l2
40008078: 94 12 a0 c0 or %o2, 0xc0, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
4000807c: 81 c7 e0 08 ret
40008080: 81 e8 00 00 restore
}
if ( block_size < min_block_size ) {
(*printer)(
40008084: 90 10 00 19 mov %i1, %o0
40008088: 96 10 00 10 mov %l0, %o3
4000808c: 98 10 00 16 mov %l6, %o4
40008090: 9a 10 00 13 mov %l3, %o5
40008094: 92 10 20 01 mov 1, %o1
40008098: 15 10 00 70 sethi %hi(0x4001c000), %o2
4000809c: b0 10 20 00 clr %i0
400080a0: 9f c4 80 00 call %l2
400080a4: 94 12 a0 f0 or %o2, 0xf0, %o2
block,
block_size,
min_block_size
);
return false;
400080a8: 81 c7 e0 08 ret
400080ac: 81 e8 00 00 restore
}
if ( next_block_begin <= block_begin ) {
(*printer)(
400080b0: 96 10 00 10 mov %l0, %o3
400080b4: 98 10 00 11 mov %l1, %o4
400080b8: 92 10 20 01 mov 1, %o1
400080bc: 15 10 00 70 sethi %hi(0x4001c000), %o2
400080c0: b0 10 20 00 clr %i0
400080c4: 9f c4 80 00 call %l2
400080c8: 94 12 a1 20 or %o2, 0x120, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
400080cc: 81 c7 e0 08 ret
400080d0: 81 e8 00 00 restore
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
400080d4: 92 10 20 01 mov 1, %o1
400080d8: 15 10 00 6f sethi %hi(0x4001bc00), %o2
400080dc: b0 10 20 00 clr %i0
400080e0: 9f c4 80 00 call %l2
400080e4: 94 12 a3 90 or %o2, 0x390, %o2
400080e8: 81 c7 e0 08 ret
400080ec: 81 e8 00 00 restore
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
400080f0: 96 10 00 11 mov %l1, %o3
400080f4: 92 10 20 01 mov 1, %o1
400080f8: 15 10 00 6f sethi %hi(0x4001bc00), %o2
400080fc: b0 10 20 00 clr %i0
40008100: 9f c4 80 00 call %l2
40008104: 94 12 a3 c8 or %o2, 0x3c8, %o2
40008108: 81 c7 e0 08 ret
4000810c: 81 e8 00 00 restore
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
40008110: 90 10 00 19 mov %i1, %o0
40008114: 96 10 00 11 mov %l1, %o3
40008118: 92 10 20 01 mov 1, %o1
4000811c: 15 10 00 70 sethi %hi(0x4001c000), %o2
40008120: b0 10 20 00 clr %i0
40008124: 9f c4 80 00 call %l2
40008128: 94 12 a0 18 or %o2, 0x18, %o2
4000812c: 81 c7 e0 08 ret
40008130: 81 e8 00 00 restore
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
40008134: 96 10 00 11 mov %l1, %o3
40008138: 92 10 20 01 mov 1, %o1
4000813c: 15 10 00 6f sethi %hi(0x4001bc00), %o2
40008140: b0 10 20 00 clr %i0
40008144: 9f c4 80 00 call %l2
40008148: 94 12 a3 f8 or %o2, 0x3f8, %o2
4000814c: 81 c7 e0 08 ret
40008150: 81 e8 00 00 restore
40006118 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
40006118: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
4000611c: 23 10 00 70 sethi %hi(0x4001c000), %l1
40006120: c2 04 63 bc ld [ %l1 + 0x3bc ], %g1 ! 4001c3bc <_IO_Number_of_drivers>
40006124: 80 a0 60 00 cmp %g1, 0
40006128: 02 80 00 0c be 40006158 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
4000612c: a2 14 63 bc or %l1, 0x3bc, %l1
40006130: a0 10 20 00 clr %l0
(void) rtems_io_initialize( major, 0, NULL );
40006134: 90 10 00 10 mov %l0, %o0
40006138: 92 10 20 00 clr %o1
4000613c: 40 00 15 27 call 4000b5d8 <rtems_io_initialize>
40006140: 94 10 20 00 clr %o2
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
40006144: c2 04 40 00 ld [ %l1 ], %g1
40006148: a0 04 20 01 inc %l0
4000614c: 80 a0 40 10 cmp %g1, %l0
40006150: 18 bf ff fa bgu 40006138 <_IO_Initialize_all_drivers+0x20>
40006154: 90 10 00 10 mov %l0, %o0
40006158: 81 c7 e0 08 ret
4000615c: 81 e8 00 00 restore
40006160 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
40006160: 9d e3 bf a0 save %sp, -96, %sp
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
40006164: 03 10 00 6e sethi %hi(0x4001b800), %g1
40006168: 82 10 60 08 or %g1, 8, %g1 ! 4001b808 <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
4000616c: e6 00 60 2c ld [ %g1 + 0x2c ], %l3
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
40006170: e2 00 60 30 ld [ %g1 + 0x30 ], %l1
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
40006174: 80 a4 40 13 cmp %l1, %l3
40006178: 0a 80 00 08 bcs 40006198 <_IO_Manager_initialization+0x38>
4000617c: e0 00 60 34 ld [ %g1 + 0x34 ], %l0
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
40006180: 03 10 00 70 sethi %hi(0x4001c000), %g1
40006184: e0 20 63 c0 st %l0, [ %g1 + 0x3c0 ] ! 4001c3c0 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
40006188: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000618c: e2 20 63 bc st %l1, [ %g1 + 0x3bc ] ! 4001c3bc <_IO_Number_of_drivers>
return;
40006190: 81 c7 e0 08 ret
40006194: 81 e8 00 00 restore
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
40006198: 83 2c e0 03 sll %l3, 3, %g1
4000619c: a5 2c e0 05 sll %l3, 5, %l2
400061a0: a4 24 80 01 sub %l2, %g1, %l2
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
400061a4: 40 00 0c 05 call 400091b8 <_Workspace_Allocate_or_fatal_error>
400061a8: 90 10 00 12 mov %l2, %o0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
400061ac: 03 10 00 70 sethi %hi(0x4001c000), %g1
memset(
400061b0: 94 10 00 12 mov %l2, %o2
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
400061b4: e6 20 63 bc st %l3, [ %g1 + 0x3bc ]
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
400061b8: 25 10 00 70 sethi %hi(0x4001c000), %l2
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
400061bc: 92 10 20 00 clr %o1
400061c0: 40 00 21 d3 call 4000e90c <memset>
400061c4: d0 24 a3 c0 st %o0, [ %l2 + 0x3c0 ]
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
400061c8: 80 a4 60 00 cmp %l1, 0
400061cc: 02 bf ff f1 be 40006190 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
400061d0: da 04 a3 c0 ld [ %l2 + 0x3c0 ], %o5
400061d4: 82 10 20 00 clr %g1
400061d8: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
400061dc: c4 04 00 01 ld [ %l0 + %g1 ], %g2
400061e0: 86 04 00 01 add %l0, %g1, %g3
400061e4: c4 23 40 01 st %g2, [ %o5 + %g1 ]
400061e8: d8 00 e0 04 ld [ %g3 + 4 ], %o4
400061ec: 84 03 40 01 add %o5, %g1, %g2
400061f0: d8 20 a0 04 st %o4, [ %g2 + 4 ]
400061f4: d8 00 e0 08 ld [ %g3 + 8 ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
400061f8: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
400061fc: d8 20 a0 08 st %o4, [ %g2 + 8 ]
40006200: d8 00 e0 0c ld [ %g3 + 0xc ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
40006204: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
40006208: d8 20 a0 0c st %o4, [ %g2 + 0xc ]
4000620c: d8 00 e0 10 ld [ %g3 + 0x10 ], %o4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
40006210: 80 a4 40 04 cmp %l1, %g4
_IO_Driver_address_table[index] = driver_table[index];
40006214: d8 20 a0 10 st %o4, [ %g2 + 0x10 ]
40006218: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
4000621c: 18 bf ff f0 bgu 400061dc <_IO_Manager_initialization+0x7c>
40006220: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
40006224: 81 c7 e0 08 ret
40006228: 81 e8 00 00 restore
40006ddc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
40006ddc: 9d e3 bf a0 save %sp, -96, %sp
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
40006de0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
40006de4: a0 10 00 18 mov %i0, %l0
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
40006de8: 80 a0 60 00 cmp %g1, 0
40006dec: 02 80 00 19 be 40006e50 <_Objects_Allocate+0x74> <== NEVER TAKEN
40006df0: b0 10 20 00 clr %i0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
40006df4: a2 04 20 20 add %l0, 0x20, %l1
40006df8: 40 00 12 19 call 4000b65c <_Chain_Get>
40006dfc: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
40006e00: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
40006e04: 80 a0 60 00 cmp %g1, 0
40006e08: 02 80 00 12 be 40006e50 <_Objects_Allocate+0x74>
40006e0c: b0 10 00 08 mov %o0, %i0
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
40006e10: 80 a2 20 00 cmp %o0, 0
40006e14: 02 80 00 11 be 40006e58 <_Objects_Allocate+0x7c>
40006e18: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
40006e1c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
40006e20: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
40006e24: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1
40006e28: 40 00 41 d6 call 40017580 <.udiv>
40006e2c: 90 22 00 01 sub %o0, %g1, %o0
40006e30: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
40006e34: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
40006e38: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
40006e3c: c4 00 40 08 ld [ %g1 + %o0 ], %g2
information->inactive--;
40006e40: 86 00 ff ff add %g3, -1, %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
40006e44: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
40006e48: c6 34 20 2c sth %g3, [ %l0 + 0x2c ]
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
40006e4c: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
}
}
return the_object;
}
40006e50: 81 c7 e0 08 ret
40006e54: 81 e8 00 00 restore
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
40006e58: 40 00 00 11 call 40006e9c <_Objects_Extend_information>
40006e5c: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
40006e60: 40 00 11 ff call 4000b65c <_Chain_Get>
40006e64: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
40006e68: b0 92 20 00 orcc %o0, 0, %i0
40006e6c: 32 bf ff ed bne,a 40006e20 <_Objects_Allocate+0x44>
40006e70: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
information->inactive--;
}
}
return the_object;
}
40006e74: 81 c7 e0 08 ret
40006e78: 81 e8 00 00 restore
40006e9c <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
40006e9c: 9d e3 bf 90 save %sp, -112, %sp
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
40006ea0: e8 06 20 34 ld [ %i0 + 0x34 ], %l4
40006ea4: 80 a5 20 00 cmp %l4, 0
40006ea8: 02 80 00 ab be 40007154 <_Objects_Extend_information+0x2b8>
40006eac: e6 16 20 0a lduh [ %i0 + 0xa ], %l3
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
40006eb0: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5
40006eb4: e4 16 20 14 lduh [ %i0 + 0x14 ], %l2
40006eb8: ab 2d 60 10 sll %l5, 0x10, %l5
40006ebc: 92 10 00 12 mov %l2, %o1
40006ec0: 40 00 41 b0 call 40017580 <.udiv>
40006ec4: 91 35 60 10 srl %l5, 0x10, %o0
40006ec8: 91 2a 20 10 sll %o0, 0x10, %o0
40006ecc: b9 32 20 10 srl %o0, 0x10, %i4
for ( ; block < block_count; block++ ) {
40006ed0: 80 a7 20 00 cmp %i4, 0
40006ed4: 02 80 00 a7 be 40007170 <_Objects_Extend_information+0x2d4><== NEVER TAKEN
40006ed8: 90 10 00 12 mov %l2, %o0
if ( information->object_blocks[ block ] == NULL )
40006edc: c2 05 00 00 ld [ %l4 ], %g1
40006ee0: 80 a0 60 00 cmp %g1, 0
40006ee4: 02 80 00 a4 be 40007174 <_Objects_Extend_information+0x2d8><== NEVER TAKEN
40006ee8: a2 10 00 13 mov %l3, %l1
40006eec: 10 80 00 06 b 40006f04 <_Objects_Extend_information+0x68>
40006ef0: a0 10 20 00 clr %l0
40006ef4: c2 05 00 01 ld [ %l4 + %g1 ], %g1
40006ef8: 80 a0 60 00 cmp %g1, 0
40006efc: 22 80 00 08 be,a 40006f1c <_Objects_Extend_information+0x80>
40006f00: ab 35 60 10 srl %l5, 0x10, %l5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
40006f04: a0 04 20 01 inc %l0
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
40006f08: a2 04 40 12 add %l1, %l2, %l1
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
40006f0c: 80 a7 00 10 cmp %i4, %l0
40006f10: 18 bf ff f9 bgu 40006ef4 <_Objects_Extend_information+0x58>
40006f14: 83 2c 20 02 sll %l0, 2, %g1
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
40006f18: ab 35 60 10 srl %l5, 0x10, %l5
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
40006f1c: 03 00 00 3f sethi %hi(0xfc00), %g1
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
40006f20: aa 05 40 08 add %l5, %o0, %l5
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
40006f24: 82 10 63 ff or %g1, 0x3ff, %g1
40006f28: 80 a5 40 01 cmp %l5, %g1
40006f2c: 18 80 00 96 bgu 40007184 <_Objects_Extend_information+0x2e8><== NEVER TAKEN
40006f30: 01 00 00 00 nop
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
40006f34: 40 00 41 59 call 40017498 <.umul>
40006f38: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
40006f3c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
40006f40: 80 a0 60 00 cmp %g1, 0
40006f44: 12 80 00 6d bne 400070f8 <_Objects_Extend_information+0x25c>
40006f48: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
40006f4c: 40 00 08 9b call 400091b8 <_Workspace_Allocate_or_fatal_error>
40006f50: 01 00 00 00 nop
40006f54: a4 10 00 08 mov %o0, %l2
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
40006f58: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
40006f5c: 80 a4 40 01 cmp %l1, %g1
40006f60: 2a 80 00 43 bcs,a 4000706c <_Objects_Extend_information+0x1d0>
40006f64: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
40006f68: a8 07 20 01 add %i4, 1, %l4
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
40006f6c: 91 2d 20 01 sll %l4, 1, %o0
40006f70: 90 02 00 14 add %o0, %l4, %o0
40006f74: 90 05 40 08 add %l5, %o0, %o0
40006f78: 90 02 00 13 add %o0, %l3, %o0
40006f7c: 40 00 08 9e call 400091f4 <_Workspace_Allocate>
40006f80: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
40006f84: ac 92 20 00 orcc %o0, 0, %l6
40006f88: 02 80 00 7d be 4000717c <_Objects_Extend_information+0x2e0>
40006f8c: a9 2d 20 02 sll %l4, 2, %l4
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
40006f90: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
40006f94: 80 a4 c0 01 cmp %l3, %g1
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
40006f98: ae 05 80 14 add %l6, %l4, %l7
40006f9c: 0a 80 00 5e bcs 40007114 <_Objects_Extend_information+0x278>
40006fa0: a8 05 c0 14 add %l7, %l4, %l4
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
40006fa4: 80 a4 e0 00 cmp %l3, 0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
40006fa8: 82 10 20 00 clr %g1
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
40006fac: 02 80 00 08 be 40006fcc <_Objects_Extend_information+0x130><== NEVER TAKEN
40006fb0: bb 2f 20 02 sll %i4, 2, %i5
local_table[ index ] = NULL;
40006fb4: 85 28 60 02 sll %g1, 2, %g2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
40006fb8: 82 00 60 01 inc %g1
40006fbc: 80 a4 c0 01 cmp %l3, %g1
40006fc0: 18 bf ff fd bgu 40006fb4 <_Objects_Extend_information+0x118><== NEVER TAKEN
40006fc4: c0 20 80 14 clr [ %g2 + %l4 ]
40006fc8: bb 2f 20 02 sll %i4, 2, %i5
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006fcc: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
40006fd0: c0 25 c0 1d clr [ %l7 + %i5 ]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006fd4: 86 04 40 03 add %l1, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
40006fd8: 80 a4 40 03 cmp %l1, %g3
40006fdc: 1a 80 00 0a bcc 40007004 <_Objects_Extend_information+0x168><== NEVER TAKEN
40006fe0: c0 25 80 1d clr [ %l6 + %i5 ]
40006fe4: 85 2c 60 02 sll %l1, 2, %g2
40006fe8: 82 10 00 11 mov %l1, %g1
40006fec: 84 05 00 02 add %l4, %g2, %g2
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
40006ff0: c0 20 80 00 clr [ %g2 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
40006ff4: 82 00 60 01 inc %g1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
40006ff8: 80 a0 40 03 cmp %g1, %g3
40006ffc: 0a bf ff fd bcs 40006ff0 <_Objects_Extend_information+0x154>
40007000: 84 00 a0 04 add %g2, 4, %g2
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
40007004: 7f ff eb 36 call 40001cdc <sparc_disable_interrupts>
40007008: 01 00 00 00 nop
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
4000700c: c6 06 00 00 ld [ %i0 ], %g3
40007010: c4 16 20 04 lduh [ %i0 + 4 ], %g2
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
40007014: ea 36 20 10 sth %l5, [ %i0 + 0x10 ]
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
40007018: e6 06 20 34 ld [ %i0 + 0x34 ], %l3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
4000701c: ee 26 20 30 st %l7, [ %i0 + 0x30 ]
information->local_table = local_table;
40007020: e8 26 20 1c st %l4, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40007024: 87 28 e0 18 sll %g3, 0x18, %g3
40007028: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
4000702c: ec 26 20 34 st %l6, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40007030: ab 2d 60 10 sll %l5, 0x10, %l5
40007034: 03 00 00 40 sethi %hi(0x10000), %g1
40007038: ab 35 60 10 srl %l5, 0x10, %l5
4000703c: 82 10 c0 01 or %g3, %g1, %g1
40007040: 82 10 40 02 or %g1, %g2, %g1
40007044: 82 10 40 15 or %g1, %l5, %g1
40007048: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
4000704c: 7f ff eb 28 call 40001cec <sparc_enable_interrupts>
40007050: 01 00 00 00 nop
if ( old_tables )
40007054: 80 a4 e0 00 cmp %l3, 0
40007058: 22 80 00 05 be,a 4000706c <_Objects_Extend_information+0x1d0>
4000705c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
_Workspace_Free( old_tables );
40007060: 40 00 08 6e call 40009218 <_Workspace_Free>
40007064: 90 10 00 13 mov %l3, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40007068: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
4000706c: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
40007070: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
40007074: 92 10 00 12 mov %l2, %o1
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40007078: a1 2c 20 02 sll %l0, 2, %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
4000707c: a6 06 20 20 add %i0, 0x20, %l3
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40007080: e4 20 40 10 st %l2, [ %g1 + %l0 ]
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
40007084: 29 00 00 40 sethi %hi(0x10000), %l4
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
40007088: a4 07 bf f4 add %fp, -12, %l2
4000708c: 40 00 11 87 call 4000b6a8 <_Chain_Initialize>
40007090: 90 10 00 12 mov %l2, %o0
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
40007094: 30 80 00 0c b,a 400070c4 <_Objects_Extend_information+0x228>
the_object->id = _Objects_Build_id(
40007098: c4 16 20 04 lduh [ %i0 + 4 ], %g2
4000709c: 83 28 60 18 sll %g1, 0x18, %g1
400070a0: 85 28 a0 1b sll %g2, 0x1b, %g2
400070a4: 82 10 40 14 or %g1, %l4, %g1
400070a8: 82 10 40 02 or %g1, %g2, %g1
400070ac: 82 10 40 11 or %g1, %l1, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
400070b0: 92 10 00 08 mov %o0, %o1
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
400070b4: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
400070b8: a2 04 60 01 inc %l1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
400070bc: 7f ff fc e2 call 40006444 <_Chain_Append>
400070c0: 90 10 00 13 mov %l3, %o0
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
400070c4: 40 00 11 66 call 4000b65c <_Chain_Get>
400070c8: 90 10 00 12 mov %l2, %o0
400070cc: 80 a2 20 00 cmp %o0, 0
400070d0: 32 bf ff f2 bne,a 40007098 <_Objects_Extend_information+0x1fc>
400070d4: c2 06 00 00 ld [ %i0 ], %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
400070d8: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
400070dc: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
400070e0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive =
400070e4: 82 01 00 01 add %g4, %g1, %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
400070e8: c8 20 80 10 st %g4, [ %g2 + %l0 ]
information->inactive =
400070ec: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
400070f0: 81 c7 e0 08 ret
400070f4: 81 e8 00 00 restore
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
400070f8: 40 00 08 3f call 400091f4 <_Workspace_Allocate>
400070fc: 01 00 00 00 nop
if ( !new_object_block )
40007100: a4 92 20 00 orcc %o0, 0, %l2
40007104: 32 bf ff 96 bne,a 40006f5c <_Objects_Extend_information+0xc0>
40007108: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
4000710c: 81 c7 e0 08 ret
40007110: 81 e8 00 00 restore
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
40007114: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
40007118: bb 2f 20 02 sll %i4, 2, %i5
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
4000711c: 40 00 1d bd call 4000e810 <memcpy>
40007120: 94 10 00 1d mov %i5, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
40007124: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
40007128: 94 10 00 1d mov %i5, %o2
4000712c: 40 00 1d b9 call 4000e810 <memcpy>
40007130: 90 10 00 17 mov %l7, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
40007134: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2
40007138: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
4000713c: 94 04 c0 0a add %l3, %o2, %o2
40007140: 90 10 00 14 mov %l4, %o0
40007144: 40 00 1d b3 call 4000e810 <memcpy>
40007148: 95 2a a0 02 sll %o2, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
4000714c: 10 bf ff a1 b 40006fd0 <_Objects_Extend_information+0x134>
40007150: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
40007154: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5
40007158: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
4000715c: ab 2d 60 10 sll %l5, 0x10, %l5
40007160: a2 10 00 13 mov %l3, %l1
40007164: b8 10 20 00 clr %i4
40007168: 10 bf ff 6c b 40006f18 <_Objects_Extend_information+0x7c>
4000716c: a0 10 20 00 clr %l0
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
40007170: a2 10 00 13 mov %l3, %l1 <== NOT EXECUTED
40007174: 10 bf ff 69 b 40006f18 <_Objects_Extend_information+0x7c> <== NOT EXECUTED
40007178: a0 10 20 00 clr %l0 <== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
4000717c: 40 00 08 27 call 40009218 <_Workspace_Free>
40007180: 90 10 00 12 mov %l2, %o0
return;
40007184: 81 c7 e0 08 ret
40007188: 81 e8 00 00 restore
40007238 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
40007238: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
4000723c: 80 a6 60 00 cmp %i1, 0
40007240: 12 80 00 04 bne 40007250 <_Objects_Get_information+0x18>
40007244: 01 00 00 00 nop
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
40007248: 81 c7 e0 08 ret
4000724c: 91 e8 20 00 restore %g0, 0, %o0
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
40007250: 40 00 12 b1 call 4000bd14 <_Objects_API_maximum_class>
40007254: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
40007258: 80 a2 20 00 cmp %o0, 0
4000725c: 22 80 00 15 be,a 400072b0 <_Objects_Get_information+0x78>
40007260: b0 10 20 00 clr %i0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
40007264: 80 a6 40 08 cmp %i1, %o0
40007268: 38 80 00 12 bgu,a 400072b0 <_Objects_Get_information+0x78>
4000726c: b0 10 20 00 clr %i0
return NULL;
if ( !_Objects_Information_table[ the_api ] )
40007270: b1 2e 20 02 sll %i0, 2, %i0
40007274: 03 10 00 70 sethi %hi(0x4001c000), %g1
40007278: 82 10 60 50 or %g1, 0x50, %g1 ! 4001c050 <_Objects_Information_table>
4000727c: c2 00 40 18 ld [ %g1 + %i0 ], %g1
40007280: 80 a0 60 00 cmp %g1, 0
40007284: 02 80 00 0b be 400072b0 <_Objects_Get_information+0x78> <== NEVER TAKEN
40007288: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
4000728c: b3 2e 60 02 sll %i1, 2, %i1
40007290: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
40007294: 80 a6 20 00 cmp %i0, 0
40007298: 02 80 00 06 be 400072b0 <_Objects_Get_information+0x78> <== NEVER TAKEN
4000729c: 01 00 00 00 nop
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
400072a0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
400072a4: 80 a0 60 00 cmp %g1, 0
400072a8: 22 80 00 02 be,a 400072b0 <_Objects_Get_information+0x78>
400072ac: b0 10 20 00 clr %i0
return NULL;
#endif
return info;
}
400072b0: 81 c7 e0 08 ret
400072b4: 81 e8 00 00 restore
40009020 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
40009020: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
40009024: 80 a6 60 00 cmp %i1, 0
40009028: 12 80 00 05 bne 4000903c <_Objects_Get_name_as_string+0x1c>
4000902c: 80 a6 a0 00 cmp %i2, 0
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
40009030: b4 10 20 00 clr %i2
}
return NULL; /* unreachable path */
}
40009034: 81 c7 e0 08 ret
40009038: 91 e8 00 1a restore %g0, %i2, %o0
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
4000903c: 02 bf ff fe be 40009034 <_Objects_Get_name_as_string+0x14>
40009040: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
40009044: 12 80 00 04 bne 40009054 <_Objects_Get_name_as_string+0x34>
40009048: 03 10 00 a9 sethi %hi(0x4002a400), %g1
4000904c: c2 00 63 8c ld [ %g1 + 0x38c ], %g1 ! 4002a78c <_Thread_Executing>
40009050: f0 00 60 08 ld [ %g1 + 8 ], %i0
information = _Objects_Get_information_id( tmpId );
40009054: 7f ff ff af call 40008f10 <_Objects_Get_information_id>
40009058: 90 10 00 18 mov %i0, %o0
if ( !information )
4000905c: 80 a2 20 00 cmp %o0, 0
40009060: 22 bf ff f5 be,a 40009034 <_Objects_Get_name_as_string+0x14>
40009064: b4 10 20 00 clr %i2
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
40009068: 92 10 00 18 mov %i0, %o1
4000906c: 40 00 00 2f call 40009128 <_Objects_Get>
40009070: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
40009074: c2 07 bf fc ld [ %fp + -4 ], %g1
40009078: 80 a0 60 00 cmp %g1, 0
4000907c: 32 bf ff ee bne,a 40009034 <_Objects_Get_name_as_string+0x14>
40009080: b4 10 20 00 clr %i2
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
40009084: c2 02 20 0c ld [ %o0 + 0xc ], %g1
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
40009088: c0 2f bf f4 clrb [ %fp + -12 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
4000908c: 87 30 60 18 srl %g1, 0x18, %g3
lname[ 1 ] = (u32_name >> 16) & 0xff;
40009090: 85 30 60 10 srl %g1, 0x10, %g2
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
40009094: c2 2f bf f3 stb %g1, [ %fp + -13 ]
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
40009098: c4 2f bf f1 stb %g2, [ %fp + -15 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
4000909c: 83 30 60 08 srl %g1, 8, %g1
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
400090a0: c6 2f bf f0 stb %g3, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
400090a4: c2 2f bf f2 stb %g1, [ %fp + -14 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
400090a8: b2 86 7f ff addcc %i1, -1, %i1
400090ac: 02 80 00 1d be 40009120 <_Objects_Get_name_as_string+0x100><== NEVER TAKEN
400090b0: 84 10 00 03 mov %g3, %g2
400090b4: 80 a0 e0 00 cmp %g3, 0
400090b8: 02 80 00 1a be 40009120 <_Objects_Get_name_as_string+0x100>
400090bc: 17 10 00 88 sethi %hi(0x40022000), %o3
400090c0: 86 10 00 1a mov %i2, %g3
400090c4: 96 12 e1 00 or %o3, 0x100, %o3
400090c8: 82 10 20 00 clr %g1
400090cc: 10 80 00 06 b 400090e4 <_Objects_Get_name_as_string+0xc4>
400090d0: 98 07 bf f0 add %fp, -16, %o4
400090d4: c8 4b 00 01 ldsb [ %o4 + %g1 ], %g4
400090d8: 80 a1 20 00 cmp %g4, 0
400090dc: 02 80 00 0e be 40009114 <_Objects_Get_name_as_string+0xf4>
400090e0: c4 0b 00 01 ldub [ %o4 + %g1 ], %g2
*d = (isprint((unsigned char)*s)) ? *s : '*';
400090e4: da 02 c0 00 ld [ %o3 ], %o5
400090e8: 88 08 a0 ff and %g2, 0xff, %g4
400090ec: 88 03 40 04 add %o5, %g4, %g4
400090f0: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
400090f4: 80 89 20 97 btst 0x97, %g4
400090f8: 12 80 00 03 bne 40009104 <_Objects_Get_name_as_string+0xe4>
400090fc: 82 00 60 01 inc %g1
40009100: 84 10 20 2a mov 0x2a, %g2
40009104: c4 28 c0 00 stb %g2, [ %g3 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
40009108: 80 a0 40 19 cmp %g1, %i1
4000910c: 0a bf ff f2 bcs 400090d4 <_Objects_Get_name_as_string+0xb4>
40009110: 86 00 e0 01 inc %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
40009114: 40 00 02 3f call 40009a10 <_Thread_Enable_dispatch>
40009118: c0 28 c0 00 clrb [ %g3 ]
return name;
4000911c: 30 bf ff c6 b,a 40009034 <_Objects_Get_name_as_string+0x14>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
40009120: 10 bf ff fd b 40009114 <_Objects_Get_name_as_string+0xf4>
40009124: 86 10 00 1a mov %i2, %g3
400187b4 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
400187b4: c4 02 20 08 ld [ %o0 + 8 ], %g2
if ( information->maximum >= index ) {
400187b8: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
400187bc: 84 22 40 02 sub %o1, %g2, %g2
400187c0: 84 00 a0 01 inc %g2
if ( information->maximum >= index ) {
400187c4: 80 a0 80 01 cmp %g2, %g1
400187c8: 18 80 00 09 bgu 400187ec <_Objects_Get_no_protection+0x38>
400187cc: 85 28 a0 02 sll %g2, 2, %g2
if ( (the_object = information->local_table[ index ]) != NULL ) {
400187d0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
400187d4: d0 00 40 02 ld [ %g1 + %g2 ], %o0
400187d8: 80 a2 20 00 cmp %o0, 0
400187dc: 02 80 00 05 be 400187f0 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
400187e0: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
400187e4: 81 c3 e0 08 retl
400187e8: c0 22 80 00 clr [ %o2 ]
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
400187ec: 82 10 20 01 mov 1, %g1
400187f0: 90 10 20 00 clr %o0
return NULL;
}
400187f4: 81 c3 e0 08 retl
400187f8: c2 22 80 00 st %g1, [ %o2 ]
40008aa8 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
40008aa8: 9d e3 bf 98 save %sp, -104, %sp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
40008aac: 92 96 20 00 orcc %i0, 0, %o1
40008ab0: 12 80 00 06 bne 40008ac8 <_Objects_Id_to_name+0x20>
40008ab4: 83 32 60 18 srl %o1, 0x18, %g1
40008ab8: 03 10 00 86 sethi %hi(0x40021800), %g1
40008abc: c2 00 63 2c ld [ %g1 + 0x32c ], %g1 ! 40021b2c <_Thread_Executing>
40008ac0: d2 00 60 08 ld [ %g1 + 8 ], %o1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
40008ac4: 83 32 60 18 srl %o1, 0x18, %g1
40008ac8: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
40008acc: 84 00 7f ff add %g1, -1, %g2
40008ad0: 80 a0 a0 03 cmp %g2, 3
40008ad4: 18 80 00 18 bgu 40008b34 <_Objects_Id_to_name+0x8c>
40008ad8: 83 28 60 02 sll %g1, 2, %g1
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
40008adc: 05 10 00 86 sethi %hi(0x40021800), %g2
40008ae0: 84 10 a1 d0 or %g2, 0x1d0, %g2 ! 400219d0 <_Objects_Information_table>
40008ae4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
40008ae8: 80 a0 60 00 cmp %g1, 0
40008aec: 02 80 00 12 be 40008b34 <_Objects_Id_to_name+0x8c>
40008af0: 85 32 60 1b srl %o1, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
40008af4: 85 28 a0 02 sll %g2, 2, %g2
40008af8: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
40008afc: 80 a2 20 00 cmp %o0, 0
40008b00: 02 80 00 0d be 40008b34 <_Objects_Id_to_name+0x8c> <== NEVER TAKEN
40008b04: 01 00 00 00 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
40008b08: 7f ff ff cb call 40008a34 <_Objects_Get>
40008b0c: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
40008b10: 80 a2 20 00 cmp %o0, 0
40008b14: 02 80 00 08 be 40008b34 <_Objects_Id_to_name+0x8c>
40008b18: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
40008b1c: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
40008b20: b0 10 20 00 clr %i0
40008b24: 40 00 02 51 call 40009468 <_Thread_Enable_dispatch>
40008b28: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
40008b2c: 81 c7 e0 08 ret
40008b30: 81 e8 00 00 restore
}
40008b34: 81 c7 e0 08 ret
40008b38: 91 e8 20 03 restore %g0, 3, %o0
400073a0 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
400073a0: 9d e3 bf a0 save %sp, -96, %sp
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
400073a4: 05 10 00 70 sethi %hi(0x4001c000), %g2
400073a8: 83 2e 60 02 sll %i1, 2, %g1
400073ac: 84 10 a0 50 or %g2, 0x50, %g2
400073b0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
400073b4: 85 2f 20 10 sll %i4, 0x10, %g2
400073b8: 85 30 a0 10 srl %g2, 0x10, %g2
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
400073bc: 87 2e a0 02 sll %i2, 2, %g3
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
400073c0: c4 26 20 18 st %g2, [ %i0 + 0x18 ]
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
400073c4: f0 20 40 03 st %i0, [ %g1 + %g3 ]
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
400073c8: 85 36 e0 1f srl %i3, 0x1f, %g2
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
400073cc: 03 20 00 00 sethi %hi(0x80000000), %g1
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
400073d0: f2 26 00 00 st %i1, [ %i0 ]
information->the_class = the_class;
400073d4: f4 36 20 04 sth %i2, [ %i0 + 4 ]
information->size = size;
information->local_table = 0;
400073d8: c0 26 20 1c clr [ %i0 + 0x1c ]
information->inactive_per_block = 0;
400073dc: c0 26 20 30 clr [ %i0 + 0x30 ]
information->object_blocks = 0;
400073e0: c0 26 20 34 clr [ %i0 + 0x34 ]
information->inactive = 0;
400073e4: c0 36 20 2c clrh [ %i0 + 0x2c ]
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
400073e8: c0 36 20 10 clrh [ %i0 + 0x10 ]
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
400073ec: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ]
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
400073f0: b6 2e c0 01 andn %i3, %g1, %i3
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
400073f4: 80 a0 a0 00 cmp %g2, 0
400073f8: 02 80 00 05 be 4000740c <_Objects_Initialize_information+0x6c>
400073fc: c2 07 a0 5c ld [ %fp + 0x5c ], %g1
40007400: 80 a6 e0 00 cmp %i3, 0
40007404: 02 80 00 28 be 400074a4 <_Objects_Initialize_information+0x104>
40007408: 90 10 20 00 clr %o0
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
4000740c: 07 10 00 6f sethi %hi(0x4001bc00), %g3
40007410: 86 10 e2 98 or %g3, 0x298, %g3 ! 4001be98 <null_local_table.3551>
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
40007414: 80 a0 00 1b cmp %g0, %i3
40007418: b3 2e 60 18 sll %i1, 0x18, %i1
4000741c: 84 40 20 00 addx %g0, 0, %g2
40007420: b5 2e a0 1b sll %i2, 0x1b, %i2
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
40007424: c6 26 20 1c st %g3, [ %i0 + 0x1c ]
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
40007428: f6 36 20 14 sth %i3, [ %i0 + 0x14 ]
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
4000742c: 07 00 00 40 sethi %hi(0x10000), %g3
40007430: b2 16 40 03 or %i1, %g3, %i1
40007434: b4 16 40 1a or %i1, %i2, %i2
40007438: b4 16 80 02 or %i2, %g2, %i2
4000743c: f4 26 20 08 st %i2, [ %i0 + 8 ]
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
40007440: 84 00 60 04 add %g1, 4, %g2
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
40007444: 80 88 60 03 btst 3, %g1
40007448: 02 80 00 0c be 40007478 <_Objects_Initialize_information+0xd8><== ALWAYS TAKEN
4000744c: 84 08 bf fc and %g2, -4, %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40007450: 82 06 20 24 add %i0, 0x24, %g1 <== NOT EXECUTED
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
40007454: c4 36 20 38 sth %g2, [ %i0 + 0x38 ] <== NOT EXECUTED
40007458: c2 26 20 20 st %g1, [ %i0 + 0x20 ] <== NOT EXECUTED
the_chain->permanent_null = NULL;
4000745c: c0 26 20 24 clr [ %i0 + 0x24 ] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
40007460: 82 06 20 20 add %i0, 0x20, %g1 <== NOT EXECUTED
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
40007464: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
40007468: 12 80 00 0d bne 4000749c <_Objects_Initialize_information+0xfc><== NOT EXECUTED
4000746c: c2 26 20 28 st %g1, [ %i0 + 0x28 ] <== NOT EXECUTED
40007470: 81 c7 e0 08 ret
40007474: 81 e8 00 00 restore
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
40007478: 84 10 00 01 mov %g1, %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4000747c: 82 06 20 24 add %i0, 0x24, %g1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
40007480: c4 36 20 38 sth %g2, [ %i0 + 0x38 ]
40007484: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
the_chain->permanent_null = NULL;
40007488: c0 26 20 24 clr [ %i0 + 0x24 ]
the_chain->last = _Chain_Head(the_chain);
4000748c: 82 06 20 20 add %i0, 0x20, %g1
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
40007490: 80 a6 e0 00 cmp %i3, 0
40007494: 02 bf ff f7 be 40007470 <_Objects_Initialize_information+0xd0>
40007498: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
4000749c: 7f ff fe 80 call 40006e9c <_Objects_Extend_information>
400074a0: 81 e8 00 00 restore
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
400074a4: 92 10 20 01 mov 1, %o1
400074a8: 7f ff fe 1e call 40006d20 <_Internal_error_Occurred>
400074ac: 94 10 20 14 mov 0x14, %o2
40007574 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
40007574: 9d e3 bf a0 save %sp, -96, %sp
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
40007578: e0 16 20 0a lduh [ %i0 + 0xa ], %l0
block_count = (information->maximum - index_base) /
4000757c: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1
40007580: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
40007584: 92 10 00 11 mov %l1, %o1
40007588: 40 00 3f fe call 40017580 <.udiv>
4000758c: 90 22 00 10 sub %o0, %l0, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
40007590: 80 a2 20 00 cmp %o0, 0
40007594: 02 80 00 12 be 400075dc <_Objects_Shrink_information+0x68><== NEVER TAKEN
40007598: a4 10 20 04 mov 4, %l2
if ( information->inactive_per_block[ block ] ==
4000759c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
400075a0: c4 00 c0 00 ld [ %g3 ], %g2
400075a4: 80 a4 40 02 cmp %l1, %g2
400075a8: 12 80 00 09 bne 400075cc <_Objects_Shrink_information+0x58><== ALWAYS TAKEN
400075ac: 82 10 20 00 clr %g1
400075b0: 10 80 00 0d b 400075e4 <_Objects_Shrink_information+0x70> <== NOT EXECUTED
400075b4: a4 10 20 00 clr %l2 <== NOT EXECUTED
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
400075b8: a0 04 00 11 add %l0, %l1, %l0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
400075bc: 80 a4 40 02 cmp %l1, %g2
400075c0: 02 80 00 09 be 400075e4 <_Objects_Shrink_information+0x70>
400075c4: 84 04 a0 04 add %l2, 4, %g2
400075c8: a4 10 00 02 mov %g2, %l2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
400075cc: 82 00 60 01 inc %g1
400075d0: 80 a2 00 01 cmp %o0, %g1
400075d4: 38 bf ff f9 bgu,a 400075b8 <_Objects_Shrink_information+0x44>
400075d8: c4 00 c0 12 ld [ %g3 + %l2 ], %g2
400075dc: 81 c7 e0 08 ret
400075e0: 81 e8 00 00 restore
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
400075e4: 10 80 00 06 b 400075fc <_Objects_Shrink_information+0x88>
400075e8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
400075ec: 80 a4 60 00 cmp %l1, 0
400075f0: 22 80 00 12 be,a 40007638 <_Objects_Shrink_information+0xc4>
400075f4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
400075f8: 90 10 00 11 mov %l1, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
400075fc: c2 12 20 0a lduh [ %o0 + 0xa ], %g1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
40007600: 80 a0 40 10 cmp %g1, %l0
40007604: 0a bf ff fa bcs 400075ec <_Objects_Shrink_information+0x78>
40007608: e2 02 00 00 ld [ %o0 ], %l1
(index < (index_base + information->allocation_size))) {
4000760c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
40007610: 84 04 00 02 add %l0, %g2, %g2
40007614: 80 a0 40 02 cmp %g1, %g2
40007618: 1a bf ff f6 bcc 400075f0 <_Objects_Shrink_information+0x7c>
4000761c: 80 a4 60 00 cmp %l1, 0
_Chain_Extract( &extract_me->Node );
40007620: 40 00 10 05 call 4000b634 <_Chain_Extract>
40007624: 01 00 00 00 nop
}
}
while ( the_object );
40007628: 80 a4 60 00 cmp %l1, 0
4000762c: 12 bf ff f4 bne 400075fc <_Objects_Shrink_information+0x88><== ALWAYS TAKEN
40007630: 90 10 00 11 mov %l1, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
40007634: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
40007638: 40 00 06 f8 call 40009218 <_Workspace_Free>
4000763c: d0 00 40 12 ld [ %g1 + %l2 ], %o0
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
40007640: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
40007644: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
40007648: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
information->inactive -= information->allocation_size;
4000764c: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
40007650: c0 21 00 12 clr [ %g4 + %l2 ]
information->inactive -= information->allocation_size;
40007654: 84 20 c0 02 sub %g3, %g2, %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
40007658: c0 20 40 12 clr [ %g1 + %l2 ]
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
4000765c: c4 36 20 2c sth %g2, [ %i0 + 0x2c ]
return;
40007660: 81 c7 e0 08 ret
40007664: 81 e8 00 00 restore
40005e14 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
40005e14: 9d e3 bf 98 save %sp, -104, %sp
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
40005e18: 03 10 00 6d sethi %hi(0x4001b400), %g1
40005e1c: 82 10 63 d0 or %g1, 0x3d0, %g1 ! 4001b7d0 <Configuration_RTEMS_API>
40005e20: e0 00 60 2c ld [ %g1 + 0x2c ], %l0
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
40005e24: 80 a4 20 00 cmp %l0, 0
40005e28: 02 80 00 1a be 40005e90 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
40005e2c: e4 00 60 28 ld [ %g1 + 0x28 ], %l2
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
40005e30: 80 a4 a0 00 cmp %l2, 0
40005e34: 02 80 00 17 be 40005e90 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c><== NEVER TAKEN
40005e38: a2 10 20 00 clr %l1
40005e3c: a6 07 bf fc add %fp, -4, %l3
return_value = rtems_task_create(
40005e40: d0 04 00 00 ld [ %l0 ], %o0
40005e44: d2 04 20 08 ld [ %l0 + 8 ], %o1
40005e48: d4 04 20 04 ld [ %l0 + 4 ], %o2
40005e4c: d6 04 20 14 ld [ %l0 + 0x14 ], %o3
40005e50: d8 04 20 0c ld [ %l0 + 0xc ], %o4
40005e54: 7f ff ff 6e call 40005c0c <rtems_task_create>
40005e58: 9a 10 00 13 mov %l3, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
40005e5c: 80 a2 20 00 cmp %o0, 0
40005e60: 12 80 00 0f bne 40005e9c <_RTEMS_tasks_Initialize_user_tasks_body+0x88>
40005e64: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
40005e68: d0 07 bf fc ld [ %fp + -4 ], %o0
40005e6c: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
40005e70: 40 00 00 0f call 40005eac <rtems_task_start>
40005e74: d4 04 20 18 ld [ %l0 + 0x18 ], %o2
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
40005e78: 80 a2 20 00 cmp %o0, 0
40005e7c: 12 80 00 07 bne 40005e98 <_RTEMS_tasks_Initialize_user_tasks_body+0x84>
40005e80: a2 04 60 01 inc %l1
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
40005e84: 80 a4 80 11 cmp %l2, %l1
40005e88: 18 bf ff ee bgu 40005e40 <_RTEMS_tasks_Initialize_user_tasks_body+0x2c><== NEVER TAKEN
40005e8c: a0 04 20 1c add %l0, 0x1c, %l0
40005e90: 81 c7 e0 08 ret
40005e94: 81 e8 00 00 restore
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
40005e98: 94 10 00 08 mov %o0, %o2
40005e9c: 92 10 20 01 mov 1, %o1
40005ea0: 40 00 03 a0 call 40006d20 <_Internal_error_Occurred>
40005ea4: 90 10 20 01 mov 1, %o0
4000b3e4 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4000b3e4: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4000b3e8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0
if ( !api )
4000b3ec: 80 a4 20 00 cmp %l0, 0
4000b3f0: 02 80 00 1f be 4000b46c <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN
4000b3f4: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4000b3f8: 7f ff da 39 call 40001cdc <sparc_disable_interrupts>
4000b3fc: 01 00 00 00 nop
signal_set = asr->signals_posted;
4000b400: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
asr->signals_posted = 0;
4000b404: c0 24 20 14 clr [ %l0 + 0x14 ]
_ISR_Enable( level );
4000b408: 7f ff da 39 call 40001cec <sparc_enable_interrupts>
4000b40c: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4000b410: 80 a4 60 00 cmp %l1, 0
4000b414: 32 80 00 04 bne,a 4000b424 <_RTEMS_tasks_Post_switch_extension+0x40><== ALWAYS TAKEN
4000b418: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
4000b41c: 81 c7 e0 08 ret <== NOT EXECUTED
4000b420: 81 e8 00 00 restore <== NOT EXECUTED
return;
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b424: d0 04 20 10 ld [ %l0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4000b428: 82 00 60 01 inc %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b42c: a4 07 bf fc add %fp, -4, %l2
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4000b430: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b434: 94 10 00 12 mov %l2, %o2
4000b438: 27 00 00 3f sethi %hi(0xfc00), %l3
4000b43c: 40 00 07 bf call 4000d338 <rtems_task_mode>
4000b440: 92 14 e3 ff or %l3, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
4000b444: c2 04 20 0c ld [ %l0 + 0xc ], %g1
4000b448: 9f c0 40 00 call %g1
4000b44c: 90 10 00 11 mov %l1, %o0
asr->nest_level -= 1;
4000b450: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b454: d0 07 bf fc ld [ %fp + -4 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
4000b458: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b45c: 92 14 e3 ff or %l3, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
4000b460: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000b464: 40 00 07 b5 call 4000d338 <rtems_task_mode>
4000b468: 94 10 00 12 mov %l2, %o2
4000b46c: 81 c7 e0 08 ret
4000b470: 81 e8 00 00 restore
4000b308 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4000b308: c2 02 21 6c ld [ %o0 + 0x16c ], %g1
while (tvp) {
4000b30c: 80 a0 60 00 cmp %g1, 0
4000b310: 22 80 00 0b be,a 4000b33c <_RTEMS_tasks_Switch_extension+0x34>
4000b314: c2 02 61 6c ld [ %o1 + 0x16c ], %g1
tvp->tval = *tvp->ptr;
4000b318: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
4000b31c: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
4000b320: c8 00 80 00 ld [ %g2 ], %g4
4000b324: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
4000b328: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4000b32c: 80 a0 60 00 cmp %g1, 0
4000b330: 12 bf ff fa bne 4000b318 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
4000b334: c6 20 80 00 st %g3, [ %g2 ]
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
4000b338: c2 02 61 6c ld [ %o1 + 0x16c ], %g1
while (tvp) {
4000b33c: 80 a0 60 00 cmp %g1, 0
4000b340: 02 80 00 0a be 4000b368 <_RTEMS_tasks_Switch_extension+0x60>
4000b344: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
4000b348: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
4000b34c: c6 00 60 0c ld [ %g1 + 0xc ], %g3
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
4000b350: c8 00 80 00 ld [ %g2 ], %g4
4000b354: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
4000b358: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4000b35c: 80 a0 60 00 cmp %g1, 0
4000b360: 12 bf ff fa bne 4000b348 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN
4000b364: c6 20 80 00 st %g3, [ %g2 ]
4000b368: 81 c3 e0 08 retl
4000714c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
4000714c: 9d e3 bf 98 save %sp, -104, %sp
40007150: 11 10 00 87 sethi %hi(0x40021c00), %o0
40007154: 92 10 00 18 mov %i0, %o1
40007158: 90 12 22 90 or %o0, 0x290, %o0
4000715c: 40 00 07 e1 call 400090e0 <_Objects_Get>
40007160: 94 07 bf fc add %fp, -4, %o2
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
40007164: c2 07 bf fc ld [ %fp + -4 ], %g1
40007168: 80 a0 60 00 cmp %g1, 0
4000716c: 12 80 00 16 bne 400071c4 <_Rate_monotonic_Timeout+0x78> <== NEVER TAKEN
40007170: a0 10 00 08 mov %o0, %l0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
40007174: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
40007178: 03 00 00 10 sethi %hi(0x4000), %g1
4000717c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
40007180: 80 88 80 01 btst %g2, %g1
40007184: 22 80 00 08 be,a 400071a4 <_Rate_monotonic_Timeout+0x58>
40007188: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
the_thread->Wait.id == the_period->Object.id ) {
4000718c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
40007190: c2 04 20 08 ld [ %l0 + 8 ], %g1
40007194: 80 a0 80 01 cmp %g2, %g1
40007198: 02 80 00 19 be 400071fc <_Rate_monotonic_Timeout+0xb0>
4000719c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
400071a0: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
400071a4: 80 a0 60 01 cmp %g1, 1
400071a8: 02 80 00 09 be 400071cc <_Rate_monotonic_Timeout+0x80>
400071ac: 82 10 20 04 mov 4, %g1
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
400071b0: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
400071b4: 03 10 00 88 sethi %hi(0x40022000), %g1
400071b8: c4 00 60 00 ld [ %g1 ], %g2
400071bc: 84 00 bf ff add %g2, -1, %g2
400071c0: c4 20 60 00 st %g2, [ %g1 ]
400071c4: 81 c7 e0 08 ret
400071c8: 81 e8 00 00 restore
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
400071cc: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
400071d0: 90 10 00 10 mov %l0, %o0
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
400071d4: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
400071d8: 7f ff fe 24 call 40006a68 <_Rate_monotonic_Initiate_statistics>
400071dc: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
400071e0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
400071e4: 92 04 20 10 add %l0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
400071e8: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
400071ec: 11 10 00 88 sethi %hi(0x40022000), %o0
400071f0: 40 00 0f 72 call 4000afb8 <_Watchdog_Insert>
400071f4: 90 12 20 dc or %o0, 0xdc, %o0 ! 400220dc <_Watchdog_Ticks_chain>
400071f8: 30 bf ff ef b,a 400071b4 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
400071fc: 40 00 09 25 call 40009690 <_Thread_Clear_state>
40007200: 92 12 63 f8 or %o1, 0x3f8, %o1
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
40007204: 10 bf ff f5 b 400071d8 <_Rate_monotonic_Timeout+0x8c>
40007208: 90 10 00 10 mov %l0, %o0
400068e0 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
400068e0: 9d e3 bf 98 save %sp, -104, %sp
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
400068e4: 05 10 00 70 sethi %hi(0x4001c000), %g2
400068e8: c6 00 a2 44 ld [ %g2 + 0x244 ], %g3 ! 4001c244 <_Watchdog_Ticks_since_boot>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
400068ec: 03 10 00 6e sethi %hi(0x4001b800), %g1
400068f0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 ! 4001b814 <Configuration+0xc>
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
400068f4: 86 00 e0 01 inc %g3
400068f8: c6 20 a2 44 st %g3, [ %g2 + 0x244 ]
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
400068fc: 87 28 60 07 sll %g1, 7, %g3
40006900: 85 28 60 02 sll %g1, 2, %g2
40006904: 84 20 c0 02 sub %g3, %g2, %g2
40006908: 82 00 80 01 add %g2, %g1, %g1
4000690c: 83 28 60 03 sll %g1, 3, %g1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
40006910: a0 07 bf f8 add %fp, -8, %l0
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
40006914: c2 27 bf fc st %g1, [ %fp + -4 ]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
40006918: 92 10 00 10 mov %l0, %o1
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
4000691c: c0 27 bf f8 clr [ %fp + -8 ]
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
40006920: 11 10 00 70 sethi %hi(0x4001c000), %o0
40006924: 40 00 08 6b call 40008ad0 <_Timespec_Add_to>
40006928: 90 12 21 70 or %o0, 0x170, %o0 ! 4001c170 <_TOD_Uptime>
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
4000692c: 92 10 00 10 mov %l0, %o1
40006930: 11 10 00 70 sethi %hi(0x4001c000), %o0
40006934: 40 00 08 67 call 40008ad0 <_Timespec_Add_to>
40006938: 90 12 21 80 or %o0, 0x180, %o0 ! 4001c180 <_TOD_Now>
while ( seconds ) {
4000693c: a0 92 20 00 orcc %o0, 0, %l0
40006940: 02 80 00 08 be 40006960 <_TOD_Tickle_ticks+0x80>
40006944: 23 10 00 70 sethi %hi(0x4001c000), %l1
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
40006948: a2 14 61 c0 or %l1, 0x1c0, %l1 ! 4001c1c0 <_Watchdog_Seconds_chain>
4000694c: 40 00 09 f1 call 40009110 <_Watchdog_Tickle>
40006950: 90 10 00 11 mov %l1, %o0
40006954: a0 84 3f ff addcc %l0, -1, %l0
40006958: 12 bf ff fd bne 4000694c <_TOD_Tickle_ticks+0x6c> <== NEVER TAKEN
4000695c: 01 00 00 00 nop
40006960: 81 c7 e0 08 ret
40006964: 81 e8 00 00 restore
40006ac4 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
40006ac4: 9d e3 bf a0 save %sp, -96, %sp
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
40006ac8: 03 10 00 88 sethi %hi(0x40022000), %g1
if ((!the_tod) ||
40006acc: 80 a6 20 00 cmp %i0, 0
40006ad0: 02 80 00 2e be 40006b88 <_TOD_Validate+0xc4> <== NEVER TAKEN
40006ad4: d2 00 60 04 ld [ %g1 + 4 ], %o1
40006ad8: 11 00 03 d0 sethi %hi(0xf4000), %o0
40006adc: 40 00 57 df call 4001ca58 <.udiv>
40006ae0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
(the_tod->ticks >= ticks_per_second) ||
40006ae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
40006ae8: 80 a2 00 01 cmp %o0, %g1
40006aec: 08 80 00 27 bleu 40006b88 <_TOD_Validate+0xc4>
40006af0: 01 00 00 00 nop
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
40006af4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
40006af8: 80 a0 60 3b cmp %g1, 0x3b
40006afc: 18 80 00 23 bgu 40006b88 <_TOD_Validate+0xc4>
40006b00: 01 00 00 00 nop
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
40006b04: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
40006b08: 80 a0 60 3b cmp %g1, 0x3b
40006b0c: 18 80 00 1f bgu 40006b88 <_TOD_Validate+0xc4>
40006b10: 01 00 00 00 nop
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
40006b14: c2 06 20 0c ld [ %i0 + 0xc ], %g1
40006b18: 80 a0 60 17 cmp %g1, 0x17
40006b1c: 18 80 00 1b bgu 40006b88 <_TOD_Validate+0xc4>
40006b20: 01 00 00 00 nop
(the_tod->month == 0) ||
40006b24: c2 06 20 04 ld [ %i0 + 4 ], %g1
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40006b28: 80 a0 60 00 cmp %g1, 0
40006b2c: 02 80 00 17 be 40006b88 <_TOD_Validate+0xc4> <== NEVER TAKEN
40006b30: 80 a0 60 0c cmp %g1, 0xc
40006b34: 18 80 00 15 bgu 40006b88 <_TOD_Validate+0xc4>
40006b38: 01 00 00 00 nop
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
40006b3c: c4 06 00 00 ld [ %i0 ], %g2
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40006b40: 80 a0 a7 c3 cmp %g2, 0x7c3
40006b44: 08 80 00 11 bleu 40006b88 <_TOD_Validate+0xc4>
40006b48: 01 00 00 00 nop
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
40006b4c: c6 06 20 08 ld [ %i0 + 8 ], %g3
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40006b50: 80 a0 e0 00 cmp %g3, 0
40006b54: 02 80 00 0d be 40006b88 <_TOD_Validate+0xc4> <== NEVER TAKEN
40006b58: 80 88 a0 03 btst 3, %g2
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
40006b5c: 32 80 00 0d bne,a 40006b90 <_TOD_Validate+0xcc>
40006b60: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
40006b64: 82 00 60 0d add %g1, 0xd, %g1
40006b68: 05 10 00 82 sethi %hi(0x40020800), %g2
40006b6c: 83 28 60 02 sll %g1, 2, %g1
40006b70: 84 10 a1 2c or %g2, 0x12c, %g2
40006b74: c2 00 80 01 ld [ %g2 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
40006b78: 80 a0 40 03 cmp %g1, %g3
40006b7c: b0 60 3f ff subx %g0, -1, %i0
40006b80: 81 c7 e0 08 ret
40006b84: 81 e8 00 00 restore
if ( the_tod->day > days_in_month )
return false;
return true;
}
40006b88: 81 c7 e0 08 ret
40006b8c: 91 e8 20 00 restore %g0, 0, %o0
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
40006b90: 05 10 00 82 sethi %hi(0x40020800), %g2
40006b94: 84 10 a1 2c or %g2, 0x12c, %g2 ! 4002092c <_TOD_Days_per_month>
40006b98: 10 bf ff f8 b 40006b78 <_TOD_Validate+0xb4>
40006b9c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
400076cc <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
400076cc: 9d e3 bf a0 save %sp, -96, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
400076d0: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
400076d4: 40 00 04 49 call 400087f8 <_Thread_Set_transient>
400076d8: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
400076dc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
400076e0: 80 a0 40 19 cmp %g1, %i1
400076e4: 02 80 00 05 be 400076f8 <_Thread_Change_priority+0x2c>
400076e8: a0 10 00 18 mov %i0, %l0
_Thread_Set_priority( the_thread, new_priority );
400076ec: 92 10 00 19 mov %i1, %o1
400076f0: 40 00 03 c6 call 40008608 <_Thread_Set_priority>
400076f4: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
400076f8: 7f ff e9 79 call 40001cdc <sparc_disable_interrupts>
400076fc: 01 00 00 00 nop
40007700: b0 10 00 08 mov %o0, %i0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
40007704: e4 04 20 10 ld [ %l0 + 0x10 ], %l2
if ( state != STATES_TRANSIENT ) {
40007708: 80 a4 a0 04 cmp %l2, 4
4000770c: 02 80 00 18 be 4000776c <_Thread_Change_priority+0xa0>
40007710: 80 8c 60 04 btst 4, %l1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
40007714: 02 80 00 0b be 40007740 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
40007718: 82 0c bf fb and %l2, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
4000771c: 7f ff e9 74 call 40001cec <sparc_enable_interrupts> <== NOT EXECUTED
40007720: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
40007724: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
40007728: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
4000772c: 80 8c 80 01 btst %l2, %g1 <== NOT EXECUTED
40007730: 32 80 00 0d bne,a 40007764 <_Thread_Change_priority+0x98><== NOT EXECUTED
40007734: f0 04 20 44 ld [ %l0 + 0x44 ], %i0 <== NOT EXECUTED
40007738: 81 c7 e0 08 ret
4000773c: 81 e8 00 00 restore
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
40007740: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
40007744: 7f ff e9 6a call 40001cec <sparc_enable_interrupts>
40007748: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
4000774c: 03 00 00 ef sethi %hi(0x3bc00), %g1
40007750: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
40007754: 80 8c 80 01 btst %l2, %g1
40007758: 02 bf ff f8 be 40007738 <_Thread_Change_priority+0x6c>
4000775c: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
40007760: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
40007764: 40 00 03 79 call 40008548 <_Thread_queue_Requeue>
40007768: 93 e8 00 10 restore %g0, %l0, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4000776c: 12 80 00 14 bne 400077bc <_Thread_Change_priority+0xf0> <== NEVER TAKEN
40007770: 23 10 00 70 sethi %hi(0x4001c000), %l1
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
40007774: c2 04 20 90 ld [ %l0 + 0x90 ], %g1
40007778: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2
4000777c: c6 10 40 00 lduh [ %g1 ], %g3
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
40007780: c0 24 20 10 clr [ %l0 + 0x10 ]
40007784: 84 10 c0 02 or %g3, %g2, %g2
40007788: c4 30 40 00 sth %g2, [ %g1 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
4000778c: c4 14 61 a0 lduh [ %l1 + 0x1a0 ], %g2
40007790: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
40007794: 80 8e a0 ff btst 0xff, %i2
40007798: 82 10 80 01 or %g2, %g1, %g1
4000779c: c2 34 61 a0 sth %g1, [ %l1 + 0x1a0 ]
400077a0: 02 80 00 48 be 400078c0 <_Thread_Change_priority+0x1f4>
400077a4: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
400077a8: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
400077ac: c2 24 20 04 st %g1, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
400077b0: e0 20 40 00 st %l0, [ %g1 ]
the_node->next = before_node;
before_node->previous = the_node;
400077b4: e0 20 a0 04 st %l0, [ %g2 + 4 ]
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
400077b8: c4 24 00 00 st %g2, [ %l0 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
400077bc: 7f ff e9 4c call 40001cec <sparc_enable_interrupts>
400077c0: 90 10 00 18 mov %i0, %o0
400077c4: 7f ff e9 46 call 40001cdc <sparc_disable_interrupts>
400077c8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
400077cc: c2 14 61 a0 lduh [ %l1 + 0x1a0 ], %g1
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
400077d0: 05 10 00 70 sethi %hi(0x4001c000), %g2
400077d4: 83 28 60 10 sll %g1, 0x10, %g1
400077d8: da 00 a0 44 ld [ %g2 + 0x44 ], %o5
400077dc: 85 30 60 10 srl %g1, 0x10, %g2
400077e0: 80 a0 a0 ff cmp %g2, 0xff
400077e4: 08 80 00 27 bleu 40007880 <_Thread_Change_priority+0x1b4>
400077e8: 07 10 00 6a sethi %hi(0x4001a800), %g3
400077ec: 83 30 60 18 srl %g1, 0x18, %g1
400077f0: 86 10 e1 b0 or %g3, 0x1b0, %g3
400077f4: c4 08 c0 01 ldub [ %g3 + %g1 ], %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
400077f8: 09 10 00 70 sethi %hi(0x4001c000), %g4
400077fc: 85 28 a0 10 sll %g2, 0x10, %g2
40007800: 88 11 22 20 or %g4, 0x220, %g4
40007804: 83 30 a0 0f srl %g2, 0xf, %g1
40007808: c2 11 00 01 lduh [ %g4 + %g1 ], %g1
4000780c: 83 28 60 10 sll %g1, 0x10, %g1
40007810: 89 30 60 10 srl %g1, 0x10, %g4
40007814: 80 a1 20 ff cmp %g4, 0xff
40007818: 18 80 00 28 bgu 400078b8 <_Thread_Change_priority+0x1ec>
4000781c: 83 30 60 18 srl %g1, 0x18, %g1
40007820: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1
40007824: 82 00 60 08 add %g1, 8, %g1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
40007828: 85 30 a0 0c srl %g2, 0xc, %g2
4000782c: 83 28 60 10 sll %g1, 0x10, %g1
40007830: 83 30 60 10 srl %g1, 0x10, %g1
40007834: 82 00 40 02 add %g1, %g2, %g1
40007838: 85 28 60 04 sll %g1, 4, %g2
4000783c: 83 28 60 02 sll %g1, 2, %g1
40007840: 82 20 80 01 sub %g2, %g1, %g1
40007844: c2 03 40 01 ld [ %o5 + %g1 ], %g1
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
40007848: 05 10 00 70 sethi %hi(0x4001c000), %g2
4000784c: c4 00 a1 ac ld [ %g2 + 0x1ac ], %g2 ! 4001c1ac <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
40007850: 07 10 00 70 sethi %hi(0x4001c000), %g3
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
40007854: 80 a0 40 02 cmp %g1, %g2
40007858: 02 80 00 08 be 40007878 <_Thread_Change_priority+0x1ac>
4000785c: c2 20 e1 7c st %g1, [ %g3 + 0x17c ]
_Thread_Executing->is_preemptible )
40007860: c2 08 a0 75 ldub [ %g2 + 0x75 ], %g1
40007864: 80 a0 60 00 cmp %g1, 0
40007868: 02 80 00 04 be 40007878 <_Thread_Change_priority+0x1ac>
4000786c: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
40007870: 03 10 00 70 sethi %hi(0x4001c000), %g1
40007874: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ] ! 4001c1bc <_Context_Switch_necessary>
_ISR_Enable( level );
40007878: 7f ff e9 1d call 40001cec <sparc_enable_interrupts>
4000787c: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
40007880: 86 10 e1 b0 or %g3, 0x1b0, %g3
40007884: c4 08 c0 02 ldub [ %g3 + %g2 ], %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
40007888: 09 10 00 70 sethi %hi(0x4001c000), %g4
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
4000788c: 84 00 a0 08 add %g2, 8, %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
40007890: 88 11 22 20 or %g4, 0x220, %g4
40007894: 85 28 a0 10 sll %g2, 0x10, %g2
40007898: 83 30 a0 0f srl %g2, 0xf, %g1
4000789c: c2 11 00 01 lduh [ %g4 + %g1 ], %g1
400078a0: 83 28 60 10 sll %g1, 0x10, %g1
400078a4: 89 30 60 10 srl %g1, 0x10, %g4
400078a8: 80 a1 20 ff cmp %g4, 0xff
400078ac: 28 bf ff de bleu,a 40007824 <_Thread_Change_priority+0x158>
400078b0: c2 08 c0 04 ldub [ %g3 + %g4 ], %g1
400078b4: 83 30 60 18 srl %g1, 0x18, %g1
400078b8: 10 bf ff dc b 40007828 <_Thread_Change_priority+0x15c>
400078bc: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
400078c0: 84 00 60 04 add %g1, 4, %g2
400078c4: c4 24 00 00 st %g2, [ %l0 ]
old_last_node = the_chain->last;
400078c8: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_chain->last = the_node;
400078cc: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
400078d0: c4 24 20 04 st %g2, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
400078d4: 10 bf ff ba b 400077bc <_Thread_Change_priority+0xf0>
400078d8: e0 20 80 00 st %l0, [ %g2 ]
400078dc <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
400078dc: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
400078e0: 7f ff e8 ff call 40001cdc <sparc_disable_interrupts>
400078e4: a0 10 00 18 mov %i0, %l0
400078e8: b0 10 00 08 mov %o0, %i0
current_state = the_thread->current_state;
400078ec: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & state ) {
400078f0: 80 8e 40 01 btst %i1, %g1
400078f4: 02 80 00 06 be 4000790c <_Thread_Clear_state+0x30>
400078f8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
400078fc: b2 28 40 19 andn %g1, %i1, %i1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
40007900: 80 a6 60 00 cmp %i1, 0
40007904: 02 80 00 04 be 40007914 <_Thread_Clear_state+0x38>
40007908: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
}
}
}
_ISR_Enable( level );
4000790c: 7f ff e8 f8 call 40001cec <sparc_enable_interrupts>
40007910: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
40007914: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
if ( _States_Is_ready( current_state ) ) {
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
40007918: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
4000791c: c8 10 80 00 lduh [ %g2 ], %g4
40007920: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
40007924: 86 11 00 03 or %g4, %g3, %g3
40007928: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000792c: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
40007930: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4
40007934: c4 24 00 00 st %g2, [ %l0 ]
40007938: 07 10 00 70 sethi %hi(0x4001c000), %g3
old_last_node = the_chain->last;
4000793c: c4 00 60 08 ld [ %g1 + 8 ], %g2
40007940: da 10 e1 a0 lduh [ %g3 + 0x1a0 ], %o5
the_chain->last = the_node;
40007944: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
40007948: c4 24 20 04 st %g2, [ %l0 + 4 ]
4000794c: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
40007950: e0 20 80 00 st %l0, [ %g2 ]
40007954: c2 30 e1 a0 sth %g1, [ %g3 + 0x1a0 ]
_ISR_Flash( level );
40007958: 7f ff e8 e5 call 40001cec <sparc_enable_interrupts>
4000795c: 01 00 00 00 nop
40007960: 7f ff e8 df call 40001cdc <sparc_disable_interrupts>
40007964: 01 00 00 00 nop
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
40007968: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000796c: c6 00 61 7c ld [ %g1 + 0x17c ], %g3 ! 4001c17c <_Thread_Heir>
40007970: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
40007974: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
40007978: 80 a0 80 03 cmp %g2, %g3
4000797c: 1a bf ff e4 bcc 4000790c <_Thread_Clear_state+0x30>
40007980: 07 10 00 70 sethi %hi(0x4001c000), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
40007984: c6 00 e1 ac ld [ %g3 + 0x1ac ], %g3 ! 4001c1ac <_Thread_Executing>
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
40007988: e0 20 61 7c st %l0, [ %g1 + 0x17c ]
if ( _Thread_Executing->is_preemptible ||
4000798c: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1
40007990: 80 a0 60 00 cmp %g1, 0
40007994: 32 80 00 05 bne,a 400079a8 <_Thread_Clear_state+0xcc>
40007998: 84 10 20 01 mov 1, %g2
4000799c: 80 a0 a0 00 cmp %g2, 0
400079a0: 12 bf ff db bne 4000790c <_Thread_Clear_state+0x30> <== ALWAYS TAKEN
400079a4: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
400079a8: 03 10 00 70 sethi %hi(0x4001c000), %g1
400079ac: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ] ! 4001c1bc <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
400079b0: 7f ff e8 cf call 40001cec <sparc_enable_interrupts>
400079b4: 81 e8 00 00 restore
40007b34 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
40007b34: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
40007b38: 90 10 00 18 mov %i0, %o0
40007b3c: 40 00 00 72 call 40007d04 <_Thread_Get>
40007b40: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40007b44: c2 07 bf fc ld [ %fp + -4 ], %g1
40007b48: 80 a0 60 00 cmp %g1, 0
40007b4c: 12 80 00 08 bne 40007b6c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
40007b50: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
40007b54: 7f ff ff 62 call 400078dc <_Thread_Clear_state>
40007b58: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_SIZE+0xfc00018>
40007b5c: 03 10 00 70 sethi %hi(0x4001c000), %g1
40007b60: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
40007b64: 84 00 bf ff add %g2, -1, %g2
40007b68: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
40007b6c: 81 c7 e0 08 ret
40007b70: 81 e8 00 00 restore
40007b74 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
40007b74: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
40007b78: 2b 10 00 70 sethi %hi(0x4001c000), %l5
_ISR_Disable( level );
40007b7c: 7f ff e8 58 call 40001cdc <sparc_disable_interrupts>
40007b80: e2 05 61 ac ld [ %l5 + 0x1ac ], %l1 ! 4001c1ac <_Thread_Executing>
while ( _Context_Switch_necessary == true ) {
40007b84: 2d 10 00 70 sethi %hi(0x4001c000), %l6
40007b88: c2 0d a1 bc ldub [ %l6 + 0x1bc ], %g1 ! 4001c1bc <_Context_Switch_necessary>
40007b8c: 80 a0 60 00 cmp %g1, 0
40007b90: 02 80 00 3f be 40007c8c <_Thread_Dispatch+0x118>
40007b94: 31 10 00 70 sethi %hi(0x4001c000), %i0
40007b98: 35 10 00 70 sethi %hi(0x4001c000), %i2
40007b9c: 25 10 00 70 sethi %hi(0x4001c000), %l2
40007ba0: 37 10 00 70 sethi %hi(0x4001c000), %i3
40007ba4: a4 14 a1 b4 or %l2, 0x1b4, %l2
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
40007ba8: 33 10 00 70 sethi %hi(0x4001c000), %i1
40007bac: ac 15 a1 bc or %l6, 0x1bc, %l6
40007bb0: aa 15 61 ac or %l5, 0x1ac, %l5
40007bb4: b4 16 a1 7c or %i2, 0x17c, %i2
40007bb8: b6 16 e1 78 or %i3, 0x178, %i3
40007bbc: b2 16 60 48 or %i1, 0x48, %i1
40007bc0: b8 16 20 f0 or %i0, 0xf0, %i4
40007bc4: a8 07 bf f8 add %fp, -8, %l4
40007bc8: a6 07 bf f0 add %fp, -16, %l3
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
40007bcc: ba 10 20 01 mov 1, %i5
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
40007bd0: 10 80 00 25 b 40007c64 <_Thread_Dispatch+0xf0>
40007bd4: ae 10 00 12 mov %l2, %l7
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
40007bd8: 7f ff e8 45 call 40001cec <sparc_enable_interrupts>
40007bdc: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
40007be0: 40 00 0f 3e call 4000b8d8 <_TOD_Get_uptime>
40007be4: 90 10 00 14 mov %l4, %o0
_Timestamp_Subtract(
40007be8: 90 10 00 17 mov %l7, %o0
40007bec: 92 10 00 14 mov %l4, %o1
40007bf0: 40 00 03 d1 call 40008b34 <_Timespec_Subtract>
40007bf4: 94 10 00 13 mov %l3, %o2
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
40007bf8: 92 10 00 13 mov %l3, %o1
40007bfc: 40 00 03 b5 call 40008ad0 <_Timespec_Add_to>
40007c00: 90 04 60 84 add %l1, 0x84, %o0
_Thread_Time_of_last_context_switch = uptime;
40007c04: c4 07 bf f8 ld [ %fp + -8 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40007c08: c2 06 c0 00 ld [ %i3 ], %g1
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
40007c0c: c4 24 80 00 st %g2, [ %l2 ]
40007c10: c4 07 bf fc ld [ %fp + -4 ], %g2
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
40007c14: 90 10 00 11 mov %l1, %o0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
40007c18: c4 24 a0 04 st %g2, [ %l2 + 4 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40007c1c: 80 a0 60 00 cmp %g1, 0
40007c20: 02 80 00 06 be 40007c38 <_Thread_Dispatch+0xc4> <== NEVER TAKEN
40007c24: 92 10 00 10 mov %l0, %o1
executing->libc_reent = *_Thread_libc_reent;
40007c28: c4 00 40 00 ld [ %g1 ], %g2
40007c2c: c4 24 61 58 st %g2, [ %l1 + 0x158 ]
*_Thread_libc_reent = heir->libc_reent;
40007c30: c4 04 21 58 ld [ %l0 + 0x158 ], %g2
40007c34: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
40007c38: 40 00 04 81 call 40008e3c <_User_extensions_Thread_switch>
40007c3c: 01 00 00 00 nop
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
40007c40: 90 04 60 d0 add %l1, 0xd0, %o0
40007c44: 40 00 05 98 call 400092a4 <_CPU_Context_switch>
40007c48: 92 04 20 d0 add %l0, 0xd0, %o1
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
40007c4c: 7f ff e8 24 call 40001cdc <sparc_disable_interrupts>
40007c50: e2 05 40 00 ld [ %l5 ], %l1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
40007c54: c2 0d 80 00 ldub [ %l6 ], %g1
40007c58: 80 a0 60 00 cmp %g1, 0
40007c5c: 02 80 00 0c be 40007c8c <_Thread_Dispatch+0x118>
40007c60: 01 00 00 00 nop
heir = _Thread_Heir;
40007c64: e0 06 80 00 ld [ %i2 ], %l0
_Thread_Dispatch_disable_level = 1;
40007c68: fa 27 00 00 st %i5, [ %i4 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
40007c6c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
40007c70: c0 2d 80 00 clrb [ %l6 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
40007c74: 80 a0 60 01 cmp %g1, 1
40007c78: 12 bf ff d8 bne 40007bd8 <_Thread_Dispatch+0x64>
40007c7c: e0 25 40 00 st %l0, [ %l5 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
40007c80: c2 06 40 00 ld [ %i1 ], %g1
40007c84: 10 bf ff d5 b 40007bd8 <_Thread_Dispatch+0x64>
40007c88: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
40007c8c: c0 26 20 f0 clr [ %i0 + 0xf0 ]
_ISR_Enable( level );
40007c90: 7f ff e8 17 call 40001cec <sparc_enable_interrupts>
40007c94: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
40007c98: 03 10 00 70 sethi %hi(0x4001c000), %g1
40007c9c: c2 00 61 90 ld [ %g1 + 0x190 ], %g1 ! 4001c190 <_Thread_Do_post_task_switch_extension>
40007ca0: 80 a0 60 00 cmp %g1, 0
40007ca4: 12 80 00 06 bne 40007cbc <_Thread_Dispatch+0x148> <== NEVER TAKEN
40007ca8: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
40007cac: c2 0c 60 74 ldub [ %l1 + 0x74 ], %g1
40007cb0: 80 a0 60 00 cmp %g1, 0
40007cb4: 02 80 00 04 be 40007cc4 <_Thread_Dispatch+0x150>
40007cb8: 01 00 00 00 nop
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
40007cbc: 7f ff f9 8f call 400062f8 <_API_extensions_Run_postswitch>
40007cc0: c0 2c 60 74 clrb [ %l1 + 0x74 ]
40007cc4: 81 c7 e0 08 ret
40007cc8: 81 e8 00 00 restore
4000d7a0 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
4000d7a0: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d7a4: c2 00 61 ac ld [ %g1 + 0x1ac ], %g1 ! 4001c1ac <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
4000d7a8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000d7ac: 80 a0 a0 00 cmp %g2, 0
4000d7b0: 12 80 00 0b bne 4000d7dc <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
4000d7b4: 84 10 20 01 mov 1, %g2
4000d7b8: 05 10 00 70 sethi %hi(0x4001c000), %g2
4000d7bc: c4 00 a1 7c ld [ %g2 + 0x17c ], %g2 ! 4001c17c <_Thread_Heir>
4000d7c0: 80 a0 40 02 cmp %g1, %g2
4000d7c4: 02 80 00 0b be 4000d7f0 <_Thread_Evaluate_mode+0x50>
4000d7c8: 01 00 00 00 nop
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4000d7cc: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1
4000d7d0: 80 a0 60 00 cmp %g1, 0
4000d7d4: 02 80 00 07 be 4000d7f0 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
4000d7d8: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
4000d7dc: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d7e0: 90 10 20 01 mov 1, %o0
4000d7e4: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ]
return true;
4000d7e8: 81 c3 e0 08 retl
4000d7ec: 01 00 00 00 nop
}
return false;
}
4000d7f0: 81 c3 e0 08 retl
4000d7f4: 90 10 20 00 clr %o0 ! 0 <PROM_START>
4000d7f8 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4000d7f8: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4000d7fc: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d800: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001c1ac <_Thread_Executing>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
4000d804: 3f 10 00 35 sethi %hi(0x4000d400), %i7
4000d808: be 17 e3 f8 or %i7, 0x3f8, %i7 ! 4000d7f8 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4000d80c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
4000d810: 7f ff d1 37 call 40001cec <sparc_enable_interrupts>
4000d814: 91 2a 20 08 sll %o0, 8, %o0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4000d818: 03 10 00 6f sethi %hi(0x4001bc00), %g1
doneConstructors = 1;
4000d81c: 84 10 20 01 mov 1, %g2
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4000d820: e2 08 62 a8 ldub [ %g1 + 0x2a8 ], %l1
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
4000d824: 90 10 00 10 mov %l0, %o0
4000d828: 7f ff ed 07 call 40008c44 <_User_extensions_Thread_begin>
4000d82c: c4 28 62 a8 stb %g2, [ %g1 + 0x2a8 ]
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4000d830: 7f ff e9 27 call 40007ccc <_Thread_Enable_dispatch>
4000d834: a3 2c 60 18 sll %l1, 0x18, %l1
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
4000d838: 80 a4 60 00 cmp %l1, 0
4000d83c: 02 80 00 0c be 4000d86c <_Thread_Handler+0x74>
4000d840: 01 00 00 00 nop
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4000d844: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
4000d848: 80 a0 60 00 cmp %g1, 0
4000d84c: 22 80 00 0f be,a 4000d888 <_Thread_Handler+0x90> <== ALWAYS TAKEN
4000d850: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4000d854: 7f ff ed 10 call 40008c94 <_User_extensions_Thread_exitted>
4000d858: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
4000d85c: 90 10 20 00 clr %o0
4000d860: 92 10 20 01 mov 1, %o1
4000d864: 7f ff e5 2f call 40006d20 <_Internal_error_Occurred>
4000d868: 94 10 20 06 mov 6, %o2
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
4000d86c: 40 00 37 a7 call 4001b708 <_init>
4000d870: 01 00 00 00 nop
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4000d874: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
4000d878: 80 a0 60 00 cmp %g1, 0
4000d87c: 12 bf ff f6 bne 4000d854 <_Thread_Handler+0x5c> <== NEVER TAKEN
4000d880: 01 00 00 00 nop
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4000d884: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
4000d888: 9f c0 40 00 call %g1
4000d88c: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4000d890: 10 bf ff f1 b 4000d854 <_Thread_Handler+0x5c>
4000d894: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
40007db0 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
40007db0: 9d e3 bf a0 save %sp, -96, %sp
40007db4: 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;
40007db8: 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
)
{
40007dbc: e2 00 40 00 ld [ %g1 ], %l1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
40007dc0: c0 26 61 60 clr [ %i1 + 0x160 ]
40007dc4: c0 26 61 64 clr [ %i1 + 0x164 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
40007dc8: c0 26 61 58 clr [ %i1 + 0x158 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
40007dcc: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0
/*
* 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 );
40007dd0: 90 10 00 19 mov %i1, %o0
40007dd4: 40 00 02 ad call 40008888 <_Thread_Stack_Allocate>
40007dd8: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
40007ddc: 80 a6 c0 08 cmp %i3, %o0
40007de0: 18 80 00 4f bgu 40007f1c <_Thread_Initialize+0x16c>
40007de4: 80 a2 20 00 cmp %o0, 0
40007de8: 02 80 00 4d be 40007f1c <_Thread_Initialize+0x16c> <== NEVER TAKEN
40007dec: 25 10 00 70 sethi %hi(0x4001c000), %l2
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
40007df0: c4 06 60 c8 ld [ %i1 + 0xc8 ], %g2
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
40007df4: c2 04 a1 8c ld [ %l2 + 0x18c ], %g1
40007df8: c4 26 60 c4 st %g2, [ %i1 + 0xc4 ]
the_stack->size = size;
40007dfc: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40007e00: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
40007e04: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
40007e08: c0 26 60 68 clr [ %i1 + 0x68 ]
40007e0c: 80 a0 60 00 cmp %g1, 0
40007e10: 12 80 00 45 bne 40007f24 <_Thread_Initialize+0x174>
40007e14: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
40007e18: c0 26 61 68 clr [ %i1 + 0x168 ]
40007e1c: b6 10 20 00 clr %i3
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
40007e20: 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 );
40007e24: 92 10 00 1d mov %i5, %o1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
40007e28: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ]
the_thread->Start.budget_callout = budget_callout;
40007e2c: 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 );
40007e30: 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;
40007e34: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
40007e38: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
40007e3c: e0 2e 60 ac stb %l0, [ %i1 + 0xac ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
40007e40: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
40007e44: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
40007e48: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
40007e4c: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
40007e50: c0 26 60 1c clr [ %i1 + 0x1c ]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
40007e54: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
40007e58: 40 00 01 ec call 40008608 <_Thread_Set_priority>
40007e5c: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40007e60: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
40007e64: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
40007e68: 83 28 60 02 sll %g1, 2, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
40007e6c: e2 26 60 0c st %l1, [ %i1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40007e70: 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 );
40007e74: c0 26 60 84 clr [ %i1 + 0x84 ]
40007e78: 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 );
40007e7c: 90 10 00 19 mov %i1, %o0
40007e80: 40 00 03 ac call 40008d30 <_User_extensions_Thread_create>
40007e84: b0 10 20 01 mov 1, %i0
if ( extension_status )
40007e88: 80 8a 20 ff btst 0xff, %o0
40007e8c: 12 80 00 22 bne 40007f14 <_Thread_Initialize+0x164>
40007e90: 01 00 00 00 nop
return true;
failed:
if ( the_thread->libc_reent )
40007e94: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
40007e98: 80 a2 20 00 cmp %o0, 0
40007e9c: 22 80 00 05 be,a 40007eb0 <_Thread_Initialize+0x100>
40007ea0: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( the_thread->libc_reent );
40007ea4: 40 00 04 dd call 40009218 <_Workspace_Free>
40007ea8: 01 00 00 00 nop
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
40007eac: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
40007eb0: 80 a2 20 00 cmp %o0, 0
40007eb4: 22 80 00 05 be,a 40007ec8 <_Thread_Initialize+0x118>
40007eb8: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
40007ebc: 40 00 04 d7 call 40009218 <_Workspace_Free>
40007ec0: 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] )
40007ec4: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
40007ec8: 80 a2 20 00 cmp %o0, 0
40007ecc: 22 80 00 05 be,a 40007ee0 <_Thread_Initialize+0x130> <== ALWAYS TAKEN
40007ed0: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
40007ed4: 40 00 04 d1 call 40009218 <_Workspace_Free> <== NOT EXECUTED
40007ed8: 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] )
40007edc: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 <== NOT EXECUTED
40007ee0: 80 a2 20 00 cmp %o0, 0
40007ee4: 02 80 00 05 be 40007ef8 <_Thread_Initialize+0x148> <== ALWAYS TAKEN
40007ee8: 80 a6 e0 00 cmp %i3, 0
_Workspace_Free( the_thread->API_Extensions[i] );
40007eec: 40 00 04 cb call 40009218 <_Workspace_Free> <== NOT EXECUTED
40007ef0: 01 00 00 00 nop <== NOT EXECUTED
if ( extensions_area )
40007ef4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
40007ef8: 02 80 00 05 be 40007f0c <_Thread_Initialize+0x15c>
40007efc: 90 10 00 19 mov %i1, %o0
(void) _Workspace_Free( extensions_area );
40007f00: 40 00 04 c6 call 40009218 <_Workspace_Free>
40007f04: 90 10 00 1b mov %i3, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
40007f08: 90 10 00 19 mov %i1, %o0
40007f0c: 40 00 02 7a call 400088f4 <_Thread_Stack_Free>
40007f10: b0 10 20 00 clr %i0
return false;
}
40007f14: 81 c7 e0 08 ret
40007f18: 81 e8 00 00 restore
/*
* 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 );
if ( !actual_stack_size || actual_stack_size < stack_size )
40007f1c: 81 c7 e0 08 ret
40007f20: 91 e8 20 00 restore %g0, 0, %o0
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
40007f24: 82 00 60 01 inc %g1
40007f28: 40 00 04 b3 call 400091f4 <_Workspace_Allocate>
40007f2c: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
40007f30: b6 92 20 00 orcc %o0, 0, %i3
40007f34: 02 bf ff d8 be 40007e94 <_Thread_Initialize+0xe4>
40007f38: c8 04 a1 8c ld [ %l2 + 0x18c ], %g4
goto failed;
}
the_thread->extensions = (void **) extensions_area;
40007f3c: f6 26 61 68 st %i3, [ %i1 + 0x168 ]
40007f40: 86 10 00 1b mov %i3, %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++ )
40007f44: 84 10 20 00 clr %g2
40007f48: 10 80 00 03 b 40007f54 <_Thread_Initialize+0x1a4>
40007f4c: 82 10 20 00 clr %g1
40007f50: c6 06 61 68 ld [ %i1 + 0x168 ], %g3
the_thread->extensions[i] = NULL;
40007f54: 85 28 a0 02 sll %g2, 2, %g2
40007f58: c0 20 c0 02 clr [ %g3 + %g2 ]
* 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++ )
40007f5c: 82 00 60 01 inc %g1
40007f60: 80 a1 00 01 cmp %g4, %g1
40007f64: 1a bf ff fb bcc 40007f50 <_Thread_Initialize+0x1a0>
40007f68: 84 10 00 01 mov %g1, %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
40007f6c: 10 bf ff ae b 40007e24 <_Thread_Initialize+0x74>
40007f70: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
4000c190 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4000c190: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
4000c194: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000c198: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001c1ac <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
4000c19c: 7f ff d6 d0 call 40001cdc <sparc_disable_interrupts>
4000c1a0: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
4000c1a4: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
4000c1a8: c4 04 40 00 ld [ %l1 ], %g2
4000c1ac: c2 04 60 08 ld [ %l1 + 8 ], %g1
4000c1b0: 80 a0 80 01 cmp %g2, %g1
4000c1b4: 02 80 00 1f be 4000c230 <_Thread_Reset_timeslice+0xa0>
4000c1b8: 86 04 60 04 add %l1, 4, %g3
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4000c1bc: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
4000c1c0: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
4000c1c4: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000c1c8: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4000c1cc: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4000c1d0: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
4000c1d4: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
4000c1d8: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4000c1dc: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4000c1e0: 7f ff d6 c3 call 40001cec <sparc_enable_interrupts>
4000c1e4: 01 00 00 00 nop
4000c1e8: 7f ff d6 bd call 40001cdc <sparc_disable_interrupts>
4000c1ec: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
4000c1f0: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000c1f4: c4 00 61 7c ld [ %g1 + 0x17c ], %g2 ! 4001c17c <_Thread_Heir>
4000c1f8: 80 a4 00 02 cmp %l0, %g2
4000c1fc: 02 80 00 06 be 4000c214 <_Thread_Reset_timeslice+0x84> <== ALWAYS TAKEN
4000c200: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
4000c204: 03 10 00 70 sethi %hi(0x4001c000), %g1 <== NOT EXECUTED
4000c208: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ] ! 4001c1bc <_Context_Switch_necessary><== NOT EXECUTED
_ISR_Enable( level );
4000c20c: 7f ff d6 b8 call 40001cec <sparc_enable_interrupts> <== NOT EXECUTED
4000c210: 81 e8 00 00 restore <== NOT EXECUTED
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
4000c214: c4 04 40 00 ld [ %l1 ], %g2
4000c218: c4 20 61 7c st %g2, [ %g1 + 0x17c ]
_Context_Switch_necessary = true;
4000c21c: 84 10 20 01 mov 1, %g2
4000c220: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000c224: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ] ! 4001c1bc <_Context_Switch_necessary>
_ISR_Enable( level );
4000c228: 7f ff d6 b1 call 40001cec <sparc_enable_interrupts>
4000c22c: 81 e8 00 00 restore
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
4000c230: 7f ff d6 af call 40001cec <sparc_enable_interrupts>
4000c234: 81 e8 00 00 restore
4000cba8 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4000cba8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4000cbac: 7f ff d4 ce call 40001ee4 <sparc_disable_interrupts>
4000cbb0: a0 10 00 18 mov %i0, %l0
4000cbb4: b0 10 00 08 mov %o0, %i0
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4000cbb8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & STATES_SUSPENDED ) {
4000cbbc: 80 88 60 02 btst 2, %g1
4000cbc0: 02 80 00 05 be 4000cbd4 <_Thread_Resume+0x2c> <== NEVER TAKEN
4000cbc4: 82 08 7f fd and %g1, -3, %g1
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4000cbc8: 80 a0 60 00 cmp %g1, 0
4000cbcc: 02 80 00 04 be 4000cbdc <_Thread_Resume+0x34>
4000cbd0: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_Context_Switch_necessary = true;
}
}
}
_ISR_Enable( level );
4000cbd4: 7f ff d4 c8 call 40001ef4 <sparc_enable_interrupts>
4000cbd8: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4000cbdc: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
if ( _States_Is_ready( current_state ) ) {
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4000cbe0: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
4000cbe4: c8 10 80 00 lduh [ %g2 ], %g4
4000cbe8: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
4000cbec: 86 11 00 03 or %g4, %g3, %g3
4000cbf0: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000cbf4: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
4000cbf8: c8 14 20 94 lduh [ %l0 + 0x94 ], %g4
4000cbfc: c4 24 00 00 st %g2, [ %l0 ]
4000cc00: 07 10 00 88 sethi %hi(0x40022000), %g3
old_last_node = the_chain->last;
4000cc04: c4 00 60 08 ld [ %g1 + 8 ], %g2
4000cc08: da 10 e2 a0 lduh [ %g3 + 0x2a0 ], %o5
the_chain->last = the_node;
4000cc0c: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
4000cc10: c4 24 20 04 st %g2, [ %l0 + 4 ]
4000cc14: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4000cc18: e0 20 80 00 st %l0, [ %g2 ]
4000cc1c: c2 30 e2 a0 sth %g1, [ %g3 + 0x2a0 ]
_ISR_Flash( level );
4000cc20: 7f ff d4 b5 call 40001ef4 <sparc_enable_interrupts>
4000cc24: 01 00 00 00 nop
4000cc28: 7f ff d4 af call 40001ee4 <sparc_disable_interrupts>
4000cc2c: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4000cc30: 03 10 00 88 sethi %hi(0x40022000), %g1
4000cc34: c6 00 62 7c ld [ %g1 + 0x27c ], %g3 ! 4002227c <_Thread_Heir>
4000cc38: c4 04 20 14 ld [ %l0 + 0x14 ], %g2
4000cc3c: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
4000cc40: 80 a0 80 03 cmp %g2, %g3
4000cc44: 1a bf ff e4 bcc 4000cbd4 <_Thread_Resume+0x2c>
4000cc48: 07 10 00 88 sethi %hi(0x40022000), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4000cc4c: c6 00 e2 ac ld [ %g3 + 0x2ac ], %g3 ! 400222ac <_Thread_Executing>
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
4000cc50: e0 20 62 7c st %l0, [ %g1 + 0x27c ]
if ( _Thread_Executing->is_preemptible ||
4000cc54: c2 08 e0 75 ldub [ %g3 + 0x75 ], %g1
4000cc58: 80 a0 60 00 cmp %g1, 0
4000cc5c: 32 80 00 05 bne,a 4000cc70 <_Thread_Resume+0xc8>
4000cc60: 84 10 20 01 mov 1, %g2
4000cc64: 80 a0 a0 00 cmp %g2, 0
4000cc68: 12 bf ff db bne 4000cbd4 <_Thread_Resume+0x2c> <== ALWAYS TAKEN
4000cc6c: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4000cc70: 03 10 00 88 sethi %hi(0x40022000), %g1
4000cc74: c4 28 62 bc stb %g2, [ %g1 + 0x2bc ] ! 400222bc <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4000cc78: 7f ff d4 9f call 40001ef4 <sparc_enable_interrupts>
4000cc7c: 81 e8 00 00 restore
40008a24 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
40008a24: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
40008a28: 03 10 00 70 sethi %hi(0x4001c000), %g1
40008a2c: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001c1ac <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
40008a30: 7f ff e4 ab call 40001cdc <sparc_disable_interrupts>
40008a34: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
40008a38: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
40008a3c: c4 04 40 00 ld [ %l1 ], %g2
40008a40: c2 04 60 08 ld [ %l1 + 8 ], %g1
40008a44: 80 a0 80 01 cmp %g2, %g1
40008a48: 02 80 00 19 be 40008aac <_Thread_Yield_processor+0x88>
40008a4c: 86 04 60 04 add %l1, 4, %g3
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
40008a50: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
40008a54: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
40008a58: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
40008a5c: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
40008a60: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
40008a64: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
40008a68: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
40008a6c: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
40008a70: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
40008a74: 7f ff e4 9e call 40001cec <sparc_enable_interrupts>
40008a78: 01 00 00 00 nop
40008a7c: 7f ff e4 98 call 40001cdc <sparc_disable_interrupts>
40008a80: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
40008a84: 03 10 00 70 sethi %hi(0x4001c000), %g1
40008a88: c4 00 61 7c ld [ %g1 + 0x17c ], %g2 ! 4001c17c <_Thread_Heir>
40008a8c: 80 a4 00 02 cmp %l0, %g2
40008a90: 22 80 00 0e be,a 40008ac8 <_Thread_Yield_processor+0xa4> <== ALWAYS TAKEN
40008a94: c4 04 40 00 ld [ %l1 ], %g2
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
40008a98: 84 10 20 01 mov 1, %g2
40008a9c: 03 10 00 70 sethi %hi(0x4001c000), %g1
40008aa0: c4 28 61 bc stb %g2, [ %g1 + 0x1bc ] ! 4001c1bc <_Context_Switch_necessary>
_ISR_Enable( level );
40008aa4: 7f ff e4 92 call 40001cec <sparc_enable_interrupts>
40008aa8: 81 e8 00 00 restore
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
40008aac: 03 10 00 70 sethi %hi(0x4001c000), %g1
40008ab0: c2 00 61 7c ld [ %g1 + 0x17c ], %g1 ! 4001c17c <_Thread_Heir>
40008ab4: 80 a4 00 01 cmp %l0, %g1
40008ab8: 32 bf ff f9 bne,a 40008a9c <_Thread_Yield_processor+0x78><== NEVER TAKEN
40008abc: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
_Context_Switch_necessary = true;
_ISR_Enable( level );
40008ac0: 7f ff e4 8b call 40001cec <sparc_enable_interrupts>
40008ac4: 81 e8 00 00 restore
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
40008ac8: 10 bf ff f4 b 40008a98 <_Thread_Yield_processor+0x74>
40008acc: c4 20 61 7c st %g2, [ %g1 + 0x17c ]
4000828c <_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
)
{
4000828c: 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;
40008290: 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);
40008294: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
40008298: 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);
4000829c: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
400082a0: 82 06 60 38 add %i1, 0x38, %g1
400082a4: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
400082a8: 2d 10 00 6e sethi %hi(0x4001b800), %l6
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
400082ac: 83 34 20 06 srl %l0, 6, %g1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
400082b0: 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 ];
400082b4: ab 28 60 04 sll %g1, 4, %l5
400082b8: ac 15 a0 04 or %l6, 4, %l6
400082bc: 83 28 60 02 sll %g1, 2, %g1
block_state = the_thread_queue->state;
400082c0: e8 06 20 38 ld [ %i0 + 0x38 ], %l4
_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 ];
400082c4: aa 25 40 01 sub %l5, %g1, %l5
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
400082c8: 12 80 00 24 bne 40008358 <_Thread_queue_Enqueue_priority+0xcc>
400082cc: aa 06 00 15 add %i0, %l5, %l5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
400082d0: ac 05 60 04 add %l5, 4, %l6
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
400082d4: 7f ff e6 82 call 40001cdc <sparc_disable_interrupts>
400082d8: 01 00 00 00 nop
400082dc: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->first;
400082e0: c2 05 40 00 ld [ %l5 ], %g1
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
400082e4: 80 a0 40 16 cmp %g1, %l6
400082e8: 02 80 00 3a be 400083d0 <_Thread_queue_Enqueue_priority+0x144>
400082ec: a2 10 00 01 mov %g1, %l1
search_priority = search_thread->current_priority;
400082f0: e6 00 60 14 ld [ %g1 + 0x14 ], %l3
if ( priority <= search_priority )
400082f4: 80 a4 00 13 cmp %l0, %l3
400082f8: 18 80 00 0b bgu 40008324 <_Thread_queue_Enqueue_priority+0x98>
400082fc: 01 00 00 00 nop
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
40008300: 10 80 00 36 b 400083d8 <_Thread_queue_Enqueue_priority+0x14c>
40008304: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
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 ) ) {
40008308: 80 a4 40 16 cmp %l1, %l6
4000830c: 02 80 00 32 be 400083d4 <_Thread_queue_Enqueue_priority+0x148>
40008310: 82 10 00 11 mov %l1, %g1
search_priority = search_thread->current_priority;
40008314: e6 04 60 14 ld [ %l1 + 0x14 ], %l3
if ( priority <= search_priority )
40008318: 80 a4 00 13 cmp %l0, %l3
4000831c: 28 80 00 2f bleu,a 400083d8 <_Thread_queue_Enqueue_priority+0x14c>
40008320: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
40008324: 7f ff e6 72 call 40001cec <sparc_enable_interrupts>
40008328: 90 10 00 12 mov %l2, %o0
4000832c: 7f ff e6 6c call 40001cdc <sparc_disable_interrupts>
40008330: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
40008334: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
40008338: 80 8d 00 01 btst %l4, %g1
4000833c: 32 bf ff f3 bne,a 40008308 <_Thread_queue_Enqueue_priority+0x7c><== ALWAYS TAKEN
40008340: e2 04 40 00 ld [ %l1 ], %l1
_ISR_Enable( level );
40008344: 7f ff e6 6a call 40001cec <sparc_enable_interrupts> <== NOT EXECUTED
40008348: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
goto restart_forward_search;
4000834c: 30 bf ff e2 b,a 400082d4 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
40008350: 7f ff e6 67 call 40001cec <sparc_enable_interrupts>
40008354: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
40008358: 7f ff e6 61 call 40001cdc <sparc_disable_interrupts>
4000835c: e6 0d 80 00 ldub [ %l6 ], %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;
40008360: a6 04 e0 01 inc %l3
_ISR_Disable( level );
40008364: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->last;
40008368: c2 05 60 08 ld [ %l5 + 8 ], %g1
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4000836c: 80 a0 40 15 cmp %g1, %l5
40008370: 02 80 00 20 be 400083f0 <_Thread_queue_Enqueue_priority+0x164>
40008374: a2 10 00 01 mov %g1, %l1
search_priority = search_thread->current_priority;
40008378: e6 00 60 14 ld [ %g1 + 0x14 ], %l3
if ( priority >= search_priority )
4000837c: 80 a4 00 13 cmp %l0, %l3
40008380: 0a 80 00 0b bcs 400083ac <_Thread_queue_Enqueue_priority+0x120>
40008384: 01 00 00 00 nop
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
40008388: 10 80 00 1b b 400083f4 <_Thread_queue_Enqueue_priority+0x168>
4000838c: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
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 ) ) {
40008390: 80 a4 40 15 cmp %l1, %l5
40008394: 02 80 00 17 be 400083f0 <_Thread_queue_Enqueue_priority+0x164>
40008398: 82 10 00 11 mov %l1, %g1
search_priority = search_thread->current_priority;
4000839c: e6 04 60 14 ld [ %l1 + 0x14 ], %l3
if ( priority >= search_priority )
400083a0: 80 a4 00 13 cmp %l0, %l3
400083a4: 3a 80 00 14 bcc,a 400083f4 <_Thread_queue_Enqueue_priority+0x168>
400083a8: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
400083ac: 7f ff e6 50 call 40001cec <sparc_enable_interrupts>
400083b0: 90 10 00 12 mov %l2, %o0
400083b4: 7f ff e6 4a call 40001cdc <sparc_disable_interrupts>
400083b8: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
400083bc: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
400083c0: 80 8d 00 01 btst %l4, %g1
400083c4: 32 bf ff f3 bne,a 40008390 <_Thread_queue_Enqueue_priority+0x104>
400083c8: e2 04 60 04 ld [ %l1 + 4 ], %l1
400083cc: 30 bf ff e1 b,a 40008350 <_Thread_queue_Enqueue_priority+0xc4>
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 ) ) {
400083d0: a6 10 3f ff mov -1, %l3
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
400083d4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
400083d8: 80 a0 a0 01 cmp %g2, 1
400083dc: 02 80 00 17 be 40008438 <_Thread_queue_Enqueue_priority+0x1ac>
400083e0: 80 a4 00 13 cmp %l0, %l3
* 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;
400083e4: e4 26 80 00 st %l2, [ %i2 ]
return the_thread_queue->sync_state;
}
400083e8: 81 c7 e0 08 ret
400083ec: 91 e8 00 02 restore %g0, %g2, %o0
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
400083f0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
400083f4: 80 a0 a0 01 cmp %g2, 1
400083f8: 32 bf ff fc bne,a 400083e8 <_Thread_queue_Enqueue_priority+0x15c>
400083fc: e4 26 80 00 st %l2, [ %i2 ]
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
40008400: 80 a4 00 13 cmp %l0, %l3
40008404: 02 80 00 1a be 4000846c <_Thread_queue_Enqueue_priority+0x1e0>
40008408: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
4000840c: c4 00 40 00 ld [ %g1 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
40008410: c2 26 60 04 st %g1, [ %i1 + 4 ]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
40008414: c4 26 40 00 st %g2, [ %i1 ]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
40008418: 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;
4000841c: f2 20 40 00 st %i1, [ %g1 ]
next_node->previous = the_node;
40008420: f2 20 a0 04 st %i1, [ %g2 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40008424: b0 10 20 01 mov 1, %i0
40008428: 7f ff e6 31 call 40001cec <sparc_enable_interrupts>
4000842c: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40008430: 81 c7 e0 08 ret
40008434: 81 e8 00 00 restore
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
40008438: 02 80 00 0d be 4000846c <_Thread_queue_Enqueue_priority+0x1e0>
4000843c: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
40008440: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
40008444: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = previous_node;
40008448: c4 26 60 04 st %g2, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
4000844c: 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;
40008450: f2 20 80 00 st %i1, [ %g2 ]
search_node->previous = the_node;
40008454: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40008458: b0 10 20 01 mov 1, %i0
4000845c: 7f ff e6 24 call 40001cec <sparc_enable_interrupts>
40008460: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40008464: 81 c7 e0 08 ret
40008468: 81 e8 00 00 restore
4000846c: a2 04 60 3c add %l1, 0x3c, %l1
_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;
40008470: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
40008474: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
40008478: 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;
4000847c: 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;
40008480: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
40008484: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40008488: b0 10 20 01 mov 1, %i0
4000848c: 7f ff e6 18 call 40001cec <sparc_enable_interrupts>
40008490: 90 10 00 12 mov %l2, %o0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40008494: 81 c7 e0 08 ret
40008498: 81 e8 00 00 restore
40008548 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
40008548: 9d e3 bf 98 save %sp, -104, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
4000854c: 80 a6 20 00 cmp %i0, 0
40008550: 02 80 00 13 be 4000859c <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
40008554: 01 00 00 00 nop
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
40008558: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
4000855c: 80 a4 60 01 cmp %l1, 1
40008560: 02 80 00 04 be 40008570 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
40008564: 01 00 00 00 nop
40008568: 81 c7 e0 08 ret <== NOT EXECUTED
4000856c: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
40008570: 7f ff e5 db call 40001cdc <sparc_disable_interrupts>
40008574: 01 00 00 00 nop
40008578: a0 10 00 08 mov %o0, %l0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4000857c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
40008580: 03 00 00 ef sethi %hi(0x3bc00), %g1
40008584: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
40008588: 80 88 80 01 btst %g2, %g1
4000858c: 12 80 00 06 bne 400085a4 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
40008590: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
40008594: 7f ff e5 d6 call 40001cec <sparc_enable_interrupts>
40008598: 90 10 00 10 mov %l0, %o0
4000859c: 81 c7 e0 08 ret
400085a0: 81 e8 00 00 restore
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
400085a4: 92 10 00 19 mov %i1, %o1
400085a8: e2 26 20 30 st %l1, [ %i0 + 0x30 ]
400085ac: 40 00 0e 57 call 4000bf08 <_Thread_queue_Extract_priority_helper>
400085b0: 94 10 20 01 mov 1, %o2
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
400085b4: 90 10 00 18 mov %i0, %o0
400085b8: 92 10 00 19 mov %i1, %o1
400085bc: 7f ff ff 34 call 4000828c <_Thread_queue_Enqueue_priority>
400085c0: 94 07 bf fc add %fp, -4, %o2
400085c4: 30 bf ff f4 b,a 40008594 <_Thread_queue_Requeue+0x4c>
400085c8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
400085c8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
400085cc: 90 10 00 18 mov %i0, %o0
400085d0: 7f ff fd cd call 40007d04 <_Thread_Get>
400085d4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
400085d8: c2 07 bf fc ld [ %fp + -4 ], %g1
400085dc: 80 a0 60 00 cmp %g1, 0
400085e0: 12 80 00 08 bne 40008600 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
400085e4: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
400085e8: 40 00 0e 83 call 4000bff4 <_Thread_queue_Process_timeout>
400085ec: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
400085f0: 03 10 00 70 sethi %hi(0x4001c000), %g1
400085f4: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
400085f8: 84 00 bf ff add %g2, -1, %g2
400085fc: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
40008600: 81 c7 e0 08 ret
40008604: 81 e8 00 00 restore
40016128 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
40016128: 9d e3 bf 88 save %sp, -120, %sp
4001612c: 2d 10 00 f6 sethi %hi(0x4003d800), %l6
40016130: ba 07 bf f4 add %fp, -12, %i5
40016134: a8 07 bf f8 add %fp, -8, %l4
40016138: a4 07 bf e8 add %fp, -24, %l2
4001613c: ae 07 bf ec add %fp, -20, %l7
40016140: 2b 10 00 f6 sethi %hi(0x4003d800), %l5
40016144: 39 10 00 f5 sethi %hi(0x4003d400), %i4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
40016148: c0 27 bf f8 clr [ %fp + -8 ]
4001614c: c0 27 bf ec clr [ %fp + -20 ]
the_chain->last = _Chain_Head(the_chain);
40016150: fa 27 bf fc st %i5, [ %fp + -4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40016154: e8 27 bf f4 st %l4, [ %fp + -12 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
40016158: e4 27 bf f0 st %l2, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4001615c: ee 27 bf e8 st %l7, [ %fp + -24 ]
40016160: ac 15 a1 24 or %l6, 0x124, %l6
40016164: aa 15 60 60 or %l5, 0x60, %l5
40016168: b8 17 23 d0 or %i4, 0x3d0, %i4
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
4001616c: a2 06 20 30 add %i0, 0x30, %l1
/*
* 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 );
40016170: a6 06 20 68 add %i0, 0x68, %l3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40016174: b2 06 20 08 add %i0, 8, %i1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
40016178: b4 06 20 40 add %i0, 0x40, %i2
_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;
4001617c: b6 10 20 01 mov 1, %i3
{
/*
* 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;
40016180: fa 26 20 78 st %i5, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
40016184: c2 05 80 00 ld [ %l6 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
40016188: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
4001618c: 90 10 00 11 mov %l1, %o0
40016190: 92 20 40 09 sub %g1, %o1, %o1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
40016194: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
40016198: 40 00 11 c8 call 4001a8b8 <_Watchdog_Adjust_to_chain>
4001619c: 94 10 00 12 mov %l2, %o2
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
400161a0: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
400161a4: e0 05 40 00 ld [ %l5 ], %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 ) {
400161a8: 80 a4 00 09 cmp %l0, %o1
400161ac: 38 80 00 2f bgu,a 40016268 <_Timer_server_Body+0x140>
400161b0: 92 24 00 09 sub %l0, %o1, %o1
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
400161b4: 80 a4 00 09 cmp %l0, %o1
400161b8: 0a 80 00 30 bcs 40016278 <_Timer_server_Body+0x150>
400161bc: 94 22 40 10 sub %o1, %l0, %o2
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
400161c0: 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 );
400161c4: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
400161c8: 40 00 02 98 call 40016c28 <_Chain_Get>
400161cc: 01 00 00 00 nop
if ( timer == NULL ) {
400161d0: 80 a2 20 00 cmp %o0, 0
400161d4: 02 80 00 10 be 40016214 <_Timer_server_Body+0xec>
400161d8: 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 ) {
400161dc: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
400161e0: 80 a0 60 01 cmp %g1, 1
400161e4: 02 80 00 29 be 40016288 <_Timer_server_Body+0x160>
400161e8: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
400161ec: 12 bf ff f6 bne 400161c4 <_Timer_server_Body+0x9c> <== NEVER TAKEN
400161f0: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
400161f4: 40 00 11 e7 call 4001a990 <_Watchdog_Insert>
400161f8: 90 10 00 13 mov %l3, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
400161fc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
40016200: 40 00 02 8a call 40016c28 <_Chain_Get>
40016204: 01 00 00 00 nop
if ( timer == NULL ) {
40016208: 80 a2 20 00 cmp %o0, 0
4001620c: 32 bf ff f5 bne,a 400161e0 <_Timer_server_Body+0xb8> <== NEVER TAKEN
40016210: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
40016214: 7f ff e3 a7 call 4000f0b0 <sparc_disable_interrupts>
40016218: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
4001621c: c2 07 bf f4 ld [ %fp + -12 ], %g1
40016220: 80 a5 00 01 cmp %l4, %g1
40016224: 02 80 00 1d be 40016298 <_Timer_server_Body+0x170> <== ALWAYS TAKEN
40016228: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
4001622c: 7f ff e3 a5 call 4000f0c0 <sparc_enable_interrupts> <== NOT EXECUTED
40016230: 01 00 00 00 nop <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
40016234: c2 05 80 00 ld [ %l6 ], %g1 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
40016238: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
4001623c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
40016240: 92 20 40 09 sub %g1, %o1, %o1 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
40016244: c2 26 20 3c st %g1, [ %i0 + 0x3c ] <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
40016248: 40 00 11 9c call 4001a8b8 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED
4001624c: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
40016250: d2 06 20 74 ld [ %i0 + 0x74 ], %o1 <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
40016254: e0 05 40 00 ld [ %l5 ], %l0 <== NOT EXECUTED
/*
* 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 ) {
40016258: 80 a4 00 09 cmp %l0, %o1 <== NOT EXECUTED
4001625c: 08 bf ff d7 bleu 400161b8 <_Timer_server_Body+0x90> <== NOT EXECUTED
40016260: 01 00 00 00 nop <== NOT EXECUTED
/*
* 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 );
40016264: 92 24 00 09 sub %l0, %o1, %o1 <== NOT EXECUTED
40016268: 90 10 00 13 mov %l3, %o0
4001626c: 40 00 11 93 call 4001a8b8 <_Watchdog_Adjust_to_chain>
40016270: 94 10 00 12 mov %l2, %o2
40016274: 30 bf ff d3 b,a 400161c0 <_Timer_server_Body+0x98>
/*
* 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 );
40016278: 90 10 00 13 mov %l3, %o0
4001627c: 40 00 11 5f call 4001a7f8 <_Watchdog_Adjust>
40016280: 92 10 20 01 mov 1, %o1
40016284: 30 bf ff cf b,a 400161c0 <_Timer_server_Body+0x98>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
40016288: 92 02 20 10 add %o0, 0x10, %o1
4001628c: 40 00 11 c1 call 4001a990 <_Watchdog_Insert>
40016290: 90 10 00 11 mov %l1, %o0
40016294: 30 bf ff cc b,a 400161c4 <_Timer_server_Body+0x9c>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
40016298: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
4001629c: 7f ff e3 89 call 4000f0c0 <sparc_enable_interrupts>
400162a0: 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 ) ) {
400162a4: c2 07 bf e8 ld [ %fp + -24 ], %g1
400162a8: 80 a5 c0 01 cmp %l7, %g1
400162ac: 12 80 00 0c bne 400162dc <_Timer_server_Body+0x1b4>
400162b0: 01 00 00 00 nop
400162b4: 30 80 00 13 b,a 40016300 <_Timer_server_Body+0x1d8>
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
400162b8: c0 24 20 08 clr [ %l0 + 8 ]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
400162bc: c2 27 bf e8 st %g1, [ %fp + -24 ]
new_first->previous = _Chain_Head(the_chain);
400162c0: e4 20 60 04 st %l2, [ %g1 + 4 ]
_ISR_Enable( level );
400162c4: 7f ff e3 7f call 4000f0c0 <sparc_enable_interrupts>
400162c8: 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 );
400162cc: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
400162d0: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
400162d4: 9f c0 40 00 call %g1
400162d8: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
400162dc: 7f ff e3 75 call 4000f0b0 <sparc_disable_interrupts>
400162e0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
400162e4: 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))
400162e8: 80 a5 c0 10 cmp %l7, %l0
400162ec: 32 bf ff f3 bne,a 400162b8 <_Timer_server_Body+0x190>
400162f0: c2 04 00 00 ld [ %l0 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
400162f4: 7f ff e3 73 call 4000f0c0 <sparc_enable_interrupts>
400162f8: 01 00 00 00 nop
400162fc: 30 bf ff a1 b,a 40016180 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
40016300: c0 2e 20 7c clrb [ %i0 + 0x7c ]
40016304: c2 07 00 00 ld [ %i4 ], %g1
40016308: 82 00 60 01 inc %g1
4001630c: c2 27 00 00 st %g1, [ %i4 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
40016310: d0 06 00 00 ld [ %i0 ], %o0
40016314: 40 00 0e 98 call 40019d74 <_Thread_Set_state>
40016318: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
4001631c: 7f ff ff 59 call 40016080 <_Timer_server_Reset_interval_system_watchdog>
40016320: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
40016324: 7f ff ff 6c call 400160d4 <_Timer_server_Reset_tod_system_watchdog>
40016328: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
4001632c: 40 00 0b c1 call 40019230 <_Thread_Enable_dispatch>
40016330: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40016334: 90 10 00 19 mov %i1, %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;
40016338: f6 2e 20 7c stb %i3, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
4001633c: 40 00 12 02 call 4001ab44 <_Watchdog_Remove>
40016340: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
40016344: 40 00 12 00 call 4001ab44 <_Watchdog_Remove>
40016348: 90 10 00 1a mov %i2, %o0
4001634c: 30 bf ff 8d b,a 40016180 <_Timer_server_Body+0x58>
40008ad0 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
40008ad0: 9d e3 bf a0 save %sp, -96, %sp
40008ad4: 82 10 00 18 mov %i0, %g1
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
40008ad8: c8 06 60 04 ld [ %i1 + 4 ], %g4
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
40008adc: f0 06 40 00 ld [ %i1 ], %i0
/* Add the basics */
time->tv_sec += add->tv_sec;
40008ae0: c6 00 40 00 ld [ %g1 ], %g3
time->tv_nsec += add->tv_nsec;
40008ae4: c4 00 60 04 ld [ %g1 + 4 ], %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
40008ae8: 86 00 c0 18 add %g3, %i0, %g3
time->tv_nsec += add->tv_nsec;
40008aec: 84 01 00 02 add %g4, %g2, %g2
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
40008af0: c6 20 40 00 st %g3, [ %g1 ]
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
40008af4: 1b 0e e6 b2 sethi %hi(0x3b9ac800), %o5
40008af8: 9a 13 61 ff or %o5, 0x1ff, %o5 ! 3b9ac9ff <RAM_SIZE+0x3b5ac9ff>
40008afc: 80 a0 80 0d cmp %g2, %o5
40008b00: 08 80 00 0b bleu 40008b2c <_Timespec_Add_to+0x5c>
40008b04: c4 20 60 04 st %g2, [ %g1 + 4 ]
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
40008b08: 09 31 19 4d sethi %hi(0xc4653400), %g4
40008b0c: 88 11 22 00 or %g4, 0x200, %g4 ! c4653600 <LEON_REG+0x44653600>
40008b10: 84 00 80 04 add %g2, %g4, %g2
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
40008b14: 86 00 e0 01 inc %g3
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
40008b18: 80 a0 80 0d cmp %g2, %o5
40008b1c: 18 bf ff fd bgu 40008b10 <_Timespec_Add_to+0x40> <== NEVER TAKEN
40008b20: b0 06 20 01 inc %i0
40008b24: c6 20 40 00 st %g3, [ %g1 ]
40008b28: c4 20 60 04 st %g2, [ %g1 + 4 ]
time->tv_sec++;
seconds++;
}
return seconds;
}
40008b2c: 81 c7 e0 08 ret
40008b30: 81 e8 00 00 restore
4000abd8 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
4000abd8: c6 02 00 00 ld [ %o0 ], %g3
4000abdc: c4 02 40 00 ld [ %o1 ], %g2
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
4000abe0: 82 10 00 08 mov %o0, %g1
if ( lhs->tv_sec > rhs->tv_sec )
4000abe4: 80 a0 c0 02 cmp %g3, %g2
4000abe8: 14 80 00 0a bg 4000ac10 <_Timespec_Greater_than+0x38>
4000abec: 90 10 20 01 mov 1, %o0
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4000abf0: 80 a0 c0 02 cmp %g3, %g2
4000abf4: 06 80 00 07 bl 4000ac10 <_Timespec_Greater_than+0x38> <== NEVER TAKEN
4000abf8: 90 10 20 00 clr %o0
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4000abfc: c4 00 60 04 ld [ %g1 + 4 ], %g2
4000ac00: c2 02 60 04 ld [ %o1 + 4 ], %g1
4000ac04: 80 a0 80 01 cmp %g2, %g1
4000ac08: 04 80 00 04 ble 4000ac18 <_Timespec_Greater_than+0x40>
4000ac0c: 90 10 20 01 mov 1, %o0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4000ac10: 81 c3 e0 08 retl
4000ac14: 01 00 00 00 nop
4000ac18: 81 c3 e0 08 retl
4000ac1c: 90 10 20 00 clr %o0 ! 0 <PROM_START>
40008ce0 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
40008ce0: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008ce4: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008ce8: a2 14 63 28 or %l1, 0x328, %l1 ! 4001c328 <_User_extensions_List>
40008cec: e0 04 60 08 ld [ %l1 + 8 ], %l0
40008cf0: 80 a4 00 11 cmp %l0, %l1
40008cf4: 02 80 00 0d be 40008d28 <_User_extensions_Fatal+0x48> <== NEVER TAKEN
40008cf8: b2 0e 60 ff and %i1, 0xff, %i1
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
40008cfc: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
40008d00: 80 a0 60 00 cmp %g1, 0
40008d04: 02 80 00 05 be 40008d18 <_User_extensions_Fatal+0x38>
40008d08: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
40008d0c: 92 10 00 19 mov %i1, %o1
40008d10: 9f c0 40 00 call %g1
40008d14: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
40008d18: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008d1c: 80 a4 00 11 cmp %l0, %l1
40008d20: 32 bf ff f8 bne,a 40008d00 <_User_extensions_Fatal+0x20>
40008d24: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
40008d28: 81 c7 e0 08 ret
40008d2c: 81 e8 00 00 restore
40008b8c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
40008b8c: 9d e3 bf a0 save %sp, -96, %sp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
40008b90: 07 10 00 6e sethi %hi(0x4001b800), %g3
40008b94: 86 10 e0 08 or %g3, 8, %g3 ! 4001b808 <Configuration>
initial_extensions = Configuration.User_extension_table;
40008b98: e6 00 e0 3c ld [ %g3 + 0x3c ], %l3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40008b9c: 1b 10 00 70 sethi %hi(0x4001c000), %o5
40008ba0: 09 10 00 70 sethi %hi(0x4001c000), %g4
40008ba4: 84 13 63 28 or %o5, 0x328, %g2
40008ba8: 82 11 20 f4 or %g4, 0xf4, %g1
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
40008bac: c4 20 a0 08 st %g2, [ %g2 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
40008bb0: c0 20 a0 04 clr [ %g2 + 4 ]
the_chain->last = _Chain_Head(the_chain);
40008bb4: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
40008bb8: c0 20 60 04 clr [ %g1 + 4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40008bbc: 84 00 a0 04 add %g2, 4, %g2
40008bc0: 82 00 60 04 add %g1, 4, %g1
40008bc4: c4 23 63 28 st %g2, [ %o5 + 0x328 ]
40008bc8: c2 21 20 f4 st %g1, [ %g4 + 0xf4 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
40008bcc: 80 a4 e0 00 cmp %l3, 0
40008bd0: 02 80 00 1b be 40008c3c <_User_extensions_Handler_initialization+0xb0>
40008bd4: e4 00 e0 38 ld [ %g3 + 0x38 ], %l2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
40008bd8: 83 2c a0 02 sll %l2, 2, %g1
40008bdc: a3 2c a0 04 sll %l2, 4, %l1
40008be0: a2 24 40 01 sub %l1, %g1, %l1
40008be4: a2 04 40 12 add %l1, %l2, %l1
40008be8: a3 2c 60 02 sll %l1, 2, %l1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
40008bec: 40 00 01 73 call 400091b8 <_Workspace_Allocate_or_fatal_error>
40008bf0: 90 10 00 11 mov %l1, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
40008bf4: 94 10 00 11 mov %l1, %o2
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
40008bf8: a0 10 00 08 mov %o0, %l0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
40008bfc: 40 00 17 44 call 4000e90c <memset>
40008c00: 92 10 20 00 clr %o1
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
40008c04: 80 a4 a0 00 cmp %l2, 0
40008c08: 02 80 00 0d be 40008c3c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
40008c0c: a2 10 20 00 clr %l1
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
40008c10: 93 2c 60 05 sll %l1, 5, %o1
40008c14: 94 10 20 20 mov 0x20, %o2
40008c18: 92 04 c0 09 add %l3, %o1, %o1
40008c1c: 40 00 16 fd call 4000e810 <memcpy>
40008c20: 90 04 20 14 add %l0, 0x14, %o0
_User_extensions_Add_set( extension );
40008c24: 40 00 0d 86 call 4000c23c <_User_extensions_Add_set>
40008c28: 90 10 00 10 mov %l0, %o0
40008c2c: a2 04 60 01 inc %l1
40008c30: 80 a4 80 11 cmp %l2, %l1
40008c34: 18 bf ff f7 bgu 40008c10 <_User_extensions_Handler_initialization+0x84>
40008c38: a0 04 20 34 add %l0, 0x34, %l0
40008c3c: 81 c7 e0 08 ret
40008c40: 81 e8 00 00 restore
40008c44 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
40008c44: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40008c48: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008c4c: e0 04 63 28 ld [ %l1 + 0x328 ], %l0 ! 4001c328 <_User_extensions_List>
40008c50: a2 14 63 28 or %l1, 0x328, %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
40008c54: a2 04 60 04 add %l1, 4, %l1
40008c58: 80 a4 00 11 cmp %l0, %l1
40008c5c: 02 80 00 0c be 40008c8c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
40008c60: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
40008c64: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
40008c68: 80 a0 60 00 cmp %g1, 0
40008c6c: 02 80 00 04 be 40008c7c <_User_extensions_Thread_begin+0x38>
40008c70: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
40008c74: 9f c0 40 00 call %g1
40008c78: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
40008c7c: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40008c80: 80 a4 00 11 cmp %l0, %l1
40008c84: 32 bf ff f9 bne,a 40008c68 <_User_extensions_Thread_begin+0x24>
40008c88: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
40008c8c: 81 c7 e0 08 ret
40008c90: 81 e8 00 00 restore
40008d30 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
40008d30: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
40008d34: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008d38: e0 04 63 28 ld [ %l1 + 0x328 ], %l0 ! 4001c328 <_User_extensions_List>
40008d3c: a2 14 63 28 or %l1, 0x328, %l1
40008d40: a2 04 60 04 add %l1, 4, %l1
40008d44: 80 a4 00 11 cmp %l0, %l1
40008d48: 02 80 00 10 be 40008d88 <_User_extensions_Thread_create+0x58><== NEVER TAKEN
40008d4c: 25 10 00 70 sethi %hi(0x4001c000), %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
40008d50: a4 14 a1 ac or %l2, 0x1ac, %l2 ! 4001c1ac <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
40008d54: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
40008d58: 80 a0 60 00 cmp %g1, 0
40008d5c: 02 80 00 07 be 40008d78 <_User_extensions_Thread_create+0x48>
40008d60: 92 10 00 18 mov %i0, %o1
status = (*the_extension->Callouts.thread_create)(
40008d64: 9f c0 40 00 call %g1
40008d68: d0 04 80 00 ld [ %l2 ], %o0
_Thread_Executing,
the_thread
);
if ( !status )
40008d6c: 80 8a 20 ff btst 0xff, %o0
40008d70: 02 80 00 08 be 40008d90 <_User_extensions_Thread_create+0x60>
40008d74: 01 00 00 00 nop
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
40008d78: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
40008d7c: 80 a4 00 11 cmp %l0, %l1
40008d80: 32 bf ff f6 bne,a 40008d58 <_User_extensions_Thread_create+0x28>
40008d84: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
return false;
}
}
return true;
}
40008d88: 81 c7 e0 08 ret
40008d8c: 91 e8 20 01 restore %g0, 1, %o0
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
40008d90: 81 c7 e0 08 ret
40008d94: 91 e8 20 00 restore %g0, 0, %o0
40008d98 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
40008d98: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008d9c: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008da0: a2 14 63 28 or %l1, 0x328, %l1 ! 4001c328 <_User_extensions_List>
40008da4: e0 04 60 08 ld [ %l1 + 8 ], %l0
40008da8: 80 a4 00 11 cmp %l0, %l1
40008dac: 02 80 00 0d be 40008de0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
40008db0: 25 10 00 70 sethi %hi(0x4001c000), %l2
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
40008db4: a4 14 a1 ac or %l2, 0x1ac, %l2 ! 4001c1ac <_Thread_Executing>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
40008db8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
40008dbc: 80 a0 60 00 cmp %g1, 0
40008dc0: 02 80 00 04 be 40008dd0 <_User_extensions_Thread_delete+0x38>
40008dc4: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_delete)(
40008dc8: 9f c0 40 00 call %g1
40008dcc: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
40008dd0: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008dd4: 80 a4 00 11 cmp %l0, %l1
40008dd8: 32 bf ff f9 bne,a 40008dbc <_User_extensions_Thread_delete+0x24>
40008ddc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
40008de0: 81 c7 e0 08 ret
40008de4: 81 e8 00 00 restore
40008c94 <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
40008c94: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008c98: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008c9c: a2 14 63 28 or %l1, 0x328, %l1 ! 4001c328 <_User_extensions_List>
40008ca0: e0 04 60 08 ld [ %l1 + 8 ], %l0
40008ca4: 80 a4 00 11 cmp %l0, %l1
40008ca8: 02 80 00 0c be 40008cd8 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
40008cac: 01 00 00 00 nop
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
40008cb0: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
40008cb4: 80 a0 60 00 cmp %g1, 0
40008cb8: 02 80 00 04 be 40008cc8 <_User_extensions_Thread_exitted+0x34>
40008cbc: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
40008cc0: 9f c0 40 00 call %g1
40008cc4: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
40008cc8: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
40008ccc: 80 a4 00 11 cmp %l0, %l1
40008cd0: 32 bf ff f9 bne,a 40008cb4 <_User_extensions_Thread_exitted+0x20>
40008cd4: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
40008cd8: 81 c7 e0 08 ret
40008cdc: 81 e8 00 00 restore
40009ad0 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
40009ad0: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40009ad4: 23 10 00 83 sethi %hi(0x40020c00), %l1
40009ad8: e0 04 61 08 ld [ %l1 + 0x108 ], %l0 ! 40020d08 <_User_extensions_List>
40009adc: a2 14 61 08 or %l1, 0x108, %l1
40009ae0: a2 04 60 04 add %l1, 4, %l1
40009ae4: 80 a4 00 11 cmp %l0, %l1
40009ae8: 02 80 00 0d be 40009b1c <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
40009aec: 25 10 00 82 sethi %hi(0x40020800), %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
40009af0: a4 14 a3 8c or %l2, 0x38c, %l2 ! 40020b8c <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
40009af4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
40009af8: 80 a0 60 00 cmp %g1, 0
40009afc: 02 80 00 04 be 40009b0c <_User_extensions_Thread_restart+0x3c>
40009b00: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_restart)(
40009b04: 9f c0 40 00 call %g1
40009b08: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
40009b0c: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40009b10: 80 a4 00 11 cmp %l0, %l1
40009b14: 32 bf ff f9 bne,a 40009af8 <_User_extensions_Thread_restart+0x28>
40009b18: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
40009b1c: 81 c7 e0 08 ret
40009b20: 81 e8 00 00 restore
40008de8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
40008de8: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40008dec: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008df0: e0 04 63 28 ld [ %l1 + 0x328 ], %l0 ! 4001c328 <_User_extensions_List>
40008df4: a2 14 63 28 or %l1, 0x328, %l1
40008df8: a2 04 60 04 add %l1, 4, %l1
40008dfc: 80 a4 00 11 cmp %l0, %l1
40008e00: 02 80 00 0d be 40008e34 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
40008e04: 25 10 00 70 sethi %hi(0x4001c000), %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
40008e08: a4 14 a1 ac or %l2, 0x1ac, %l2 ! 4001c1ac <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
40008e0c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
40008e10: 80 a0 60 00 cmp %g1, 0
40008e14: 02 80 00 04 be 40008e24 <_User_extensions_Thread_start+0x3c>
40008e18: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_start)(
40008e1c: 9f c0 40 00 call %g1
40008e20: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
40008e24: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
40008e28: 80 a4 00 11 cmp %l0, %l1
40008e2c: 32 bf ff f9 bne,a 40008e10 <_User_extensions_Thread_start+0x28>
40008e30: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
40008e34: 81 c7 e0 08 ret
40008e38: 81 e8 00 00 restore
40008e3c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
40008e3c: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
40008e40: 23 10 00 70 sethi %hi(0x4001c000), %l1
40008e44: e0 04 60 f4 ld [ %l1 + 0xf4 ], %l0 ! 4001c0f4 <_User_extensions_Switches_list>
40008e48: a2 14 60 f4 or %l1, 0xf4, %l1
40008e4c: a2 04 60 04 add %l1, 4, %l1
40008e50: 80 a4 00 11 cmp %l0, %l1
40008e54: 02 80 00 0a be 40008e7c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
40008e58: 01 00 00 00 nop
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
40008e5c: c2 04 20 08 ld [ %l0 + 8 ], %g1
40008e60: 90 10 00 18 mov %i0, %o0
40008e64: 9f c0 40 00 call %g1
40008e68: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
40008e6c: e0 04 00 00 ld [ %l0 ], %l0
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
40008e70: 80 a4 00 11 cmp %l0, %l1
40008e74: 32 bf ff fb bne,a 40008e60 <_User_extensions_Thread_switch+0x24>
40008e78: c2 04 20 08 ld [ %l0 + 8 ], %g1
40008e7c: 81 c7 e0 08 ret
40008e80: 81 e8 00 00 restore
4000b10c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4000b10c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
4000b110: 7f ff de d4 call 40002c60 <sparc_disable_interrupts>
4000b114: a0 10 00 18 mov %i0, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000b118: c2 06 00 00 ld [ %i0 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4000b11c: a2 06 20 04 add %i0, 4, %l1
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4000b120: 80 a0 40 11 cmp %g1, %l1
4000b124: 02 80 00 1f be 4000b1a0 <_Watchdog_Adjust+0x94>
4000b128: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
4000b12c: 12 80 00 1f bne 4000b1a8 <_Watchdog_Adjust+0x9c>
4000b130: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4000b134: 80 a6 a0 00 cmp %i2, 0
4000b138: 02 80 00 1a be 4000b1a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
4000b13c: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
4000b140: f2 00 60 10 ld [ %g1 + 0x10 ], %i1
4000b144: 80 a6 80 19 cmp %i2, %i1
4000b148: 1a 80 00 0b bcc 4000b174 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN
4000b14c: a4 10 20 01 mov 1, %l2
_Watchdog_First( header )->delta_interval -= units;
4000b150: 10 80 00 1d b 4000b1c4 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED
4000b154: b4 26 40 1a sub %i1, %i2, %i2 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4000b158: b4 a6 80 19 subcc %i2, %i1, %i2
4000b15c: 02 80 00 11 be 4000b1a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
4000b160: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
4000b164: f2 00 60 10 ld [ %g1 + 0x10 ], %i1
4000b168: 80 a6 40 1a cmp %i1, %i2
4000b16c: 38 80 00 16 bgu,a 4000b1c4 <_Watchdog_Adjust+0xb8>
4000b170: b4 26 40 1a sub %i1, %i2, %i2
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4000b174: e4 20 60 10 st %l2, [ %g1 + 0x10 ]
_ISR_Enable( level );
4000b178: 7f ff de be call 40002c70 <sparc_enable_interrupts>
4000b17c: 01 00 00 00 nop
_Watchdog_Tickle( header );
4000b180: 40 00 00 b6 call 4000b458 <_Watchdog_Tickle>
4000b184: 90 10 00 10 mov %l0, %o0
_ISR_Disable( level );
4000b188: 7f ff de b6 call 40002c60 <sparc_disable_interrupts>
4000b18c: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000b190: c4 04 00 00 ld [ %l0 ], %g2
if ( _Chain_Is_empty( header ) )
4000b194: 80 a4 40 02 cmp %l1, %g2
4000b198: 12 bf ff f0 bne 4000b158 <_Watchdog_Adjust+0x4c>
4000b19c: 82 10 00 02 mov %g2, %g1
}
break;
}
}
_ISR_Enable( level );
4000b1a0: 7f ff de b4 call 40002c70 <sparc_enable_interrupts>
4000b1a4: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4000b1a8: 12 bf ff fe bne 4000b1a0 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
4000b1ac: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4000b1b0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000b1b4: b4 00 80 1a add %g2, %i2, %i2
4000b1b8: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
4000b1bc: 7f ff de ad call 40002c70 <sparc_enable_interrupts>
4000b1c0: 91 e8 00 08 restore %g0, %o0, %o0
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
4000b1c4: 10 bf ff f7 b 4000b1a0 <_Watchdog_Adjust+0x94>
4000b1c8: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
40009038 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
40009038: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4000903c: 7f ff e3 28 call 40001cdc <sparc_disable_interrupts>
40009040: 01 00 00 00 nop
previous_state = the_watchdog->state;
40009044: e0 06 20 08 ld [ %i0 + 8 ], %l0
switch ( previous_state ) {
40009048: 80 a4 20 01 cmp %l0, 1
4000904c: 02 80 00 2a be 400090f4 <_Watchdog_Remove+0xbc>
40009050: 03 10 00 70 sethi %hi(0x4001c000), %g1
40009054: 1a 80 00 09 bcc 40009078 <_Watchdog_Remove+0x40>
40009058: 80 a4 20 03 cmp %l0, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4000905c: 03 10 00 70 sethi %hi(0x4001c000), %g1
40009060: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 4001c244 <_Watchdog_Ticks_since_boot>
40009064: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
40009068: 7f ff e3 21 call 40001cec <sparc_enable_interrupts>
4000906c: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
40009070: 81 c7 e0 08 ret
40009074: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
40009078: 18 bf ff fa bgu 40009060 <_Watchdog_Remove+0x28> <== NEVER TAKEN
4000907c: 03 10 00 70 sethi %hi(0x4001c000), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
40009080: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
40009084: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
40009088: c4 00 40 00 ld [ %g1 ], %g2
4000908c: 80 a0 a0 00 cmp %g2, 0
40009090: 02 80 00 07 be 400090ac <_Watchdog_Remove+0x74>
40009094: 05 10 00 70 sethi %hi(0x4001c000), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
40009098: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
4000909c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
400090a0: 84 00 c0 02 add %g3, %g2, %g2
400090a4: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
400090a8: 05 10 00 70 sethi %hi(0x4001c000), %g2
400090ac: c4 00 a2 40 ld [ %g2 + 0x240 ], %g2 ! 4001c240 <_Watchdog_Sync_count>
400090b0: 80 a0 a0 00 cmp %g2, 0
400090b4: 22 80 00 07 be,a 400090d0 <_Watchdog_Remove+0x98>
400090b8: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
400090bc: 05 10 00 70 sethi %hi(0x4001c000), %g2
400090c0: c6 00 a1 88 ld [ %g2 + 0x188 ], %g3 ! 4001c188 <_ISR_Nest_level>
400090c4: 05 10 00 70 sethi %hi(0x4001c000), %g2
400090c8: c6 20 a1 a8 st %g3, [ %g2 + 0x1a8 ] ! 4001c1a8 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
400090cc: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
previous->next = next;
400090d0: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
400090d4: c4 20 60 04 st %g2, [ %g1 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
400090d8: 03 10 00 70 sethi %hi(0x4001c000), %g1
400090dc: c2 00 62 44 ld [ %g1 + 0x244 ], %g1 ! 4001c244 <_Watchdog_Ticks_since_boot>
400090e0: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
400090e4: 7f ff e3 02 call 40001cec <sparc_enable_interrupts>
400090e8: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
400090ec: 81 c7 e0 08 ret
400090f0: 81 e8 00 00 restore
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
400090f4: c2 00 62 44 ld [ %g1 + 0x244 ], %g1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
400090f8: c0 26 20 08 clr [ %i0 + 8 ]
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
400090fc: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
40009100: 7f ff e2 fb call 40001cec <sparc_enable_interrupts>
40009104: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
40009108: 81 c7 e0 08 ret
4000910c: 81 e8 00 00 restore
4000a920 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4000a920: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4000a924: 7f ff df a6 call 400027bc <sparc_disable_interrupts>
4000a928: a0 10 00 18 mov %i0, %l0
4000a92c: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
4000a930: 11 10 00 80 sethi %hi(0x40020000), %o0
4000a934: 94 10 00 19 mov %i1, %o2
4000a938: 90 12 22 38 or %o0, 0x238, %o0
4000a93c: 7f ff e5 02 call 40003d44 <printk>
4000a940: 92 10 00 10 mov %l0, %o1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000a944: e2 06 40 00 ld [ %i1 ], %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4000a948: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
4000a94c: 80 a4 40 19 cmp %l1, %i1
4000a950: 02 80 00 0f be 4000a98c <_Watchdog_Report_chain+0x6c>
4000a954: 11 10 00 80 sethi %hi(0x40020000), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4000a958: 92 10 00 11 mov %l1, %o1
4000a95c: 40 00 00 11 call 4000a9a0 <_Watchdog_Report>
4000a960: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
4000a964: e2 04 40 00 ld [ %l1 ], %l1
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
4000a968: 80 a4 40 19 cmp %l1, %i1
4000a96c: 12 bf ff fc bne 4000a95c <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
4000a970: 92 10 00 11 mov %l1, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4000a974: 92 10 00 10 mov %l0, %o1
4000a978: 11 10 00 80 sethi %hi(0x40020000), %o0
4000a97c: 7f ff e4 f2 call 40003d44 <printk>
4000a980: 90 12 22 50 or %o0, 0x250, %o0 ! 40020250 <_Status_Object_name_errors_to_status+0x30>
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4000a984: 7f ff df 92 call 400027cc <sparc_enable_interrupts>
4000a988: 81 e8 00 00 restore
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4000a98c: 7f ff e4 ee call 40003d44 <printk>
4000a990: 90 12 22 60 or %o0, 0x260, %o0
}
_ISR_Enable( level );
4000a994: 7f ff df 8e call 400027cc <sparc_enable_interrupts>
4000a998: 81 e8 00 00 restore
4000d12c <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4000d12c: 9d e3 bf 98 save %sp, -104, %sp
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4000d130: a0 96 20 00 orcc %i0, 0, %l0
4000d134: 02 80 00 23 be 4000d1c0 <rtems_barrier_create+0x94>
4000d138: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
4000d13c: 80 a6 e0 00 cmp %i3, 0
4000d140: 02 80 00 20 be 4000d1c0 <rtems_barrier_create+0x94>
4000d144: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4000d148: 80 8e 60 10 btst 0x10, %i1
4000d14c: 02 80 00 1f be 4000d1c8 <rtems_barrier_create+0x9c>
4000d150: 80 a6 a0 00 cmp %i2, 0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4000d154: 02 80 00 1b be 4000d1c0 <rtems_barrier_create+0x94>
4000d158: b0 10 20 0a mov 0xa, %i0
4000d15c: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d160: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4000d164: c0 27 bf f8 clr [ %fp + -8 ]
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4000d168: f4 27 bf fc st %i2, [ %fp + -4 ]
4000d16c: 84 00 a0 01 inc %g2
4000d170: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
4000d174: 25 10 00 70 sethi %hi(0x4001c000), %l2
4000d178: 7f ff e7 19 call 40006ddc <_Objects_Allocate>
4000d17c: 90 14 a3 c4 or %l2, 0x3c4, %o0 ! 4001c3c4 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4000d180: a2 92 20 00 orcc %o0, 0, %l1
4000d184: 02 80 00 1e be 4000d1fc <rtems_barrier_create+0xd0> <== NEVER TAKEN
4000d188: 90 04 60 14 add %l1, 0x14, %o0
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4000d18c: 92 07 bf f8 add %fp, -8, %o1
4000d190: 40 00 01 4b call 4000d6bc <_CORE_barrier_Initialize>
4000d194: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
4000d198: c2 14 60 0a lduh [ %l1 + 0xa ], %g1
4000d19c: c6 04 60 08 ld [ %l1 + 8 ], %g3
4000d1a0: a4 14 a3 c4 or %l2, 0x3c4, %l2
4000d1a4: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4000d1a8: e0 24 60 0c st %l0, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4000d1ac: 83 28 60 02 sll %g1, 2, %g1
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4000d1b0: c6 26 c0 00 st %g3, [ %i3 ]
4000d1b4: e2 20 80 01 st %l1, [ %g2 + %g1 ]
_Thread_Enable_dispatch();
4000d1b8: 7f ff ea c5 call 40007ccc <_Thread_Enable_dispatch>
4000d1bc: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
4000d1c0: 81 c7 e0 08 ret
4000d1c4: 81 e8 00 00 restore
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
4000d1c8: 82 10 20 01 mov 1, %g1
4000d1cc: c2 27 bf f8 st %g1, [ %fp + -8 ]
4000d1d0: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d1d4: c4 00 60 f0 ld [ %g1 + 0xf0 ], %g2 ! 4001c0f0 <_Thread_Dispatch_disable_level>
the_attributes.maximum_count = maximum_waiters;
4000d1d8: f4 27 bf fc st %i2, [ %fp + -4 ]
4000d1dc: 84 00 a0 01 inc %g2
4000d1e0: c4 20 60 f0 st %g2, [ %g1 + 0xf0 ]
4000d1e4: 25 10 00 70 sethi %hi(0x4001c000), %l2
4000d1e8: 7f ff e6 fd call 40006ddc <_Objects_Allocate>
4000d1ec: 90 14 a3 c4 or %l2, 0x3c4, %o0 ! 4001c3c4 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4000d1f0: a2 92 20 00 orcc %o0, 0, %l1
4000d1f4: 12 bf ff e6 bne 4000d18c <rtems_barrier_create+0x60>
4000d1f8: 90 04 60 14 add %l1, 0x14, %o0
_Thread_Enable_dispatch();
4000d1fc: 7f ff ea b4 call 40007ccc <_Thread_Enable_dispatch>
4000d200: b0 10 20 05 mov 5, %i0
return RTEMS_TOO_MANY;
4000d204: 81 c7 e0 08 ret
4000d208: 81 e8 00 00 restore
40008010 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
40008010: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
40008014: 03 10 00 89 sethi %hi(0x40022400), %g1
40008018: c2 00 60 e8 ld [ %g1 + 0xe8 ], %g1 ! 400224e8 <_ISR_Nest_level>
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
4000801c: 09 10 00 89 sethi %hi(0x40022400), %g4
if ( rtems_interrupt_is_in_progress() )
40008020: 80 a0 60 00 cmp %g1, 0
40008024: 84 10 20 12 mov 0x12, %g2
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
40008028: 82 10 00 19 mov %i1, %g1
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
4000802c: 12 80 00 49 bne 40008150 <rtems_io_register_driver+0x140>
40008030: c6 01 23 50 ld [ %g4 + 0x350 ], %g3
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
40008034: 80 a6 a0 00 cmp %i2, 0
40008038: 02 80 00 4b be 40008164 <rtems_io_register_driver+0x154>
4000803c: 80 a6 60 00 cmp %i1, 0
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
40008040: 02 80 00 49 be 40008164 <rtems_io_register_driver+0x154>
40008044: c6 26 80 00 st %g3, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
40008048: c4 06 40 00 ld [ %i1 ], %g2
4000804c: 80 a0 a0 00 cmp %g2, 0
40008050: 22 80 00 42 be,a 40008158 <rtems_io_register_driver+0x148>
40008054: c4 06 60 04 ld [ %i1 + 4 ], %g2
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
40008058: 80 a0 c0 18 cmp %g3, %i0
4000805c: 08 80 00 3d bleu 40008150 <rtems_io_register_driver+0x140>
40008060: 84 10 20 0a mov 0xa, %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
40008064: 05 10 00 89 sethi %hi(0x40022400), %g2
40008068: c6 00 a0 50 ld [ %g2 + 0x50 ], %g3 ! 40022450 <_Thread_Dispatch_disable_level>
4000806c: 86 00 e0 01 inc %g3
40008070: c6 20 a0 50 st %g3, [ %g2 + 0x50 ]
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
40008074: 80 a6 20 00 cmp %i0, 0
40008078: 12 80 00 2b bne 40008124 <rtems_io_register_driver+0x114>
4000807c: 05 10 00 89 sethi %hi(0x40022400), %g2
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
40008080: da 01 23 50 ld [ %g4 + 0x350 ], %o5
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
40008084: 80 a3 60 00 cmp %o5, 0
40008088: 02 80 00 3a be 40008170 <rtems_io_register_driver+0x160> <== NEVER TAKEN
4000808c: d8 00 a3 54 ld [ %g2 + 0x354 ], %o4
40008090: 10 80 00 05 b 400080a4 <rtems_io_register_driver+0x94>
40008094: 86 10 00 0c mov %o4, %g3
40008098: 80 a3 40 18 cmp %o5, %i0
4000809c: 08 80 00 0b bleu 400080c8 <rtems_io_register_driver+0xb8>
400080a0: 86 00 e0 18 add %g3, 0x18, %g3
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
400080a4: c8 00 c0 00 ld [ %g3 ], %g4
400080a8: 80 a1 20 00 cmp %g4, 0
400080ac: 32 bf ff fb bne,a 40008098 <rtems_io_register_driver+0x88>
400080b0: b0 06 20 01 inc %i0
400080b4: c8 00 e0 04 ld [ %g3 + 4 ], %g4
400080b8: 80 a1 20 00 cmp %g4, 0
400080bc: 32 bf ff f7 bne,a 40008098 <rtems_io_register_driver+0x88>
400080c0: b0 06 20 01 inc %i0
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
400080c4: 80 a3 40 18 cmp %o5, %i0
400080c8: 02 80 00 2b be 40008174 <rtems_io_register_driver+0x164>
400080cc: f0 26 80 00 st %i0, [ %i2 ]
400080d0: 85 2e 20 03 sll %i0, 3, %g2
400080d4: 87 2e 20 05 sll %i0, 5, %g3
400080d8: 84 20 c0 02 sub %g3, %g2, %g2
400080dc: 84 03 00 02 add %o4, %g2, %g2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
400080e0: c6 00 40 00 ld [ %g1 ], %g3
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
400080e4: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
400080e8: c6 20 80 00 st %g3, [ %g2 ]
400080ec: c6 00 60 04 ld [ %g1 + 4 ], %g3
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
400080f0: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
400080f4: c6 20 a0 04 st %g3, [ %g2 + 4 ]
400080f8: c6 00 60 08 ld [ %g1 + 8 ], %g3
400080fc: c6 20 a0 08 st %g3, [ %g2 + 8 ]
40008100: c6 00 60 0c ld [ %g1 + 0xc ], %g3
40008104: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
40008108: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
4000810c: c6 20 a0 10 st %g3, [ %g2 + 0x10 ]
40008110: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
_Thread_Enable_dispatch();
40008114: 40 00 07 0d call 40009d48 <_Thread_Enable_dispatch>
40008118: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
4000811c: 40 00 23 c8 call 4001103c <rtems_io_initialize>
40008120: 81 e8 00 00 restore
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
40008124: c6 00 a3 54 ld [ %g2 + 0x354 ], %g3
40008128: 89 2e 20 05 sll %i0, 5, %g4
4000812c: 85 2e 20 03 sll %i0, 3, %g2
40008130: 84 21 00 02 sub %g4, %g2, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
40008134: c8 00 c0 02 ld [ %g3 + %g2 ], %g4
40008138: 80 a1 20 00 cmp %g4, 0
4000813c: 02 80 00 12 be 40008184 <rtems_io_register_driver+0x174>
40008140: 84 00 c0 02 add %g3, %g2, %g2
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
40008144: 40 00 07 01 call 40009d48 <_Thread_Enable_dispatch>
40008148: 01 00 00 00 nop
4000814c: 84 10 20 0c mov 0xc, %g2 ! c <PROM_START+0xc>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
40008150: 81 c7 e0 08 ret
40008154: 91 e8 00 02 restore %g0, %g2, %o0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
40008158: 80 a0 a0 00 cmp %g2, 0
4000815c: 12 bf ff c0 bne 4000805c <rtems_io_register_driver+0x4c>
40008160: 80 a0 c0 18 cmp %g3, %i0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
40008164: 84 10 20 09 mov 9, %g2
}
40008168: 81 c7 e0 08 ret
4000816c: 91 e8 00 02 restore %g0, %g2, %o0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
40008170: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
40008174: 40 00 06 f5 call 40009d48 <_Thread_Enable_dispatch>
40008178: 01 00 00 00 nop
return sc;
4000817c: 10 bf ff f5 b 40008150 <rtems_io_register_driver+0x140>
40008180: 84 10 20 05 mov 5, %g2 ! 5 <PROM_START+0x5>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
40008184: c6 00 a0 04 ld [ %g2 + 4 ], %g3
40008188: 80 a0 e0 00 cmp %g3, 0
4000818c: 12 bf ff ee bne 40008144 <rtems_io_register_driver+0x134>
40008190: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
40008194: 10 bf ff d3 b 400080e0 <rtems_io_register_driver+0xd0>
40008198: f0 26 80 00 st %i0, [ %i2 ]
40008a34 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
40008a34: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
40008a38: 80 a6 20 00 cmp %i0, 0
40008a3c: 02 80 00 23 be 40008ac8 <rtems_iterate_over_all_threads+0x94><== NEVER TAKEN
40008a40: 25 10 00 a9 sethi %hi(0x4002a400), %l2
40008a44: a4 14 a2 34 or %l2, 0x234, %l2 ! 4002a634 <_Objects_Information_table+0x4>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
40008a48: a6 04 a0 10 add %l2, 0x10, %l3
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
40008a4c: c2 04 80 00 ld [ %l2 ], %g1
40008a50: 80 a0 60 00 cmp %g1, 0
40008a54: 22 80 00 1a be,a 40008abc <rtems_iterate_over_all_threads+0x88>
40008a58: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
40008a5c: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( !information )
40008a60: 80 a4 60 00 cmp %l1, 0
40008a64: 22 80 00 16 be,a 40008abc <rtems_iterate_over_all_threads+0x88>
40008a68: a4 04 a0 04 add %l2, 4, %l2
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
40008a6c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
40008a70: 84 90 60 00 orcc %g1, 0, %g2
40008a74: 22 80 00 12 be,a 40008abc <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
40008a78: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
40008a7c: a0 10 20 01 mov 1, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
40008a80: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
40008a84: 83 2c 20 02 sll %l0, 2, %g1
40008a88: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
40008a8c: 90 90 60 00 orcc %g1, 0, %o0
40008a90: 02 80 00 05 be 40008aa4 <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
40008a94: a0 04 20 01 inc %l0
continue;
(*routine)(the_thread);
40008a98: 9f c6 00 00 call %i0
40008a9c: 01 00 00 00 nop
40008aa0: c4 14 60 10 lduh [ %l1 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
40008aa4: 83 28 a0 10 sll %g2, 0x10, %g1
40008aa8: 83 30 60 10 srl %g1, 0x10, %g1
40008aac: 80 a0 40 10 cmp %g1, %l0
40008ab0: 3a bf ff f5 bcc,a 40008a84 <rtems_iterate_over_all_threads+0x50>
40008ab4: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
40008ab8: a4 04 a0 04 add %l2, 4, %l2
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
40008abc: 80 a4 80 13 cmp %l2, %l3
40008ac0: 32 bf ff e4 bne,a 40008a50 <rtems_iterate_over_all_threads+0x1c>
40008ac4: c2 04 80 00 ld [ %l2 ], %g1
40008ac8: 81 c7 e0 08 ret
40008acc: 81 e8 00 00 restore
400076b4 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
400076b4: 9d e3 bf a0 save %sp, -96, %sp
400076b8: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
400076bc: 80 a6 a0 00 cmp %i2, 0
400076c0: 02 80 00 20 be 40007740 <rtems_object_get_class_information+0x8c>
400076c4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
400076c8: 92 10 00 19 mov %i1, %o1
400076cc: 40 00 07 19 call 40009330 <_Objects_Get_information>
400076d0: b0 10 20 0a mov 0xa, %i0
if ( !obj_info )
400076d4: 80 a2 20 00 cmp %o0, 0
400076d8: 02 80 00 1a be 40007740 <rtems_object_get_class_information+0x8c>
400076dc: 01 00 00 00 nop
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
400076e0: c2 02 20 08 ld [ %o0 + 8 ], %g1
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
400076e4: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
400076e8: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
400076ec: c2 26 80 00 st %g1, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
400076f0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
info->auto_extend = obj_info->auto_extend;
400076f4: c4 2e a0 0c stb %g2, [ %i2 + 0xc ]
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
400076f8: c2 26 a0 04 st %g1, [ %i2 + 4 ]
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
400076fc: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
40007700: 80 a1 20 00 cmp %g4, 0
40007704: 02 80 00 0d be 40007738 <rtems_object_get_class_information+0x84><== NEVER TAKEN
40007708: 84 10 20 00 clr %g2
4000770c: da 02 20 1c ld [ %o0 + 0x1c ], %o5
40007710: 86 10 20 01 mov 1, %g3
40007714: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
40007718: 87 28 e0 02 sll %g3, 2, %g3
4000771c: c6 03 40 03 ld [ %o5 + %g3 ], %g3
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
40007720: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
40007724: 80 a0 00 03 cmp %g0, %g3
40007728: 84 60 bf ff subx %g2, -1, %g2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
4000772c: 80 a1 00 01 cmp %g4, %g1
40007730: 1a bf ff fa bcc 40007718 <rtems_object_get_class_information+0x64>
40007734: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
40007738: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
4000773c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
40007740: 81 c7 e0 08 ret
40007744: 81 e8 00 00 restore
400138e0 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
400138e0: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
400138e4: a0 96 20 00 orcc %i0, 0, %l0
400138e8: 02 80 00 31 be 400139ac <rtems_partition_create+0xcc>
400138ec: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
400138f0: 80 a6 60 00 cmp %i1, 0
400138f4: 02 80 00 32 be 400139bc <rtems_partition_create+0xdc>
400138f8: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
400138fc: 02 80 00 30 be 400139bc <rtems_partition_create+0xdc> <== NEVER TAKEN
40013900: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
40013904: 02 80 00 2c be 400139b4 <rtems_partition_create+0xd4>
40013908: 80 a6 a0 00 cmp %i2, 0
4001390c: 02 80 00 2a be 400139b4 <rtems_partition_create+0xd4>
40013910: 80 a6 80 1b cmp %i2, %i3
40013914: 0a 80 00 28 bcs 400139b4 <rtems_partition_create+0xd4>
40013918: 80 8e e0 07 btst 7, %i3
4001391c: 12 80 00 26 bne 400139b4 <rtems_partition_create+0xd4>
40013920: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
40013924: 12 80 00 26 bne 400139bc <rtems_partition_create+0xdc>
40013928: 03 10 00 f5 sethi %hi(0x4003d400), %g1
4001392c: c4 00 63 d0 ld [ %g1 + 0x3d0 ], %g2 ! 4003d7d0 <_Thread_Dispatch_disable_level>
40013930: 84 00 a0 01 inc %g2
40013934: c4 20 63 d0 st %g2, [ %g1 + 0x3d0 ]
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
40013938: 25 10 00 f5 sethi %hi(0x4003d400), %l2
4001393c: 40 00 12 4a call 40018264 <_Objects_Allocate>
40013940: 90 14 a1 d8 or %l2, 0x1d8, %o0 ! 4003d5d8 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
40013944: a2 92 20 00 orcc %o0, 0, %l1
40013948: 02 80 00 1f be 400139c4 <rtems_partition_create+0xe4>
4001394c: 92 10 00 1b mov %i3, %o1
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
40013950: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
40013954: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
40013958: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
the_partition->buffer_size = buffer_size;
4001395c: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
40013960: c0 24 60 20 clr [ %l1 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
40013964: 40 00 61 4b call 4002be90 <.udiv>
40013968: 90 10 00 1a mov %i2, %o0
4001396c: 92 10 00 19 mov %i1, %o1
40013970: 94 10 00 08 mov %o0, %o2
40013974: 96 10 00 1b mov %i3, %o3
40013978: b8 04 60 24 add %l1, 0x24, %i4
4001397c: 40 00 0c be call 40016c74 <_Chain_Initialize>
40013980: 90 10 00 1c mov %i4, %o0
40013984: c2 14 60 0a lduh [ %l1 + 0xa ], %g1
40013988: c6 04 60 08 ld [ %l1 + 8 ], %g3
4001398c: a4 14 a1 d8 or %l2, 0x1d8, %l2
40013990: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
40013994: e0 24 60 0c st %l0, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40013998: 83 28 60 02 sll %g1, 2, %g1
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
4001399c: c6 27 40 00 st %g3, [ %i5 ]
400139a0: e2 20 80 01 st %l1, [ %g2 + %g1 ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
400139a4: 40 00 16 23 call 40019230 <_Thread_Enable_dispatch>
400139a8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
400139ac: 81 c7 e0 08 ret
400139b0: 81 e8 00 00 restore
}
400139b4: 81 c7 e0 08 ret
400139b8: 91 e8 20 08 restore %g0, 8, %o0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
400139bc: 81 c7 e0 08 ret
400139c0: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
400139c4: 40 00 16 1b call 40019230 <_Thread_Enable_dispatch>
400139c8: b0 10 20 05 mov 5, %i0
return RTEMS_TOO_MANY;
400139cc: 81 c7 e0 08 ret
400139d0: 81 e8 00 00 restore
40006c84 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
40006c84: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
40006c88: 11 10 00 87 sethi %hi(0x40021c00), %o0
40006c8c: 92 10 00 18 mov %i0, %o1
40006c90: 90 12 22 90 or %o0, 0x290, %o0
40006c94: 40 00 09 13 call 400090e0 <_Objects_Get>
40006c98: 94 07 bf fc add %fp, -4, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
40006c9c: c2 07 bf fc ld [ %fp + -4 ], %g1
40006ca0: 80 a0 60 00 cmp %g1, 0
40006ca4: 02 80 00 04 be 40006cb4 <rtems_rate_monotonic_period+0x30>
40006ca8: a0 10 00 08 mov %o0, %l0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40006cac: 81 c7 e0 08 ret
40006cb0: 91 e8 20 04 restore %g0, 4, %o0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
40006cb4: 23 10 00 88 sethi %hi(0x40022000), %l1
40006cb8: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
40006cbc: c2 04 60 bc ld [ %l1 + 0xbc ], %g1
40006cc0: 80 a0 80 01 cmp %g2, %g1
40006cc4: 02 80 00 06 be 40006cdc <rtems_rate_monotonic_period+0x58>
40006cc8: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
40006ccc: 40 00 0b 6d call 40009a80 <_Thread_Enable_dispatch>
40006cd0: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
40006cd4: 81 c7 e0 08 ret
40006cd8: 81 e8 00 00 restore
}
if ( length == RTEMS_PERIOD_STATUS ) {
40006cdc: 12 80 00 0e bne 40006d14 <rtems_rate_monotonic_period+0x90>
40006ce0: 01 00 00 00 nop
switch ( the_period->state ) {
40006ce4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
40006ce8: 80 a0 60 04 cmp %g1, 4
40006cec: 18 80 00 06 bgu 40006d04 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
40006cf0: b0 10 20 00 clr %i0
40006cf4: 83 28 60 02 sll %g1, 2, %g1
40006cf8: 05 10 00 7f sethi %hi(0x4001fc00), %g2
40006cfc: 84 10 a2 98 or %g2, 0x298, %g2 ! 4001fe98 <CSWTCH.47>
40006d00: f0 00 80 01 ld [ %g2 + %g1 ], %i0
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
40006d04: 40 00 0b 5f call 40009a80 <_Thread_Enable_dispatch>
40006d08: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
40006d0c: 81 c7 e0 08 ret
40006d10: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
40006d14: 7f ff ef a6 call 40002bac <sparc_disable_interrupts>
40006d18: 01 00 00 00 nop
40006d1c: a6 10 00 08 mov %o0, %l3
switch ( the_period->state ) {
40006d20: e4 04 20 38 ld [ %l0 + 0x38 ], %l2
40006d24: 80 a4 a0 02 cmp %l2, 2
40006d28: 02 80 00 1a be 40006d90 <rtems_rate_monotonic_period+0x10c>
40006d2c: 80 a4 a0 04 cmp %l2, 4
40006d30: 02 80 00 32 be 40006df8 <rtems_rate_monotonic_period+0x174>
40006d34: 80 a4 a0 00 cmp %l2, 0
40006d38: 12 bf ff dd bne 40006cac <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
40006d3c: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
40006d40: 7f ff ef 9f call 40002bbc <sparc_enable_interrupts>
40006d44: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
40006d48: 7f ff ff 48 call 40006a68 <_Rate_monotonic_Initiate_statistics>
40006d4c: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
40006d50: 82 10 20 02 mov 2, %g1
40006d54: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40006d58: 03 10 00 1c sethi %hi(0x40007000), %g1
40006d5c: 82 10 61 4c or %g1, 0x14c, %g1 ! 4000714c <_Rate_monotonic_Timeout>
the_watchdog->id = id;
40006d60: f0 24 20 30 st %i0, [ %l0 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006d64: 92 04 20 10 add %l0, 0x10, %o1
40006d68: 11 10 00 88 sethi %hi(0x40022000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40006d6c: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006d70: 90 12 20 dc or %o0, 0xdc, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40006d74: c0 24 20 18 clr [ %l0 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40006d78: c0 24 20 34 clr [ %l0 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
40006d7c: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40006d80: c2 24 20 2c st %g1, [ %l0 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006d84: 40 00 10 8d call 4000afb8 <_Watchdog_Insert>
40006d88: b0 10 20 00 clr %i0
40006d8c: 30 bf ff de b,a 40006d04 <rtems_rate_monotonic_period+0x80>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
40006d90: 7f ff ff 7d call 40006b84 <_Rate_monotonic_Update_statistics>
40006d94: 90 10 00 10 mov %l0, %o0
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
40006d98: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
40006d9c: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
40006da0: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
40006da4: 7f ff ef 86 call 40002bbc <sparc_enable_interrupts>
40006da8: 90 10 00 13 mov %l3, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
40006dac: c2 04 60 bc ld [ %l1 + 0xbc ], %g1
40006db0: c4 04 20 08 ld [ %l0 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40006db4: 90 10 00 01 mov %g1, %o0
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
40006db8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40006dbc: 40 00 0d b0 call 4000a47c <_Thread_Set_state>
40006dc0: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
40006dc4: 7f ff ef 7a call 40002bac <sparc_disable_interrupts>
40006dc8: 01 00 00 00 nop
local_state = the_period->state;
40006dcc: e6 04 20 38 ld [ %l0 + 0x38 ], %l3
the_period->state = RATE_MONOTONIC_ACTIVE;
40006dd0: e4 24 20 38 st %l2, [ %l0 + 0x38 ]
_ISR_Enable( level );
40006dd4: 7f ff ef 7a call 40002bbc <sparc_enable_interrupts>
40006dd8: 01 00 00 00 nop
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
40006ddc: 80 a4 e0 03 cmp %l3, 3
40006de0: 02 80 00 17 be 40006e3c <rtems_rate_monotonic_period+0x1b8>
40006de4: d0 04 60 bc ld [ %l1 + 0xbc ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
40006de8: 40 00 0b 26 call 40009a80 <_Thread_Enable_dispatch>
40006dec: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
40006df0: 81 c7 e0 08 ret
40006df4: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
40006df8: 7f ff ff 63 call 40006b84 <_Rate_monotonic_Update_statistics>
40006dfc: 90 10 00 10 mov %l0, %o0
_ISR_Enable( level );
40006e00: 7f ff ef 6f call 40002bbc <sparc_enable_interrupts>
40006e04: 90 10 00 13 mov %l3, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
40006e08: 82 10 20 02 mov 2, %g1
40006e0c: 92 04 20 10 add %l0, 0x10, %o1
40006e10: 11 10 00 88 sethi %hi(0x40022000), %o0
40006e14: 90 12 20 dc or %o0, 0xdc, %o0 ! 400220dc <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40006e18: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
the_period->next_length = length;
40006e1c: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
40006e20: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006e24: 40 00 10 65 call 4000afb8 <_Watchdog_Insert>
40006e28: b0 10 20 06 mov 6, %i0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
40006e2c: 40 00 0b 15 call 40009a80 <_Thread_Enable_dispatch>
40006e30: 01 00 00 00 nop
return RTEMS_TIMEOUT;
40006e34: 81 c7 e0 08 ret
40006e38: 81 e8 00 00 restore
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40006e3c: 40 00 0a 15 call 40009690 <_Thread_Clear_state>
40006e40: 13 00 00 10 sethi %hi(0x4000), %o1
40006e44: 30 bf ff e9 b,a 40006de8 <rtems_rate_monotonic_period+0x164>
40006e48 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
40006e48: 9d e3 bf 30 save %sp, -208, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
40006e4c: 80 a6 60 00 cmp %i1, 0
40006e50: 02 80 00 4d be 40006f84 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c><== NEVER TAKEN
40006e54: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
40006e58: 13 10 00 7f sethi %hi(0x4001fc00), %o1
40006e5c: 9f c6 40 00 call %i1
40006e60: 92 12 62 b0 or %o1, 0x2b0, %o1 ! 4001feb0 <CSWTCH.47+0x18>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
40006e64: 90 10 00 18 mov %i0, %o0
40006e68: 13 10 00 7f sethi %hi(0x4001fc00), %o1
40006e6c: 9f c6 40 00 call %i1
40006e70: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 4001fed0 <CSWTCH.47+0x38>
(*print)( context, "--- Wall times are in seconds ---\n" );
40006e74: 90 10 00 18 mov %i0, %o0
40006e78: 13 10 00 7f sethi %hi(0x4001fc00), %o1
40006e7c: 9f c6 40 00 call %i1
40006e80: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 4001fef8 <CSWTCH.47+0x60>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
40006e84: 90 10 00 18 mov %i0, %o0
40006e88: 13 10 00 7f sethi %hi(0x4001fc00), %o1
40006e8c: 9f c6 40 00 call %i1
40006e90: 92 12 63 20 or %o1, 0x320, %o1 ! 4001ff20 <CSWTCH.47+0x88>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
40006e94: 90 10 00 18 mov %i0, %o0
40006e98: 13 10 00 7f sethi %hi(0x4001fc00), %o1
40006e9c: 9f c6 40 00 call %i1
40006ea0: 92 12 63 70 or %o1, 0x370, %o1 ! 4001ff70 <CSWTCH.47+0xd8>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006ea4: 23 10 00 87 sethi %hi(0x40021c00), %l1
40006ea8: a2 14 62 90 or %l1, 0x290, %l1 ! 40021e90 <_Rate_monotonic_Information>
40006eac: e0 04 60 08 ld [ %l1 + 8 ], %l0
40006eb0: c2 04 60 0c ld [ %l1 + 0xc ], %g1
40006eb4: 80 a4 00 01 cmp %l0, %g1
40006eb8: 18 80 00 33 bgu 40006f84 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c><== NEVER TAKEN
40006ebc: 3b 10 00 7f sethi %hi(0x4001fc00), %i5
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
40006ec0: 39 10 00 7f sethi %hi(0x4001fc00), %i4
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
40006ec4: 35 10 00 80 sethi %hi(0x40020000), %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
40006ec8: 2f 10 00 7f sethi %hi(0x4001fc00), %l7
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40006ecc: ba 17 63 c0 or %i5, 0x3c0, %i5
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
40006ed0: b8 17 23 e0 or %i4, 0x3e0, %i4
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
40006ed4: b4 16 a0 00 mov %i2, %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
40006ed8: ae 15 e3 d8 or %l7, 0x3d8, %l7
40006edc: a4 07 bf a0 add %fp, -96, %l2
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
40006ee0: ac 07 bf d8 add %fp, -40, %l6
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
40006ee4: a6 07 bf f8 add %fp, -8, %l3
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
40006ee8: aa 07 bf b8 add %fp, -72, %l5
40006eec: 10 80 00 06 b 40006f04 <rtems_rate_monotonic_report_statistics_with_plugin+0xbc>
40006ef0: a8 07 bf f0 add %fp, -16, %l4
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
40006ef4: a0 04 20 01 inc %l0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006ef8: 80 a0 40 10 cmp %g1, %l0
40006efc: 0a 80 00 22 bcs 40006f84 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c>
40006f00: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
40006f04: 90 10 00 10 mov %l0, %o0
40006f08: 40 00 19 4b call 4000d434 <rtems_rate_monotonic_get_statistics>
40006f0c: 92 10 00 12 mov %l2, %o1
if ( status != RTEMS_SUCCESSFUL )
40006f10: 80 a2 20 00 cmp %o0, 0
40006f14: 32 bf ff f8 bne,a 40006ef4 <rtems_rate_monotonic_report_statistics_with_plugin+0xac>
40006f18: c2 04 60 0c ld [ %l1 + 0xc ], %g1
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
40006f1c: 92 10 00 16 mov %l6, %o1
40006f20: 40 00 19 74 call 4000d4f0 <rtems_rate_monotonic_get_status>
40006f24: 90 10 00 10 mov %l0, %o0
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
40006f28: d0 07 bf d8 ld [ %fp + -40 ], %o0
40006f2c: 94 10 00 13 mov %l3, %o2
40006f30: 40 00 00 b7 call 4000720c <rtems_object_get_name>
40006f34: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40006f38: d8 1f bf a0 ldd [ %fp + -96 ], %o4
40006f3c: 92 10 00 1d mov %i5, %o1
40006f40: 94 10 00 10 mov %l0, %o2
40006f44: 90 10 00 18 mov %i0, %o0
40006f48: 9f c6 40 00 call %i1
40006f4c: 96 10 00 13 mov %l3, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
40006f50: c2 07 bf a0 ld [ %fp + -96 ], %g1
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
40006f54: 94 10 00 14 mov %l4, %o2
40006f58: 90 10 00 15 mov %l5, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
40006f5c: 80 a0 60 00 cmp %g1, 0
40006f60: 12 80 00 0b bne 40006f8c <rtems_rate_monotonic_report_statistics_with_plugin+0x144>
40006f64: 92 10 00 17 mov %l7, %o1
(*print)( context, "\n" );
40006f68: 9f c6 40 00 call %i1
40006f6c: 90 10 00 18 mov %i0, %o0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006f70: c2 04 60 0c ld [ %l1 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
40006f74: a0 04 20 01 inc %l0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006f78: 80 a0 40 10 cmp %g1, %l0
40006f7c: 1a bf ff e3 bcc 40006f08 <rtems_rate_monotonic_report_statistics_with_plugin+0xc0><== ALWAYS TAKEN
40006f80: 90 10 00 10 mov %l0, %o0
40006f84: 81 c7 e0 08 ret
40006f88: 81 e8 00 00 restore
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
40006f8c: 40 00 0e d0 call 4000aacc <_Timespec_Divide_by_integer>
40006f90: 92 10 00 01 mov %g1, %o1
(*print)( context,
40006f94: d0 07 bf ac ld [ %fp + -84 ], %o0
40006f98: 40 00 54 e1 call 4001c31c <.div>
40006f9c: 92 10 23 e8 mov 0x3e8, %o1
40006fa0: 96 10 00 08 mov %o0, %o3
40006fa4: d0 07 bf b4 ld [ %fp + -76 ], %o0
40006fa8: d6 27 bf 9c st %o3, [ %fp + -100 ]
40006fac: 40 00 54 dc call 4001c31c <.div>
40006fb0: 92 10 23 e8 mov 0x3e8, %o1
40006fb4: c2 07 bf f0 ld [ %fp + -16 ], %g1
40006fb8: b6 10 00 08 mov %o0, %i3
40006fbc: d0 07 bf f4 ld [ %fp + -12 ], %o0
40006fc0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40006fc4: 40 00 54 d6 call 4001c31c <.div>
40006fc8: 92 10 23 e8 mov 0x3e8, %o1
40006fcc: d8 07 bf b0 ld [ %fp + -80 ], %o4
40006fd0: d6 07 bf 9c ld [ %fp + -100 ], %o3
40006fd4: d4 07 bf a8 ld [ %fp + -88 ], %o2
40006fd8: 9a 10 00 1b mov %i3, %o5
40006fdc: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40006fe0: 92 10 00 1c mov %i4, %o1
40006fe4: 9f c6 40 00 call %i1
40006fe8: 90 10 00 18 mov %i0, %o0
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
40006fec: d2 07 bf a0 ld [ %fp + -96 ], %o1
40006ff0: 94 10 00 14 mov %l4, %o2
40006ff4: 40 00 0e b6 call 4000aacc <_Timespec_Divide_by_integer>
40006ff8: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
40006ffc: d0 07 bf c4 ld [ %fp + -60 ], %o0
40007000: 40 00 54 c7 call 4001c31c <.div>
40007004: 92 10 23 e8 mov 0x3e8, %o1
40007008: 96 10 00 08 mov %o0, %o3
4000700c: d0 07 bf cc ld [ %fp + -52 ], %o0
40007010: d6 27 bf 9c st %o3, [ %fp + -100 ]
40007014: 40 00 54 c2 call 4001c31c <.div>
40007018: 92 10 23 e8 mov 0x3e8, %o1
4000701c: c2 07 bf f0 ld [ %fp + -16 ], %g1
40007020: b6 10 00 08 mov %o0, %i3
40007024: d0 07 bf f4 ld [ %fp + -12 ], %o0
40007028: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
4000702c: 40 00 54 bc call 4001c31c <.div>
40007030: 92 10 23 e8 mov 0x3e8, %o1
40007034: d4 07 bf c0 ld [ %fp + -64 ], %o2
40007038: d6 07 bf 9c ld [ %fp + -100 ], %o3
4000703c: d8 07 bf c8 ld [ %fp + -56 ], %o4
40007040: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40007044: 9a 10 00 1b mov %i3, %o5
40007048: 90 10 00 18 mov %i0, %o0
4000704c: 9f c6 40 00 call %i1
40007050: 92 10 00 1a mov %i2, %o1
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40007054: 10 bf ff a8 b 40006ef4 <rtems_rate_monotonic_report_statistics_with_plugin+0xac>
40007058: c2 04 60 0c ld [ %l1 + 0xc ], %g1
40007078 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
40007078: 9d e3 bf a0 save %sp, -96, %sp
4000707c: 03 10 00 88 sethi %hi(0x40022000), %g1
40007080: c4 00 60 00 ld [ %g1 ], %g2
40007084: 84 00 a0 01 inc %g2
40007088: c4 20 60 00 st %g2, [ %g1 ]
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
4000708c: 23 10 00 87 sethi %hi(0x40021c00), %l1
40007090: a2 14 62 90 or %l1, 0x290, %l1 ! 40021e90 <_Rate_monotonic_Information>
40007094: e0 04 60 08 ld [ %l1 + 8 ], %l0
40007098: c2 04 60 0c ld [ %l1 + 0xc ], %g1
4000709c: 80 a4 00 01 cmp %l0, %g1
400070a0: 18 80 00 09 bgu 400070c4 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
400070a4: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
400070a8: 40 00 00 0a call 400070d0 <rtems_rate_monotonic_reset_statistics>
400070ac: 90 10 00 10 mov %l0, %o0
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
400070b0: c2 04 60 0c ld [ %l1 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
400070b4: a0 04 20 01 inc %l0
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
400070b8: 80 a0 40 10 cmp %g1, %l0
400070bc: 1a bf ff fb bcc 400070a8 <rtems_rate_monotonic_reset_all_statistics+0x30>
400070c0: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
400070c4: 40 00 0a 6f call 40009a80 <_Thread_Enable_dispatch>
400070c8: 81 e8 00 00 restore
400147c4 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
400147c4: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
400147c8: 80 a6 60 00 cmp %i1, 0
400147cc: 02 80 00 22 be 40014854 <rtems_region_get_segment_size+0x90>
400147d0: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( !size )
400147d4: 02 80 00 20 be 40014854 <rtems_region_get_segment_size+0x90>
400147d8: 21 10 00 f6 sethi %hi(0x4003d800), %l0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
400147dc: 40 00 08 e5 call 40016b70 <_API_Mutex_Lock>
400147e0: d0 04 20 84 ld [ %l0 + 0x84 ], %o0 ! 4003d884 <_RTEMS_Allocator_Mutex>
400147e4: 92 10 00 18 mov %i0, %o1
400147e8: 11 10 00 f5 sethi %hi(0x4003d400), %o0
400147ec: 94 07 bf fc add %fp, -4, %o2
400147f0: 40 00 0f f1 call 400187b4 <_Objects_Get_no_protection>
400147f4: 90 12 22 58 or %o0, 0x258, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
400147f8: c2 07 bf fc ld [ %fp + -4 ], %g1
400147fc: 80 a0 60 00 cmp %g1, 0
40014800: 12 80 00 0f bne 4001483c <rtems_region_get_segment_size+0x78>
40014804: 80 a0 60 01 cmp %g1, 1
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
40014808: 90 02 20 68 add %o0, 0x68, %o0
4001480c: 92 10 00 19 mov %i1, %o1
40014810: 94 10 00 1a mov %i2, %o2
40014814: 40 00 0e 45 call 40018128 <_Heap_Size_of_alloc_area>
40014818: b0 10 20 09 mov 9, %i0
4001481c: 80 8a 20 ff btst 0xff, %o0
40014820: 02 80 00 03 be 4001482c <rtems_region_get_segment_size+0x68><== NEVER TAKEN
40014824: 01 00 00 00 nop
40014828: b0 10 20 00 clr %i0 ! 0 <PROM_START>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
4001482c: 40 00 08 e7 call 40016bc8 <_API_Mutex_Unlock>
40014830: d0 04 20 84 ld [ %l0 + 0x84 ], %o0
return return_status;
40014834: 81 c7 e0 08 ret
40014838: 81 e8 00 00 restore
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
4001483c: 12 bf ff fb bne 40014828 <rtems_region_get_segment_size+0x64><== NEVER TAKEN
40014840: b0 10 20 04 mov 4, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
40014844: 40 00 08 e1 call 40016bc8 <_API_Mutex_Unlock>
40014848: d0 04 20 84 ld [ %l0 + 0x84 ], %o0
return return_status;
4001484c: 81 c7 e0 08 ret
40014850: 81 e8 00 00 restore
}
40014854: 81 c7 e0 08 ret
40014858: 91 e8 20 09 restore %g0, 9, %o0
40014ee8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
40014ee8: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
40014eec: 80 a6 60 00 cmp %i1, 0
40014ef0: 12 80 00 04 bne 40014f00 <rtems_signal_send+0x18>
40014ef4: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40014ef8: 81 c7 e0 08 ret
40014efc: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
40014f00: 90 10 00 18 mov %i0, %o0
40014f04: 40 00 10 ef call 400192c0 <_Thread_Get>
40014f08: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40014f0c: c4 07 bf fc ld [ %fp + -4 ], %g2
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
40014f10: a2 10 00 08 mov %o0, %l1
switch ( location ) {
40014f14: 80 a0 a0 00 cmp %g2, 0
40014f18: 12 bf ff f8 bne 40014ef8 <rtems_signal_send+0x10>
40014f1c: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
40014f20: e0 02 21 5c ld [ %o0 + 0x15c ], %l0
asr = &api->Signal;
40014f24: c2 04 20 0c ld [ %l0 + 0xc ], %g1
40014f28: 80 a0 60 00 cmp %g1, 0
40014f2c: 02 80 00 26 be 40014fc4 <rtems_signal_send+0xdc>
40014f30: 01 00 00 00 nop
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
40014f34: c2 0c 20 08 ldub [ %l0 + 8 ], %g1
40014f38: 80 a0 60 00 cmp %g1, 0
40014f3c: 02 80 00 16 be 40014f94 <rtems_signal_send+0xac>
40014f40: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
40014f44: 7f ff e8 5b call 4000f0b0 <sparc_disable_interrupts>
40014f48: 01 00 00 00 nop
*signal_set |= signals;
40014f4c: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
40014f50: b2 10 40 19 or %g1, %i1, %i1
40014f54: f2 24 20 14 st %i1, [ %l0 + 0x14 ]
_ISR_Enable( _level );
40014f58: 7f ff e8 5a call 4000f0c0 <sparc_enable_interrupts>
40014f5c: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
40014f60: 03 10 00 f6 sethi %hi(0x4003d800), %g1
40014f64: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 ! 4003d868 <_ISR_Nest_level>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
40014f68: 82 10 20 01 mov 1, %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
40014f6c: 80 a0 a0 00 cmp %g2, 0
40014f70: 02 80 00 10 be 40014fb0 <rtems_signal_send+0xc8>
40014f74: c2 2c 60 74 stb %g1, [ %l1 + 0x74 ]
40014f78: 05 10 00 f6 sethi %hi(0x4003d800), %g2
40014f7c: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2 ! 4003d88c <_Thread_Executing>
40014f80: 80 a4 40 02 cmp %l1, %g2
40014f84: 12 80 00 0b bne 40014fb0 <rtems_signal_send+0xc8> <== NEVER TAKEN
40014f88: 05 10 00 f6 sethi %hi(0x4003d800), %g2
_ISR_Signals_to_thread_executing = true;
40014f8c: 10 80 00 09 b 40014fb0 <rtems_signal_send+0xc8>
40014f90: c2 28 a1 28 stb %g1, [ %g2 + 0x128 ] ! 4003d928 <_ISR_Signals_to_thread_executing>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
40014f94: 7f ff e8 47 call 4000f0b0 <sparc_disable_interrupts>
40014f98: 01 00 00 00 nop
*signal_set |= signals;
40014f9c: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
40014fa0: b2 10 40 19 or %g1, %i1, %i1
40014fa4: f2 24 20 18 st %i1, [ %l0 + 0x18 ]
_ISR_Enable( _level );
40014fa8: 7f ff e8 46 call 4000f0c0 <sparc_enable_interrupts>
40014fac: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
40014fb0: 40 00 10 a0 call 40019230 <_Thread_Enable_dispatch>
40014fb4: 01 00 00 00 nop
40014fb8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40014fbc: 81 c7 e0 08 ret
40014fc0: 91 e8 00 01 restore %g0, %g1, %o0
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
40014fc4: 40 00 10 9b call 40019230 <_Thread_Enable_dispatch>
40014fc8: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
40014fcc: 10 bf ff cb b 40014ef8 <rtems_signal_send+0x10>
40014fd0: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
4000d338 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4000d338: 9d e3 bf a0 save %sp, -96, %sp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4000d33c: 80 a6 a0 00 cmp %i2, 0
4000d340: 02 80 00 44 be 4000d450 <rtems_task_mode+0x118>
4000d344: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4000d348: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d34c: e0 00 61 ac ld [ %g1 + 0x1ac ], %l0 ! 4001c1ac <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000d350: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000d354: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000d358: 80 a0 00 02 cmp %g0, %g2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4000d35c: e2 04 21 5c ld [ %l0 + 0x15c ], %l1
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000d360: a4 60 3f ff subx %g0, -1, %l2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000d364: 80 a0 60 00 cmp %g1, 0
4000d368: 12 80 00 3c bne 4000d458 <rtems_task_mode+0x120>
4000d36c: a5 2c a0 08 sll %l2, 8, %l2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d370: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
4000d374: 80 a0 00 01 cmp %g0, %g1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
4000d378: 7f ff f0 d4 call 400096c8 <_CPU_ISR_Get_level>
4000d37c: a6 60 3f ff subx %g0, -1, %l3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d380: a7 2c e0 0a sll %l3, 0xa, %l3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4000d384: a6 14 c0 08 or %l3, %o0, %l3
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4000d388: a4 14 c0 12 or %l3, %l2, %l2
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4000d38c: 80 8e 61 00 btst 0x100, %i1
4000d390: 02 80 00 06 be 4000d3a8 <rtems_task_mode+0x70>
4000d394: e4 26 80 00 st %l2, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4000d398: 83 36 20 08 srl %i0, 8, %g1
4000d39c: 82 18 60 01 xor %g1, 1, %g1
4000d3a0: 82 08 60 01 and %g1, 1, %g1
4000d3a4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
4000d3a8: 80 8e 62 00 btst 0x200, %i1
4000d3ac: 02 80 00 0b be 4000d3d8 <rtems_task_mode+0xa0>
4000d3b0: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
4000d3b4: 80 8e 22 00 btst 0x200, %i0
4000d3b8: 22 80 00 07 be,a 4000d3d4 <rtems_task_mode+0x9c>
4000d3bc: c0 24 20 7c clr [ %l0 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4000d3c0: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d3c4: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 ! 4001c048 <_Thread_Ticks_per_timeslice>
4000d3c8: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4000d3cc: 82 10 20 01 mov 1, %g1
4000d3d0: c2 24 20 7c st %g1, [ %l0 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4000d3d4: 80 8e 60 0f btst 0xf, %i1
4000d3d8: 12 80 00 2d bne 4000d48c <rtems_task_mode+0x154>
4000d3dc: 01 00 00 00 nop
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4000d3e0: 80 8e 64 00 btst 0x400, %i1
4000d3e4: 22 80 00 16 be,a 4000d43c <rtems_task_mode+0x104>
4000d3e8: a0 10 20 00 clr %l0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d3ec: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4000d3f0: b1 36 20 0a srl %i0, 0xa, %i0
4000d3f4: b0 1e 20 01 xor %i0, 1, %i0
4000d3f8: b0 0e 20 01 and %i0, 1, %i0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d3fc: 80 a0 40 18 cmp %g1, %i0
4000d400: 22 80 00 0f be,a 4000d43c <rtems_task_mode+0x104>
4000d404: a0 10 20 00 clr %l0
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4000d408: 7f ff d2 35 call 40001cdc <sparc_disable_interrupts>
4000d40c: f0 2c 60 08 stb %i0, [ %l1 + 8 ]
_signals = information->signals_pending;
4000d410: c4 04 60 18 ld [ %l1 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
4000d414: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
information->signals_posted = _signals;
4000d418: c4 24 60 14 st %g2, [ %l1 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
4000d41c: c2 24 60 18 st %g1, [ %l1 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
4000d420: 7f ff d2 33 call 40001cec <sparc_enable_interrupts>
4000d424: 01 00 00 00 nop
4000d428: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
4000d42c: 80 a0 60 00 cmp %g1, 0
4000d430: 12 80 00 28 bne 4000d4d0 <rtems_task_mode+0x198>
4000d434: 82 10 20 01 mov 1, %g1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
4000d438: a0 10 20 00 clr %l0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4000d43c: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000d440: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 4001c290 <_System_state_Current>
4000d444: 80 a0 60 03 cmp %g1, 3
4000d448: 02 80 00 16 be 4000d4a0 <rtems_task_mode+0x168> <== ALWAYS TAKEN
4000d44c: 82 10 20 00 clr %g1
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4000d450: 81 c7 e0 08 ret
4000d454: 91 e8 00 01 restore %g0, %g1, %o0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d458: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4000d45c: a4 14 a2 00 or %l2, 0x200, %l2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d460: 80 a0 00 01 cmp %g0, %g1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
4000d464: 7f ff f0 99 call 400096c8 <_CPU_ISR_Get_level>
4000d468: a6 60 3f ff subx %g0, -1, %l3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000d46c: a7 2c e0 0a sll %l3, 0xa, %l3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4000d470: a6 14 c0 08 or %l3, %o0, %l3
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4000d474: a4 14 c0 12 or %l3, %l2, %l2
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4000d478: 80 8e 61 00 btst 0x100, %i1
4000d47c: 02 bf ff cb be 4000d3a8 <rtems_task_mode+0x70>
4000d480: e4 26 80 00 st %l2, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4000d484: 10 bf ff c6 b 4000d39c <rtems_task_mode+0x64>
4000d488: 83 36 20 08 srl %i0, 8, %g1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4000d48c: 90 0e 20 0f and %i0, 0xf, %o0
4000d490: 7f ff d2 17 call 40001cec <sparc_enable_interrupts>
4000d494: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4000d498: 10 bf ff d3 b 4000d3e4 <rtems_task_mode+0xac>
4000d49c: 80 8e 64 00 btst 0x400, %i1
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4000d4a0: 40 00 00 c0 call 4000d7a0 <_Thread_Evaluate_mode>
4000d4a4: 01 00 00 00 nop
4000d4a8: 80 8a 20 ff btst 0xff, %o0
4000d4ac: 12 80 00 04 bne 4000d4bc <rtems_task_mode+0x184>
4000d4b0: 80 8c 20 ff btst 0xff, %l0
4000d4b4: 02 bf ff e7 be 4000d450 <rtems_task_mode+0x118>
4000d4b8: 82 10 20 00 clr %g1
_Thread_Dispatch();
4000d4bc: 7f ff e9 ae call 40007b74 <_Thread_Dispatch>
4000d4c0: 01 00 00 00 nop
4000d4c4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
return RTEMS_SUCCESSFUL;
}
4000d4c8: 81 c7 e0 08 ret
4000d4cc: 91 e8 00 01 restore %g0, %g1, %o0
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
4000d4d0: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ]
4000d4d4: 10 bf ff da b 4000d43c <rtems_task_mode+0x104>
4000d4d8: a0 10 20 01 mov 1, %l0
4000b380 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4000b380: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4000b384: 80 a6 60 00 cmp %i1, 0
4000b388: 02 80 00 07 be 4000b3a4 <rtems_task_set_priority+0x24>
4000b38c: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4000b390: 03 10 00 89 sethi %hi(0x40022400), %g1
4000b394: c2 08 62 94 ldub [ %g1 + 0x294 ], %g1 ! 40022694 <rtems_maximum_priority>
4000b398: 80 a6 40 01 cmp %i1, %g1
4000b39c: 18 80 00 1c bgu 4000b40c <rtems_task_set_priority+0x8c>
4000b3a0: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4000b3a4: 80 a6 a0 00 cmp %i2, 0
4000b3a8: 02 80 00 19 be 4000b40c <rtems_task_set_priority+0x8c>
4000b3ac: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4000b3b0: 40 00 08 8f call 4000d5ec <_Thread_Get>
4000b3b4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
4000b3b8: c2 07 bf fc ld [ %fp + -4 ], %g1
4000b3bc: 80 a0 60 00 cmp %g1, 0
4000b3c0: 12 80 00 13 bne 4000b40c <rtems_task_set_priority+0x8c>
4000b3c4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4000b3c8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4000b3cc: 80 a6 60 00 cmp %i1, 0
4000b3d0: 02 80 00 0d be 4000b404 <rtems_task_set_priority+0x84>
4000b3d4: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
4000b3d8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
4000b3dc: 80 a0 60 00 cmp %g1, 0
4000b3e0: 02 80 00 06 be 4000b3f8 <rtems_task_set_priority+0x78>
4000b3e4: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
the_thread->current_priority > new_priority )
4000b3e8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
4000b3ec: 80 a6 40 01 cmp %i1, %g1
4000b3f0: 1a 80 00 05 bcc 4000b404 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
4000b3f4: 01 00 00 00 nop
_Thread_Change_priority( the_thread, new_priority, false );
4000b3f8: 92 10 00 19 mov %i1, %o1
4000b3fc: 40 00 06 d8 call 4000cf5c <_Thread_Change_priority>
4000b400: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
4000b404: 40 00 08 56 call 4000d55c <_Thread_Enable_dispatch>
4000b408: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4000b40c: 81 c7 e0 08 ret
4000b410: 81 e8 00 00 restore
400072cc <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
400072cc: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
400072d0: 80 a6 60 00 cmp %i1, 0
400072d4: 02 80 00 09 be 400072f8 <rtems_task_variable_delete+0x2c>
400072d8: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
400072dc: 90 10 00 18 mov %i0, %o0
400072e0: 40 00 08 0d call 40009314 <_Thread_Get>
400072e4: 92 07 bf fc add %fp, -4, %o1
switch (location) {
400072e8: c4 07 bf fc ld [ %fp + -4 ], %g2
400072ec: 80 a0 a0 00 cmp %g2, 0
400072f0: 02 80 00 04 be 40007300 <rtems_task_variable_delete+0x34>
400072f4: 82 10 20 04 mov 4, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
400072f8: 81 c7 e0 08 ret
400072fc: 91 e8 00 01 restore %g0, %g1, %o0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
40007300: d2 02 21 6c ld [ %o0 + 0x16c ], %o1
while (tvp) {
40007304: 80 a2 60 00 cmp %o1, 0
40007308: 02 80 00 10 be 40007348 <rtems_task_variable_delete+0x7c>
4000730c: 01 00 00 00 nop
if (tvp->ptr == ptr) {
40007310: c2 02 60 04 ld [ %o1 + 4 ], %g1
40007314: 80 a0 40 19 cmp %g1, %i1
40007318: 12 80 00 08 bne 40007338 <rtems_task_variable_delete+0x6c>
4000731c: 84 10 00 09 mov %o1, %g2
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
40007320: 10 80 00 17 b 4000737c <rtems_task_variable_delete+0xb0>
40007324: c2 02 40 00 ld [ %o1 ], %g1
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
40007328: 80 a0 40 19 cmp %g1, %i1
4000732c: 22 80 00 0c be,a 4000735c <rtems_task_variable_delete+0x90>
40007330: c2 02 40 00 ld [ %o1 ], %g1
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
40007334: 84 10 00 09 mov %o1, %g2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
40007338: d2 02 40 00 ld [ %o1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
4000733c: 80 a2 60 00 cmp %o1, 0
40007340: 32 bf ff fa bne,a 40007328 <rtems_task_variable_delete+0x5c><== ALWAYS TAKEN
40007344: c2 02 60 04 ld [ %o1 + 4 ], %g1
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
40007348: 40 00 07 e5 call 400092dc <_Thread_Enable_dispatch>
4000734c: 01 00 00 00 nop
40007350: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40007354: 81 c7 e0 08 ret
40007358: 91 e8 00 01 restore %g0, %g1, %o0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
4000735c: c2 20 80 00 st %g1, [ %g2 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
40007360: 40 00 00 2d call 40007414 <_RTEMS_Tasks_Invoke_task_variable_dtor>
40007364: 01 00 00 00 nop
_Thread_Enable_dispatch();
40007368: 40 00 07 dd call 400092dc <_Thread_Enable_dispatch>
4000736c: 01 00 00 00 nop
40007370: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40007374: 81 c7 e0 08 ret
40007378: 91 e8 00 01 restore %g0, %g1, %o0
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
4000737c: 10 bf ff f9 b 40007360 <rtems_task_variable_delete+0x94>
40007380: c2 22 21 6c st %g1, [ %o0 + 0x16c ]
40007384 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
40007384: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
40007388: 80 a6 60 00 cmp %i1, 0
4000738c: 02 80 00 1c be 400073fc <rtems_task_variable_get+0x78>
40007390: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( !result )
40007394: 02 80 00 1a be 400073fc <rtems_task_variable_get+0x78>
40007398: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
4000739c: 40 00 07 de call 40009314 <_Thread_Get>
400073a0: 92 07 bf fc add %fp, -4, %o1
switch (location) {
400073a4: c2 07 bf fc ld [ %fp + -4 ], %g1
400073a8: 80 a0 60 00 cmp %g1, 0
400073ac: 12 80 00 12 bne 400073f4 <rtems_task_variable_get+0x70>
400073b0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
400073b4: c2 02 21 6c ld [ %o0 + 0x16c ], %g1
while (tvp) {
400073b8: 80 a0 60 00 cmp %g1, 0
400073bc: 32 80 00 07 bne,a 400073d8 <rtems_task_variable_get+0x54>
400073c0: c4 00 60 04 ld [ %g1 + 4 ], %g2
400073c4: 30 80 00 10 b,a 40007404 <rtems_task_variable_get+0x80>
400073c8: 80 a0 60 00 cmp %g1, 0
400073cc: 02 80 00 0e be 40007404 <rtems_task_variable_get+0x80> <== NEVER TAKEN
400073d0: 01 00 00 00 nop
if (tvp->ptr == ptr) {
400073d4: c4 00 60 04 ld [ %g1 + 4 ], %g2
400073d8: 80 a0 80 19 cmp %g2, %i1
400073dc: 32 bf ff fb bne,a 400073c8 <rtems_task_variable_get+0x44>
400073e0: c2 00 40 00 ld [ %g1 ], %g1
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
400073e4: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
400073e8: b0 10 20 00 clr %i0
400073ec: 40 00 07 bc call 400092dc <_Thread_Enable_dispatch>
400073f0: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
400073f4: 81 c7 e0 08 ret
400073f8: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
400073fc: 81 c7 e0 08 ret
40007400: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
40007404: 40 00 07 b6 call 400092dc <_Thread_Enable_dispatch>
40007408: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
4000740c: 81 c7 e0 08 ret
40007410: 81 e8 00 00 restore
40015924 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
40015924: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
40015928: 11 10 00 f6 sethi %hi(0x4003d800), %o0
4001592c: 92 10 00 18 mov %i0, %o1
40015930: 90 12 22 a4 or %o0, 0x2a4, %o0
40015934: 40 00 0b b2 call 400187fc <_Objects_Get>
40015938: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
4001593c: c2 07 bf fc ld [ %fp + -4 ], %g1
40015940: 80 a0 60 00 cmp %g1, 0
40015944: 12 80 00 0a bne 4001596c <rtems_timer_cancel+0x48>
40015948: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
4001594c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
40015950: 80 a0 60 04 cmp %g1, 4
40015954: 02 80 00 04 be 40015964 <rtems_timer_cancel+0x40> <== NEVER TAKEN
40015958: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
4001595c: 40 00 14 7a call 4001ab44 <_Watchdog_Remove>
40015960: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
40015964: 40 00 0e 33 call 40019230 <_Thread_Enable_dispatch>
40015968: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4001596c: 81 c7 e0 08 ret
40015970: 81 e8 00 00 restore
40015e30 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
40015e30: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
40015e34: 03 10 00 f6 sethi %hi(0x4003d800), %g1
40015e38: e0 00 62 e4 ld [ %g1 + 0x2e4 ], %l0 ! 4003dae4 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
40015e3c: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
40015e40: 80 a4 20 00 cmp %l0, 0
40015e44: 02 80 00 34 be 40015f14 <rtems_timer_server_fire_when+0xe4>
40015e48: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
40015e4c: 03 10 00 f5 sethi %hi(0x4003d400), %g1
40015e50: c2 08 63 e4 ldub [ %g1 + 0x3e4 ], %g1 ! 4003d7e4 <_TOD_Is_set>
40015e54: 80 a0 60 00 cmp %g1, 0
40015e58: 02 80 00 2f be 40015f14 <rtems_timer_server_fire_when+0xe4><== NEVER TAKEN
40015e5c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
40015e60: 80 a6 a0 00 cmp %i2, 0
40015e64: 02 80 00 2c be 40015f14 <rtems_timer_server_fire_when+0xe4>
40015e68: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
40015e6c: 7f ff f3 d2 call 40012db4 <_TOD_Validate>
40015e70: 90 10 00 19 mov %i1, %o0
40015e74: 80 8a 20 ff btst 0xff, %o0
40015e78: 12 80 00 04 bne 40015e88 <rtems_timer_server_fire_when+0x58>
40015e7c: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40015e80: 81 c7 e0 08 ret
40015e84: 91 e8 20 14 restore %g0, 0x14, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
40015e88: 7f ff f3 95 call 40012cdc <_TOD_To_seconds>
40015e8c: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
40015e90: 25 10 00 f6 sethi %hi(0x4003d800), %l2
40015e94: c2 04 a0 60 ld [ %l2 + 0x60 ], %g1 ! 4003d860 <_TOD_Now>
40015e98: 80 a2 00 01 cmp %o0, %g1
40015e9c: 08 bf ff f9 bleu 40015e80 <rtems_timer_server_fire_when+0x50>
40015ea0: b2 10 00 08 mov %o0, %i1
40015ea4: 11 10 00 f6 sethi %hi(0x4003d800), %o0
40015ea8: 92 10 00 11 mov %l1, %o1
40015eac: 90 12 22 a4 or %o0, 0x2a4, %o0
40015eb0: 40 00 0a 53 call 400187fc <_Objects_Get>
40015eb4: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
40015eb8: c2 07 bf fc ld [ %fp + -4 ], %g1
40015ebc: a6 10 00 08 mov %o0, %l3
40015ec0: 80 a0 60 00 cmp %g1, 0
40015ec4: 12 80 00 14 bne 40015f14 <rtems_timer_server_fire_when+0xe4>
40015ec8: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
40015ecc: 40 00 13 1e call 4001ab44 <_Watchdog_Remove>
40015ed0: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
40015ed4: e2 24 e0 30 st %l1, [ %l3 + 0x30 ]
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40015ed8: c4 04 a0 60 ld [ %l2 + 0x60 ], %g2
(*timer_server->schedule_operation)( timer_server, the_timer );
40015edc: c2 04 20 04 ld [ %l0 + 4 ], %g1
40015ee0: 90 10 00 10 mov %l0, %o0
40015ee4: 92 10 00 13 mov %l3, %o1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40015ee8: b2 26 40 02 sub %i1, %g2, %i1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
40015eec: 84 10 20 03 mov 3, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40015ef0: f4 24 e0 2c st %i2, [ %l3 + 0x2c ]
40015ef4: c4 24 e0 38 st %g2, [ %l3 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40015ef8: f6 24 e0 34 st %i3, [ %l3 + 0x34 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40015efc: f2 24 e0 1c st %i1, [ %l3 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40015f00: c0 24 e0 18 clr [ %l3 + 0x18 ]
(*timer_server->schedule_operation)( timer_server, the_timer );
40015f04: 9f c0 40 00 call %g1
40015f08: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
40015f0c: 40 00 0c c9 call 40019230 <_Thread_Enable_dispatch>
40015f10: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
40015f14: 81 c7 e0 08 ret
40015f18: 81 e8 00 00 restore