RTEMS 4.11Annotated Report
Wed Apr 11 10:56:08 2012
02008608 <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2008608: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200860c: 39 00 80 75 sethi %hi(0x201d400), %i4
2008610: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List>
2008614: b8 17 21 a4 or %i4, 0x1a4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008618: b8 07 20 04 add %i4, 4, %i4
200861c: 80 a7 40 1c cmp %i5, %i4
2008620: 02 80 00 09 be 2008644 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
2008624: 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)();
2008628: c2 07 60 08 ld [ %i5 + 8 ], %g1
200862c: 9f c0 40 00 call %g1
2008630: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008634: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008638: 80 a7 40 1c cmp %i5, %i4
200863c: 32 bf ff fc bne,a 200862c <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
2008640: c2 07 60 08 ld [ %i5 + 8 ], %g1 <== NOT EXECUTED
2008644: 81 c7 e0 08 ret
2008648: 81 e8 00 00 restore
0200864c <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
200864c: 9d e3 bf a0 save %sp, -96, %sp
2008650: 39 00 80 75 sethi %hi(0x201d400), %i4
2008654: fa 07 21 a4 ld [ %i4 + 0x1a4 ], %i5 ! 201d5a4 <_API_extensions_List>
2008658: b8 17 21 a4 or %i4, 0x1a4, %i4
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
200865c: b8 07 20 04 add %i4, 4, %i4
2008660: 80 a7 40 1c cmp %i5, %i4
2008664: 02 80 00 0a be 200868c <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
2008668: 37 00 80 75 sethi %hi(0x201d400), %i3
200866c: b6 16 e1 e0 or %i3, 0x1e0, %i3 ! 201d5e0 <_Per_CPU_Information>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
2008670: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2008674: 9f c0 40 00 call %g1
2008678: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
200867c: fa 07 40 00 ld [ %i5 ], %i5
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
2008680: 80 a7 40 1c cmp %i5, %i4
2008684: 32 bf ff fc bne,a 2008674 <_API_extensions_Run_postswitch+0x28><== NEVER TAKEN
2008688: c2 07 60 0c ld [ %i5 + 0xc ], %g1 <== NOT EXECUTED
200868c: 81 c7 e0 08 ret
2008690: 81 e8 00 00 restore
02011998 <_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
)
{
2011998: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
201199c: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
20119a0: 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;
20119a4: 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)) {
20119a8: 80 8e e0 03 btst 3, %i3
20119ac: 02 80 00 0a be 20119d4 <_CORE_message_queue_Initialize+0x3c>
20119b0: b8 10 00 1b mov %i3, %i4
allocated_message_size += sizeof(uint32_t);
20119b4: b8 06 e0 04 add %i3, 4, %i4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
20119b8: b8 0f 3f fc and %i4, -4, %i4
}
if (allocated_message_size < maximum_message_size)
20119bc: 80 a6 c0 1c cmp %i3, %i4
20119c0: 08 80 00 05 bleu 20119d4 <_CORE_message_queue_Initialize+0x3c><== ALWAYS TAKEN
20119c4: ba 10 20 00 clr %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
20119c8: b0 0f 60 01 and %i5, 1, %i0 <== NOT EXECUTED
20119cc: 81 c7 e0 08 ret
20119d0: 81 e8 00 00 restore
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
20119d4: b8 07 20 10 add %i4, 0x10, %i4
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
20119d8: 90 10 20 00 clr %o0
20119dc: 92 10 00 1a mov %i2, %o1
20119e0: 94 10 20 00 clr %o2
20119e4: 96 10 00 1c mov %i4, %o3
20119e8: 40 00 41 60 call 2021f68 <__muldi3>
20119ec: ba 10 20 00 clr %i5
if ( x > SIZE_MAX )
20119f0: 80 a2 20 00 cmp %o0, 0
20119f4: 34 bf ff f6 bg,a 20119cc <_CORE_message_queue_Initialize+0x34>
20119f8: b0 0f 60 01 and %i5, 1, %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
20119fc: 40 00 0c a7 call 2014c98 <_Workspace_Allocate>
2011a00: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2011a04: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2011a08: 80 a2 20 00 cmp %o0, 0
2011a0c: 02 bf ff ef be 20119c8 <_CORE_message_queue_Initialize+0x30><== NEVER TAKEN
2011a10: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2011a14: 90 06 20 60 add %i0, 0x60, %o0
2011a18: 94 10 00 1a mov %i2, %o2
2011a1c: 7f ff ff c5 call 2011930 <_Chain_Initialize>
2011a20: 96 10 00 1c mov %i4, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2011a24: c4 06 40 00 ld [ %i1 ], %g2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2011a28: 82 06 20 50 add %i0, 0x50, %g1
2011a2c: 84 18 a0 01 xor %g2, 1, %g2
2011a30: 80 a0 00 02 cmp %g0, %g2
2011a34: 84 06 20 54 add %i0, 0x54, %g2
head->next = tail;
head->previous = NULL;
tail->previous = head;
2011a38: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2011a3c: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
2011a40: 90 10 00 18 mov %i0, %o0
head->previous = NULL;
2011a44: c0 26 20 54 clr [ %i0 + 0x54 ]
2011a48: 92 60 3f ff subx %g0, -1, %o1
2011a4c: 94 10 20 80 mov 0x80, %o2
2011a50: 96 10 20 06 mov 6, %o3
2011a54: 40 00 0a 3a call 201433c <_Thread_queue_Initialize>
2011a58: ba 10 20 01 mov 1, %i5
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2011a5c: b0 0f 60 01 and %i5, 1, %i0
2011a60: 81 c7 e0 08 ret
2011a64: 81 e8 00 00 restore
02008bf0 <_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
)
{
2008bf0: 9d e3 bf a0 save %sp, -96, %sp
2008bf4: ba 10 00 18 mov %i0, %i5
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008bf8: b0 10 20 00 clr %i0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
2008bfc: 40 00 07 c9 call 200ab20 <_Thread_queue_Dequeue>
2008c00: 90 10 00 1d mov %i5, %o0
2008c04: 80 a2 20 00 cmp %o0, 0
2008c08: 02 80 00 04 be 2008c18 <_CORE_semaphore_Surrender+0x28>
2008c0c: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
2008c10: 81 c7 e0 08 ret
2008c14: 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 );
2008c18: 7f ff e6 a8 call 20026b8 <sparc_disable_interrupts>
2008c1c: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2008c20: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2008c24: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
2008c28: 80 a0 40 02 cmp %g1, %g2
2008c2c: 1a 80 00 05 bcc 2008c40 <_CORE_semaphore_Surrender+0x50> <== NEVER TAKEN
2008c30: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2008c34: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
2008c38: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
2008c3c: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2008c40: 7f ff e6 a2 call 20026c8 <sparc_enable_interrupts>
2008c44: 01 00 00 00 nop
}
return status;
}
2008c48: 81 c7 e0 08 ret
2008c4c: 81 e8 00 00 restore
020087e0 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
20087e0: 9d e3 bf a0 save %sp, -96, %sp
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
20087e4: c0 26 20 04 clr [ %i0 + 4 ]
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
20087e8: ba 06 20 04 add %i0, 4, %i5
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
20087ec: 80 a6 a0 00 cmp %i2, 0
20087f0: 02 80 00 12 be 2008838 <_Chain_Initialize+0x58> <== NEVER TAKEN
20087f4: 90 10 00 18 mov %i0, %o0
20087f8: b4 06 bf ff add %i2, -1, %i2
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
20087fc: 82 10 00 19 mov %i1, %g1
head->previous = NULL;
while ( count-- ) {
2008800: 92 10 00 1a mov %i2, %o1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
2008804: 10 80 00 05 b 2008818 <_Chain_Initialize+0x38>
2008808: 84 10 00 18 mov %i0, %g2
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
200880c: 84 10 00 01 mov %g1, %g2
2008810: b4 06 bf ff add %i2, -1, %i2
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
2008814: 82 10 00 03 mov %g3, %g1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
2008818: c2 20 80 00 st %g1, [ %g2 ]
next->previous = current;
200881c: c4 20 60 04 st %g2, [ %g1 + 4 ]
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
2008820: 80 a6 a0 00 cmp %i2, 0
2008824: 12 bf ff fa bne 200880c <_Chain_Initialize+0x2c>
2008828: 86 00 40 1b add %g1, %i3, %g3
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
200882c: 40 00 3f 83 call 2018638 <.umul>
2008830: 90 10 00 1b mov %i3, %o0
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
2008834: 90 06 40 08 add %i1, %o0, %o0
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
2008838: fa 22 00 00 st %i5, [ %o0 ]
tail->previous = current;
200883c: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
2008840: 81 c7 e0 08 ret
2008844: 81 e8 00 00 restore
0200788c <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
200788c: 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 ];
2007890: fa 06 21 50 ld [ %i0 + 0x150 ], %i5
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2007894: 7f ff eb 89 call 20026b8 <sparc_disable_interrupts>
2007898: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
pending_events = api->pending_events;
200789c: c4 07 40 00 ld [ %i5 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
20078a0: 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 ) ) {
20078a4: 86 88 40 02 andcc %g1, %g2, %g3
20078a8: 02 80 00 39 be 200798c <_Event_Surrender+0x100>
20078ac: 09 00 80 75 sethi %hi(0x201d400), %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() &&
20078b0: 88 11 21 e0 or %g4, 0x1e0, %g4 ! 201d5e0 <_Per_CPU_Information>
20078b4: f2 01 20 08 ld [ %g4 + 8 ], %i1
20078b8: 80 a6 60 00 cmp %i1, 0
20078bc: 32 80 00 1c bne,a 200792c <_Event_Surrender+0xa0>
20078c0: c8 01 20 0c ld [ %g4 + 0xc ], %g4
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
20078c4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
20078c8: 80 89 21 00 btst 0x100, %g4
20078cc: 02 80 00 30 be 200798c <_Event_Surrender+0x100>
20078d0: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
20078d4: 02 80 00 04 be 20078e4 <_Event_Surrender+0x58>
20078d8: 80 8f 20 02 btst 2, %i4
20078dc: 02 80 00 2c be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN
20078e0: 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;
20078e4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
20078e8: 84 28 80 03 andn %g2, %g3, %g2
/*
* 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 );
20078ec: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
20078f0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20078f4: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
20078f8: 7f ff eb 74 call 20026c8 <sparc_enable_interrupts>
20078fc: 01 00 00 00 nop
2007900: 7f ff eb 6e call 20026b8 <sparc_disable_interrupts>
2007904: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
2007908: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200790c: 80 a0 60 02 cmp %g1, 2
2007910: 02 80 00 21 be 2007994 <_Event_Surrender+0x108>
2007914: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2007918: 7f ff eb 6c call 20026c8 <sparc_enable_interrupts>
200791c: 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 );
2007920: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2007924: 40 00 0a af call 200a3e0 <_Thread_Clear_state>
2007928: 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() &&
200792c: 80 a6 00 04 cmp %i0, %g4
2007930: 32 bf ff e6 bne,a 20078c8 <_Event_Surrender+0x3c>
2007934: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2007938: 09 00 80 75 sethi %hi(0x201d400), %g4
200793c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1 ! 201d640 <_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() &&
_Thread_Is_executing( the_thread ) &&
2007940: 80 a6 60 02 cmp %i1, 2
2007944: 02 80 00 07 be 2007960 <_Event_Surrender+0xd4> <== NEVER TAKEN
2007948: 80 a0 40 03 cmp %g1, %g3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
200794c: f2 01 22 40 ld [ %g4 + 0x240 ], %i1
* 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() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
2007950: 80 a6 60 01 cmp %i1, 1
2007954: 32 bf ff dd bne,a 20078c8 <_Event_Surrender+0x3c>
2007958: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
200795c: 80 a0 40 03 cmp %g1, %g3
2007960: 02 80 00 04 be 2007970 <_Event_Surrender+0xe4>
2007964: 80 8f 20 02 btst 2, %i4
2007968: 02 80 00 09 be 200798c <_Event_Surrender+0x100> <== NEVER TAKEN
200796c: 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;
2007970: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
2007974: 84 28 80 03 andn %g2, %g3, %g2
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 );
2007978: c4 27 40 00 st %g2, [ %i5 ]
the_thread->Wait.count = 0;
200797c: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007980: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2007984: 82 10 20 03 mov 3, %g1
2007988: c2 21 22 40 st %g1, [ %g4 + 0x240 ]
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
200798c: 7f ff eb 4f call 20026c8 <sparc_enable_interrupts>
2007990: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2007994: 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 );
2007998: 7f ff eb 4c call 20026c8 <sparc_enable_interrupts>
200799c: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
20079a0: 40 00 0f 5b call 200b70c <_Watchdog_Remove>
20079a4: 90 06 20 48 add %i0, 0x48, %o0
20079a8: b2 16 63 f8 or %i1, 0x3f8, %i1
20079ac: 40 00 0a 8d call 200a3e0 <_Thread_Clear_state>
20079b0: 81 e8 00 00 restore
020079b4 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
20079b4: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
20079b8: 90 10 00 18 mov %i0, %o0
20079bc: 40 00 0b 88 call 200a7dc <_Thread_Get>
20079c0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20079c4: c2 07 bf fc ld [ %fp + -4 ], %g1
20079c8: 80 a0 60 00 cmp %g1, 0
20079cc: 12 80 00 16 bne 2007a24 <_Event_Timeout+0x70> <== NEVER TAKEN
20079d0: ba 10 00 08 mov %o0, %i5
*
* 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 );
20079d4: 7f ff eb 39 call 20026b8 <sparc_disable_interrupts>
20079d8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
20079dc: 03 00 80 75 sethi %hi(0x201d400), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
20079e0: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 201d5ec <_Per_CPU_Information+0xc>
20079e4: 80 a7 40 01 cmp %i5, %g1
20079e8: 02 80 00 11 be 2007a2c <_Event_Timeout+0x78>
20079ec: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20079f0: 82 10 20 06 mov 6, %g1
20079f4: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
20079f8: 7f ff eb 34 call 20026c8 <sparc_enable_interrupts>
20079fc: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007a00: 90 10 00 1d mov %i5, %o0
2007a04: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2007a08: 40 00 0a 76 call 200a3e0 <_Thread_Clear_state>
2007a0c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2007a10: 03 00 80 74 sethi %hi(0x201d000), %g1
2007a14: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
2007a18: 84 00 bf ff add %g2, -1, %g2
2007a1c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
2007a20: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
2007a24: 81 c7 e0 08 ret
2007a28: 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 )
2007a2c: 03 00 80 75 sethi %hi(0x201d400), %g1
2007a30: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 201d640 <_Event_Sync_state>
2007a34: 80 a0 a0 01 cmp %g2, 1
2007a38: 32 bf ff ef bne,a 20079f4 <_Event_Timeout+0x40>
2007a3c: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2007a40: 84 10 20 02 mov 2, %g2
2007a44: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2007a48: 10 bf ff eb b 20079f4 <_Event_Timeout+0x40>
2007a4c: 82 10 20 06 mov 6, %g1
0200d768 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
200d768: 9d e3 bf 98 save %sp, -104, %sp
200d76c: ba 10 00 18 mov %i0, %i5
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
200d770: a0 06 60 04 add %i1, 4, %l0
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
200d774: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
200d778: 80 a6 40 10 cmp %i1, %l0
200d77c: 18 80 00 23 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d780: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
200d784: 80 a6 e0 00 cmp %i3, 0
200d788: 12 80 00 7d bne 200d97c <_Heap_Allocate_aligned_with_boundary+0x214>
200d78c: 80 a6 40 1b cmp %i1, %i3
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d790: e2 07 60 08 ld [ %i5 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d794: 80 a7 40 11 cmp %i5, %l1
200d798: 02 80 00 18 be 200d7f8 <_Heap_Allocate_aligned_with_boundary+0x90>
200d79c: b8 10 20 00 clr %i4
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;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d7a0: 82 05 a0 07 add %l6, 7, %g1
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d7a4: ae 10 20 04 mov 4, %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;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d7a8: c2 27 bf fc st %g1, [ %fp + -4 ]
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
200d7ac: 10 80 00 0b b 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d7b0: ae 25 c0 19 sub %l7, %i1, %l7
* 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 ) {
if ( alignment == 0 ) {
200d7b4: 12 80 00 17 bne 200d810 <_Heap_Allocate_aligned_with_boundary+0xa8>
200d7b8: b0 04 60 08 add %l1, 8, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d7bc: 80 a6 20 00 cmp %i0, 0
200d7c0: 12 80 00 5b bne 200d92c <_Heap_Allocate_aligned_with_boundary+0x1c4>
200d7c4: b8 07 20 01 inc %i4
break;
}
block = block->next;
200d7c8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d7cc: 80 a7 40 11 cmp %i5, %l1
200d7d0: 22 80 00 0b be,a 200d7fc <_Heap_Allocate_aligned_with_boundary+0x94>
200d7d4: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
/*
* 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 ) {
200d7d8: e4 04 60 04 ld [ %l1 + 4 ], %l2
200d7dc: 80 a4 00 12 cmp %l0, %l2
200d7e0: 0a bf ff f5 bcs 200d7b4 <_Heap_Allocate_aligned_with_boundary+0x4c>
200d7e4: 80 a6 a0 00 cmp %i2, 0
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
200d7e8: e2 04 60 08 ld [ %l1 + 8 ], %l1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
200d7ec: 80 a7 40 11 cmp %i5, %l1
200d7f0: 12 bf ff fa bne 200d7d8 <_Heap_Allocate_aligned_with_boundary+0x70>
200d7f4: b8 07 20 01 inc %i4
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d7f8: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d7fc: 80 a0 40 1c cmp %g1, %i4
200d800: 0a 80 00 5a bcs 200d968 <_Heap_Allocate_aligned_with_boundary+0x200>
200d804: b0 10 20 00 clr %i0
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
200d808: 81 c7 e0 08 ret
200d80c: 81 e8 00 00 restore
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;
200d810: c4 07 bf fc ld [ %fp + -4 ], %g2
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
200d814: ea 07 60 14 ld [ %i5 + 0x14 ], %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;
200d818: a4 0c bf fe and %l2, -2, %l2
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;
200d81c: 82 20 80 15 sub %g2, %l5, %g1
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
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;
200d820: a4 04 40 12 add %l1, %l2, %l2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d824: 92 10 00 1a mov %i2, %o1
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_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
200d828: b0 05 c0 12 add %l7, %l2, %i0
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;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
200d82c: a4 00 40 12 add %g1, %l2, %l2
200d830: 40 00 2c 68 call 20189d0 <.urem>
200d834: 90 10 00 18 mov %i0, %o0
200d838: 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 ) {
200d83c: 80 a4 80 18 cmp %l2, %i0
200d840: 1a 80 00 06 bcc 200d858 <_Heap_Allocate_aligned_with_boundary+0xf0>
200d844: a8 04 60 08 add %l1, 8, %l4
200d848: 90 10 00 12 mov %l2, %o0
200d84c: 40 00 2c 61 call 20189d0 <.urem>
200d850: 92 10 00 1a mov %i2, %o1
200d854: b0 24 80 08 sub %l2, %o0, %i0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
200d858: 80 a6 e0 00 cmp %i3, 0
200d85c: 02 80 00 24 be 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184>
200d860: 80 a5 00 18 cmp %l4, %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;
200d864: a4 06 00 19 add %i0, %i1, %l2
200d868: 92 10 00 1b mov %i3, %o1
200d86c: 40 00 2c 59 call 20189d0 <.urem>
200d870: 90 10 00 12 mov %l2, %o0
200d874: 90 24 80 08 sub %l2, %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 ) {
200d878: 80 a6 00 08 cmp %i0, %o0
200d87c: 1a 80 00 1b bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d880: 80 a2 00 12 cmp %o0, %l2
200d884: 1a 80 00 1a bcc 200d8ec <_Heap_Allocate_aligned_with_boundary+0x184>
200d888: 80 a5 00 18 cmp %l4, %i0
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
200d88c: a6 05 00 19 add %l4, %i1, %l3
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
200d890: 80 a4 c0 08 cmp %l3, %o0
200d894: 08 80 00 08 bleu 200d8b4 <_Heap_Allocate_aligned_with_boundary+0x14c>
200d898: b0 10 20 00 clr %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d89c: 10 bf ff c9 b 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d8a0: 80 a6 20 00 cmp %i0, 0
/* 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 ) {
200d8a4: 1a 80 00 11 bcc 200d8e8 <_Heap_Allocate_aligned_with_boundary+0x180>
200d8a8: 80 a4 c0 08 cmp %l3, %o0
if ( boundary_line < boundary_floor ) {
200d8ac: 18 bf ff c4 bgu 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54><== NEVER TAKEN
200d8b0: b0 10 20 00 clr %i0
return 0;
}
alloc_begin = boundary_line - alloc_size;
200d8b4: b0 22 00 19 sub %o0, %i1, %i0
200d8b8: 92 10 00 1a mov %i2, %o1
200d8bc: 40 00 2c 45 call 20189d0 <.urem>
200d8c0: 90 10 00 18 mov %i0, %o0
200d8c4: 92 10 00 1b mov %i3, %o1
200d8c8: b0 26 00 08 sub %i0, %o0, %i0
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
200d8cc: a4 06 00 19 add %i0, %i1, %l2
200d8d0: 40 00 2c 40 call 20189d0 <.urem>
200d8d4: 90 10 00 12 mov %l2, %o0
200d8d8: 90 24 80 08 sub %l2, %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 ) {
200d8dc: 80 a2 00 12 cmp %o0, %l2
200d8e0: 0a bf ff f1 bcs 200d8a4 <_Heap_Allocate_aligned_with_boundary+0x13c>
200d8e4: 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 ) {
200d8e8: 80 a5 00 18 cmp %l4, %i0
200d8ec: 18 80 00 22 bgu 200d974 <_Heap_Allocate_aligned_with_boundary+0x20c>
200d8f0: 82 10 3f f8 mov -8, %g1
200d8f4: 90 10 00 18 mov %i0, %o0
200d8f8: a4 20 40 11 sub %g1, %l1, %l2
200d8fc: 92 10 00 16 mov %l6, %o1
200d900: 40 00 2c 34 call 20189d0 <.urem>
200d904: a4 04 80 18 add %l2, %i0, %l2
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;
if ( free_size >= min_block_size || free_size == 0 ) {
200d908: 90 a4 80 08 subcc %l2, %o0, %o0
200d90c: 02 bf ff ad be 200d7c0 <_Heap_Allocate_aligned_with_boundary+0x58>
200d910: 80 a6 20 00 cmp %i0, 0
200d914: 80 a2 00 15 cmp %o0, %l5
return alloc_begin;
}
}
return 0;
200d918: 82 40 3f ff addx %g0, -1, %g1
200d91c: b0 0e 00 01 and %i0, %g1, %i0
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
200d920: 80 a6 20 00 cmp %i0, 0
200d924: 02 bf ff a9 be 200d7c8 <_Heap_Allocate_aligned_with_boundary+0x60>
200d928: b8 07 20 01 inc %i4
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d92c: c4 07 60 48 ld [ %i5 + 0x48 ], %g2
stats->searches += search_count;
200d930: c2 07 60 4c ld [ %i5 + 0x4c ], %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d934: 84 00 a0 01 inc %g2
stats->searches += search_count;
200d938: 82 00 40 1c add %g1, %i4, %g1
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
200d93c: c4 27 60 48 st %g2, [ %i5 + 0x48 ]
stats->searches += search_count;
200d940: c2 27 60 4c st %g1, [ %i5 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
200d944: 90 10 00 1d mov %i5, %o0
200d948: 92 10 00 11 mov %l1, %o1
200d94c: 94 10 00 18 mov %i0, %o2
200d950: 7f ff ed cf call 200908c <_Heap_Block_allocate>
200d954: 96 10 00 19 mov %i1, %o3
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
200d958: c2 07 60 44 ld [ %i5 + 0x44 ], %g1
200d95c: 80 a0 40 1c cmp %g1, %i4
200d960: 1a 80 00 03 bcc 200d96c <_Heap_Allocate_aligned_with_boundary+0x204>
200d964: 01 00 00 00 nop
stats->max_search = search_count;
200d968: f8 27 60 44 st %i4, [ %i5 + 0x44 ]
}
return (void *) alloc_begin;
}
200d96c: 81 c7 e0 08 ret
200d970: 81 e8 00 00 restore
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
200d974: 10 bf ff 92 b 200d7bc <_Heap_Allocate_aligned_with_boundary+0x54>
200d978: b0 10 20 00 clr %i0
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
200d97c: 18 bf ff a3 bgu 200d808 <_Heap_Allocate_aligned_with_boundary+0xa0>
200d980: 80 a6 a0 00 cmp %i2, 0
return NULL;
}
if ( alignment == 0 ) {
200d984: 22 bf ff 83 be,a 200d790 <_Heap_Allocate_aligned_with_boundary+0x28>
200d988: b4 10 00 16 mov %l6, %i2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200d98c: 10 bf ff 82 b 200d794 <_Heap_Allocate_aligned_with_boundary+0x2c>
200d990: e2 07 60 08 ld [ %i5 + 8 ], %l1
0200d9a8 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
200d9a8: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
200d9ac: c0 27 bf f8 clr [ %fp + -8 ]
Heap_Block *extend_last_block = NULL;
200d9b0: c0 27 bf fc clr [ %fp + -4 ]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
200d9b4: ba 06 40 1a add %i1, %i2, %i5
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
200d9b8: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
200d9bc: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
200d9c0: d6 06 20 14 ld [ %i0 + 0x14 ], %o3
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
200d9c4: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
200d9c8: 80 a6 40 1d cmp %i1, %i5
200d9cc: 08 80 00 05 bleu 200d9e0 <_Heap_Extend+0x38>
200d9d0: a2 10 20 00 clr %l1
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
200d9d4: b0 0c 60 01 and %l1, 1, %i0
200d9d8: 81 c7 e0 08 ret
200d9dc: 81 e8 00 00 restore
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
200d9e0: 90 10 00 19 mov %i1, %o0
200d9e4: 92 10 00 1a mov %i2, %o1
200d9e8: 94 10 00 10 mov %l0, %o2
200d9ec: 98 07 bf f8 add %fp, -8, %o4
200d9f0: 7f ff ed 48 call 2008f10 <_Heap_Get_first_and_last_block>
200d9f4: 9a 07 bf fc add %fp, -4, %o5
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
200d9f8: 80 8a 20 ff btst 0xff, %o0
200d9fc: 02 bf ff f6 be 200d9d4 <_Heap_Extend+0x2c>
200da00: aa 10 20 00 clr %l5
200da04: a2 10 00 1c mov %i4, %l1
200da08: ac 10 20 00 clr %l6
200da0c: a6 10 20 00 clr %l3
200da10: 10 80 00 14 b 200da60 <_Heap_Extend+0xb8>
200da14: a8 10 20 00 clr %l4
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
200da18: 2a 80 00 02 bcs,a 200da20 <_Heap_Extend+0x78>
200da1c: ac 10 00 11 mov %l1, %l6
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200da20: 90 10 00 1a mov %i2, %o0
200da24: 40 00 2c b2 call 2018cec <.urem>
200da28: 92 10 00 10 mov %l0, %o1
200da2c: 82 06 bf f8 add %i2, -8, %g1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200da30: 80 a6 80 19 cmp %i2, %i1
200da34: 02 80 00 1c be 200daa4 <_Heap_Extend+0xfc>
200da38: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
200da3c: 80 a6 40 1a cmp %i1, %i2
200da40: 38 80 00 02 bgu,a 200da48 <_Heap_Extend+0xa0>
200da44: aa 10 00 01 mov %g1, %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;
200da48: e2 00 60 04 ld [ %g1 + 4 ], %l1
200da4c: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200da50: a2 00 40 11 add %g1, %l1, %l1
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200da54: 80 a7 00 11 cmp %i4, %l1
200da58: 22 80 00 1b be,a 200dac4 <_Heap_Extend+0x11c>
200da5c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200da60: 80 a4 40 1c cmp %l1, %i4
200da64: 02 80 00 66 be 200dbfc <_Heap_Extend+0x254>
200da68: 82 10 00 11 mov %l1, %g1
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200da6c: 80 a0 40 1d cmp %g1, %i5
200da70: 0a 80 00 70 bcs 200dc30 <_Heap_Extend+0x288>
200da74: f4 04 40 00 ld [ %l1 ], %i2
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
200da78: 80 a0 40 1d cmp %g1, %i5
200da7c: 12 bf ff e7 bne 200da18 <_Heap_Extend+0x70>
200da80: 80 a7 40 1a cmp %i5, %i2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200da84: 90 10 00 1a mov %i2, %o0
200da88: 40 00 2c 99 call 2018cec <.urem>
200da8c: 92 10 00 10 mov %l0, %o1
200da90: 82 06 bf f8 add %i2, -8, %g1
200da94: a8 10 00 11 mov %l1, %l4
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200da98: 80 a6 80 19 cmp %i2, %i1
200da9c: 12 bf ff e8 bne 200da3c <_Heap_Extend+0x94> <== ALWAYS TAKEN
200daa0: 82 20 40 08 sub %g1, %o0, %g1
start_block->prev_size = extend_area_end;
200daa4: fa 24 40 00 st %i5, [ %l1 ]
- 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;
200daa8: e2 00 60 04 ld [ %g1 + 4 ], %l1
200daac: a2 0c 7f fe and %l1, -2, %l1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200dab0: a2 00 40 11 add %g1, %l1, %l1
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200dab4: 80 a7 00 11 cmp %i4, %l1
200dab8: 12 bf ff ea bne 200da60 <_Heap_Extend+0xb8> <== NEVER TAKEN
200dabc: a6 10 00 01 mov %g1, %l3
if ( extend_area_begin < heap->area_begin ) {
200dac0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200dac4: 80 a6 40 01 cmp %i1, %g1
200dac8: 3a 80 00 55 bcc,a 200dc1c <_Heap_Extend+0x274>
200dacc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
heap->area_begin = extend_area_begin;
200dad0: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200dad4: c2 07 bf f8 ld [ %fp + -8 ], %g1
200dad8: c4 07 bf fc ld [ %fp + -4 ], %g2
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200dadc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
200dae0: 86 20 80 01 sub %g2, %g1, %g3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
200dae4: fa 20 40 00 st %i5, [ %g1 ]
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
200dae8: b8 10 e0 01 or %g3, 1, %i4
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
200daec: f8 20 60 04 st %i4, [ %g1 + 4 ]
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
200daf0: c6 20 80 00 st %g3, [ %g2 ]
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200daf4: 80 a1 00 01 cmp %g4, %g1
200daf8: 08 80 00 43 bleu 200dc04 <_Heap_Extend+0x25c>
200dafc: c0 20 a0 04 clr [ %g2 + 4 ]
heap->first_block = extend_first_block;
200db00: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200db04: 80 a5 20 00 cmp %l4, 0
200db08: 02 80 00 63 be 200dc94 <_Heap_Extend+0x2ec>
200db0c: b2 06 60 08 add %i1, 8, %i1
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
200db10: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
200db14: 92 10 00 1c mov %i4, %o1
200db18: 40 00 2c 75 call 2018cec <.urem>
200db1c: 90 10 00 19 mov %i1, %o0
if ( remainder != 0 ) {
200db20: 80 a2 20 00 cmp %o0, 0
200db24: 02 80 00 04 be 200db34 <_Heap_Extend+0x18c>
200db28: c4 05 00 00 ld [ %l4 ], %g2
return value - remainder + alignment;
200db2c: b2 06 40 1c add %i1, %i4, %i1
200db30: b2 26 40 08 sub %i1, %o0, %i1
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
200db34: 82 06 7f f8 add %i1, -8, %g1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
200db38: c4 26 7f f8 st %g2, [ %i1 + -8 ]
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
200db3c: 84 25 00 01 sub %l4, %g1, %g2
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
200db40: 84 10 a0 01 or %g2, 1, %g2
_Heap_Free_block( heap, new_first_block );
200db44: 90 10 00 18 mov %i0, %o0
200db48: 92 10 00 01 mov %g1, %o1
200db4c: 7f ff ff 8d call 200d980 <_Heap_Free_block>
200db50: c4 26 7f fc st %g2, [ %i1 + -4 ]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200db54: 80 a4 e0 00 cmp %l3, 0
200db58: 02 80 00 3b be 200dc44 <_Heap_Extend+0x29c>
200db5c: ba 07 7f f8 add %i5, -8, %i5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200db60: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
200db64: ba 27 40 13 sub %i5, %l3, %i5
200db68: 40 00 2c 61 call 2018cec <.urem>
200db6c: 90 10 00 1d mov %i5, %o0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
200db70: c2 04 e0 04 ld [ %l3 + 4 ], %g1
200db74: ba 27 40 08 sub %i5, %o0, %i5
200db78: 82 20 40 1d sub %g1, %i5, %g1
| HEAP_PREV_BLOCK_USED;
200db7c: 82 10 60 01 or %g1, 1, %g1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200db80: 84 07 40 13 add %i5, %l3, %g2
200db84: c2 20 a0 04 st %g1, [ %g2 + 4 ]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200db88: c2 04 e0 04 ld [ %l3 + 4 ], %g1
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
200db8c: 90 10 00 18 mov %i0, %o0
200db90: 82 08 60 01 and %g1, 1, %g1
200db94: 92 10 00 13 mov %l3, %o1
block->size_and_flag = size | flag;
200db98: ba 17 40 01 or %i5, %g1, %i5
200db9c: 7f ff ff 79 call 200d980 <_Heap_Free_block>
200dba0: fa 24 e0 04 st %i5, [ %l3 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200dba4: 80 a4 e0 00 cmp %l3, 0
200dba8: 02 80 00 34 be 200dc78 <_Heap_Extend+0x2d0>
200dbac: 80 a5 20 00 cmp %l4, 0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200dbb0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200dbb4: fa 06 20 20 ld [ %i0 + 0x20 ], %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dbb8: c8 00 60 04 ld [ %g1 + 4 ], %g4
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
200dbbc: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200dbc0: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200dbc4: ba 27 40 01 sub %i5, %g1, %i5
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dbc8: 88 09 20 01 and %g4, 1, %g4
block->size_and_flag = size | flag;
200dbcc: 88 17 40 04 or %i5, %g4, %g4
200dbd0: c8 20 60 04 st %g4, [ %g1 + 4 ]
200dbd4: a4 20 c0 12 sub %g3, %l2, %l2
/* Statistics */
stats->size += extended_size;
200dbd8: 82 00 80 12 add %g2, %l2, %g1
200dbdc: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
if ( extended_size_ptr != NULL )
200dbe0: 80 a6 e0 00 cmp %i3, 0
200dbe4: 02 bf ff 7c be 200d9d4 <_Heap_Extend+0x2c> <== NEVER TAKEN
200dbe8: a2 10 20 01 mov 1, %l1
*extended_size_ptr = extended_size;
200dbec: e4 26 c0 00 st %l2, [ %i3 ]
return true;
}
200dbf0: b0 0c 60 01 and %l1, 1, %i0
200dbf4: 81 c7 e0 08 ret
200dbf8: 81 e8 00 00 restore
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
200dbfc: 10 bf ff 9c b 200da6c <_Heap_Extend+0xc4>
200dc00: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
200dc04: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200dc08: 80 a0 40 02 cmp %g1, %g2
200dc0c: 2a bf ff be bcs,a 200db04 <_Heap_Extend+0x15c>
200dc10: c4 26 20 24 st %g2, [ %i0 + 0x24 ]
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200dc14: 10 bf ff bd b 200db08 <_Heap_Extend+0x160>
200dc18: 80 a5 20 00 cmp %l4, 0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
200dc1c: 80 a7 40 01 cmp %i5, %g1
200dc20: 38 bf ff ad bgu,a 200dad4 <_Heap_Extend+0x12c>
200dc24: fa 26 20 1c st %i5, [ %i0 + 0x1c ]
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200dc28: 10 bf ff ac b 200dad8 <_Heap_Extend+0x130>
200dc2c: c2 07 bf f8 ld [ %fp + -8 ], %g1
(uintptr_t) start_block : heap->area_begin;
uintptr_t const sub_area_end = start_block->prev_size;
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200dc30: 80 a6 40 1a cmp %i1, %i2
200dc34: 1a bf ff 92 bcc 200da7c <_Heap_Extend+0xd4>
200dc38: 80 a0 40 1d cmp %g1, %i5
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
200dc3c: 10 bf ff 66 b 200d9d4 <_Heap_Extend+0x2c>
200dc40: a2 10 20 00 clr %l1
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
200dc44: 80 a5 60 00 cmp %l5, 0
200dc48: 02 bf ff d7 be 200dba4 <_Heap_Extend+0x1fc>
200dc4c: c4 07 bf f8 ld [ %fp + -8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200dc50: c6 05 60 04 ld [ %l5 + 4 ], %g3
_Heap_Link_above(
200dc54: c2 07 bf fc ld [ %fp + -4 ], %g1
200dc58: 86 08 e0 01 and %g3, 1, %g3
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
200dc5c: 84 20 80 15 sub %g2, %l5, %g2
block->size_and_flag = size | flag;
200dc60: 84 10 80 03 or %g2, %g3, %g2
200dc64: c4 25 60 04 st %g2, [ %l5 + 4 ]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
200dc68: c4 00 60 04 ld [ %g1 + 4 ], %g2
200dc6c: 84 10 a0 01 or %g2, 1, %g2
200dc70: 10 bf ff cd b 200dba4 <_Heap_Extend+0x1fc>
200dc74: c4 20 60 04 st %g2, [ %g1 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200dc78: 32 bf ff cf bne,a 200dbb4 <_Heap_Extend+0x20c>
200dc7c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
_Heap_Free_block( heap, extend_first_block );
200dc80: d2 07 bf f8 ld [ %fp + -8 ], %o1
200dc84: 7f ff ff 3f call 200d980 <_Heap_Free_block>
200dc88: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200dc8c: 10 bf ff ca b 200dbb4 <_Heap_Extend+0x20c>
200dc90: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
200dc94: 80 a5 a0 00 cmp %l6, 0
200dc98: 02 bf ff b0 be 200db58 <_Heap_Extend+0x1b0>
200dc9c: 80 a4 e0 00 cmp %l3, 0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
200dca0: ac 25 80 02 sub %l6, %g2, %l6
200dca4: ac 15 a0 01 or %l6, 1, %l6
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
200dca8: 10 bf ff ac b 200db58 <_Heap_Extend+0x1b0>
200dcac: ec 20 a0 04 st %l6, [ %g2 + 4 ]
0200d994 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200d994: 9d e3 bf a0 save %sp, -96, %sp
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
200d998: 80 a6 60 00 cmp %i1, 0
200d99c: 02 80 00 57 be 200daf8 <_Heap_Free+0x164>
200d9a0: 84 10 20 01 mov 1, %g2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d9a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d9a8: 40 00 2c 0a call 20189d0 <.urem>
200d9ac: 90 10 00 19 mov %i1, %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
200d9b0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d9b4: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200d9b8: ba 27 40 08 sub %i5, %o0, %i5
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;
200d9bc: 80 a7 40 01 cmp %i5, %g1
200d9c0: 0a 80 00 4e bcs 200daf8 <_Heap_Free+0x164>
200d9c4: 84 10 20 00 clr %g2
200d9c8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200d9cc: 80 a7 40 04 cmp %i5, %g4
200d9d0: 38 80 00 4b bgu,a 200dafc <_Heap_Free+0x168>
200d9d4: b0 08 a0 01 and %g2, 1, %i0
- 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;
200d9d8: de 07 60 04 ld [ %i5 + 4 ], %o7
200d9dc: b2 0b ff fe and %o7, -2, %i1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d9e0: 86 07 40 19 add %i5, %i1, %g3
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;
200d9e4: 80 a0 40 03 cmp %g1, %g3
200d9e8: 38 80 00 45 bgu,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200d9ec: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
200d9f0: 80 a1 00 03 cmp %g4, %g3
200d9f4: 2a 80 00 42 bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200d9f8: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
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;
200d9fc: da 00 e0 04 ld [ %g3 + 4 ], %o5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200da00: 80 8b 60 01 btst 1, %o5
200da04: 02 80 00 3d be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da08: 98 0b 7f fe and %o5, -2, %o4
return true;
}
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 ));
200da0c: 80 a1 00 03 cmp %g4, %g3
200da10: 02 80 00 06 be 200da28 <_Heap_Free+0x94>
200da14: 9a 10 20 00 clr %o5
200da18: 84 00 c0 0c add %g3, %o4, %g2
200da1c: da 00 a0 04 ld [ %g2 + 4 ], %o5
200da20: 9a 0b 60 01 and %o5, 1, %o5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
200da24: 9a 1b 60 01 xor %o5, 1, %o5
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 ) ) {
200da28: 80 8b e0 01 btst 1, %o7
200da2c: 12 80 00 1d bne 200daa0 <_Heap_Free+0x10c>
200da30: 80 8b 60 ff btst 0xff, %o5
uintptr_t const prev_size = block->prev_size;
200da34: d6 07 40 00 ld [ %i5 ], %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200da38: 9e 27 40 0b sub %i5, %o3, %o7
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;
200da3c: 80 a0 40 0f cmp %g1, %o7
200da40: 18 80 00 2e bgu 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da44: 84 10 20 00 clr %g2
200da48: 80 a1 00 0f cmp %g4, %o7
200da4c: 2a 80 00 2c bcs,a 200dafc <_Heap_Free+0x168> <== NEVER TAKEN
200da50: b0 08 a0 01 and %g2, 1, %i0 <== NOT EXECUTED
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;
200da54: c2 03 e0 04 ld [ %o7 + 4 ], %g1
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) ) {
200da58: 80 88 60 01 btst 1, %g1
200da5c: 02 80 00 27 be 200daf8 <_Heap_Free+0x164> <== NEVER TAKEN
200da60: 80 8b 60 ff btst 0xff, %o5
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200da64: 22 80 00 3a be,a 200db4c <_Heap_Free+0x1b8>
200da68: 96 06 40 0b add %i1, %o3, %o3
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
200da6c: c2 00 e0 08 ld [ %g3 + 8 ], %g1
Heap_Block *prev = block->prev;
200da70: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200da74: c6 06 20 38 ld [ %i0 + 0x38 ], %g3
prev->next = next;
200da78: c2 20 a0 08 st %g1, [ %g2 + 8 ]
next->prev = prev;
200da7c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
200da80: 82 00 ff ff add %g3, -1, %g1
200da84: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200da88: 98 06 40 0c add %i1, %o4, %o4
200da8c: 96 03 00 0b add %o4, %o3, %o3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200da90: 82 12 e0 01 or %o3, 1, %g1
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200da94: d6 23 c0 0b st %o3, [ %o7 + %o3 ]
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;
200da98: 10 80 00 0e b 200dad0 <_Heap_Free+0x13c>
200da9c: c2 23 e0 04 st %g1, [ %o7 + 4 ]
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 */
200daa0: 22 80 00 19 be,a 200db04 <_Heap_Free+0x170>
200daa4: c4 06 20 08 ld [ %i0 + 8 ], %g2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
200daa8: c4 00 e0 08 ld [ %g3 + 8 ], %g2
Heap_Block *prev = old_block->prev;
200daac: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
new_block->next = next;
200dab0: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = prev;
200dab4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
uintptr_t const size = block_size + next_block_size;
200dab8: 98 03 00 19 add %o4, %i1, %o4
next->prev = new_block;
200dabc: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
prev->next = new_block;
200dac0: fa 20 60 08 st %i5, [ %g1 + 8 ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200dac4: 84 13 20 01 or %o4, 1, %g2
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200dac8: d8 27 40 0c st %o4, [ %i5 + %o4 ]
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;
200dacc: c4 27 60 04 st %g2, [ %i5 + 4 ]
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dad0: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
200dad4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
200dad8: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dadc: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
200dae0: 82 00 60 01 inc %g1
stats->free_size += block_size;
200dae4: b2 00 c0 19 add %g3, %i1, %i1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
200dae8: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
200daec: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200daf0: f2 26 20 30 st %i1, [ %i0 + 0x30 ]
return( true );
200daf4: 84 10 20 01 mov 1, %g2
}
200daf8: b0 08 a0 01 and %g2, 1, %i0
200dafc: 81 c7 e0 08 ret
200db00: 81 e8 00 00 restore
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;
200db04: 82 16 60 01 or %i1, 1, %g1
200db08: c2 27 60 04 st %g1, [ %i5 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200db0c: c8 00 e0 04 ld [ %g3 + 4 ], %g4
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200db10: f0 27 60 0c st %i0, [ %i5 + 0xc ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200db14: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200db18: c4 27 60 08 st %g2, [ %i5 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200db1c: fa 20 a0 0c st %i5, [ %g2 + 0xc ]
} 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;
200db20: 84 09 3f fe and %g4, -2, %g2
next_block->prev_size = block_size;
200db24: f2 27 40 19 st %i1, [ %i5 + %i1 ]
} 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;
200db28: c4 20 e0 04 st %g2, [ %g3 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
200db2c: 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;
200db30: 82 00 60 01 inc %g1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200db34: fa 26 20 08 st %i5, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200db38: 80 a0 40 02 cmp %g1, %g2
200db3c: 08 bf ff e5 bleu 200dad0 <_Heap_Free+0x13c>
200db40: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200db44: 10 bf ff e3 b 200dad0 <_Heap_Free+0x13c>
200db48: 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;
200db4c: 82 12 e0 01 or %o3, 1, %g1
200db50: c2 23 e0 04 st %g1, [ %o7 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200db54: c2 00 e0 04 ld [ %g3 + 4 ], %g1
next_block->prev_size = size;
200db58: d6 27 40 19 st %o3, [ %i5 + %i1 ]
_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;
200db5c: 82 08 7f fe and %g1, -2, %g1
200db60: 10 bf ff dc b 200dad0 <_Heap_Free+0x13c>
200db64: c2 20 e0 04 st %g1, [ %g3 + 4 ]
0202e31c <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
202e31c: 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;
202e320: 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;
202e324: c0 26 40 00 clr [ %i1 ]
info->largest = 0;
202e328: c0 26 60 04 clr [ %i1 + 4 ]
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
202e32c: 80 a6 00 01 cmp %i0, %g1
202e330: 02 80 00 14 be 202e380 <_Heap_Get_free_information+0x64> <== NEVER TAKEN
202e334: c0 26 60 08 clr [ %i1 + 8 ]
202e338: 88 10 20 01 mov 1, %g4
202e33c: 9e 10 20 00 clr %o7
202e340: 10 80 00 03 b 202e34c <_Heap_Get_free_information+0x30>
202e344: 86 10 20 00 clr %g3
202e348: 88 10 00 0d mov %o5, %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;
202e34c: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_block != tail;
the_block = the_block->next)
202e350: 9a 01 20 01 add %g4, 1, %o5
202e354: 84 08 bf fe and %g2, -2, %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 )
202e358: 80 a0 80 0f cmp %g2, %o7
202e35c: 08 80 00 03 bleu 202e368 <_Heap_Get_free_information+0x4c>
202e360: 86 00 c0 02 add %g3, %g2, %g3
info->largest = the_size;
202e364: 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)
202e368: 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);
202e36c: 80 a6 00 01 cmp %i0, %g1
202e370: 32 bf ff f6 bne,a 202e348 <_Heap_Get_free_information+0x2c>
202e374: de 06 60 04 ld [ %i1 + 4 ], %o7
202e378: c8 26 40 00 st %g4, [ %i1 ]
202e37c: c6 26 60 08 st %g3, [ %i1 + 8 ]
202e380: 81 c7 e0 08 ret
202e384: 81 e8 00 00 restore
0200add8 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
uintptr_t remaining_free_space
)
{
200add8: 9d e3 bf a0 save %sp, -96, %sp
void *free_space = remaining_free_space > 0 ?
_Heap_Allocate( heap, remaining_free_space )
: NULL;
200addc: b4 10 20 00 clr %i2
200ade0: 80 a6 60 00 cmp %i1, 0
200ade4: 12 80 00 1c bne 200ae54 <_Heap_Greedy_allocate+0x7c>
200ade8: b8 10 00 18 mov %i0, %i4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200adec: fa 07 20 08 ld [ %i4 + 8 ], %i5
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
200adf0: b0 10 20 00 clr %i0
while ( current != free_list_tail ) {
200adf4: 80 a7 00 1d cmp %i4, %i5
200adf8: 12 80 00 05 bne 200ae0c <_Heap_Greedy_allocate+0x34> <== ALWAYS TAKEN
200adfc: b6 10 20 00 clr %i3
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
}
_Heap_Free( heap, free_space );
200ae00: 10 80 00 11 b 200ae44 <_Heap_Greedy_allocate+0x6c> <== NOT EXECUTED
200ae04: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
200ae08: ba 10 00 01 mov %g1, %i5
- 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;
200ae0c: d6 07 60 04 ld [ %i5 + 4 ], %o3
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
while ( current != free_list_tail ) {
_Heap_Block_allocate(
200ae10: 92 10 00 1d mov %i5, %o1
200ae14: 96 0a ff fe and %o3, -2, %o3
200ae18: 94 07 60 08 add %i5, 8, %o2
200ae1c: 90 10 00 1c mov %i4, %o0
200ae20: 40 00 00 e6 call 200b1b8 <_Heap_Block_allocate>
200ae24: 96 02 ff f8 add %o3, -8, %o3
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
200ae28: f6 27 60 08 st %i3, [ %i5 + 8 ]
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200ae2c: c2 07 20 08 ld [ %i4 + 8 ], %g1
: NULL;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *current = _Heap_Free_list_first( heap );
Heap_Block *blocks = NULL;
while ( current != free_list_tail ) {
200ae30: 80 a7 00 01 cmp %i4, %g1
200ae34: 12 bf ff f5 bne 200ae08 <_Heap_Greedy_allocate+0x30>
200ae38: b6 10 00 1d mov %i5, %i3
200ae3c: b0 10 00 1d mov %i5, %i0
current->next = blocks;
blocks = current;
current = _Heap_Free_list_first( heap );
}
_Heap_Free( heap, free_space );
200ae40: 90 10 00 1c mov %i4, %o0
200ae44: 40 00 1c ec call 20121f4 <_Heap_Free>
200ae48: 92 10 00 1a mov %i2, %o1
return blocks;
}
200ae4c: 81 c7 e0 08 ret
200ae50: 81 e8 00 00 restore
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
200ae54: 90 10 00 18 mov %i0, %o0
200ae58: 92 10 00 19 mov %i1, %o1
200ae5c: 94 10 20 00 clr %o2
200ae60: 40 00 1c 5a call 2011fc8 <_Heap_Allocate_aligned_with_boundary>
200ae64: 96 10 20 00 clr %o3
200ae68: 10 bf ff e1 b 200adec <_Heap_Greedy_allocate+0x14>
200ae6c: b4 10 00 08 mov %o0, %i2
0200ae70 <_Heap_Greedy_free>:
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
200ae70: 9d e3 bf a0 save %sp, -96, %sp
while ( blocks != NULL ) {
200ae74: 80 a6 60 00 cmp %i1, 0
200ae78: 32 80 00 04 bne,a 200ae88 <_Heap_Greedy_free+0x18> <== ALWAYS TAKEN
200ae7c: fa 06 60 08 ld [ %i1 + 8 ], %i5
200ae80: 30 80 00 0a b,a 200aea8 <_Heap_Greedy_free+0x38> <== NOT EXECUTED
Heap_Block *current = blocks;
blocks = blocks->next;
200ae84: fa 06 60 08 ld [ %i1 + 8 ], %i5
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
200ae88: 92 06 60 08 add %i1, 8, %o1
200ae8c: 40 00 1c da call 20121f4 <_Heap_Free>
200ae90: 90 10 00 18 mov %i0, %o0
void _Heap_Greedy_free(
Heap_Control *heap,
Heap_Block *blocks
)
{
while ( blocks != NULL ) {
200ae94: 80 a7 60 00 cmp %i5, 0
200ae98: 12 bf ff fb bne 200ae84 <_Heap_Greedy_free+0x14>
200ae9c: b2 10 00 1d mov %i5, %i1
200aea0: 81 c7 e0 08 ret
200aea4: 81 e8 00 00 restore
200aea8: 81 c7 e0 08 ret <== NOT EXECUTED
200aeac: 81 e8 00 00 restore <== NOT EXECUTED
02044174 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
2044174: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *current = heap->first_block;
2044178: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *end = heap->last_block;
204417c: fa 06 20 24 ld [ %i0 + 0x24 ], %i5
bool stop = false;
while ( !stop && current != end ) {
2044180: 80 a7 00 1d cmp %i4, %i5
2044184: 32 80 00 06 bne,a 204419c <_Heap_Iterate+0x28> <== ALWAYS TAKEN
2044188: d2 07 20 04 ld [ %i4 + 4 ], %o1
204418c: 30 80 00 0e b,a 20441c4 <_Heap_Iterate+0x50> <== NOT EXECUTED
2044190: 02 80 00 0d be 20441c4 <_Heap_Iterate+0x50>
2044194: 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;
2044198: d2 07 20 04 ld [ %i4 + 4 ], %o1
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
204419c: 90 10 00 1c mov %i4, %o0
20441a0: 92 0a 7f fe and %o1, -2, %o1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
20441a4: b8 07 00 09 add %i4, %o1, %i4
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;
20441a8: d4 07 20 04 ld [ %i4 + 4 ], %o2
20441ac: 96 10 00 1a mov %i2, %o3
20441b0: 9f c6 40 00 call %i1
20441b4: 94 0a a0 01 and %o2, 1, %o2
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
20441b8: 80 8a 20 ff btst 0xff, %o0
20441bc: 02 bf ff f5 be 2044190 <_Heap_Iterate+0x1c> <== ALWAYS TAKEN
20441c0: 80 a7 40 1c cmp %i5, %i4
20441c4: 81 c7 e0 08 ret
20441c8: 81 e8 00 00 restore
0200dc88 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
200dc88: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200dc8c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200dc90: 40 00 2b 50 call 20189d0 <.urem>
200dc94: 90 10 00 19 mov %i1, %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
200dc98: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200dc9c: 84 06 7f f8 add %i1, -8, %g2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200dca0: 84 20 80 08 sub %g2, %o0, %g2
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;
200dca4: 80 a0 80 01 cmp %g2, %g1
200dca8: 0a 80 00 16 bcs 200dd00 <_Heap_Size_of_alloc_area+0x78>
200dcac: 86 10 20 00 clr %g3
200dcb0: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
200dcb4: 80 a0 80 04 cmp %g2, %g4
200dcb8: 18 80 00 13 bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcbc: b0 08 e0 01 and %g3, 1, %i0
- 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;
200dcc0: f0 00 a0 04 ld [ %g2 + 4 ], %i0
200dcc4: b0 0e 3f fe and %i0, -2, %i0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200dcc8: 84 00 80 18 add %g2, %i0, %g2
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;
200dccc: 80 a0 40 02 cmp %g1, %g2
200dcd0: 18 80 00 0d bgu 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcd4: b0 08 e0 01 and %g3, 1, %i0
200dcd8: 80 a1 00 02 cmp %g4, %g2
200dcdc: 0a 80 00 0a bcs 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dce0: 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;
200dce4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
200dce8: 80 88 60 01 btst 1, %g1
200dcec: 02 80 00 06 be 200dd04 <_Heap_Size_of_alloc_area+0x7c> <== NEVER TAKEN
200dcf0: 84 20 80 19 sub %g2, %i1, %g2
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
200dcf4: 86 10 20 01 mov 1, %g3
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
200dcf8: 84 00 a0 04 add %g2, 4, %g2
200dcfc: c4 26 80 00 st %g2, [ %i2 ]
return true;
}
200dd00: b0 08 e0 01 and %g3, 1, %i0
200dd04: 81 c7 e0 08 ret
200dd08: 81 e8 00 00 restore
02009e48 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
2009e48: 9d e3 bf 80 save %sp, -128, %sp
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
2009e4c: 3b 00 80 27 sethi %hi(0x2009c00), %i5
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
2009e50: e0 06 20 10 ld [ %i0 + 0x10 ], %l0
uintptr_t const min_block_size = heap->min_block_size;
2009e54: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
2009e58: f8 06 20 20 ld [ %i0 + 0x20 ], %i4
Heap_Block *const last_block = heap->last_block;
2009e5c: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
2009e60: 80 a6 a0 00 cmp %i2, 0
2009e64: 02 80 00 04 be 2009e74 <_Heap_Walk+0x2c>
2009e68: ba 17 61 dc or %i5, 0x1dc, %i5
2009e6c: 3b 00 80 27 sethi %hi(0x2009c00), %i5
2009e70: ba 17 61 e4 or %i5, 0x1e4, %i5 ! 2009de4 <_Heap_Walk_print>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
2009e74: 03 00 80 7e sethi %hi(0x201f800), %g1
2009e78: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 ! 201f9e8 <_System_state_Current>
2009e7c: 80 a0 a0 03 cmp %g2, 3
2009e80: 02 80 00 05 be 2009e94 <_Heap_Walk+0x4c>
2009e84: 82 10 20 01 mov 1, %g1
block = next_block;
} while ( block != first_block );
return true;
}
2009e88: b0 08 60 01 and %g1, 1, %i0
2009e8c: 81 c7 e0 08 ret
2009e90: 81 e8 00 00 restore
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)(
2009e94: da 06 20 18 ld [ %i0 + 0x18 ], %o5
2009e98: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
2009e9c: c4 06 20 08 ld [ %i0 + 8 ], %g2
2009ea0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2009ea4: 90 10 00 19 mov %i1, %o0
2009ea8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
2009eac: f8 23 a0 60 st %i4, [ %sp + 0x60 ]
2009eb0: e2 23 a0 64 st %l1, [ %sp + 0x64 ]
2009eb4: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2009eb8: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2009ebc: 92 10 20 00 clr %o1
2009ec0: 96 10 00 10 mov %l0, %o3
2009ec4: 15 00 80 71 sethi %hi(0x201c400), %o2
2009ec8: 98 10 00 1b mov %i3, %o4
2009ecc: 9f c7 40 00 call %i5
2009ed0: 94 12 a1 00 or %o2, 0x100, %o2
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
2009ed4: 80 a4 20 00 cmp %l0, 0
2009ed8: 02 80 00 28 be 2009f78 <_Heap_Walk+0x130>
2009edc: 80 8c 20 07 btst 7, %l0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
2009ee0: 12 80 00 2d bne 2009f94 <_Heap_Walk+0x14c>
2009ee4: 90 10 00 1b mov %i3, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009ee8: 7f ff de f9 call 2001acc <.urem>
2009eec: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
2009ef0: 80 a2 20 00 cmp %o0, 0
2009ef4: 12 80 00 30 bne 2009fb4 <_Heap_Walk+0x16c>
2009ef8: 90 07 20 08 add %i4, 8, %o0
2009efc: 7f ff de f4 call 2001acc <.urem>
2009f00: 92 10 00 10 mov %l0, %o1
);
return false;
}
if (
2009f04: 80 a2 20 00 cmp %o0, 0
2009f08: 32 80 00 33 bne,a 2009fd4 <_Heap_Walk+0x18c>
2009f0c: 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;
2009f10: e8 07 20 04 ld [ %i4 + 4 ], %l4
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
2009f14: 80 8d 20 01 btst 1, %l4
2009f18: 22 80 00 36 be,a 2009ff0 <_Heap_Walk+0x1a8>
2009f1c: 90 10 00 19 mov %i1, %o0
- 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;
2009f20: c2 04 60 04 ld [ %l1 + 4 ], %g1
2009f24: 82 08 7f fe and %g1, -2, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2009f28: 82 04 40 01 add %l1, %g1, %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;
2009f2c: c4 00 60 04 ld [ %g1 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
2009f30: 80 88 a0 01 btst 1, %g2
2009f34: 02 80 00 0a be 2009f5c <_Heap_Walk+0x114>
2009f38: 80 a7 00 01 cmp %i4, %g1
);
return false;
}
if (
2009f3c: 02 80 00 33 be 200a008 <_Heap_Walk+0x1c0>
2009f40: 90 10 00 19 mov %i1, %o0
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
2009f44: 92 10 20 01 mov 1, %o1
2009f48: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f4c: 9f c7 40 00 call %i5
2009f50: 94 12 a2 78 or %o2, 0x278, %o2 ! 201c678 <__log2table+0x2d8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f54: 10 bf ff cd b 2009e88 <_Heap_Walk+0x40>
2009f58: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
2009f5c: 90 10 00 19 mov %i1, %o0
2009f60: 92 10 20 01 mov 1, %o1
2009f64: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f68: 9f c7 40 00 call %i5
2009f6c: 94 12 a2 60 or %o2, 0x260, %o2 ! 201c660 <__log2table+0x2c0>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f70: 10 bf ff c6 b 2009e88 <_Heap_Walk+0x40>
2009f74: 82 10 20 00 clr %g1
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
2009f78: 90 10 00 19 mov %i1, %o0
2009f7c: 92 10 20 01 mov 1, %o1
2009f80: 15 00 80 71 sethi %hi(0x201c400), %o2
2009f84: 9f c7 40 00 call %i5
2009f88: 94 12 a1 98 or %o2, 0x198, %o2 ! 201c598 <__log2table+0x1f8>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009f8c: 10 bf ff bf b 2009e88 <_Heap_Walk+0x40>
2009f90: 82 10 20 00 clr %g1
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
2009f94: 90 10 00 19 mov %i1, %o0
2009f98: 92 10 20 01 mov 1, %o1
2009f9c: 96 10 00 10 mov %l0, %o3
2009fa0: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fa4: 9f c7 40 00 call %i5
2009fa8: 94 12 a1 b0 or %o2, 0x1b0, %o2 ! 201c5b0 <__log2table+0x210>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fac: 10 bf ff b7 b 2009e88 <_Heap_Walk+0x40>
2009fb0: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
2009fb4: 90 10 00 19 mov %i1, %o0
2009fb8: 92 10 20 01 mov 1, %o1
2009fbc: 96 10 00 1b mov %i3, %o3
2009fc0: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fc4: 9f c7 40 00 call %i5
2009fc8: 94 12 a1 d0 or %o2, 0x1d0, %o2 ! 201c5d0 <__log2table+0x230>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fcc: 10 bf ff af b 2009e88 <_Heap_Walk+0x40>
2009fd0: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
2009fd4: 92 10 20 01 mov 1, %o1
2009fd8: 96 10 00 1c mov %i4, %o3
2009fdc: 15 00 80 71 sethi %hi(0x201c400), %o2
2009fe0: 9f c7 40 00 call %i5
2009fe4: 94 12 a1 f8 or %o2, 0x1f8, %o2 ! 201c5f8 <__log2table+0x258>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
2009fe8: 10 bf ff a8 b 2009e88 <_Heap_Walk+0x40>
2009fec: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
2009ff0: 92 10 20 01 mov 1, %o1
2009ff4: 15 00 80 71 sethi %hi(0x201c400), %o2
2009ff8: 9f c7 40 00 call %i5
2009ffc: 94 12 a2 30 or %o2, 0x230, %o2 ! 201c630 <__log2table+0x290>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a000: 10 bf ff a2 b 2009e88 <_Heap_Walk+0x40>
200a004: 82 10 20 00 clr %g1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
200a008: f4 06 20 08 ld [ %i0 + 8 ], %i2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
200a00c: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
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 ) {
200a010: 80 a6 00 1a cmp %i0, %i2
200a014: 02 80 00 0d be 200a048 <_Heap_Walk+0x200>
200a018: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
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;
200a01c: 80 a0 40 1a cmp %g1, %i2
200a020: 28 80 00 bc bleu,a 200a310 <_Heap_Walk+0x4c8> <== ALWAYS TAKEN
200a024: e6 06 20 24 ld [ %i0 + 0x24 ], %l3
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
200a028: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200a02c: 92 10 20 01 mov 1, %o1
200a030: 96 10 00 1a mov %i2, %o3
200a034: 15 00 80 71 sethi %hi(0x201c400), %o2
200a038: 9f c7 40 00 call %i5
200a03c: 94 12 a2 a8 or %o2, 0x2a8, %o2 ! 201c6a8 <__log2table+0x308>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a040: 10 bf ff 92 b 2009e88 <_Heap_Walk+0x40>
200a044: 82 10 20 00 clr %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a048: 2d 00 80 72 sethi %hi(0x201c800), %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
200a04c: 2f 00 80 72 sethi %hi(0x201c800), %l7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a050: a4 10 00 1c mov %i4, %l2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a054: ac 15 a0 d8 or %l6, 0xd8, %l6
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
200a058: ae 15 e0 c0 or %l7, 0xc0, %l7
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a05c: 2b 00 80 72 sethi %hi(0x201c800), %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;
200a060: a6 0d 3f fe and %l4, -2, %l3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200a064: b4 04 c0 12 add %l3, %l2, %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;
200a068: 80 a0 40 1a cmp %g1, %i2
200a06c: 28 80 00 0b bleu,a 200a098 <_Heap_Walk+0x250> <== ALWAYS TAKEN
200a070: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
200a074: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
200a078: 92 10 20 01 mov 1, %o1
200a07c: 96 10 00 12 mov %l2, %o3
200a080: 15 00 80 71 sethi %hi(0x201c400), %o2
200a084: 98 10 00 1a mov %i2, %o4
200a088: 9f c7 40 00 call %i5
200a08c: 94 12 a3 50 or %o2, 0x350, %o2
"block 0x%08x: next block 0x%08x not in heap\n",
block,
next_block
);
return false;
200a090: 10 bf ff 7e b 2009e88 <_Heap_Walk+0x40>
200a094: 82 10 20 00 clr %g1
200a098: 80 a0 40 1a cmp %g1, %i2
200a09c: 0a bf ff f7 bcs 200a078 <_Heap_Walk+0x230>
200a0a0: 90 10 00 19 mov %i1, %o0
uintptr_t const block_begin = (uintptr_t) block;
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;
bool const is_not_last_block = block != last_block;
200a0a4: 82 1c 80 11 xor %l2, %l1, %g1
200a0a8: 80 a0 00 01 cmp %g0, %g1
200a0ac: 82 40 20 00 addx %g0, 0, %g1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a0b0: 90 10 00 13 mov %l3, %o0
200a0b4: c2 27 bf fc st %g1, [ %fp + -4 ]
200a0b8: 7f ff de 85 call 2001acc <.urem>
200a0bc: 92 10 00 10 mov %l0, %o1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
200a0c0: 80 a2 20 00 cmp %o0, 0
200a0c4: 02 80 00 05 be 200a0d8 <_Heap_Walk+0x290>
200a0c8: c2 07 bf fc ld [ %fp + -4 ], %g1
200a0cc: 80 88 60 ff btst 0xff, %g1
200a0d0: 12 80 00 76 bne 200a2a8 <_Heap_Walk+0x460>
200a0d4: 90 10 00 19 mov %i1, %o0
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
200a0d8: 80 a6 c0 13 cmp %i3, %l3
200a0dc: 08 80 00 05 bleu 200a0f0 <_Heap_Walk+0x2a8>
200a0e0: 80 a4 80 1a cmp %l2, %i2
200a0e4: 80 88 60 ff btst 0xff, %g1
200a0e8: 12 80 00 78 bne 200a2c8 <_Heap_Walk+0x480> <== ALWAYS TAKEN
200a0ec: 80 a4 80 1a cmp %l2, %i2
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
200a0f0: 2a 80 00 06 bcs,a 200a108 <_Heap_Walk+0x2c0>
200a0f4: c2 06 a0 04 ld [ %i2 + 4 ], %g1
200a0f8: 80 88 60 ff btst 0xff, %g1
200a0fc: 12 80 00 7d bne 200a2f0 <_Heap_Walk+0x4a8>
200a100: 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;
200a104: c2 06 a0 04 ld [ %i2 + 4 ], %g1
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200a108: 80 88 60 01 btst 1, %g1
200a10c: 02 80 00 19 be 200a170 <_Heap_Walk+0x328>
200a110: a8 0d 20 01 and %l4, 1, %l4
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
200a114: 80 a5 20 00 cmp %l4, 0
200a118: 22 80 00 0e be,a 200a150 <_Heap_Walk+0x308>
200a11c: da 04 80 00 ld [ %l2 ], %o5
(*printer)(
200a120: 90 10 00 19 mov %i1, %o0
200a124: 92 10 20 00 clr %o1
200a128: 94 10 00 17 mov %l7, %o2
200a12c: 96 10 00 12 mov %l2, %o3
200a130: 9f c7 40 00 call %i5
200a134: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
200a138: 80 a7 00 1a cmp %i4, %i2
200a13c: 02 80 00 42 be 200a244 <_Heap_Walk+0x3fc>
200a140: a4 10 00 1a mov %i2, %l2
200a144: e8 06 a0 04 ld [ %i2 + 4 ], %l4
200a148: 10 bf ff c6 b 200a060 <_Heap_Walk+0x218>
200a14c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
200a150: 96 10 00 12 mov %l2, %o3
200a154: 90 10 00 19 mov %i1, %o0
200a158: 92 10 20 00 clr %o1
200a15c: 94 10 00 16 mov %l6, %o2
200a160: 9f c7 40 00 call %i5
200a164: 98 10 00 13 mov %l3, %o4
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
200a168: 10 bf ff f5 b 200a13c <_Heap_Walk+0x2f4>
200a16c: 80 a7 00 1a cmp %i4, %i2
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
200a170: da 04 a0 0c ld [ %l2 + 0xc ], %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)(
200a174: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a178: 05 00 80 71 sethi %hi(0x201c400), %g2
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
200a17c: c8 06 20 0c ld [ %i0 + 0xc ], %g4
200a180: 80 a0 40 0d cmp %g1, %o5
200a184: 02 80 00 05 be 200a198 <_Heap_Walk+0x350>
200a188: 86 10 a0 c0 or %g2, 0xc0, %g3
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
200a18c: 80 a6 00 0d cmp %i0, %o5
200a190: 02 80 00 3c be 200a280 <_Heap_Walk+0x438>
200a194: 86 15 60 88 or %l5, 0x88, %g3
block->next,
block->next == last_free_block ?
200a198: c2 04 a0 08 ld [ %l2 + 8 ], %g1
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)(
200a19c: 1f 00 80 71 sethi %hi(0x201c400), %o7
200a1a0: 80 a1 00 01 cmp %g4, %g1
200a1a4: 02 80 00 05 be 200a1b8 <_Heap_Walk+0x370>
200a1a8: 84 13 e0 e0 or %o7, 0xe0, %g2
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a1ac: 80 a6 00 01 cmp %i0, %g1
200a1b0: 02 80 00 31 be 200a274 <_Heap_Walk+0x42c>
200a1b4: 84 15 60 88 or %l5, 0x88, %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)(
200a1b8: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
200a1bc: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
200a1c0: c4 23 a0 64 st %g2, [ %sp + 0x64 ]
200a1c4: 90 10 00 19 mov %i1, %o0
200a1c8: 92 10 20 00 clr %o1
200a1cc: 15 00 80 72 sethi %hi(0x201c800), %o2
200a1d0: 96 10 00 12 mov %l2, %o3
200a1d4: 94 12 a0 18 or %o2, 0x18, %o2
200a1d8: 9f c7 40 00 call %i5
200a1dc: 98 10 00 13 mov %l3, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
200a1e0: da 06 80 00 ld [ %i2 ], %o5
200a1e4: 80 a4 c0 0d cmp %l3, %o5
200a1e8: 12 80 00 19 bne 200a24c <_Heap_Walk+0x404>
200a1ec: 80 a5 20 00 cmp %l4, 0
);
return false;
}
if ( !prev_used ) {
200a1f0: 02 80 00 27 be 200a28c <_Heap_Walk+0x444>
200a1f4: 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;
200a1f8: 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 ) {
200a1fc: 80 a6 00 01 cmp %i0, %g1
200a200: 02 80 00 0b be 200a22c <_Heap_Walk+0x3e4> <== NEVER TAKEN
200a204: 92 10 20 01 mov 1, %o1
if ( free_block == block ) {
200a208: 80 a4 80 01 cmp %l2, %g1
200a20c: 02 bf ff cc be 200a13c <_Heap_Walk+0x2f4>
200a210: 80 a7 00 1a cmp %i4, %i2
return true;
}
free_block = free_block->next;
200a214: c2 00 60 08 ld [ %g1 + 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 ) {
200a218: 80 a6 00 01 cmp %i0, %g1
200a21c: 12 bf ff fc bne 200a20c <_Heap_Walk+0x3c4>
200a220: 80 a4 80 01 cmp %l2, %g1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
200a224: 90 10 00 19 mov %i1, %o0
200a228: 92 10 20 01 mov 1, %o1
200a22c: 96 10 00 12 mov %l2, %o3
200a230: 15 00 80 72 sethi %hi(0x201c800), %o2
200a234: 9f c7 40 00 call %i5
200a238: 94 12 a1 00 or %o2, 0x100, %o2 ! 201c900 <__log2table+0x560>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a23c: 10 bf ff 13 b 2009e88 <_Heap_Walk+0x40>
200a240: 82 10 20 00 clr %g1
}
block = next_block;
} while ( block != first_block );
return true;
200a244: 10 bf ff 11 b 2009e88 <_Heap_Walk+0x40>
200a248: 82 10 20 01 mov 1, %g1
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
200a24c: f4 23 a0 5c st %i2, [ %sp + 0x5c ]
200a250: 90 10 00 19 mov %i1, %o0
200a254: 92 10 20 01 mov 1, %o1
200a258: 96 10 00 12 mov %l2, %o3
200a25c: 15 00 80 72 sethi %hi(0x201c800), %o2
200a260: 98 10 00 13 mov %l3, %o4
200a264: 9f c7 40 00 call %i5
200a268: 94 12 a0 50 or %o2, 0x50, %o2
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a26c: 10 bf ff 07 b 2009e88 <_Heap_Walk+0x40>
200a270: 82 10 20 00 clr %g1
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
200a274: 05 00 80 71 sethi %hi(0x201c400), %g2
200a278: 10 bf ff d0 b 200a1b8 <_Heap_Walk+0x370>
200a27c: 84 10 a0 f0 or %g2, 0xf0, %g2 ! 201c4f0 <__log2table+0x150>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
200a280: 07 00 80 71 sethi %hi(0x201c400), %g3
200a284: 10 bf ff c5 b 200a198 <_Heap_Walk+0x350>
200a288: 86 10 e0 d0 or %g3, 0xd0, %g3 ! 201c4d0 <__log2table+0x130>
return false;
}
if ( !prev_used ) {
(*printer)(
200a28c: 92 10 20 01 mov 1, %o1
200a290: 96 10 00 12 mov %l2, %o3
200a294: 15 00 80 72 sethi %hi(0x201c800), %o2
200a298: 9f c7 40 00 call %i5
200a29c: 94 12 a0 90 or %o2, 0x90, %o2 ! 201c890 <__log2table+0x4f0>
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
200a2a0: 10 bf fe fa b 2009e88 <_Heap_Walk+0x40>
200a2a4: 82 10 20 00 clr %g1
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
200a2a8: 92 10 20 01 mov 1, %o1
200a2ac: 96 10 00 12 mov %l2, %o3
200a2b0: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2b4: 98 10 00 13 mov %l3, %o4
200a2b8: 9f c7 40 00 call %i5
200a2bc: 94 12 a3 80 or %o2, 0x380, %o2
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
200a2c0: 10 bf fe f2 b 2009e88 <_Heap_Walk+0x40>
200a2c4: 82 10 20 00 clr %g1
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
200a2c8: 90 10 00 19 mov %i1, %o0
200a2cc: 92 10 20 01 mov 1, %o1
200a2d0: 96 10 00 12 mov %l2, %o3
200a2d4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2d8: 98 10 00 13 mov %l3, %o4
200a2dc: 94 12 a3 b0 or %o2, 0x3b0, %o2
200a2e0: 9f c7 40 00 call %i5
200a2e4: 9a 10 00 1b mov %i3, %o5
block,
block_size,
min_block_size
);
return false;
200a2e8: 10 bf fe e8 b 2009e88 <_Heap_Walk+0x40>
200a2ec: 82 10 20 00 clr %g1
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
200a2f0: 92 10 20 01 mov 1, %o1
200a2f4: 96 10 00 12 mov %l2, %o3
200a2f8: 15 00 80 71 sethi %hi(0x201c400), %o2
200a2fc: 98 10 00 1a mov %i2, %o4
200a300: 9f c7 40 00 call %i5
200a304: 94 12 a3 e0 or %o2, 0x3e0, %o2
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
200a308: 10 bf fe e0 b 2009e88 <_Heap_Walk+0x40>
200a30c: 82 10 20 00 clr %g1
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;
200a310: 80 a4 c0 1a cmp %l3, %i2
200a314: 0a bf ff 46 bcs 200a02c <_Heap_Walk+0x1e4> <== NEVER TAKEN
200a318: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a31c: c2 27 bf fc st %g1, [ %fp + -4 ]
200a320: 90 06 a0 08 add %i2, 8, %o0
200a324: 7f ff dd ea call 2001acc <.urem>
200a328: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
200a32c: 80 a2 20 00 cmp %o0, 0
200a330: 12 80 00 36 bne 200a408 <_Heap_Walk+0x5c0> <== NEVER TAKEN
200a334: c2 07 bf fc ld [ %fp + -4 ], %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;
200a338: c4 06 a0 04 ld [ %i2 + 4 ], %g2
200a33c: 84 08 bf fe and %g2, -2, %g2
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;
200a340: 84 06 80 02 add %i2, %g2, %g2
200a344: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a348: 80 88 a0 01 btst 1, %g2
200a34c: 12 80 00 27 bne 200a3e8 <_Heap_Walk+0x5a0> <== NEVER TAKEN
200a350: 84 10 00 18 mov %i0, %g2
200a354: 10 80 00 19 b 200a3b8 <_Heap_Walk+0x570>
200a358: a4 10 00 1a mov %i2, %l2
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 ) {
200a35c: 80 a6 00 1a cmp %i0, %i2
200a360: 02 bf ff 3a be 200a048 <_Heap_Walk+0x200>
200a364: 80 a6 80 01 cmp %i2, %g1
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;
200a368: 0a bf ff 31 bcs 200a02c <_Heap_Walk+0x1e4>
200a36c: 90 10 00 19 mov %i1, %o0
200a370: 80 a6 80 13 cmp %i2, %l3
200a374: 18 bf ff 2f bgu 200a030 <_Heap_Walk+0x1e8> <== NEVER TAKEN
200a378: 92 10 20 01 mov 1, %o1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
200a37c: c2 27 bf fc st %g1, [ %fp + -4 ]
200a380: 90 06 a0 08 add %i2, 8, %o0
200a384: 7f ff dd d2 call 2001acc <.urem>
200a388: 92 10 00 15 mov %l5, %o1
);
return false;
}
if (
200a38c: 80 a2 20 00 cmp %o0, 0
200a390: 12 80 00 1e bne 200a408 <_Heap_Walk+0x5c0>
200a394: c2 07 bf fc ld [ %fp + -4 ], %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;
200a398: c6 06 a0 04 ld [ %i2 + 4 ], %g3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
200a39c: 84 10 00 12 mov %l2, %g2
200a3a0: 86 08 ff fe and %g3, -2, %g3
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;
200a3a4: 86 00 c0 1a add %g3, %i2, %g3
200a3a8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200a3ac: 80 88 e0 01 btst 1, %g3
200a3b0: 12 80 00 0e bne 200a3e8 <_Heap_Walk+0x5a0>
200a3b4: a4 10 00 1a mov %i2, %l2
);
return false;
}
if ( free_block->prev != prev_block ) {
200a3b8: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
200a3bc: 80 a3 00 02 cmp %o4, %g2
200a3c0: 22 bf ff e7 be,a 200a35c <_Heap_Walk+0x514>
200a3c4: f4 06 a0 08 ld [ %i2 + 8 ], %i2
(*printer)(
200a3c8: 90 10 00 19 mov %i1, %o0
200a3cc: 92 10 20 01 mov 1, %o1
200a3d0: 96 10 00 1a mov %i2, %o3
200a3d4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a3d8: 9f c7 40 00 call %i5
200a3dc: 94 12 a3 18 or %o2, 0x318, %o2 ! 201c718 <__log2table+0x378>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a3e0: 10 bf fe aa b 2009e88 <_Heap_Walk+0x40>
200a3e4: 82 10 20 00 clr %g1
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
200a3e8: 90 10 00 19 mov %i1, %o0
200a3ec: 92 10 20 01 mov 1, %o1
200a3f0: 96 10 00 1a mov %i2, %o3
200a3f4: 15 00 80 71 sethi %hi(0x201c400), %o2
200a3f8: 9f c7 40 00 call %i5
200a3fc: 94 12 a2 f8 or %o2, 0x2f8, %o2 ! 201c6f8 <__log2table+0x358>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a400: 10 bf fe a2 b 2009e88 <_Heap_Walk+0x40>
200a404: 82 10 20 00 clr %g1
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
200a408: 90 10 00 19 mov %i1, %o0
200a40c: 92 10 20 01 mov 1, %o1
200a410: 96 10 00 1a mov %i2, %o3
200a414: 15 00 80 71 sethi %hi(0x201c400), %o2
200a418: 9f c7 40 00 call %i5
200a41c: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 201c6c8 <__log2table+0x328>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
200a420: 10 bf fe 9a b 2009e88 <_Heap_Walk+0x40>
200a424: 82 10 20 00 clr %g1
02008524 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
2008524: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2008528: 39 00 80 75 sethi %hi(0x201d400), %i4
200852c: c2 07 22 84 ld [ %i4 + 0x284 ], %g1 ! 201d684 <_IO_Number_of_drivers>
2008530: 80 a0 60 00 cmp %g1, 0
2008534: 02 80 00 0c be 2008564 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
2008538: ba 10 20 00 clr %i5
200853c: b8 17 22 84 or %i4, 0x284, %i4
(void) rtems_io_initialize( major, 0, NULL );
2008540: 90 10 00 1d mov %i5, %o0
2008544: 92 10 20 00 clr %o1
2008548: 40 00 14 00 call 200d548 <rtems_io_initialize>
200854c: 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 ++ )
2008550: c2 07 00 00 ld [ %i4 ], %g1
2008554: ba 07 60 01 inc %i5
2008558: 80 a0 40 1d cmp %g1, %i5
200855c: 18 bf ff fa bgu 2008544 <_IO_Initialize_all_drivers+0x20>
2008560: 90 10 00 1d mov %i5, %o0
2008564: 81 c7 e0 08 ret
2008568: 81 e8 00 00 restore
02008458 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
2008458: 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;
200845c: 03 00 80 71 sethi %hi(0x201c400), %g1
2008460: 82 10 62 4c or %g1, 0x24c, %g1 ! 201c64c <Configuration>
drivers_in_table = Configuration.number_of_device_drivers;
2008464: f8 00 60 38 ld [ %g1 + 0x38 ], %i4
number_of_drivers = Configuration.maximum_drivers;
2008468: f2 00 60 34 ld [ %g1 + 0x34 ], %i1
/*
* 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 )
200846c: 80 a7 00 19 cmp %i4, %i1
2008470: 0a 80 00 08 bcs 2008490 <_IO_Manager_initialization+0x38>
2008474: fa 00 60 3c ld [ %g1 + 0x3c ], %i5
* 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;
2008478: 03 00 80 75 sethi %hi(0x201d400), %g1
200847c: fa 20 62 88 st %i5, [ %g1 + 0x288 ] ! 201d688 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
2008480: 03 00 80 75 sethi %hi(0x201d400), %g1
2008484: f8 20 62 84 st %i4, [ %g1 + 0x284 ] ! 201d684 <_IO_Number_of_drivers>
return;
2008488: 81 c7 e0 08 ret
200848c: 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 )
2008490: 83 2e 60 03 sll %i1, 3, %g1
2008494: b5 2e 60 05 sll %i1, 5, %i2
2008498: b4 26 80 01 sub %i2, %g1, %i2
* 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 *)
_Workspace_Allocate_or_fatal_error(
200849c: 40 00 0d 2c call 200b94c <_Workspace_Allocate_or_fatal_error>
20084a0: 90 10 00 1a mov %i2, %o0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20084a4: 03 00 80 75 sethi %hi(0x201d400), %g1
/*
* 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 *)
20084a8: 37 00 80 75 sethi %hi(0x201d400), %i3
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
20084ac: f2 20 62 84 st %i1, [ %g1 + 0x284 ]
/*
* 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 *)
20084b0: d0 26 e2 88 st %o0, [ %i3 + 0x288 ]
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
20084b4: 92 10 20 00 clr %o1
20084b8: 40 00 1f 4a call 20101e0 <memset>
20084bc: 94 10 00 1a mov %i2, %o2
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084c0: 80 a7 20 00 cmp %i4, 0
20084c4: 02 bf ff f1 be 2008488 <_IO_Manager_initialization+0x30> <== NEVER TAKEN
20084c8: f6 06 e2 88 ld [ %i3 + 0x288 ], %i3
20084cc: 82 10 20 00 clr %g1
20084d0: 88 10 20 00 clr %g4
_IO_Driver_address_table[index] = driver_table[index];
20084d4: c4 07 40 01 ld [ %i5 + %g1 ], %g2
20084d8: 86 07 40 01 add %i5, %g1, %g3
20084dc: c4 26 c0 01 st %g2, [ %i3 + %g1 ]
20084e0: f4 00 e0 04 ld [ %g3 + 4 ], %i2
20084e4: 84 06 c0 01 add %i3, %g1, %g2
20084e8: f4 20 a0 04 st %i2, [ %g2 + 4 ]
20084ec: f4 00 e0 08 ld [ %g3 + 8 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084f0: 88 01 20 01 inc %g4
_IO_Driver_address_table[index] = driver_table[index];
20084f4: f4 20 a0 08 st %i2, [ %g2 + 8 ]
20084f8: f4 00 e0 0c ld [ %g3 + 0xc ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
20084fc: 82 00 60 18 add %g1, 0x18, %g1
_IO_Driver_address_table[index] = driver_table[index];
2008500: f4 20 a0 0c st %i2, [ %g2 + 0xc ]
2008504: f4 00 e0 10 ld [ %g3 + 0x10 ], %i2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2008508: 80 a1 00 1c cmp %g4, %i4
_IO_Driver_address_table[index] = driver_table[index];
200850c: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
2008510: 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++ )
2008514: 12 bf ff f0 bne 20084d4 <_IO_Manager_initialization+0x7c>
2008518: c6 20 a0 14 st %g3, [ %g2 + 0x14 ]
200851c: 81 c7 e0 08 ret
2008520: 81 e8 00 00 restore
0200926c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
200926c: 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 )
2009270: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2009274: ba 10 00 18 mov %i0, %i5
* 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 )
2009278: 80 a0 60 00 cmp %g1, 0
200927c: 02 80 00 19 be 20092e0 <_Objects_Allocate+0x74> <== NEVER TAKEN
2009280: 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 );
2009284: b8 07 60 20 add %i5, 0x20, %i4
2009288: 7f ff fd 47 call 20087a4 <_Chain_Get>
200928c: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
2009290: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
2009294: 80 a0 60 00 cmp %g1, 0
2009298: 02 80 00 12 be 20092e0 <_Objects_Allocate+0x74>
200929c: 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 ) {
20092a0: 80 a2 20 00 cmp %o0, 0
20092a4: 02 80 00 11 be 20092e8 <_Objects_Allocate+0x7c>
20092a8: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
20092ac: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
20092b0: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
20092b4: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
20092b8: 40 00 3d 1a call 2018720 <.udiv>
20092bc: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
20092c0: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
20092c4: 91 2a 20 02 sll %o0, 2, %o0
20092c8: c6 00 40 08 ld [ %g1 + %o0 ], %g3
information->inactive--;
20092cc: c4 17 60 2c lduh [ %i5 + 0x2c ], %g2
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20092d0: 86 00 ff ff add %g3, -1, %g3
20092d4: c6 20 40 08 st %g3, [ %g1 + %o0 ]
information->inactive--;
20092d8: 82 00 bf ff add %g2, -1, %g1
20092dc: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
20092e0: 81 c7 e0 08 ret
20092e4: 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 );
20092e8: 40 00 00 10 call 2009328 <_Objects_Extend_information>
20092ec: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
20092f0: 7f ff fd 2d call 20087a4 <_Chain_Get>
20092f4: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
20092f8: b0 92 20 00 orcc %o0, 0, %i0
20092fc: 32 bf ff ed bne,a 20092b0 <_Objects_Allocate+0x44>
2009300: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
);
}
#endif
return the_object;
}
2009304: 81 c7 e0 08 ret
2009308: 81 e8 00 00 restore
02009328 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2009328: 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 )
200932c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
2009330: f8 16 20 0a lduh [ %i0 + 0xa ], %i4
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
2009334: 80 a4 20 00 cmp %l0, 0
2009338: 02 80 00 a6 be 20095d0 <_Objects_Extend_information+0x2a8>
200933c: f2 16 20 10 lduh [ %i0 + 0x10 ], %i1
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2009340: f4 16 20 14 lduh [ %i0 + 0x14 ], %i2
2009344: b3 2e 60 10 sll %i1, 0x10, %i1
2009348: 92 10 00 1a mov %i2, %o1
200934c: 40 00 3c f5 call 2018720 <.udiv>
2009350: 91 36 60 10 srl %i1, 0x10, %o0
2009354: a7 2a 20 10 sll %o0, 0x10, %l3
2009358: a7 34 e0 10 srl %l3, 0x10, %l3
for ( ; block < block_count; block++ ) {
200935c: 80 a4 e0 00 cmp %l3, 0
2009360: 02 80 00 a3 be 20095ec <_Objects_Extend_information+0x2c4><== NEVER TAKEN
2009364: 90 10 00 1a mov %i2, %o0
if ( information->object_blocks[ block ] == NULL ) {
2009368: c2 04 00 00 ld [ %l0 ], %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
200936c: ba 10 00 1c mov %i4, %i5
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2009370: 80 a0 60 00 cmp %g1, 0
2009374: 12 80 00 08 bne 2009394 <_Objects_Extend_information+0x6c><== ALWAYS TAKEN
2009378: b6 10 20 00 clr %i3
do_extend = false;
200937c: 10 80 00 a0 b 20095fc <_Objects_Extend_information+0x2d4> <== NOT EXECUTED
2009380: b4 10 20 00 clr %i2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
2009384: c2 04 00 01 ld [ %l0 + %g1 ], %g1
2009388: 80 a0 60 00 cmp %g1, 0
200938c: 22 80 00 08 be,a 20093ac <_Objects_Extend_information+0x84>
2009390: b4 10 20 00 clr %i2
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2009394: b6 06 e0 01 inc %i3
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
break;
} else
index_base += information->allocation_size;
2009398: ba 07 40 1a add %i5, %i2, %i5
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
200939c: 80 a4 c0 1b cmp %l3, %i3
20093a0: 18 bf ff f9 bgu 2009384 <_Objects_Extend_information+0x5c>
20093a4: 83 2e e0 02 sll %i3, 2, %g1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
20093a8: b4 10 20 01 mov 1, %i2
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20093ac: b3 36 60 10 srl %i1, 0x10, %i1
/*
* 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 ) {
20093b0: 03 00 00 3f sethi %hi(0xfc00), %g1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
20093b4: b2 06 40 08 add %i1, %o0, %i1
/*
* 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 ) {
20093b8: 82 10 63 ff or %g1, 0x3ff, %g1
20093bc: 80 a6 40 01 cmp %i1, %g1
20093c0: 18 80 00 93 bgu 200960c <_Objects_Extend_information+0x2e4>
20093c4: 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;
20093c8: 40 00 3c 9c call 2018638 <.umul>
20093cc: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
20093d0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
20093d4: 80 a0 60 00 cmp %g1, 0
20093d8: 02 80 00 6a be 2009580 <_Objects_Extend_information+0x258>
20093dc: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
20093e0: 40 00 09 4d call 200b914 <_Workspace_Allocate>
20093e4: 01 00 00 00 nop
if ( !new_object_block )
20093e8: a0 92 20 00 orcc %o0, 0, %l0
20093ec: 02 80 00 88 be 200960c <_Objects_Extend_information+0x2e4>
20093f0: 01 00 00 00 nop
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
20093f4: 80 8e a0 ff btst 0xff, %i2
20093f8: 22 80 00 3f be,a 20094f4 <_Objects_Extend_information+0x1cc>
20093fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
2009400: b4 04 e0 01 add %l3, 1, %i2
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2009404: 91 2e a0 01 sll %i2, 1, %o0
2009408: 90 02 00 1a add %o0, %i2, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
200940c: 90 06 40 08 add %i1, %o0, %o0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
2009410: 90 02 00 1c add %o0, %i4, %o0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
2009414: 40 00 09 40 call 200b914 <_Workspace_Allocate>
2009418: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
200941c: a2 92 20 00 orcc %o0, 0, %l1
2009420: 02 80 00 79 be 2009604 <_Objects_Extend_information+0x2dc>
2009424: b5 2e a0 02 sll %i2, 2, %i2
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2009428: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
200942c: 80 a7 00 01 cmp %i4, %g1
2009430: a4 04 40 1a add %l1, %i2, %l2
2009434: 0a 80 00 57 bcs 2009590 <_Objects_Extend_information+0x268>
2009438: b4 04 80 1a add %l2, %i2, %i2
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
200943c: 80 a7 20 00 cmp %i4, 0
2009440: 02 80 00 07 be 200945c <_Objects_Extend_information+0x134><== NEVER TAKEN
2009444: 82 10 20 00 clr %g1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2009448: 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++ ) {
200944c: 82 00 60 01 inc %g1
2009450: 80 a7 00 01 cmp %i4, %g1
2009454: 18 bf ff fd bgu 2009448 <_Objects_Extend_information+0x120><== NEVER TAKEN
2009458: c0 20 80 1a clr [ %g2 + %i2 ]
200945c: a7 2c e0 02 sll %l3, 2, %l3
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2009460: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2009464: c0 24 40 13 clr [ %l1 + %l3 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2009468: 86 07 40 03 add %i5, %g3, %g3
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
200946c: 80 a7 40 03 cmp %i5, %g3
2009470: 1a 80 00 0a bcc 2009498 <_Objects_Extend_information+0x170><== NEVER TAKEN
2009474: c0 24 80 13 clr [ %l2 + %l3 ]
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
2009478: 83 2f 60 02 sll %i5, 2, %g1
200947c: 84 10 00 1d mov %i5, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
2009480: 82 06 80 01 add %i2, %g1, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
2009484: c0 20 40 00 clr [ %g1 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
2009488: 84 00 a0 01 inc %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
200948c: 80 a0 c0 02 cmp %g3, %g2
2009490: 18 bf ff fd bgu 2009484 <_Objects_Extend_information+0x15c>
2009494: 82 00 60 04 add %g1, 4, %g1
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
2009498: 7f ff e4 88 call 20026b8 <sparc_disable_interrupts>
200949c: 01 00 00 00 nop
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094a0: c6 06 00 00 ld [ %i0 ], %g3
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(
20094a4: c4 16 20 04 lduh [ %i0 + 4 ], %g2
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
20094a8: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
20094ac: f2 36 20 10 sth %i1, [ %i0 + 0x10 ]
20094b0: 87 28 e0 18 sll %g3, 0x18, %g3
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
20094b4: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
20094b8: e2 26 20 34 st %l1, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
20094bc: e4 26 20 30 st %l2, [ %i0 + 0x30 ]
information->local_table = local_table;
20094c0: f4 26 20 1c st %i2, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
20094c4: b3 2e 60 10 sll %i1, 0x10, %i1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094c8: 03 00 00 40 sethi %hi(0x10000), %g1
20094cc: b3 36 60 10 srl %i1, 0x10, %i1
20094d0: 82 10 c0 01 or %g3, %g1, %g1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
20094d4: 82 10 40 02 or %g1, %g2, %g1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
20094d8: 82 10 40 19 or %g1, %i1, %g1
20094dc: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
20094e0: 7f ff e4 7a call 20026c8 <sparc_enable_interrupts>
20094e4: 01 00 00 00 nop
_Workspace_Free( old_tables );
20094e8: 40 00 09 13 call 200b934 <_Workspace_Free>
20094ec: 90 10 00 1c mov %i4, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
20094f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
20094f4: b7 2e e0 02 sll %i3, 2, %i3
20094f8: e0 20 40 1b st %l0, [ %g1 + %i3 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
20094fc: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2009500: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
2009504: d2 00 40 1b ld [ %g1 + %i3 ], %o1
2009508: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
200950c: 90 07 bf f4 add %fp, -12, %o0
2009510: 7f ff fc b4 call 20087e0 <_Chain_Initialize>
2009514: 39 00 00 40 sethi %hi(0x10000), %i4
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
2009518: 10 80 00 0d b 200954c <_Objects_Extend_information+0x224>
200951c: b4 06 20 20 add %i0, 0x20, %i2
the_object->id = _Objects_Build_id(
2009520: c6 16 20 04 lduh [ %i0 + 4 ], %g3
2009524: 85 28 a0 18 sll %g2, 0x18, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2009528: 87 28 e0 1b sll %g3, 0x1b, %g3
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
200952c: 84 10 80 1c or %g2, %i4, %g2
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
2009530: 84 10 80 03 or %g2, %g3, %g2
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
2009534: 84 10 80 1d or %g2, %i5, %g2
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2009538: 90 10 00 1a mov %i2, %o0
200953c: 92 10 00 01 mov %g1, %o1
index++;
2009540: ba 07 60 01 inc %i5
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2009544: 7f ff fc 8d call 2008778 <_Chain_Append>
2009548: c4 20 60 08 st %g2, [ %g1 + 8 ]
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
200954c: 7f ff fc 96 call 20087a4 <_Chain_Get>
2009550: 90 07 bf f4 add %fp, -12, %o0
2009554: 82 92 20 00 orcc %o0, 0, %g1
2009558: 32 bf ff f2 bne,a 2009520 <_Objects_Extend_information+0x1f8>
200955c: c4 06 00 00 ld [ %i0 ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2009560: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
2009564: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2009568: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
200956c: c8 20 c0 1b st %g4, [ %g3 + %i3 ]
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
2009570: 82 00 80 04 add %g2, %g4, %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
2009574: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2009578: 81 c7 e0 08 ret
200957c: 81 e8 00 00 restore
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
2009580: 40 00 08 f3 call 200b94c <_Workspace_Allocate_or_fatal_error>
2009584: 01 00 00 00 nop
2009588: 10 bf ff 9b b 20093f4 <_Objects_Extend_information+0xcc>
200958c: a0 10 00 08 mov %o0, %l0
/*
* 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,
2009590: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
2009594: a7 2c e0 02 sll %l3, 2, %l3
/*
* 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,
2009598: 40 00 1a d6 call 20100f0 <memcpy>
200959c: 94 10 00 13 mov %l3, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
20095a0: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
20095a4: 94 10 00 13 mov %l3, %o2
20095a8: 40 00 1a d2 call 20100f0 <memcpy>
20095ac: 90 10 00 12 mov %l2, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
20095b0: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20095b4: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
20095b8: b8 07 00 01 add %i4, %g1, %i4
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
20095bc: 90 10 00 1a mov %i2, %o0
20095c0: 40 00 1a cc call 20100f0 <memcpy>
20095c4: 95 2f 20 02 sll %i4, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
20095c8: 10 bf ff a7 b 2009464 <_Objects_Extend_information+0x13c>
20095cc: 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 )
20095d0: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
20095d4: ba 10 00 1c mov %i4, %i5
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
20095d8: b4 10 20 01 mov 1, %i2
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
20095dc: b6 10 20 00 clr %i3
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
20095e0: a6 10 20 00 clr %l3
20095e4: 10 bf ff 72 b 20093ac <_Objects_Extend_information+0x84>
20095e8: b3 2e 60 10 sll %i1, 0x10, %i1
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
20095ec: ba 10 00 1c mov %i4, %i5 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
20095f0: b4 10 20 01 mov 1, %i2 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
20095f4: 10 bf ff 6e b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED
20095f8: b6 10 20 00 clr %i3 <== NOT EXECUTED
20095fc: 10 bf ff 6c b 20093ac <_Objects_Extend_information+0x84> <== NOT EXECUTED
2009600: b6 10 20 00 clr %i3 <== 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 );
2009604: 40 00 08 cc call 200b934 <_Workspace_Free>
2009608: 90 10 00 10 mov %l0, %o0
return;
200960c: 81 c7 e0 08 ret
2009610: 81 e8 00 00 restore
020096b8 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
20096b8: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
20096bc: 80 a6 60 00 cmp %i1, 0
20096c0: 02 80 00 17 be 200971c <_Objects_Get_information+0x64>
20096c4: ba 10 20 00 clr %i5
/*
* 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 );
20096c8: 40 00 11 91 call 200dd0c <_Objects_API_maximum_class>
20096cc: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
20096d0: 80 a2 20 00 cmp %o0, 0
20096d4: 02 80 00 12 be 200971c <_Objects_Get_information+0x64>
20096d8: 80 a2 00 19 cmp %o0, %i1
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
20096dc: 0a 80 00 10 bcs 200971c <_Objects_Get_information+0x64>
20096e0: 03 00 80 74 sethi %hi(0x201d000), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
20096e4: b1 2e 20 02 sll %i0, 2, %i0
20096e8: 82 10 63 18 or %g1, 0x318, %g1
20096ec: c2 00 40 18 ld [ %g1 + %i0 ], %g1
20096f0: 80 a0 60 00 cmp %g1, 0
20096f4: 02 80 00 0a be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN
20096f8: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
20096fc: fa 00 40 19 ld [ %g1 + %i1 ], %i5
if ( !info )
2009700: 80 a7 60 00 cmp %i5, 0
2009704: 02 80 00 06 be 200971c <_Objects_Get_information+0x64> <== NEVER TAKEN
2009708: 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 )
200970c: c2 17 60 10 lduh [ %i5 + 0x10 ], %g1
return NULL;
2009710: 80 a0 00 01 cmp %g0, %g1
2009714: 82 60 20 00 subx %g0, 0, %g1
2009718: ba 0f 40 01 and %i5, %g1, %i5
#endif
return info;
}
200971c: 81 c7 e0 08 ret
2009720: 91 e8 00 1d restore %g0, %i5, %o0
02017798 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
2017798: 9d e3 bf 90 save %sp, -112, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
201779c: 80 a6 60 00 cmp %i1, 0
20177a0: 02 80 00 3c be 2017890 <_Objects_Get_name_as_string+0xf8>
20177a4: 80 a6 a0 00 cmp %i2, 0
return NULL;
if ( name == NULL )
20177a8: 02 80 00 35 be 201787c <_Objects_Get_name_as_string+0xe4>
20177ac: 80 a6 20 00 cmp %i0, 0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
20177b0: 02 80 00 35 be 2017884 <_Objects_Get_name_as_string+0xec>
20177b4: 03 00 80 c1 sethi %hi(0x2030400), %g1
information = _Objects_Get_information_id( tmpId );
20177b8: 7f ff e1 94 call 200fe08 <_Objects_Get_information_id>
20177bc: 90 10 00 18 mov %i0, %o0
if ( !information )
20177c0: 80 a2 20 00 cmp %o0, 0
20177c4: 02 80 00 33 be 2017890 <_Objects_Get_name_as_string+0xf8>
20177c8: 92 10 00 18 mov %i0, %o1
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
20177cc: 7f ff e1 cd call 200ff00 <_Objects_Get>
20177d0: 94 07 bf fc add %fp, -4, %o2
switch ( location ) {
20177d4: c2 07 bf fc ld [ %fp + -4 ], %g1
20177d8: 80 a0 60 00 cmp %g1, 0
20177dc: 32 80 00 2e bne,a 2017894 <_Objects_Get_name_as_string+0xfc>
20177e0: 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;
20177e4: 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';
20177e8: 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;
20177ec: 85 30 60 18 srl %g1, 0x18, %g2
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
20177f0: 87 30 60 08 srl %g1, 8, %g3
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
20177f4: 89 30 60 10 srl %g1, 0x10, %g4
lname[ 2 ] = (u32_name >> 8) & 0xff;
20177f8: c6 2f bf f2 stb %g3, [ %fp + -14 ]
lname[ 3 ] = (u32_name >> 0) & 0xff;
20177fc: c2 2f bf f3 stb %g1, [ %fp + -13 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2017800: c4 2f bf f0 stb %g2, [ %fp + -16 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
2017804: c8 2f bf f1 stb %g4, [ %fp + -15 ]
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2017808: 86 10 00 02 mov %g2, %g3
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
201780c: b2 86 7f ff addcc %i1, -1, %i1
2017810: 02 80 00 19 be 2017874 <_Objects_Get_name_as_string+0xdc> <== NEVER TAKEN
2017814: 82 10 00 1a mov %i2, %g1
2017818: 80 a0 a0 00 cmp %g2, 0
201781c: 02 80 00 16 be 2017874 <_Objects_Get_name_as_string+0xdc>
2017820: 1f 00 80 bc sethi %hi(0x202f000), %o7
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';
s = lname;
2017824: 84 07 bf f0 add %fp, -16, %g2
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
2017828: b2 06 80 19 add %i2, %i1, %i1
201782c: 10 80 00 05 b 2017840 <_Objects_Get_name_as_string+0xa8>
2017830: 9e 13 e3 58 or %o7, 0x358, %o7
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2017834: 80 a1 20 00 cmp %g4, 0
2017838: 02 80 00 0f be 2017874 <_Objects_Get_name_as_string+0xdc>
201783c: c6 08 80 00 ldub [ %g2 ], %g3
*d = (isprint((unsigned char)*s)) ? *s : '*';
2017840: f0 03 c0 00 ld [ %o7 ], %i0
2017844: 88 08 e0 ff and %g3, 0xff, %g4
2017848: 88 06 00 04 add %i0, %g4, %g4
201784c: c8 49 20 01 ldsb [ %g4 + 1 ], %g4
2017850: 80 89 20 97 btst 0x97, %g4
2017854: 12 80 00 03 bne 2017860 <_Objects_Get_name_as_string+0xc8>
2017858: 84 00 a0 01 inc %g2
201785c: 86 10 20 2a mov 0x2a, %g3
2017860: c6 28 40 00 stb %g3, [ %g1 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2017864: 82 00 60 01 inc %g1
2017868: 80 a0 40 19 cmp %g1, %i1
201786c: 32 bf ff f2 bne,a 2017834 <_Objects_Get_name_as_string+0x9c>
2017870: c8 48 80 00 ldsb [ %g2 ], %g4
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
2017874: 7f ff e5 cb call 2010fa0 <_Thread_Enable_dispatch>
2017878: c0 28 40 00 clrb [ %g1 ]
return name;
}
return NULL; /* unreachable path */
}
201787c: 81 c7 e0 08 ret
2017880: 91 e8 00 1a restore %g0, %i2, %o0
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2017884: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1
2017888: 10 bf ff cc b 20177b8 <_Objects_Get_name_as_string+0x20>
201788c: f0 00 60 08 ld [ %g1 + 8 ], %i0
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
2017890: b4 10 20 00 clr %i2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
2017894: 81 c7 e0 08 ret
2017898: 91 e8 00 1a restore %g0, %i2, %o0
02019d9c <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
2019d9c: 9d e3 bf a0 save %sp, -96, %sp
Objects_Control *object;
Objects_Id next_id;
if ( !information )
return NULL;
2019da0: 90 10 20 00 clr %o0
)
{
Objects_Control *object;
Objects_Id next_id;
if ( !information )
2019da4: 80 a6 20 00 cmp %i0, 0
2019da8: 02 80 00 19 be 2019e0c <_Objects_Get_next+0x70>
2019dac: ba 10 00 18 mov %i0, %i5
return NULL;
if ( !location_p )
2019db0: 80 a6 a0 00 cmp %i2, 0
2019db4: 02 80 00 16 be 2019e0c <_Objects_Get_next+0x70>
2019db8: 80 a6 e0 00 cmp %i3, 0
return NULL;
if ( !next_id_p )
2019dbc: 02 80 00 14 be 2019e0c <_Objects_Get_next+0x70>
2019dc0: 83 2e 60 10 sll %i1, 0x10, %g1
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
2019dc4: 80 a0 60 00 cmp %g1, 0
2019dc8: 22 80 00 13 be,a 2019e14 <_Objects_Get_next+0x78>
2019dcc: f2 06 20 08 ld [ %i0 + 8 ], %i1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019dd0: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2019dd4: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019dd8: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019ddc: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019de0: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019de4: 80 a0 80 01 cmp %g2, %g1
2019de8: 0a 80 00 13 bcs 2019e34 <_Objects_Get_next+0x98>
2019dec: 94 10 00 1a mov %i2, %o2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019df0: 7f ff d8 44 call 200ff00 <_Objects_Get>
2019df4: b2 06 60 01 inc %i1
next_id++;
} while (*location_p != OBJECTS_LOCAL);
2019df8: c2 06 80 00 ld [ %i2 ], %g1
2019dfc: 80 a0 60 00 cmp %g1, 0
2019e00: 32 bf ff f5 bne,a 2019dd4 <_Objects_Get_next+0x38>
2019e04: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
*next_id_p = next_id;
2019e08: f2 26 c0 00 st %i1, [ %i3 ]
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
2019e0c: 81 c7 e0 08 ret
2019e10: 91 e8 00 08 restore %g0, %o0, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e14: c4 17 60 10 lduh [ %i5 + 0x10 ], %g2
2019e18: 83 2e 60 10 sll %i1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019e1c: 92 10 00 19 mov %i1, %o1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e20: 83 30 60 10 srl %g1, 0x10, %g1
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
2019e24: 90 10 00 1d mov %i5, %o0
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
2019e28: 80 a0 80 01 cmp %g2, %g1
2019e2c: 1a bf ff f1 bcc 2019df0 <_Objects_Get_next+0x54> <== ALWAYS TAKEN
2019e30: 94 10 00 1a mov %i2, %o2
{
*location_p = OBJECTS_ERROR;
2019e34: 82 10 20 01 mov 1, %g1
2019e38: c2 26 80 00 st %g1, [ %i2 ]
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
2019e3c: 90 10 20 00 clr %o0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
2019e40: 82 10 3f ff mov -1, %g1
2019e44: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
2019e48: 81 c7 e0 08 ret
2019e4c: 91 e8 00 08 restore %g0, %o0, %o0
0200ff78 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200ff78: 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;
200ff7c: 80 a6 20 00 cmp %i0, 0
200ff80: 12 80 00 06 bne 200ff98 <_Objects_Id_to_name+0x20>
200ff84: 83 36 20 18 srl %i0, 0x18, %g1
200ff88: 03 00 80 c1 sethi %hi(0x2030400), %g1
200ff8c: c2 00 62 ec ld [ %g1 + 0x2ec ], %g1 ! 20306ec <_Per_CPU_Information+0xc>
200ff90: f0 00 60 08 ld [ %g1 + 8 ], %i0
200ff94: 83 36 20 18 srl %i0, 0x18, %g1
200ff98: 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 )
200ff9c: 84 00 7f ff add %g1, -1, %g2
200ffa0: 80 a0 a0 02 cmp %g2, 2
200ffa4: 18 80 00 17 bgu 2010000 <_Objects_Id_to_name+0x88>
200ffa8: ba 10 20 03 mov 3, %i5
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
200ffac: 83 28 60 02 sll %g1, 2, %g1
200ffb0: 05 00 80 c0 sethi %hi(0x2030000), %g2
200ffb4: 84 10 a3 d8 or %g2, 0x3d8, %g2 ! 20303d8 <_Objects_Information_table>
200ffb8: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200ffbc: 80 a0 60 00 cmp %g1, 0
200ffc0: 02 80 00 10 be 2010000 <_Objects_Id_to_name+0x88>
200ffc4: 85 36 20 1b srl %i0, 0x1b, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
200ffc8: 85 28 a0 02 sll %g2, 2, %g2
200ffcc: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
200ffd0: 80 a2 20 00 cmp %o0, 0
200ffd4: 02 80 00 0b be 2010000 <_Objects_Id_to_name+0x88> <== NEVER TAKEN
200ffd8: 92 10 00 18 mov %i0, %o1
#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 );
200ffdc: 7f ff ff c9 call 200ff00 <_Objects_Get>
200ffe0: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
200ffe4: 80 a2 20 00 cmp %o0, 0
200ffe8: 02 80 00 06 be 2010000 <_Objects_Id_to_name+0x88>
200ffec: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
200fff0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
200fff4: ba 10 20 00 clr %i5
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
200fff8: 40 00 03 ea call 2010fa0 <_Thread_Enable_dispatch>
200fffc: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
2010000: 81 c7 e0 08 ret
2010004: 91 e8 00 1d restore %g0, %i5, %o0
020099a4 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
20099a4: 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 );
20099a8: fa 16 20 0a lduh [ %i0 + 0xa ], %i5
block_count = (information->maximum - index_base) /
20099ac: f8 16 20 14 lduh [ %i0 + 0x14 ], %i4
20099b0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
20099b4: 92 10 00 1c mov %i4, %o1
20099b8: 40 00 3b 5a call 2018720 <.udiv>
20099bc: 90 22 00 1d sub %o0, %i5, %o0
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
20099c0: 80 a2 20 00 cmp %o0, 0
20099c4: 02 80 00 34 be 2009a94 <_Objects_Shrink_information+0xf0> <== NEVER TAKEN
20099c8: 01 00 00 00 nop
if ( information->inactive_per_block[ block ] ==
20099cc: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
20099d0: c2 01 00 00 ld [ %g4 ], %g1
20099d4: 80 a7 00 01 cmp %i4, %g1
20099d8: 02 80 00 0f be 2009a14 <_Objects_Shrink_information+0x70> <== NEVER TAKEN
20099dc: 82 10 20 00 clr %g1
20099e0: 10 80 00 07 b 20099fc <_Objects_Shrink_information+0x58>
20099e4: b6 10 20 04 mov 4, %i3
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
20099e8: 86 06 e0 04 add %i3, 4, %g3
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 ] ==
20099ec: 80 a7 00 02 cmp %i4, %g2
20099f0: 02 80 00 0a be 2009a18 <_Objects_Shrink_information+0x74>
20099f4: ba 07 40 1c add %i5, %i4, %i5
20099f8: b6 10 00 03 mov %g3, %i3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
20099fc: 82 00 60 01 inc %g1
2009a00: 80 a0 40 08 cmp %g1, %o0
2009a04: 32 bf ff f9 bne,a 20099e8 <_Objects_Shrink_information+0x44>
2009a08: c4 01 00 1b ld [ %g4 + %i3 ], %g2
2009a0c: 81 c7 e0 08 ret
2009a10: 81 e8 00 00 restore
if ( information->inactive_per_block[ block ] ==
2009a14: b6 10 20 00 clr %i3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2009a18: 10 80 00 06 b 2009a30 <_Objects_Shrink_information+0x8c>
2009a1c: 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 );
2009a20: 80 a7 20 00 cmp %i4, 0
2009a24: 22 80 00 12 be,a 2009a6c <_Objects_Shrink_information+0xc8>
2009a28: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
2009a2c: 90 10 00 1c mov %i4, %o0
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
2009a30: 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) &&
2009a34: 80 a0 40 1d cmp %g1, %i5
2009a38: 0a bf ff fa bcs 2009a20 <_Objects_Shrink_information+0x7c>
2009a3c: f8 02 00 00 ld [ %o0 ], %i4
(index < (index_base + information->allocation_size))) {
2009a40: c4 16 20 14 lduh [ %i0 + 0x14 ], %g2
2009a44: 84 07 40 02 add %i5, %g2, %g2
/*
* 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) &&
2009a48: 80 a0 40 02 cmp %g1, %g2
2009a4c: 1a bf ff f6 bcc 2009a24 <_Objects_Shrink_information+0x80>
2009a50: 80 a7 20 00 cmp %i4, 0
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
2009a54: 40 00 0e d5 call 200d5a8 <_Chain_Extract>
2009a58: 01 00 00 00 nop
}
}
while ( the_object );
2009a5c: 80 a7 20 00 cmp %i4, 0
2009a60: 12 bf ff f4 bne 2009a30 <_Objects_Shrink_information+0x8c><== ALWAYS TAKEN
2009a64: 90 10 00 1c mov %i4, %o0
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2009a68: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2009a6c: 40 00 07 b2 call 200b934 <_Workspace_Free>
2009a70: d0 00 40 1b ld [ %g1 + %i3 ], %o0
information->object_blocks[ block ] = NULL;
2009a74: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2009a78: c4 16 20 2c lduh [ %i0 + 0x2c ], %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2009a7c: c0 20 40 1b clr [ %g1 + %i3 ]
information->inactive_per_block[ block ] = 0;
2009a80: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
information->inactive -= information->allocation_size;
2009a84: c2 16 20 14 lduh [ %i0 + 0x14 ], %g1
* 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;
2009a88: c0 20 c0 1b clr [ %g3 + %i3 ]
information->inactive -= information->allocation_size;
2009a8c: 82 20 80 01 sub %g2, %g1, %g1
2009a90: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
return;
2009a94: 81 c7 e0 08 ret
2009a98: 81 e8 00 00 restore
0200a9e4 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a9e4: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200a9e8: 80 a6 60 00 cmp %i1, 0
200a9ec: 02 80 00 4c be 200ab1c <_RBTree_Extract_unprotected+0x138>
200a9f0: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200a9f4: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a9f8: 80 a0 40 19 cmp %g1, %i1
200a9fc: 22 80 00 59 be,a 200ab60 <_RBTree_Extract_unprotected+0x17c>
200aa00: c2 06 60 08 ld [ %i1 + 8 ], %g1
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
200aa04: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200aa08: 80 a0 40 19 cmp %g1, %i1
200aa0c: 22 80 00 46 be,a 200ab24 <_RBTree_Extract_unprotected+0x140>
200aa10: c2 06 60 04 ld [ %i1 + 4 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200aa14: fa 06 60 04 ld [ %i1 + 4 ], %i5
200aa18: 80 a7 60 00 cmp %i5, 0
200aa1c: 22 80 00 4a be,a 200ab44 <_RBTree_Extract_unprotected+0x160>
200aa20: f8 06 60 08 ld [ %i1 + 8 ], %i4
200aa24: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aa28: 80 a0 60 00 cmp %g1, 0
200aa2c: 32 80 00 05 bne,a 200aa40 <_RBTree_Extract_unprotected+0x5c>
200aa30: c2 07 60 08 ld [ %i5 + 8 ], %g1
200aa34: 10 80 00 50 b 200ab74 <_RBTree_Extract_unprotected+0x190>
200aa38: b8 10 00 1d mov %i5, %i4
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
200aa3c: c2 07 60 08 ld [ %i5 + 8 ], %g1
200aa40: 80 a0 60 00 cmp %g1, 0
200aa44: 32 bf ff fe bne,a 200aa3c <_RBTree_Extract_unprotected+0x58>
200aa48: ba 10 00 01 mov %g1, %i5
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
200aa4c: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200aa50: 80 a7 20 00 cmp %i4, 0
200aa54: 02 80 00 54 be 200aba4 <_RBTree_Extract_unprotected+0x1c0>
200aa58: 01 00 00 00 nop
leaf->parent = target->parent;
200aa5c: c2 07 40 00 ld [ %i5 ], %g1
200aa60: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200aa64: c4 07 40 00 ld [ %i5 ], %g2
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200aa68: c2 06 40 00 ld [ %i1 ], %g1
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
200aa6c: c8 00 a0 04 ld [ %g2 + 4 ], %g4
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
200aa70: c6 07 60 0c ld [ %i5 + 0xc ], %g3
dir = target != target->parent->child[0];
200aa74: 88 19 00 1d xor %g4, %i5, %g4
200aa78: 80 a0 00 04 cmp %g0, %g4
200aa7c: 88 40 20 00 addx %g0, 0, %g4
target->parent->child[dir] = leaf;
200aa80: 89 29 20 02 sll %g4, 2, %g4
200aa84: 84 00 80 04 add %g2, %g4, %g2
200aa88: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200aa8c: c4 00 60 04 ld [ %g1 + 4 ], %g2
200aa90: 84 18 80 19 xor %g2, %i1, %g2
200aa94: 80 a0 00 02 cmp %g0, %g2
200aa98: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = target;
200aa9c: 85 28 a0 02 sll %g2, 2, %g2
200aaa0: 82 00 40 02 add %g1, %g2, %g1
200aaa4: fa 20 60 04 st %i5, [ %g1 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
200aaa8: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aaac: c2 27 60 08 st %g1, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200aab0: c2 06 60 08 ld [ %i1 + 8 ], %g1
200aab4: 80 a0 60 00 cmp %g1, 0
200aab8: 32 80 00 02 bne,a 200aac0 <_RBTree_Extract_unprotected+0xdc><== ALWAYS TAKEN
200aabc: fa 20 40 00 st %i5, [ %g1 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200aac0: c2 06 60 04 ld [ %i1 + 4 ], %g1
200aac4: c2 27 60 04 st %g1, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200aac8: c2 06 60 04 ld [ %i1 + 4 ], %g1
200aacc: 80 a0 60 00 cmp %g1, 0
200aad0: 32 80 00 02 bne,a 200aad8 <_RBTree_Extract_unprotected+0xf4>
200aad4: fa 20 40 00 st %i5, [ %g1 ]
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200aad8: c4 06 40 00 ld [ %i1 ], %g2
target->color = the_node->color;
200aadc: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200aae0: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200aae4: c2 27 60 0c st %g1, [ %i5 + 0xc ]
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
200aae8: 80 a0 e0 00 cmp %g3, 0
200aaec: 32 80 00 06 bne,a 200ab04 <_RBTree_Extract_unprotected+0x120>
200aaf0: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200aaf4: 80 a7 20 00 cmp %i4, 0
200aaf8: 32 80 00 02 bne,a 200ab00 <_RBTree_Extract_unprotected+0x11c>
200aafc: c0 27 20 0c clr [ %i4 + 0xc ]
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
200ab00: c2 06 20 04 ld [ %i0 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
200ab04: c0 26 60 08 clr [ %i1 + 8 ]
200ab08: c0 26 60 04 clr [ %i1 + 4 ]
200ab0c: 80 a0 60 00 cmp %g1, 0
200ab10: 02 80 00 03 be 200ab1c <_RBTree_Extract_unprotected+0x138>
200ab14: c0 26 40 00 clr [ %i1 ]
200ab18: c0 20 60 0c clr [ %g1 + 0xc ]
200ab1c: 81 c7 e0 08 ret
200ab20: 81 e8 00 00 restore
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
200ab24: 80 a0 60 00 cmp %g1, 0
200ab28: 22 80 00 28 be,a 200abc8 <_RBTree_Extract_unprotected+0x1e4>
200ab2c: c2 06 40 00 ld [ %i1 ], %g1
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200ab30: fa 06 60 04 ld [ %i1 + 4 ], %i5
200ab34: 80 a7 60 00 cmp %i5, 0
200ab38: 12 bf ff bb bne 200aa24 <_RBTree_Extract_unprotected+0x40><== ALWAYS TAKEN
200ab3c: c2 26 20 0c st %g1, [ %i0 + 0xc ]
* the_node's location in the tree. This may cause the coloring to be
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
200ab40: f8 06 60 08 ld [ %i1 + 8 ], %i4 <== NOT EXECUTED
if( leaf ) {
200ab44: 80 a7 20 00 cmp %i4, 0
200ab48: 32 80 00 0c bne,a 200ab78 <_RBTree_Extract_unprotected+0x194>
200ab4c: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
200ab50: 7f ff fe d0 call 200a690 <_RBTree_Extract_validate_unprotected>
200ab54: 90 10 00 19 mov %i1, %o0
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab58: 10 80 00 0a b 200ab80 <_RBTree_Extract_unprotected+0x19c>
200ab5c: c2 06 40 00 ld [ %i1 ], %g1
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
200ab60: 80 a0 60 00 cmp %g1, 0
200ab64: 22 80 00 14 be,a 200abb4 <_RBTree_Extract_unprotected+0x1d0>
200ab68: c2 06 40 00 ld [ %i1 ], %g1
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
200ab6c: 10 bf ff a6 b 200aa04 <_RBTree_Extract_unprotected+0x20>
200ab70: c2 26 20 08 st %g1, [ %i0 + 8 ]
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
leaf->parent = the_node->parent;
200ab74: c2 06 40 00 ld [ %i1 ], %g1
200ab78: c2 27 00 00 st %g1, [ %i4 ]
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab7c: c2 06 40 00 ld [ %i1 ], %g1
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
200ab80: c6 06 60 0c ld [ %i1 + 0xc ], %g3
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200ab84: c4 00 60 04 ld [ %g1 + 4 ], %g2
200ab88: 84 18 80 19 xor %g2, %i1, %g2
200ab8c: 80 a0 00 02 cmp %g0, %g2
200ab90: 84 40 20 00 addx %g0, 0, %g2
the_node->parent->child[dir] = leaf;
200ab94: 85 28 a0 02 sll %g2, 2, %g2
200ab98: 82 00 40 02 add %g1, %g2, %g1
200ab9c: 10 bf ff d3 b 200aae8 <_RBTree_Extract_unprotected+0x104>
200aba0: f8 20 60 04 st %i4, [ %g1 + 4 ]
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200aba4: 7f ff fe bb call 200a690 <_RBTree_Extract_validate_unprotected>
200aba8: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200abac: 10 bf ff af b 200aa68 <_RBTree_Extract_unprotected+0x84>
200abb0: c4 07 40 00 ld [ %i5 ], %g2
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200abb4: 80 a6 00 01 cmp %i0, %g1
200abb8: 12 bf ff 93 bne 200aa04 <_RBTree_Extract_unprotected+0x20>
200abbc: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
200abc0: 10 bf ff 91 b 200aa04 <_RBTree_Extract_unprotected+0x20>
200abc4: c0 26 20 08 clr [ %i0 + 8 ]
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
200abc8: 80 a6 00 01 cmp %i0, %g1
200abcc: 12 bf ff 92 bne 200aa14 <_RBTree_Extract_unprotected+0x30>
200abd0: c2 26 20 0c st %g1, [ %i0 + 0xc ]
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
200abd4: 10 bf ff 90 b 200aa14 <_RBTree_Extract_unprotected+0x30>
200abd8: c0 26 20 0c clr [ %i0 + 0xc ]
0200a690 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
static void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
200a690: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
200a694: c2 06 00 00 ld [ %i0 ], %g1
if(!parent->parent) return;
200a698: c4 00 40 00 ld [ %g1 ], %g2
200a69c: 80 a0 a0 00 cmp %g2, 0
200a6a0: 02 80 00 ca be 200a9c8 <_RBTree_Extract_validate_unprotected+0x338>
200a6a4: 01 00 00 00 nop
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200a6a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a6ac: 80 a6 00 02 cmp %i0, %g2
200a6b0: 22 80 00 02 be,a 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a6b4: c4 00 60 08 ld [ %g1 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a6b8: c6 06 20 0c ld [ %i0 + 0xc ], %g3
200a6bc: 80 a0 e0 01 cmp %g3, 1
200a6c0: 22 80 00 5e be,a 200a838 <_RBTree_Extract_validate_unprotected+0x1a8>
200a6c4: c2 06 00 00 ld [ %i0 ], %g1
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
200a6c8: c6 00 40 00 ld [ %g1 ], %g3
200a6cc: 80 a0 e0 00 cmp %g3, 0
200a6d0: 02 80 00 59 be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4>
200a6d4: 80 a0 a0 00 cmp %g2, 0
200a6d8: 22 80 00 07 be,a 200a6f4 <_RBTree_Extract_validate_unprotected+0x64><== NEVER TAKEN
200a6dc: c6 00 a0 08 ld [ %g2 + 8 ], %g3 <== NOT EXECUTED
200a6e0: c8 00 a0 0c ld [ %g2 + 0xc ], %g4
200a6e4: 80 a1 20 01 cmp %g4, 1
200a6e8: 22 80 00 29 be,a 200a78c <_RBTree_Extract_validate_unprotected+0xfc>
200a6ec: de 00 60 04 ld [ %g1 + 4 ], %o7
_RBTree_Rotate(parent, dir);
sibling = parent->child[_RBTree_Opposite_direction(dir)];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
200a6f0: c6 00 a0 08 ld [ %g2 + 8 ], %g3
200a6f4: 80 a0 e0 00 cmp %g3, 0
200a6f8: 22 80 00 07 be,a 200a714 <_RBTree_Extract_validate_unprotected+0x84>
200a6fc: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a700: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
200a704: 80 a1 20 01 cmp %g4, 1
200a708: 22 80 00 52 be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0>
200a70c: c8 00 60 04 ld [ %g1 + 4 ], %g4
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
200a710: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a714: 80 a1 20 00 cmp %g4, 0
200a718: 22 80 00 07 be,a 200a734 <_RBTree_Extract_validate_unprotected+0xa4>
200a71c: 86 10 20 01 mov 1, %g3
200a720: c8 01 20 0c ld [ %g4 + 0xc ], %g4
200a724: 80 a1 20 01 cmp %g4, 1
200a728: 22 80 00 4a be,a 200a850 <_RBTree_Extract_validate_unprotected+0x1c0>
200a72c: c8 00 60 04 ld [ %g1 + 4 ], %g4
sibling->color = RBT_RED;
200a730: 86 10 20 01 mov 1, %g3
200a734: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
200a738: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200a73c: 80 a0 a0 01 cmp %g2, 1
200a740: 22 80 00 3d be,a 200a834 <_RBTree_Extract_validate_unprotected+0x1a4>
200a744: c0 20 60 0c clr [ %g1 + 0xc ]
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
200a748: c6 00 40 00 ld [ %g1 ], %g3
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200a74c: 80 a0 e0 00 cmp %g3, 0
200a750: 02 80 00 0a be 200a778 <_RBTree_Extract_validate_unprotected+0xe8><== NEVER TAKEN
200a754: 84 10 20 00 clr %g2
if(!(the_node->parent->parent)) return NULL;
200a758: c8 00 c0 00 ld [ %g3 ], %g4
200a75c: 80 a1 20 00 cmp %g4, 0
200a760: 02 80 00 07 be 200a77c <_RBTree_Extract_validate_unprotected+0xec>
200a764: b0 10 00 01 mov %g1, %i0
if(the_node == the_node->parent->child[RBT_LEFT])
200a768: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200a76c: 80 a0 40 02 cmp %g1, %g2
200a770: 22 80 00 05 be,a 200a784 <_RBTree_Extract_validate_unprotected+0xf4>
200a774: c4 00 e0 08 ld [ %g3 + 8 ], %g2
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200a778: b0 10 00 01 mov %g1, %i0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
200a77c: 10 bf ff cf b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a780: 82 10 00 03 mov %g3, %g1
200a784: 10 bf ff cd b 200a6b8 <_RBTree_Extract_validate_unprotected+0x28>
200a788: 82 10 00 03 mov %g3, %g1
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
200a78c: c8 20 60 0c st %g4, [ %g1 + 0xc ]
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
200a790: 88 1b c0 18 xor %o7, %i0, %g4
200a794: 80 a0 00 04 cmp %g0, %g4
200a798: 9a 40 20 00 addx %g0, 0, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a79c: 98 1b 60 01 xor %o5, 1, %o4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a7a0: 89 2b 20 02 sll %o4, 2, %g4
200a7a4: 96 00 40 04 add %g1, %g4, %o3
200a7a8: d6 02 e0 04 ld [ %o3 + 4 ], %o3
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
200a7ac: c0 20 a0 0c clr [ %g2 + 0xc ]
200a7b0: 80 a2 e0 00 cmp %o3, 0
200a7b4: 02 bf ff cf be 200a6f0 <_RBTree_Extract_validate_unprotected+0x60><== NEVER TAKEN
200a7b8: 84 10 20 00 clr %g2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a7bc: 80 a3 20 00 cmp %o4, 0
200a7c0: 02 80 00 04 be 200a7d0 <_RBTree_Extract_validate_unprotected+0x140>
200a7c4: 96 10 20 00 clr %o3
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a7c8: de 00 60 08 ld [ %g1 + 8 ], %o7
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a7cc: 96 10 20 01 mov 1, %o3
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a7d0: 9b 2b 60 02 sll %o5, 2, %o5
200a7d4: 84 03 c0 0d add %o7, %o5, %g2
200a7d8: d8 00 a0 04 ld [ %g2 + 4 ], %o4
200a7dc: 97 2a e0 02 sll %o3, 2, %o3
200a7e0: 96 00 40 0b add %g1, %o3, %o3
200a7e4: d8 22 e0 04 st %o4, [ %o3 + 4 ]
if (c->child[dir])
200a7e8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a7ec: 80 a0 a0 00 cmp %g2, 0
200a7f0: 02 80 00 04 be 200a800 <_RBTree_Extract_validate_unprotected+0x170><== NEVER TAKEN
200a7f4: 9a 03 c0 0d add %o7, %o5, %o5
c->child[dir]->parent = the_node;
200a7f8: c2 20 80 00 st %g1, [ %g2 ]
200a7fc: c6 00 40 00 ld [ %g1 ], %g3
c->child[dir] = the_node;
200a800: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a804: c4 00 e0 04 ld [ %g3 + 4 ], %g2
c->parent = the_node->parent;
200a808: c6 23 c0 00 st %g3, [ %o7 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a80c: 84 18 40 02 xor %g1, %g2, %g2
200a810: 80 a0 00 02 cmp %g0, %g2
200a814: 84 40 20 00 addx %g0, 0, %g2
200a818: 85 28 a0 02 sll %g2, 2, %g2
200a81c: 84 00 c0 02 add %g3, %g2, %g2
c->parent = the_node->parent;
the_node->parent = c;
200a820: 88 00 40 04 add %g1, %g4, %g4
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a824: de 20 a0 04 st %o7, [ %g2 + 4 ]
c->parent = the_node->parent;
the_node->parent = c;
200a828: de 20 40 00 st %o7, [ %g1 ]
200a82c: 10 bf ff b1 b 200a6f0 <_RBTree_Extract_validate_unprotected+0x60>
200a830: c4 01 20 04 ld [ %g4 + 4 ], %g2
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200a834: c2 06 00 00 ld [ %i0 ], %g1
200a838: c2 00 40 00 ld [ %g1 ], %g1
200a83c: 80 a0 60 00 cmp %g1, 0
200a840: 22 80 00 02 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8>
200a844: c0 26 20 0c clr [ %i0 + 0xc ]
200a848: 81 c7 e0 08 ret
200a84c: 81 e8 00 00 restore
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
200a850: 88 19 00 18 xor %g4, %i0, %g4
200a854: 80 a0 00 04 cmp %g0, %g4
200a858: 9a 40 20 00 addx %g0, 0, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a85c: 98 1b 60 01 xor %o5, 1, %o4
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
200a860: 9f 2b 20 02 sll %o4, 2, %o7
200a864: 88 00 80 0f add %g2, %o7, %g4
200a868: c8 01 20 04 ld [ %g4 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a86c: 80 a1 20 00 cmp %g4, 0
200a870: 02 80 00 06 be 200a888 <_RBTree_Extract_validate_unprotected+0x1f8>
200a874: 96 10 20 01 mov 1, %o3
200a878: d6 01 20 0c ld [ %g4 + 0xc ], %o3
200a87c: 80 a2 e0 01 cmp %o3, 1
200a880: 02 80 00 56 be 200a9d8 <_RBTree_Extract_validate_unprotected+0x348>
200a884: 96 10 20 01 mov 1, %o3
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
200a888: 89 2b 60 02 sll %o5, 2, %g4
200a88c: 88 00 80 04 add %g2, %g4, %g4
200a890: d4 01 20 04 ld [ %g4 + 4 ], %o2
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[_RBTree_Opposite_direction(dir)])) {
sibling->color = RBT_RED;
200a894: d6 20 a0 0c st %o3, [ %g2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a898: 88 1b 20 01 xor %o4, 1, %g4
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a89c: 97 29 20 02 sll %g4, 2, %o3
200a8a0: 96 00 80 0b add %g2, %o3, %o3
200a8a4: d6 02 e0 04 ld [ %o3 + 4 ], %o3
200a8a8: 80 a2 e0 00 cmp %o3, 0
200a8ac: 02 80 00 1c be 200a91c <_RBTree_Extract_validate_unprotected+0x28c><== NEVER TAKEN
200a8b0: c0 22 a0 0c clr [ %o2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a8b4: 80 a1 20 00 cmp %g4, 0
200a8b8: 12 80 00 04 bne 200a8c8 <_RBTree_Extract_validate_unprotected+0x238>
200a8bc: 96 10 20 01 mov 1, %o3
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a8c0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a8c4: 96 10 20 00 clr %o3
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a8c8: 88 00 c0 0f add %g3, %o7, %g4
200a8cc: d4 01 20 04 ld [ %g4 + 4 ], %o2
200a8d0: 97 2a e0 02 sll %o3, 2, %o3
200a8d4: 96 00 80 0b add %g2, %o3, %o3
200a8d8: d4 22 e0 04 st %o2, [ %o3 + 4 ]
if (c->child[dir])
200a8dc: c8 01 20 04 ld [ %g4 + 4 ], %g4
200a8e0: 80 a1 20 00 cmp %g4, 0
200a8e4: 32 80 00 02 bne,a 200a8ec <_RBTree_Extract_validate_unprotected+0x25c>
200a8e8: c4 21 00 00 st %g2, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a8ec: c8 00 80 00 ld [ %g2 ], %g4
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200a8f0: 96 00 c0 0f add %g3, %o7, %o3
200a8f4: c4 22 e0 04 st %g2, [ %o3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a8f8: d6 01 20 04 ld [ %g4 + 4 ], %o3
c->parent = the_node->parent;
200a8fc: c8 20 c0 00 st %g4, [ %g3 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a900: 96 18 80 0b xor %g2, %o3, %o3
c->parent = the_node->parent;
the_node->parent = c;
200a904: c6 20 80 00 st %g3, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a908: 80 a0 00 0b cmp %g0, %o3
200a90c: 84 40 20 00 addx %g0, 0, %g2
200a910: 85 28 a0 02 sll %g2, 2, %g2
200a914: 88 01 00 02 add %g4, %g2, %g4
200a918: c6 21 20 04 st %g3, [ %g4 + 4 ]
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, _RBTree_Opposite_direction(dir));
sibling = parent->child[_RBTree_Opposite_direction(dir)];
200a91c: 84 00 40 0f add %g1, %o7, %g2
200a920: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a924: 9e 00 80 0f add %g2, %o7, %o7
200a928: c8 03 e0 04 ld [ %o7 + 4 ], %g4
200a92c: 9e 10 00 02 mov %g2, %o7
}
sibling->color = parent->color;
200a930: c6 00 60 0c ld [ %g1 + 0xc ], %g3
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a934: 80 a3 e0 00 cmp %o7, 0
200a938: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
parent->color = RBT_BLACK;
200a93c: c0 20 60 0c clr [ %g1 + 0xc ]
200a940: 02 bf ff bd be 200a834 <_RBTree_Extract_validate_unprotected+0x1a4><== NEVER TAKEN
200a944: c0 21 20 0c clr [ %g4 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a948: 80 a3 20 00 cmp %o4, 0
200a94c: 22 80 00 21 be,a 200a9d0 <_RBTree_Extract_validate_unprotected+0x340>
200a950: c4 00 60 04 ld [ %g1 + 4 ], %g2
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200a954: c4 00 60 08 ld [ %g1 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a958: 88 10 20 01 mov 1, %g4
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a95c: 9b 2b 60 02 sll %o5, 2, %o5
200a960: 86 00 80 0d add %g2, %o5, %g3
200a964: de 00 e0 04 ld [ %g3 + 4 ], %o7
200a968: 89 29 20 02 sll %g4, 2, %g4
200a96c: 88 00 40 04 add %g1, %g4, %g4
200a970: de 21 20 04 st %o7, [ %g4 + 4 ]
if (c->child[dir])
200a974: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200a978: 80 a0 e0 00 cmp %g3, 0
200a97c: 32 80 00 02 bne,a 200a984 <_RBTree_Extract_validate_unprotected+0x2f4>
200a980: c2 20 c0 00 st %g1, [ %g3 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a984: c6 00 40 00 ld [ %g1 ], %g3
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200a988: 9a 00 80 0d add %g2, %o5, %o5
200a98c: c2 23 60 04 st %g1, [ %o5 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a990: c8 00 e0 04 ld [ %g3 + 4 ], %g4
c->parent = the_node->parent;
200a994: c6 20 80 00 st %g3, [ %g2 ]
the_node->parent = c;
200a998: c4 20 40 00 st %g2, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a99c: 88 18 40 04 xor %g1, %g4, %g4
200a9a0: 80 a0 00 04 cmp %g0, %g4
200a9a4: 82 40 20 00 addx %g0, 0, %g1
200a9a8: 83 28 60 02 sll %g1, 2, %g1
200a9ac: 86 00 c0 01 add %g3, %g1, %g3
sibling->child[_RBTree_Opposite_direction(dir)]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200a9b0: c2 06 00 00 ld [ %i0 ], %g1
200a9b4: c4 20 e0 04 st %g2, [ %g3 + 4 ]
200a9b8: c2 00 40 00 ld [ %g1 ], %g1
200a9bc: 80 a0 60 00 cmp %g1, 0
200a9c0: 22 bf ff a2 be,a 200a848 <_RBTree_Extract_validate_unprotected+0x1b8><== NEVER TAKEN
200a9c4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED
200a9c8: 81 c7 e0 08 ret
200a9cc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a9d0: 10 bf ff e3 b 200a95c <_RBTree_Extract_validate_unprotected+0x2cc>
200a9d4: 88 10 20 00 clr %g4
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a9d8: 9e 00 40 0f add %g1, %o7, %o7
200a9dc: 10 bf ff d5 b 200a930 <_RBTree_Extract_validate_unprotected+0x2a0>
200a9e0: de 03 e0 04 ld [ %o7 + 4 ], %o7
0200b69c <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
200b69c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
200b6a0: 7f ff e1 cb call 2003dcc <sparc_disable_interrupts>
200b6a4: b8 10 00 18 mov %i0, %i4
200b6a8: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
200b6ac: f6 06 20 04 ld [ %i0 + 4 ], %i3
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200b6b0: 80 a6 e0 00 cmp %i3, 0
200b6b4: 02 80 00 15 be 200b708 <_RBTree_Find+0x6c> <== NEVER TAKEN
200b6b8: b0 10 20 00 clr %i0
compare_result = the_rbtree->compare_function(the_node, iter_node);
200b6bc: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
200b6c0: 92 10 00 1b mov %i3, %o1
200b6c4: 9f c0 40 00 call %g1
200b6c8: 90 10 00 19 mov %i1, %o0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
200b6cc: 83 3a 20 1f sra %o0, 0x1f, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
200b6d0: 80 a2 20 00 cmp %o0, 0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
200b6d4: 82 20 40 08 sub %g1, %o0, %g1
200b6d8: 83 30 60 1f srl %g1, 0x1f, %g1
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
200b6dc: 83 28 60 02 sll %g1, 2, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
200b6e0: 12 80 00 06 bne 200b6f8 <_RBTree_Find+0x5c>
200b6e4: 82 06 c0 01 add %i3, %g1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
200b6e8: c4 0f 20 14 ldub [ %i4 + 0x14 ], %g2
200b6ec: 80 a0 a0 00 cmp %g2, 0
200b6f0: 12 80 00 0a bne 200b718 <_RBTree_Find+0x7c>
200b6f4: b0 10 00 1b mov %i3, %i0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
200b6f8: f6 00 60 04 ld [ %g1 + 4 ], %i3
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
200b6fc: 80 a6 e0 00 cmp %i3, 0
200b700: 32 bf ff f0 bne,a 200b6c0 <_RBTree_Find+0x24>
200b704: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200b708: 7f ff e1 b5 call 2003ddc <sparc_enable_interrupts>
200b70c: 90 10 00 1d mov %i5, %o0
return return_node;
}
200b710: 81 c7 e0 08 ret
200b714: 81 e8 00 00 restore
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
200b718: 7f ff e1 b1 call 2003ddc <sparc_enable_interrupts>
200b71c: 90 10 00 1d mov %i5, %o0
return return_node;
}
200b720: 81 c7 e0 08 ret
200b724: 81 e8 00 00 restore
0200bb24 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200bb24: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200bb28: 80 a6 20 00 cmp %i0, 0
200bb2c: 02 80 00 0f be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200bb30: 80 a6 e0 00 cmp %i3, 0
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200bb34: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200bb38: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200bb3c: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200bb40: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200bb44: f2 26 20 10 st %i1, [ %i0 + 0x10 ]
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200bb48: 02 80 00 08 be 200bb68 <_RBTree_Initialize+0x44> <== NEVER TAKEN
200bb4c: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert(the_rbtree, next);
200bb50: 92 10 00 1a mov %i2, %o1
200bb54: 7f ff ff b5 call 200ba28 <_RBTree_Insert>
200bb58: 90 10 00 18 mov %i0, %o0
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200bb5c: b6 86 ff ff addcc %i3, -1, %i3
200bb60: 12 bf ff fc bne 200bb50 <_RBTree_Initialize+0x2c>
200bb64: b4 06 80 1c add %i2, %i4, %i2
200bb68: 81 c7 e0 08 ret
200bb6c: 81 e8 00 00 restore
0200ac04 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200ac04: 9d e3 bf a0 save %sp, -96, %sp
200ac08: b8 10 00 18 mov %i0, %i4
if(!the_node) return (RBTree_Node*)-1;
200ac0c: 80 a6 60 00 cmp %i1, 0
200ac10: 02 80 00 96 be 200ae68 <_RBTree_Insert_unprotected+0x264>
200ac14: b0 10 3f ff mov -1, %i0
RBTree_Node *iter_node = the_rbtree->root;
200ac18: fa 07 20 04 ld [ %i4 + 4 ], %i5
int compare_result;
if (!iter_node) { /* special case: first node inserted */
200ac1c: 80 a7 60 00 cmp %i5, 0
200ac20: 32 80 00 05 bne,a 200ac34 <_RBTree_Insert_unprotected+0x30>
200ac24: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
the_node->color = RBT_BLACK;
200ac28: 10 80 00 a0 b 200aea8 <_RBTree_Insert_unprotected+0x2a4>
200ac2c: c0 26 60 0c clr [ %i1 + 0xc ]
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
200ac30: c2 07 20 10 ld [ %i4 + 0x10 ], %g1
200ac34: 92 10 00 1d mov %i5, %o1
200ac38: 9f c0 40 00 call %g1
200ac3c: 90 10 00 19 mov %i1, %o0
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200ac40: c2 0f 20 14 ldub [ %i4 + 0x14 ], %g1
200ac44: 80 a0 60 00 cmp %g1, 0
200ac48: 22 80 00 05 be,a 200ac5c <_RBTree_Insert_unprotected+0x58>
200ac4c: 90 38 00 08 xnor %g0, %o0, %o0
200ac50: 80 a2 20 00 cmp %o0, 0
200ac54: 02 80 00 87 be 200ae70 <_RBTree_Insert_unprotected+0x26c>
200ac58: 90 38 00 08 xnor %g0, %o0, %o0
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
200ac5c: 91 32 20 1f srl %o0, 0x1f, %o0
if (!iter_node->child[dir]) {
200ac60: 83 2a 20 02 sll %o0, 2, %g1
200ac64: 82 07 40 01 add %i5, %g1, %g1
200ac68: f0 00 60 04 ld [ %g1 + 4 ], %i0
200ac6c: 80 a6 20 00 cmp %i0, 0
200ac70: 32 bf ff f0 bne,a 200ac30 <_RBTree_Insert_unprotected+0x2c>
200ac74: ba 10 00 18 mov %i0, %i5
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200ac78: c0 26 60 08 clr [ %i1 + 8 ]
200ac7c: c0 26 60 04 clr [ %i1 + 4 ]
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200ac80: 90 02 20 02 add %o0, 2, %o0
200ac84: 91 2a 20 02 sll %o0, 2, %o0
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
200ac88: c4 07 00 08 ld [ %i4 + %o0 ], %g2
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
200ac8c: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_node->parent = iter_node;
200ac90: fa 26 40 00 st %i5, [ %i1 ]
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
200ac94: 82 10 20 01 mov 1, %g1
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
200ac98: 80 a0 80 1d cmp %g2, %i5
200ac9c: 02 80 00 81 be 200aea0 <_RBTree_Insert_unprotected+0x29c>
200aca0: c2 26 60 0c st %g1, [ %i1 + 0xc ]
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
200aca4: 9a 10 20 01 mov 1, %o5
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200aca8: c2 07 40 00 ld [ %i5 ], %g1
200acac: 84 90 60 00 orcc %g1, 0, %g2
200acb0: 22 80 00 6e be,a 200ae68 <_RBTree_Insert_unprotected+0x264>
200acb4: c0 26 60 0c clr [ %i1 + 0xc ]
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200acb8: c6 07 60 0c ld [ %i5 + 0xc ], %g3
200acbc: 80 a0 e0 01 cmp %g3, 1
200acc0: 12 80 00 6d bne 200ae74 <_RBTree_Insert_unprotected+0x270>
200acc4: 01 00 00 00 nop
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
200acc8: de 00 40 00 ld [ %g1 ], %o7
200accc: 80 a3 e0 00 cmp %o7, 0
200acd0: 02 80 00 0c be 200ad00 <_RBTree_Insert_unprotected+0xfc> <== NEVER TAKEN
200acd4: f8 00 60 04 ld [ %g1 + 4 ], %i4
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200acd8: 80 a7 00 1d cmp %i4, %i5
200acdc: 02 80 00 6f be 200ae98 <_RBTree_Insert_unprotected+0x294>
200ace0: 86 10 00 1c mov %i4, %g3
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200ace4: 80 a0 e0 00 cmp %g3, 0
200ace8: 22 80 00 07 be,a 200ad04 <_RBTree_Insert_unprotected+0x100>
200acec: c8 07 60 04 ld [ %i5 + 4 ], %g4
200acf0: c8 00 e0 0c ld [ %g3 + 0xc ], %g4
200acf4: 80 a1 20 01 cmp %g4, 1
200acf8: 22 80 00 61 be,a 200ae7c <_RBTree_Insert_unprotected+0x278>
200acfc: c0 27 60 0c clr [ %i5 + 0xc ]
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200ad00: c8 07 60 04 ld [ %i5 + 4 ], %g4
RBTree_Direction pdir = the_node->parent != g->child[0];
200ad04: b8 1f 00 1d xor %i4, %i5, %i4
200ad08: 80 a0 00 1c cmp %g0, %i4
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200ad0c: b8 1e 40 04 xor %i1, %g4, %i4
RBTree_Direction pdir = the_node->parent != g->child[0];
200ad10: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200ad14: 80 a0 00 1c cmp %g0, %i4
200ad18: b8 40 20 00 addx %g0, 0, %i4
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200ad1c: 80 a7 00 03 cmp %i4, %g3
200ad20: 02 80 00 27 be 200adbc <_RBTree_Insert_unprotected+0x1b8>
200ad24: 9e 18 e0 01 xor %g3, 1, %o7
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200ad28: b9 2b e0 02 sll %o7, 2, %i4
200ad2c: b8 07 40 1c add %i5, %i4, %i4
200ad30: d8 07 20 04 ld [ %i4 + 4 ], %o4
200ad34: 80 a3 20 00 cmp %o4, 0
200ad38: 02 80 00 1e be 200adb0 <_RBTree_Insert_unprotected+0x1ac> <== NEVER TAKEN
200ad3c: b9 28 e0 02 sll %g3, 2, %i4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ad40: 80 a3 e0 00 cmp %o7, 0
200ad44: 02 80 00 05 be 200ad58 <_RBTree_Insert_unprotected+0x154>
200ad48: 98 10 20 00 clr %o4
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200ad4c: c8 07 60 08 ld [ %i5 + 8 ], %g4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ad50: 98 10 20 01 mov 1, %o4
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200ad54: b9 28 e0 02 sll %g3, 2, %i4
200ad58: 9e 01 00 1c add %g4, %i4, %o7
200ad5c: d6 03 e0 04 ld [ %o7 + 4 ], %o3
200ad60: 99 2b 20 02 sll %o4, 2, %o4
200ad64: 98 07 40 0c add %i5, %o4, %o4
200ad68: d6 23 20 04 st %o3, [ %o4 + 4 ]
if (c->child[dir])
200ad6c: de 03 e0 04 ld [ %o7 + 4 ], %o7
200ad70: 80 a3 e0 00 cmp %o7, 0
200ad74: 22 80 00 05 be,a 200ad88 <_RBTree_Insert_unprotected+0x184>
200ad78: 9e 01 00 1c add %g4, %i4, %o7
c->child[dir]->parent = the_node;
200ad7c: fa 23 c0 00 st %i5, [ %o7 ]
200ad80: c2 07 40 00 ld [ %i5 ], %g1
c->child[dir] = the_node;
200ad84: 9e 01 00 1c add %g4, %i4, %o7
200ad88: fa 23 e0 04 st %i5, [ %o7 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad8c: de 00 60 04 ld [ %g1 + 4 ], %o7
c->parent = the_node->parent;
200ad90: c2 21 00 00 st %g1, [ %g4 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad94: 9e 1b c0 1d xor %o7, %i5, %o7
c->parent = the_node->parent;
the_node->parent = c;
200ad98: c8 27 40 00 st %g4, [ %i5 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ad9c: 80 a0 00 0f cmp %g0, %o7
200ada0: ba 40 20 00 addx %g0, 0, %i5
200ada4: bb 2f 60 02 sll %i5, 2, %i5
200ada8: 82 00 40 1d add %g1, %i5, %g1
200adac: c8 20 60 04 st %g4, [ %g1 + 4 ]
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
200adb0: b2 06 40 1c add %i1, %i4, %i1
200adb4: f2 06 60 04 ld [ %i1 + 4 ], %i1
200adb8: fa 06 40 00 ld [ %i1 ], %i5
}
the_node->parent->color = RBT_BLACK;
200adbc: c0 27 60 0c clr [ %i5 + 0xc ]
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
200adc0: 86 23 40 03 sub %o5, %g3, %g3
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200adc4: 80 a0 00 03 cmp %g0, %g3
200adc8: 82 60 3f ff subx %g0, -1, %g1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200adcc: 89 28 60 02 sll %g1, 2, %g4
200add0: 88 00 80 04 add %g2, %g4, %g4
200add4: c8 01 20 04 ld [ %g4 + 4 ], %g4
200add8: 80 a1 20 00 cmp %g4, 0
200addc: 02 bf ff b3 be 200aca8 <_RBTree_Insert_unprotected+0xa4> <== NEVER TAKEN
200ade0: da 20 a0 0c st %o5, [ %g2 + 0xc ]
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ade4: 80 a0 60 00 cmp %g1, 0
200ade8: 22 80 00 2a be,a 200ae90 <_RBTree_Insert_unprotected+0x28c>
200adec: c2 00 a0 04 ld [ %g2 + 4 ], %g1
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
200adf0: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200adf4: ba 10 20 01 mov 1, %i5
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200adf8: 87 28 e0 02 sll %g3, 2, %g3
200adfc: 88 00 40 03 add %g1, %g3, %g4
200ae00: f8 01 20 04 ld [ %g4 + 4 ], %i4
200ae04: bb 2f 60 02 sll %i5, 2, %i5
200ae08: ba 00 80 1d add %g2, %i5, %i5
200ae0c: f8 27 60 04 st %i4, [ %i5 + 4 ]
if (c->child[dir])
200ae10: c8 01 20 04 ld [ %g4 + 4 ], %g4
200ae14: 80 a1 20 00 cmp %g4, 0
200ae18: 32 80 00 02 bne,a 200ae20 <_RBTree_Insert_unprotected+0x21c>
200ae1c: c4 21 00 00 st %g2, [ %g4 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae20: c8 00 80 00 ld [ %g2 ], %g4
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200ae24: 86 00 40 03 add %g1, %g3, %g3
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
200ae28: c8 20 40 00 st %g4, [ %g1 ]
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200ae2c: c4 20 e0 04 st %g2, [ %g3 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
200ae30: c2 20 80 00 st %g1, [ %g2 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae34: c6 01 20 04 ld [ %g4 + 4 ], %g3
c->parent = the_node->parent;
the_node->parent = c;
200ae38: fa 06 40 00 ld [ %i1 ], %i5
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200ae3c: 86 18 80 03 xor %g2, %g3, %g3
200ae40: 80 a0 00 03 cmp %g0, %g3
200ae44: 84 40 20 00 addx %g0, 0, %g2
200ae48: 85 28 a0 02 sll %g2, 2, %g2
200ae4c: 88 01 00 02 add %g4, %g2, %g4
200ae50: c2 21 20 04 st %g1, [ %g4 + 4 ]
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200ae54: c2 07 40 00 ld [ %i5 ], %g1
200ae58: 84 90 60 00 orcc %g1, 0, %g2
200ae5c: 32 bf ff 98 bne,a 200acbc <_RBTree_Insert_unprotected+0xb8><== ALWAYS TAKEN
200ae60: c6 07 60 0c ld [ %i5 + 0xc ], %g3
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200ae64: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
200ae68: 81 c7 e0 08 ret
200ae6c: 81 e8 00 00 restore
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200ae70: b0 10 00 1d mov %i5, %i0
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
200ae74: 81 c7 e0 08 ret
200ae78: 81 e8 00 00 restore
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
200ae7c: c0 20 e0 0c clr [ %g3 + 0xc ]
g->color = RBT_RED;
200ae80: c8 20 60 0c st %g4, [ %g1 + 0xc ]
200ae84: ba 10 00 0f mov %o7, %i5
200ae88: 10 bf ff 88 b 200aca8 <_RBTree_Insert_unprotected+0xa4>
200ae8c: b2 10 00 01 mov %g1, %i1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200ae90: 10 bf ff da b 200adf8 <_RBTree_Insert_unprotected+0x1f4>
200ae94: ba 10 20 00 clr %i5
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
200ae98: 10 bf ff 93 b 200ace4 <_RBTree_Insert_unprotected+0xe0>
200ae9c: c6 00 60 08 ld [ %g1 + 8 ], %g3
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
the_rbtree->first[dir] = the_node;
200aea0: 10 bf ff 81 b 200aca4 <_RBTree_Insert_unprotected+0xa0>
200aea4: f2 27 00 08 st %i1, [ %i4 + %o0 ]
RBTree_Node *iter_node = the_rbtree->root;
int compare_result;
if (!iter_node) { /* special case: first node inserted */
the_node->color = RBT_BLACK;
the_rbtree->root = the_node;
200aea8: f2 27 20 04 st %i1, [ %i4 + 4 ]
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
200aeac: f2 27 20 0c st %i1, [ %i4 + 0xc ]
200aeb0: f2 27 20 08 st %i1, [ %i4 + 8 ]
the_node->parent = (RBTree_Node *) the_rbtree;
200aeb4: f8 26 40 00 st %i4, [ %i1 ]
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200aeb8: c0 26 60 08 clr [ %i1 + 8 ]
200aebc: c0 26 60 04 clr [ %i1 + 4 ]
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
200aec0: 81 c7 e0 08 ret
200aec4: 91 e8 20 00 restore %g0, 0, %o0
0200aedc <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
200aedc: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200aee0: 80 a0 00 19 cmp %g0, %i1
200aee4: 82 60 3f ff subx %g0, -1, %g1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200aee8: 82 00 60 02 add %g1, 2, %g1
200aeec: 83 28 60 02 sll %g1, 2, %g1
200aef0: fa 06 00 01 ld [ %i0 + %g1 ], %i5
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
200aef4: 80 a7 60 00 cmp %i5, 0
200aef8: 02 80 00 0d be 200af2c <_RBTree_Iterate_unprotected+0x50>
200aefc: 90 10 00 1d mov %i5, %o0
stop = (*visitor)( current, dir, visitor_arg );
200af00: 92 10 00 19 mov %i1, %o1
200af04: 9f c6 80 00 call %i2
200af08: 94 10 00 1b mov %i3, %o2
current = _RBTree_Next_unprotected( rbtree, current, dir );
200af0c: 92 10 00 1d mov %i5, %o1
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
200af10: b8 10 00 08 mov %o0, %i4
current = _RBTree_Next_unprotected( rbtree, current, dir );
200af14: 94 10 00 19 mov %i1, %o2
200af18: 40 00 00 07 call 200af34 <_RBTree_Next_unprotected>
200af1c: 90 10 00 18 mov %i0, %o0
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
200af20: 80 8f 20 ff btst 0xff, %i4
200af24: 02 bf ff f4 be 200aef4 <_RBTree_Iterate_unprotected+0x18> <== ALWAYS TAKEN
200af28: ba 10 00 08 mov %o0, %i5
200af2c: 81 c7 e0 08 ret
200af30: 81 e8 00 00 restore
0200af34 <_RBTree_Next_unprotected>:
const RBTree_Node *node,
RBTree_Direction dir
)
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
RBTree_Node *current = node->child [dir];
200af34: 85 2a a0 02 sll %o2, 2, %g2
200af38: 82 02 40 02 add %o1, %g2, %g1
200af3c: c2 00 60 04 ld [ %g1 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200af40: 80 a0 00 0a cmp %g0, %o2
200af44: 86 60 3f ff subx %g0, -1, %g3
RBTree_Node *next = NULL;
if ( current != NULL ) {
200af48: 80 a0 60 00 cmp %g1, 0
200af4c: 02 80 00 0a be 200af74 <_RBTree_Next_unprotected+0x40>
200af50: 94 10 00 08 mov %o0, %o2
200af54: 87 28 e0 02 sll %g3, 2, %g3
next = current;
while ( (current = current->child [opp_dir]) != NULL ) {
200af58: 84 00 40 03 add %g1, %g3, %g2
200af5c: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200af60: 80 a0 a0 00 cmp %g2, 0
200af64: 32 bf ff fd bne,a 200af58 <_RBTree_Next_unprotected+0x24>
200af68: 82 10 00 02 mov %g2, %g1
RBTree_Direction dir
)
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
RBTree_Node *current = node->child [dir];
RBTree_Node *next = NULL;
200af6c: 81 c3 e0 08 retl
200af70: 90 10 00 01 mov %g1, %o0
while ( (current = current->child [opp_dir]) != NULL ) {
next = current;
}
} else {
const RBTree_Node *null = (const RBTree_Node *) rbtree;
RBTree_Node *parent = node->parent;
200af74: c8 02 40 00 ld [ %o1 ], %g4
if ( parent != null && node == parent->child [opp_dir] ) {
200af78: 80 a2 80 04 cmp %o2, %g4
200af7c: 02 80 00 19 be 200afe0 <_RBTree_Next_unprotected+0xac>
200af80: 90 10 20 00 clr %o0
200af84: 87 28 e0 02 sll %g3, 2, %g3
200af88: 86 01 00 03 add %g4, %g3, %g3
200af8c: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200af90: 80 a0 40 09 cmp %g1, %o1
200af94: 02 80 00 13 be 200afe0 <_RBTree_Next_unprotected+0xac>
200af98: 90 10 00 04 mov %g4, %o0
next = parent;
} else {
while ( parent != null && node == parent->child [dir] ) {
200af9c: 82 01 00 02 add %g4, %g2, %g1
200afa0: c2 00 60 04 ld [ %g1 + 4 ], %g1
200afa4: 80 a2 40 01 cmp %o1, %g1
200afa8: 22 80 00 09 be,a 200afcc <_RBTree_Next_unprotected+0x98> <== ALWAYS TAKEN
200afac: c2 01 00 00 ld [ %g4 ], %g1
200afb0: 10 bf ff ef b 200af6c <_RBTree_Next_unprotected+0x38> <== NOT EXECUTED
200afb4: 82 10 00 04 mov %g4, %g1 <== NOT EXECUTED
200afb8: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200afbc: 80 a0 c0 04 cmp %g3, %g4
200afc0: 12 bf ff eb bne 200af6c <_RBTree_Next_unprotected+0x38>
200afc4: 88 10 00 01 mov %g1, %g4
node = parent;
parent = node->parent;
200afc8: c2 01 00 00 ld [ %g4 ], %g1
RBTree_Node *parent = node->parent;
if ( parent != null && node == parent->child [opp_dir] ) {
next = parent;
} else {
while ( parent != null && node == parent->child [dir] ) {
200afcc: 80 a2 80 01 cmp %o2, %g1
200afd0: 12 bf ff fa bne 200afb8 <_RBTree_Next_unprotected+0x84>
200afd4: 86 00 40 02 add %g1, %g2, %g3
}
}
}
return next;
}
200afd8: 81 c3 e0 08 retl
200afdc: 90 10 20 00 clr %o0
200afe0: 81 c3 e0 08 retl
02008104 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2008104: 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;
2008108: 03 00 80 71 sethi %hi(0x201c400), %g1
200810c: 82 10 62 9c or %g1, 0x29c, %g1 ! 201c69c <Configuration_RTEMS_API>
2008110: fa 00 60 2c ld [ %g1 + 0x2c ], %i5
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
2008114: 80 a7 60 00 cmp %i5, 0
2008118: 02 80 00 18 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74>
200811c: f6 00 60 28 ld [ %g1 + 0x28 ], %i3
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
2008120: 80 a6 e0 00 cmp %i3, 0
2008124: 02 80 00 15 be 2008178 <_RTEMS_tasks_Initialize_user_tasks_body+0x74><== NEVER TAKEN
2008128: b8 10 20 00 clr %i4
return_value = rtems_task_create(
200812c: d4 07 60 04 ld [ %i5 + 4 ], %o2
2008130: d0 07 40 00 ld [ %i5 ], %o0
2008134: d2 07 60 08 ld [ %i5 + 8 ], %o1
2008138: d6 07 60 14 ld [ %i5 + 0x14 ], %o3
200813c: d8 07 60 0c ld [ %i5 + 0xc ], %o4
2008140: 7f ff ff 70 call 2007f00 <rtems_task_create>
2008144: 9a 07 bf fc add %fp, -4, %o5
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
2008148: 94 92 20 00 orcc %o0, 0, %o2
200814c: 12 80 00 0d bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2008150: d0 07 bf fc ld [ %fp + -4 ], %o0
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
2008154: d4 07 60 18 ld [ %i5 + 0x18 ], %o2
2008158: 40 00 00 0e call 2008190 <rtems_task_start>
200815c: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2008160: 94 92 20 00 orcc %o0, 0, %o2
2008164: 12 80 00 07 bne 2008180 <_RTEMS_tasks_Initialize_user_tasks_body+0x7c>
2008168: b8 07 20 01 inc %i4
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
200816c: 80 a7 00 1b cmp %i4, %i3
2008170: 12 bf ff ef bne 200812c <_RTEMS_tasks_Initialize_user_tasks_body+0x28><== NEVER TAKEN
2008174: ba 07 60 1c add %i5, 0x1c, %i5
2008178: 81 c7 e0 08 ret
200817c: 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 );
2008180: 90 10 20 01 mov 1, %o0
2008184: 40 00 04 0d call 20091b8 <_Internal_error_Occurred>
2008188: 92 10 20 01 mov 1, %o1
0200d3dc <_RTEMS_tasks_Post_switch_extension>:
*/
static void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200d3dc: 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 ];
200d3e0: fa 06 21 50 ld [ %i0 + 0x150 ], %i5
if ( !api )
200d3e4: 80 a7 60 00 cmp %i5, 0
200d3e8: 02 80 00 1e be 200d460 <_RTEMS_tasks_Post_switch_extension+0x84><== NEVER TAKEN
200d3ec: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200d3f0: 7f ff d4 b2 call 20026b8 <sparc_disable_interrupts>
200d3f4: 01 00 00 00 nop
signal_set = asr->signals_posted;
200d3f8: f8 07 60 14 ld [ %i5 + 0x14 ], %i4
asr->signals_posted = 0;
200d3fc: c0 27 60 14 clr [ %i5 + 0x14 ]
_ISR_Enable( level );
200d400: 7f ff d4 b2 call 20026c8 <sparc_enable_interrupts>
200d404: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200d408: 80 a7 20 00 cmp %i4, 0
200d40c: 32 80 00 04 bne,a 200d41c <_RTEMS_tasks_Post_switch_extension+0x40>
200d410: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200d414: 81 c7 e0 08 ret
200d418: 81 e8 00 00 restore
return;
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d41c: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200d420: 82 00 60 01 inc %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d424: 94 07 bf fc add %fp, -4, %o2
200d428: 37 00 00 3f sethi %hi(0xfc00), %i3
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200d42c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d430: 40 00 07 76 call 200f208 <rtems_task_mode>
200d434: 92 16 e3 ff or %i3, 0x3ff, %o1
(*asr->handler)( signal_set );
200d438: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200d43c: 9f c0 40 00 call %g1
200d440: 90 10 00 1c mov %i4, %o0
asr->nest_level -= 1;
200d444: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d448: 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;
200d44c: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200d450: 92 16 e3 ff or %i3, 0x3ff, %o1
200d454: 94 07 bf fc add %fp, -4, %o2
200d458: 40 00 07 6c call 200f208 <rtems_task_mode>
200d45c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
200d460: 81 c7 e0 08 ret
200d464: 81 e8 00 00 restore
0200d270 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200d270: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
200d274: 80 a0 60 00 cmp %g1, 0
200d278: 22 80 00 0c be,a 200d2a8 <_RTEMS_tasks_Switch_extension+0x38>
200d27c: c2 02 61 5c ld [ %o1 + 0x15c ], %g1
tvp->tval = *tvp->ptr;
200d280: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->gval;
200d284: c6 00 60 08 ld [ %g1 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200d288: c8 00 80 00 ld [ %g2 ], %g4
200d28c: c8 20 60 0c st %g4, [ %g1 + 0xc ]
*tvp->ptr = tvp->gval;
200d290: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200d294: c2 00 40 00 ld [ %g1 ], %g1
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200d298: 80 a0 60 00 cmp %g1, 0
200d29c: 32 bf ff fa bne,a 200d284 <_RTEMS_tasks_Switch_extension+0x14><== NEVER TAKEN
200d2a0: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200d2a4: c2 02 61 5c ld [ %o1 + 0x15c ], %g1
while (tvp) {
200d2a8: 80 a0 60 00 cmp %g1, 0
200d2ac: 02 80 00 0b be 200d2d8 <_RTEMS_tasks_Switch_extension+0x68>
200d2b0: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200d2b4: c4 00 60 04 ld [ %g1 + 4 ], %g2
*tvp->ptr = tvp->tval;
200d2b8: 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;
200d2bc: c8 00 80 00 ld [ %g2 ], %g4
200d2c0: c8 20 60 08 st %g4, [ %g1 + 8 ]
*tvp->ptr = tvp->tval;
200d2c4: c6 20 80 00 st %g3, [ %g2 ]
tvp = (rtems_task_variable_t *)tvp->next;
200d2c8: c2 00 40 00 ld [ %g1 ], %g1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200d2cc: 80 a0 60 00 cmp %g1, 0
200d2d0: 32 bf ff fa bne,a 200d2b8 <_RTEMS_tasks_Switch_extension+0x48><== NEVER TAKEN
200d2d4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
200d2d8: 81 c3 e0 08 retl
020439fc <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
20439fc: 9d e3 bf 98 save %sp, -104, %sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2043a00: fa 06 20 40 ld [ %i0 + 0x40 ], %i5
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2043a04: 7f ff a8 f3 call 202ddd0 <_TOD_Get_uptime>
2043a08: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2043a0c: d8 1e 20 50 ldd [ %i0 + 0x50 ], %o4
_Timestamp_Subtract(
2043a10: c4 1f bf f8 ldd [ %fp + -8 ], %g2
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2043a14: 03 00 81 d0 sethi %hi(0x2074000), %g1
2043a18: 82 10 61 a0 or %g1, 0x1a0, %g1 ! 20741a0 <_Per_CPU_Information>
2043a1c: c8 00 60 0c ld [ %g1 + 0xc ], %g4
2043a20: 9a a0 c0 0d subcc %g3, %o5, %o5
2043a24: 98 60 80 0c subx %g2, %o4, %o4
2043a28: d8 3e 40 00 std %o4, [ %i1 ]
2043a2c: 80 a1 00 1d cmp %g4, %i5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
2043a30: d8 1f 60 80 ldd [ %i5 + 0x80 ], %o4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2043a34: 02 80 00 05 be 2043a48 <_Rate_monotonic_Get_status+0x4c>
2043a38: b2 10 20 01 mov 1, %i1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
2043a3c: b0 0e 60 01 and %i1, 1, %i0
2043a40: 81 c7 e0 08 ret
2043a44: 81 e8 00 00 restore
2043a48: d4 18 60 20 ldd [ %g1 + 0x20 ], %o2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2043a4c: f0 1e 20 48 ldd [ %i0 + 0x48 ], %i0
2043a50: 86 a0 c0 0b subcc %g3, %o3, %g3
2043a54: 84 60 80 0a subx %g2, %o2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2043a58: 86 83 40 03 addcc %o5, %g3, %g3
2043a5c: 84 43 00 02 addx %o4, %g2, %g2
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2043a60: 80 a6 00 02 cmp %i0, %g2
2043a64: 34 bf ff f6 bg,a 2043a3c <_Rate_monotonic_Get_status+0x40><== NEVER TAKEN
2043a68: b2 10 20 00 clr %i1 <== NOT EXECUTED
2043a6c: 02 80 00 09 be 2043a90 <_Rate_monotonic_Get_status+0x94>
2043a70: 80 a6 40 03 cmp %i1, %g3
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2043a74: 86 a0 c0 19 subcc %g3, %i1, %g3
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
2043a78: b2 10 20 01 mov 1, %i1
2043a7c: 84 60 80 18 subx %g2, %i0, %g2
}
2043a80: b0 0e 60 01 and %i1, 1, %i0
2043a84: c4 3e 80 00 std %g2, [ %i2 ]
2043a88: 81 c7 e0 08 ret
2043a8c: 81 e8 00 00 restore
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2043a90: 28 bf ff fa bleu,a 2043a78 <_Rate_monotonic_Get_status+0x7c>
2043a94: 86 a0 c0 19 subcc %g3, %i1, %g3
return false;
2043a98: 10 bf ff e9 b 2043a3c <_Rate_monotonic_Get_status+0x40>
2043a9c: b2 10 20 00 clr %i1
02043e3c <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2043e3c: 9d e3 bf 98 save %sp, -104, %sp
2043e40: 11 00 81 d1 sethi %hi(0x2074400), %o0
2043e44: 92 10 00 18 mov %i0, %o1
2043e48: 90 12 20 70 or %o0, 0x70, %o0
2043e4c: 7f ff 2f 28 call 200faec <_Objects_Get>
2043e50: 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 ) {
2043e54: c2 07 bf fc ld [ %fp + -4 ], %g1
2043e58: 80 a0 60 00 cmp %g1, 0
2043e5c: 12 80 00 17 bne 2043eb8 <_Rate_monotonic_Timeout+0x7c> <== NEVER TAKEN
2043e60: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2043e64: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2043e68: 03 00 00 10 sethi %hi(0x4000), %g1
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
2043e6c: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2043e70: 80 88 80 01 btst %g2, %g1
2043e74: 22 80 00 08 be,a 2043e94 <_Rate_monotonic_Timeout+0x58>
2043e78: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2043e7c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2043e80: c2 07 60 08 ld [ %i5 + 8 ], %g1
2043e84: 80 a0 80 01 cmp %g2, %g1
2043e88: 02 80 00 1a be 2043ef0 <_Rate_monotonic_Timeout+0xb4>
2043e8c: 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 ) {
2043e90: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
2043e94: 80 a0 60 01 cmp %g1, 1
2043e98: 02 80 00 0a be 2043ec0 <_Rate_monotonic_Timeout+0x84>
2043e9c: 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;
2043ea0: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2043ea4: 03 00 81 cf sethi %hi(0x2073c00), %g1
2043ea8: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level>
2043eac: 84 00 bf ff add %g2, -1, %g2
2043eb0: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
2043eb4: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
2043eb8: 81 c7 e0 08 ret
2043ebc: 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;
2043ec0: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
2043ec4: 90 10 00 1d mov %i5, %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;
2043ec8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
2043ecc: 7f ff ff 44 call 2043bdc <_Rate_monotonic_Initiate_statistics>
2043ed0: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043ed4: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043ed8: 11 00 81 d0 sethi %hi(0x2074000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043edc: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043ee0: 90 12 20 30 or %o0, 0x30, %o0
2043ee4: 7f ff 36 5d call 2011858 <_Watchdog_Insert>
2043ee8: 92 07 60 10 add %i5, 0x10, %o1
2043eec: 30 bf ff ee b,a 2043ea4 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2043ef0: 7f ff 31 f1 call 20106b4 <_Thread_Clear_state>
2043ef4: 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 );
2043ef8: 10 bf ff f5 b 2043ecc <_Rate_monotonic_Timeout+0x90>
2043efc: 90 10 00 1d mov %i5, %o0
02043aa0 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
2043aa0: 9d e3 bf 90 save %sp, -112, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2043aa4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2043aa8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2043aac: 84 00 a0 01 inc %g2
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2043ab0: 80 a0 60 04 cmp %g1, 4
2043ab4: 02 80 00 46 be 2043bcc <_Rate_monotonic_Update_statistics+0x12c>
2043ab8: c4 26 20 58 st %g2, [ %i0 + 0x58 ]
stats->missed_count++;
/*
* Grab status for time statistics.
*/
valid_status =
2043abc: 90 10 00 18 mov %i0, %o0
2043ac0: 92 07 bf f8 add %fp, -8, %o1
2043ac4: 7f ff ff ce call 20439fc <_Rate_monotonic_Get_status>
2043ac8: 94 07 bf f0 add %fp, -16, %o2
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
2043acc: 80 8a 20 ff btst 0xff, %o0
2043ad0: 02 80 00 21 be 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
2043ad4: c4 1f bf f0 ldd [ %fp + -16 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2043ad8: d8 1e 20 70 ldd [ %i0 + 0x70 ], %o4
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2043adc: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2043ae0: 9a 83 40 03 addcc %o5, %g3, %o5
2043ae4: 98 43 00 02 addx %o4, %g2, %o4
2043ae8: 80 a0 40 02 cmp %g1, %g2
2043aec: 04 80 00 1c ble 2043b5c <_Rate_monotonic_Update_statistics+0xbc>
2043af0: d8 3e 20 70 std %o4, [ %i0 + 0x70 ]
stats->min_cpu_time = executed;
2043af4: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2043af8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2043afc: 80 a0 40 02 cmp %g1, %g2
2043b00: 26 80 00 05 bl,a 2043b14 <_Rate_monotonic_Update_statistics+0x74><== NEVER TAKEN
2043b04: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED
2043b08: 80 a0 40 02 cmp %g1, %g2
2043b0c: 22 80 00 2b be,a 2043bb8 <_Rate_monotonic_Update_statistics+0x118><== ALWAYS TAKEN
2043b10: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
2043b14: c4 1f bf f8 ldd [ %fp + -8 ], %g2
2043b18: d8 1e 20 88 ldd [ %i0 + 0x88 ], %o4
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2043b1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2043b20: 9a 83 40 03 addcc %o5, %g3, %o5
2043b24: 98 43 00 02 addx %o4, %g2, %o4
2043b28: 80 a0 40 02 cmp %g1, %g2
2043b2c: 14 80 00 1e bg 2043ba4 <_Rate_monotonic_Update_statistics+0x104>
2043b30: d8 3e 20 88 std %o4, [ %i0 + 0x88 ]
2043b34: 80 a0 40 02 cmp %g1, %g2
2043b38: 22 80 00 18 be,a 2043b98 <_Rate_monotonic_Update_statistics+0xf8><== ALWAYS TAKEN
2043b3c: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043b40: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2043b44: 80 a0 40 02 cmp %g1, %g2
2043b48: 16 80 00 0d bge 2043b7c <_Rate_monotonic_Update_statistics+0xdc><== ALWAYS TAKEN
2043b4c: 01 00 00 00 nop
stats->max_wall_time = since_last_period;
2043b50: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
2043b54: 81 c7 e0 08 ret
2043b58: 81 e8 00 00 restore
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2043b5c: 32 bf ff e8 bne,a 2043afc <_Rate_monotonic_Update_statistics+0x5c><== NEVER TAKEN
2043b60: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
2043b64: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
2043b68: 80 a0 40 03 cmp %g1, %g3
2043b6c: 28 bf ff e4 bleu,a 2043afc <_Rate_monotonic_Update_statistics+0x5c>
2043b70: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
2043b74: 10 bf ff e1 b 2043af8 <_Rate_monotonic_Update_statistics+0x58>
2043b78: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043b7c: 12 bf ff f6 bne 2043b54 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
2043b80: 01 00 00 00 nop
2043b84: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2043b88: 80 a0 40 03 cmp %g1, %g3
2043b8c: 2a bf ff f2 bcs,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
2043b90: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
2043b94: 30 bf ff f0 b,a 2043b54 <_Rate_monotonic_Update_statistics+0xb4>
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2043b98: 80 a0 40 03 cmp %g1, %g3
2043b9c: 28 bf ff ea bleu,a 2043b44 <_Rate_monotonic_Update_statistics+0xa4>
2043ba0: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2043ba4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2043ba8: 80 a0 40 02 cmp %g1, %g2
2043bac: 06 bf ff e9 bl 2043b50 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN
2043bb0: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
2043bb4: 30 bf ff f2 b,a 2043b7c <_Rate_monotonic_Update_statistics+0xdc>
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
stats->min_cpu_time = executed;
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2043bb8: 80 a0 40 03 cmp %g1, %g3
2043bbc: 3a bf ff d7 bcc,a 2043b18 <_Rate_monotonic_Update_statistics+0x78>
2043bc0: c4 1f bf f8 ldd [ %fp + -8 ], %g2
stats->max_cpu_time = executed;
2043bc4: 10 bf ff d4 b 2043b14 <_Rate_monotonic_Update_statistics+0x74>
2043bc8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ]
*/
stats = &the_period->Statistics;
stats->count++;
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
stats->missed_count++;
2043bcc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2043bd0: 82 00 60 01 inc %g1
2043bd4: 10 bf ff ba b 2043abc <_Rate_monotonic_Update_statistics+0x1c>
2043bd8: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
0200ba90 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200ba90: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200ba94: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200ba98: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200ba9c: 80 a0 40 09 cmp %g1, %o1
200baa0: 32 80 00 02 bne,a 200baa8 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200baa4: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200baa8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200baac: 80 a0 40 09 cmp %g1, %o1
200bab0: 02 80 00 04 be 200bac0 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200bab4: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200bab8: 40 00 01 99 call 200c11c <_Thread_Change_priority>
200babc: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200bac0: f0 06 20 88 ld [ %i0 + 0x88 ], %i0
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200bac4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200bac8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200bacc: 80 a0 a0 00 cmp %g2, 0
200bad0: 02 80 00 09 be 200baf4 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200bad4: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200bad8: d0 00 40 00 ld [ %g1 ], %o0
200badc: 7f ff ff d1 call 200ba20 <_Scheduler_CBS_Get_server_id>
200bae0: 92 07 bf fc add %fp, -4, %o1
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
200bae4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200bae8: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200baec: 9f c0 40 00 call %g1
200baf0: d0 07 bf fc ld [ %fp + -4 ], %o0
200baf4: 81 c7 e0 08 ret
200baf8: 81 e8 00 00 restore
0200b5f8 <_Scheduler_CBS_Cleanup>:
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Cleanup (void)
{
200b5f8: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b5fc: 39 00 80 7f sethi %hi(0x201fc00), %i4
200b600: c2 07 22 e8 ld [ %i4 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b604: 80 a0 60 00 cmp %g1, 0
200b608: 02 80 00 18 be 200b668 <_Scheduler_CBS_Cleanup+0x70> <== NEVER TAKEN
200b60c: 03 00 80 83 sethi %hi(0x2020c00), %g1
200b610: 37 00 80 83 sethi %hi(0x2020c00), %i3
200b614: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2 ! 2020e38 <_Scheduler_CBS_Server_list>
200b618: ba 10 20 00 clr %i5
200b61c: b8 17 22 e8 or %i4, 0x2e8, %i4
if ( _Scheduler_CBS_Server_list[ i ] )
200b620: 83 2f 60 02 sll %i5, 2, %g1
200b624: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200b628: 80 a0 60 00 cmp %g1, 0
200b62c: 02 80 00 05 be 200b640 <_Scheduler_CBS_Cleanup+0x48>
200b630: 90 10 00 1d mov %i5, %o0
_Scheduler_CBS_Destroy_server( i );
200b634: 40 00 00 45 call 200b748 <_Scheduler_CBS_Destroy_server>
200b638: 01 00 00 00 nop
200b63c: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b640: c2 07 00 00 ld [ %i4 ], %g1
200b644: ba 07 60 01 inc %i5
200b648: 80 a0 40 1d cmp %g1, %i5
200b64c: 18 bf ff f6 bgu 200b624 <_Scheduler_CBS_Cleanup+0x2c>
200b650: 83 2f 60 02 sll %i5, 2, %g1
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
return SCHEDULER_CBS_OK;
}
200b654: b0 10 20 00 clr %i0
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[ i ] )
_Scheduler_CBS_Destroy_server( i );
}
_Workspace_Free( _Scheduler_CBS_Server_list );
200b658: 40 00 08 51 call 200d79c <_Workspace_Free>
200b65c: 90 10 00 02 mov %g2, %o0
return SCHEDULER_CBS_OK;
}
200b660: 81 c7 e0 08 ret
200b664: 81 e8 00 00 restore
int _Scheduler_CBS_Cleanup (void)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b668: 10 bf ff fb b 200b654 <_Scheduler_CBS_Cleanup+0x5c> <== NOT EXECUTED
200b66c: c4 00 62 38 ld [ %g1 + 0x238 ], %g2 <== NOT EXECUTED
0200b670 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200b670: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200b674: c2 06 20 04 ld [ %i0 + 4 ], %g1
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200b678: ba 10 00 18 mov %i0, %i5
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200b67c: 80 a0 60 00 cmp %g1, 0
200b680: 04 80 00 30 ble 200b740 <_Scheduler_CBS_Create_server+0xd0>
200b684: b0 10 3f ee mov -18, %i0
200b688: c2 07 40 00 ld [ %i5 ], %g1
200b68c: 80 a0 60 00 cmp %g1, 0
200b690: 04 80 00 2c ble 200b740 <_Scheduler_CBS_Create_server+0xd0>
200b694: 03 00 80 7f sethi %hi(0x201fc00), %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b698: c6 00 62 e8 ld [ %g1 + 0x2e8 ], %g3 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b69c: 80 a0 e0 00 cmp %g3, 0
200b6a0: 02 80 00 28 be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200b6a4: b0 10 3f e6 mov -26, %i0
if ( !_Scheduler_CBS_Server_list[i] )
200b6a8: 37 00 80 83 sethi %hi(0x2020c00), %i3
200b6ac: f8 06 e2 38 ld [ %i3 + 0x238 ], %i4 ! 2020e38 <_Scheduler_CBS_Server_list>
200b6b0: c2 07 00 00 ld [ %i4 ], %g1
200b6b4: 80 a0 60 00 cmp %g1, 0
200b6b8: 02 80 00 0e be 200b6f0 <_Scheduler_CBS_Create_server+0x80>
200b6bc: 82 10 20 00 clr %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b6c0: 10 80 00 07 b 200b6dc <_Scheduler_CBS_Create_server+0x6c>
200b6c4: 82 00 60 01 inc %g1
if ( !_Scheduler_CBS_Server_list[i] )
200b6c8: c4 07 00 18 ld [ %i4 + %i0 ], %g2
200b6cc: 80 a0 a0 00 cmp %g2, 0
200b6d0: 22 80 00 0a be,a 200b6f8 <_Scheduler_CBS_Create_server+0x88>
200b6d4: c2 26 80 00 st %g1, [ %i2 ]
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b6d8: 82 00 60 01 inc %g1
200b6dc: 80 a0 40 03 cmp %g1, %g3
200b6e0: 12 bf ff fa bne 200b6c8 <_Scheduler_CBS_Create_server+0x58>
200b6e4: b1 28 60 02 sll %g1, 2, %i0
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
200b6e8: 81 c7 e0 08 ret
200b6ec: 91 e8 3f e6 restore %g0, -26, %o0
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
200b6f0: b0 10 20 00 clr %i0
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200b6f4: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200b6f8: 40 00 08 21 call 200d77c <_Workspace_Allocate>
200b6fc: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200b700: c2 06 80 00 ld [ %i2 ], %g1
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200b704: d0 27 00 18 st %o0, [ %i4 + %i0 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200b708: c4 06 e2 38 ld [ %i3 + 0x238 ], %g2
200b70c: 83 28 60 02 sll %g1, 2, %g1
200b710: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200b714: 80 a0 60 00 cmp %g1, 0
200b718: 02 80 00 0a be 200b740 <_Scheduler_CBS_Create_server+0xd0><== NEVER TAKEN
200b71c: b0 10 3f ef mov -17, %i0
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b720: c4 07 40 00 ld [ %i5 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200b724: b0 10 20 00 clr %i0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b728: c4 20 60 04 st %g2, [ %g1 + 4 ]
200b72c: c4 07 60 04 ld [ %i5 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200b730: f2 20 60 0c st %i1, [ %g1 + 0xc ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b734: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200b738: 84 10 3f ff mov -1, %g2
200b73c: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
200b740: 81 c7 e0 08 ret
200b744: 81 e8 00 00 restore
0200b7b8 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200b7b8: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
200b7bc: 92 07 bf fc add %fp, -4, %o1
200b7c0: 40 00 03 a1 call 200c644 <_Thread_Get>
200b7c4: 90 10 00 19 mov %i1, %o0
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200b7c8: ba 92 20 00 orcc %o0, 0, %i5
200b7cc: 22 80 00 05 be,a 200b7e0 <_Scheduler_CBS_Detach_thread+0x28>
200b7d0: 03 00 80 7f sethi %hi(0x201fc00), %g1
_Thread_Enable_dispatch();
200b7d4: 40 00 03 8f call 200c610 <_Thread_Enable_dispatch>
200b7d8: 01 00 00 00 nop
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
200b7dc: 03 00 80 7f sethi %hi(0x201fc00), %g1
200b7e0: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
200b7e4: 80 a0 80 18 cmp %g2, %i0
200b7e8: 08 80 00 1b bleu 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b7ec: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200b7f0: 80 a7 60 00 cmp %i5, 0
200b7f4: 02 80 00 18 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b7f8: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200b7fc: 03 00 80 83 sethi %hi(0x2020c00), %g1
200b800: c2 00 62 38 ld [ %g1 + 0x238 ], %g1 ! 2020e38 <_Scheduler_CBS_Server_list>
200b804: b1 2e 20 02 sll %i0, 2, %i0
200b808: c4 00 40 18 ld [ %g1 + %i0 ], %g2
200b80c: 80 a0 a0 00 cmp %g2, 0
200b810: 02 80 00 11 be 200b854 <_Scheduler_CBS_Detach_thread+0x9c>
200b814: 82 10 3f e7 mov -25, %g1
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
200b818: c6 00 80 00 ld [ %g2 ], %g3
200b81c: 80 a0 c0 19 cmp %g3, %i1
200b820: 12 80 00 0d bne 200b854 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200b824: 82 10 3f ee mov -18, %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200b828: c8 07 60 88 ld [ %i5 + 0x88 ], %g4
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200b82c: 82 10 3f ff mov -1, %g1
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b830: c6 07 60 a0 ld [ %i5 + 0xa0 ], %g3
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200b834: c2 20 80 00 st %g1, [ %g2 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200b838: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200b83c: c4 07 60 a4 ld [ %i5 + 0xa4 ], %g2
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200b840: c0 21 20 18 clr [ %g4 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200b844: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b848: c6 27 60 78 st %g3, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200b84c: c4 27 60 7c st %g2, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
200b850: 82 10 20 00 clr %g1
}
200b854: 81 c7 e0 08 ret
200b858: 91 e8 00 01 restore %g0, %g1, %o0
0200ba20 <_Scheduler_CBS_Get_server_id>:
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200ba20: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba24: 03 00 80 7f sethi %hi(0x201fc00), %g1
200ba28: c2 00 62 e8 ld [ %g1 + 0x2e8 ], %g1 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
int _Scheduler_CBS_Get_server_id (
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
200ba2c: 84 10 00 18 mov %i0, %g2
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba30: 80 a0 60 00 cmp %g1, 0
200ba34: 02 80 00 13 be 200ba80 <_Scheduler_CBS_Get_server_id+0x60><== NEVER TAKEN
200ba38: b0 10 3f e7 mov -25, %i0
200ba3c: 07 00 80 83 sethi %hi(0x2020c00), %g3
200ba40: de 00 e2 38 ld [ %g3 + 0x238 ], %o7 ! 2020e38 <_Scheduler_CBS_Server_list>
200ba44: 86 10 20 00 clr %g3
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Get_server_id (
200ba48: 89 28 e0 02 sll %g3, 2, %g4
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
200ba4c: c8 03 c0 04 ld [ %o7 + %g4 ], %g4
200ba50: 80 a1 20 00 cmp %g4, 0
200ba54: 22 80 00 07 be,a 200ba70 <_Scheduler_CBS_Get_server_id+0x50>
200ba58: 86 00 e0 01 inc %g3
200ba5c: c8 01 00 00 ld [ %g4 ], %g4
200ba60: 80 a1 00 02 cmp %g4, %g2
200ba64: 22 80 00 09 be,a 200ba88 <_Scheduler_CBS_Get_server_id+0x68>
200ba68: c6 26 40 00 st %g3, [ %i1 ]
rtems_id task_id,
Scheduler_CBS_Server_id *server_id
)
{
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200ba6c: 86 00 e0 01 inc %g3
200ba70: 80 a0 c0 01 cmp %g3, %g1
200ba74: 12 bf ff f6 bne 200ba4c <_Scheduler_CBS_Get_server_id+0x2c>
200ba78: 89 28 e0 02 sll %g3, 2, %g4
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
}
}
return SCHEDULER_CBS_ERROR_NOSERVER;
200ba7c: b0 10 3f e7 mov -25, %i0
}
200ba80: 81 c7 e0 08 ret
200ba84: 81 e8 00 00 restore
unsigned int i;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( _Scheduler_CBS_Server_list[i] &&
_Scheduler_CBS_Server_list[i]->task_id == task_id ) {
*server_id = i;
return SCHEDULER_CBS_OK;
200ba88: 81 c7 e0 08 ret
200ba8c: 91 e8 20 00 restore %g0, 0, %o0
0200bafc <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200bafc: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
200bb00: 3b 00 80 7f sethi %hi(0x201fc00), %i5
200bb04: d0 07 62 e8 ld [ %i5 + 0x2e8 ], %o0 ! 201fee8 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
200bb08: b0 10 3f ef mov -17, %i0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200bb0c: 40 00 07 1c call 200d77c <_Workspace_Allocate>
200bb10: 91 2a 20 02 sll %o0, 2, %o0
200bb14: 09 00 80 83 sethi %hi(0x2020c00), %g4
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200bb18: 80 a2 20 00 cmp %o0, 0
200bb1c: 02 80 00 0f be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200bb20: d0 21 22 38 st %o0, [ %g4 + 0x238 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200bb24: c6 07 62 e8 ld [ %i5 + 0x2e8 ], %g3
200bb28: 80 a0 e0 00 cmp %g3, 0
200bb2c: 02 80 00 0b be 200bb58 <_Scheduler_CBS_Initialize+0x5c> <== NEVER TAKEN
200bb30: b0 10 20 00 clr %i0
200bb34: 10 80 00 03 b 200bb40 <_Scheduler_CBS_Initialize+0x44>
200bb38: 82 10 20 00 clr %g1
200bb3c: d0 01 22 38 ld [ %g4 + 0x238 ], %o0
_Scheduler_CBS_Server_list[i] = NULL;
200bb40: 85 28 60 02 sll %g1, 2, %g2
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200bb44: 82 00 60 01 inc %g1
200bb48: 80 a0 40 03 cmp %g1, %g3
200bb4c: 12 bf ff fc bne 200bb3c <_Scheduler_CBS_Initialize+0x40>
200bb50: c0 22 00 02 clr [ %o0 + %g2 ]
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200bb54: b0 10 20 00 clr %i0
}
200bb58: 81 c7 e0 08 ret
200bb5c: 81 e8 00 00 restore
0200a654 <_Scheduler_CBS_Release_job>:
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
200a654: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
200a658: 80 a2 60 00 cmp %o1, 0
200a65c: 02 80 00 11 be 200a6a0 <_Scheduler_CBS_Release_job+0x4c>
200a660: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
200a664: 80 a0 60 00 cmp %g1, 0
200a668: 02 80 00 13 be 200a6b4 <_Scheduler_CBS_Release_job+0x60>
200a66c: 07 00 80 7c sethi %hi(0x201f000), %g3
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
200a670: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a674: d2 00 e0 d0 ld [ %g3 + 0xd0 ], %o1
200a678: 92 02 40 02 add %o1, %g2, %o1
200a67c: 05 20 00 00 sethi %hi(0x80000000), %g2
200a680: 92 2a 40 02 andn %o1, %g2, %o1
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
the_thread->cpu_time_budget = serv_info->parameters.budget;
200a684: c2 00 60 08 ld [ %g1 + 8 ], %g1
200a688: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
200a68c: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
200a690: 94 10 20 01 mov 1, %o2
200a694: 82 13 c0 00 mov %o7, %g1
200a698: 40 00 01 45 call 200abac <_Thread_Change_priority>
200a69c: 9e 10 40 00 mov %g1, %o7
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
200a6a0: 80 a0 60 00 cmp %g1, 0
200a6a4: 12 bf ff f8 bne 200a684 <_Scheduler_CBS_Release_job+0x30> <== ALWAYS TAKEN
200a6a8: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
the_thread->real_priority = new_priority;
200a6ac: 10 bf ff f9 b 200a690 <_Scheduler_CBS_Release_job+0x3c> <== NOT EXECUTED
200a6b0: d2 22 20 18 st %o1, [ %o0 + 0x18 ] <== NOT EXECUTED
/* Initializing or shifting deadline. */
if (serv_info)
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
200a6b4: 03 00 80 7c sethi %hi(0x201f000), %g1
200a6b8: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 201f0d0 <_Watchdog_Ticks_since_boot>
200a6bc: 92 02 40 01 add %o1, %g1, %o1
200a6c0: 03 20 00 00 sethi %hi(0x80000000), %g1
200a6c4: 10 bf ff f2 b 200a68c <_Scheduler_CBS_Release_job+0x38>
200a6c8: 92 2a 40 01 andn %o1, %g1, %o1
0200a6cc <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
200a6cc: 9d e3 bf a0 save %sp, -96, %sp
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
200a6d0: 40 00 00 5b call 200a83c <_Scheduler_EDF_Enqueue>
200a6d4: 90 10 00 18 mov %i0, %o0
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
200a6d8: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
200a6dc: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
200a6e0: 80 a7 60 00 cmp %i5, 0
200a6e4: 02 80 00 19 be 200a748 <_Scheduler_CBS_Unblock+0x7c>
200a6e8: 03 00 80 7c sethi %hi(0x201f000), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a6ec: d2 07 60 04 ld [ %i5 + 4 ], %o1
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
200a6f0: d0 00 60 d0 ld [ %g1 + 0xd0 ], %o0
200a6f4: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a6f8: 40 00 3e 3a call 2019fe0 <.umul>
200a6fc: 90 27 00 08 sub %i4, %o0, %o0
200a700: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
200a704: b6 10 00 08 mov %o0, %i3
200a708: 40 00 3e 36 call 2019fe0 <.umul>
200a70c: d0 07 60 08 ld [ %i5 + 8 ], %o0
200a710: 80 a6 c0 08 cmp %i3, %o0
200a714: 24 80 00 0e ble,a 200a74c <_Scheduler_CBS_Unblock+0x80>
200a718: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200a71c: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200a720: 80 a7 00 09 cmp %i4, %o1
200a724: 32 80 00 02 bne,a 200a72c <_Scheduler_CBS_Unblock+0x60>
200a728: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200a72c: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
200a730: 80 a2 00 09 cmp %o0, %o1
200a734: 02 80 00 07 be 200a750 <_Scheduler_CBS_Unblock+0x84>
200a738: 3b 00 80 7c sethi %hi(0x201f000), %i5
_Thread_Change_priority(the_thread, new_priority, true);
200a73c: 90 10 00 18 mov %i0, %o0
200a740: 40 00 01 1b call 200abac <_Thread_Change_priority>
200a744: 94 10 20 01 mov 1, %o2
200a748: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
* 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
200a74c: 3b 00 80 7c sethi %hi(0x201f000), %i5
200a750: ba 17 61 f0 or %i5, 0x1f0, %i5 ! 201f1f0 <_Per_CPU_Information>
200a754: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a758: d2 00 60 14 ld [ %g1 + 0x14 ], %o1
200a75c: 03 00 80 78 sethi %hi(0x201e000), %g1
200a760: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 201e2fc <_Scheduler+0x30>
200a764: 9f c0 40 00 call %g1
200a768: 01 00 00 00 nop
200a76c: 80 a2 20 00 cmp %o0, 0
200a770: 04 80 00 0a ble 200a798 <_Scheduler_CBS_Unblock+0xcc>
200a774: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a778: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* 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 ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
200a77c: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a780: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a784: 80 a0 60 00 cmp %g1, 0
200a788: 22 80 00 06 be,a 200a7a0 <_Scheduler_CBS_Unblock+0xd4>
200a78c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a790: 82 10 20 01 mov 1, %g1
200a794: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
200a798: 81 c7 e0 08 ret
200a79c: 81 e8 00 00 restore
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a7a0: 80 a0 60 00 cmp %g1, 0
200a7a4: 12 bf ff fd bne 200a798 <_Scheduler_CBS_Unblock+0xcc> <== ALWAYS TAKEN
200a7a8: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a7ac: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
200a7b0: 30 bf ff fa b,a 200a798 <_Scheduler_CBS_Unblock+0xcc> <== NOT EXECUTED
0200a7b4 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
200a7b4: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
200a7b8: 40 00 06 c4 call 200c2c8 <_Workspace_Allocate>
200a7bc: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
200a7c0: 80 a2 20 00 cmp %o0, 0
200a7c4: 02 80 00 05 be 200a7d8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
200a7c8: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
200a7cc: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
200a7d0: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
200a7d4: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
200a7d8: 81 c7 e0 08 ret
200a7dc: 91 e8 00 08 restore %g0, %o0, %o0
0200a844 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
200a844: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
200a848: 7f ff ff a5 call 200a6dc <_Scheduler_EDF_Enqueue>
200a84c: 90 10 00 18 mov %i0, %o0
* 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 ( _Scheduler_Is_priority_lower_than(
200a850: 3b 00 80 7c sethi %hi(0x201f000), %i5
200a854: ba 17 61 50 or %i5, 0x150, %i5 ! 201f150 <_Per_CPU_Information>
200a858: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a85c: d0 00 60 14 ld [ %g1 + 0x14 ], %o0
200a860: 03 00 80 78 sethi %hi(0x201e000), %g1
200a864: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 201e25c <_Scheduler+0x30>
200a868: 9f c0 40 00 call %g1
200a86c: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
200a870: 80 a2 20 00 cmp %o0, 0
200a874: 26 80 00 04 bl,a 200a884 <_Scheduler_EDF_Unblock+0x40>
200a878: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200a87c: 81 c7 e0 08 ret
200a880: 81 e8 00 00 restore
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
200a884: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a888: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a88c: 80 a0 60 00 cmp %g1, 0
200a890: 22 80 00 06 be,a 200a8a8 <_Scheduler_EDF_Unblock+0x64>
200a894: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a898: 82 10 20 01 mov 1, %g1
200a89c: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ]
200a8a0: 81 c7 e0 08 ret
200a8a4: 81 e8 00 00 restore
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a8a8: 80 a0 60 00 cmp %g1, 0
200a8ac: 12 bf ff f4 bne 200a87c <_Scheduler_EDF_Unblock+0x38> <== ALWAYS TAKEN
200a8b0: 82 10 20 01 mov 1, %g1
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a8b4: c2 2f 60 18 stb %g1, [ %i5 + 0x18 ] <== NOT EXECUTED
200a8b8: 30 bf ff fa b,a 200a8a0 <_Scheduler_EDF_Unblock+0x5c> <== NOT EXECUTED
0200a848 <_Scheduler_simple_Ready_queue_enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
200a848: 03 00 80 75 sethi %hi(0x201d400), %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200a84c: c2 00 63 1c ld [ %g1 + 0x31c ], %g1 ! 201d71c <_Scheduler>
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
200a850: c6 02 20 14 ld [ %o0 + 0x14 ], %g3
200a854: c2 00 40 00 ld [ %g1 ], %g1
200a858: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200a85c: 80 a0 80 03 cmp %g2, %g3
200a860: 3a 80 00 08 bcc,a 200a880 <_Scheduler_simple_Ready_queue_enqueue_first+0x38>
200a864: c2 00 60 04 ld [ %g1 + 4 ], %g1
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
200a868: c2 00 40 00 ld [ %g1 ], %g1
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
200a86c: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200a870: 80 a0 80 03 cmp %g2, %g3
200a874: 2a bf ff fe bcs,a 200a86c <_Scheduler_simple_Ready_queue_enqueue_first+0x24><== NEVER TAKEN
200a878: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
current = (Thread_Control *)current->Object.Node.previous;
200a87c: c2 00 60 04 ld [ %g1 + 4 ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
200a880: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
200a884: c2 22 20 04 st %g1, [ %o0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
200a888: d0 20 40 00 st %o0, [ %g1 ]
the_node->next = before_node;
200a88c: c4 22 00 00 st %g2, [ %o0 ]
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
200a890: 81 c3 e0 08 retl
200a894: d0 20 a0 04 st %o0, [ %g2 + 4 ]
02008cc4 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
2008cc4: 9d e3 bf a0 save %sp, -96, %sp
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008cc8: 09 00 80 75 sethi %hi(0x201d400), %g4
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008ccc: 05 00 80 71 sethi %hi(0x201c400), %g2
2008cd0: d8 19 20 30 ldd [ %g4 + 0x30 ], %o4
2008cd4: c6 00 a2 5c ld [ %g2 + 0x25c ], %g3
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008cd8: 03 00 80 75 sethi %hi(0x201d400), %g1
2008cdc: f8 18 60 40 ldd [ %g1 + 0x40 ], %i4 ! 201d440 <_TOD_Now>
2008ce0: 9f 28 e0 07 sll %g3, 7, %o7
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008ce4: 37 00 80 75 sethi %hi(0x201d400), %i3
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008ce8: 85 28 e0 02 sll %g3, 2, %g2
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008cec: f4 06 e0 c0 ld [ %i3 + 0xc0 ], %i2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
2008cf0: 84 23 c0 02 sub %o7, %g2, %g2
2008cf4: 84 00 80 03 add %g2, %g3, %g2
2008cf8: 85 28 a0 03 sll %g2, 3, %g2
2008cfc: 86 10 00 02 mov %g2, %g3
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d00: 9a 80 c0 0d addcc %g3, %o5, %o5
2008d04: 84 10 20 00 clr %g2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d08: 92 10 00 1d mov %i5, %o1
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d0c: 98 40 80 0c addx %g2, %o4, %o4
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
2008d10: ba 80 c0 1d addcc %g3, %i5, %i5
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
2008d14: b4 06 a0 01 inc %i2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d18: 94 10 20 00 clr %o2
2008d1c: f4 26 e0 c0 st %i2, [ %i3 + 0xc0 ]
2008d20: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2008d24: d8 39 20 30 std %o4, [ %g4 + 0x30 ]
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
*_time += *_add;
2008d28: b8 40 80 1c addx %g2, %i4, %i4
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d2c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
*_time += *_add;
2008d30: f8 38 60 40 std %i4, [ %g1 + 0x40 ]
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d34: 40 00 3f d3 call 2018c80 <__divdi3>
2008d38: 96 12 e2 00 or %o3, 0x200, %o3
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008d3c: 94 10 20 00 clr %o2
static inline uint32_t _Timestamp64_Add_to_at_tick(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
Timestamp64_Control _start = *_time / 1000000000L;
2008d40: b6 10 00 08 mov %o0, %i3
2008d44: b4 10 00 09 mov %o1, %i2
*_time += *_add;
if ( ((*_time) / 1000000000L) != _start ) {
2008d48: 90 10 00 1c mov %i4, %o0
2008d4c: 92 10 00 1d mov %i5, %o1
2008d50: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2008d54: 40 00 3f cb call 2018c80 <__divdi3>
2008d58: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
2008d5c: 80 a6 c0 08 cmp %i3, %o0
2008d60: 02 80 00 05 be 2008d74 <_TOD_Tickle_ticks+0xb0> <== ALWAYS TAKEN
2008d64: 80 a6 80 09 cmp %i2, %o1
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
2008d68: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED
2008d6c: 40 00 0a 9e call 200b7e4 <_Watchdog_Tickle>
2008d70: 91 ee 20 64 restore %i0, 0x64, %o0
2008d74: 12 bf ff fe bne 2008d6c <_TOD_Tickle_ticks+0xa8>
2008d78: 31 00 80 75 sethi %hi(0x201d400), %i0
2008d7c: 81 c7 e0 08 ret
2008d80: 81 e8 00 00 restore
020089f0 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
20089f0: 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();
20089f4: 03 00 80 7b sethi %hi(0x201ec00), %g1
(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) )
return false;
20089f8: ba 10 20 00 clr %i5
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) ||
20089fc: 80 a6 20 00 cmp %i0, 0
2008a00: 02 80 00 2c be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a04: d2 00 60 fc ld [ %g1 + 0xfc ], %o1
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
2008a08: 11 00 03 d0 sethi %hi(0xf4000), %o0
2008a0c: 40 00 47 41 call 201a710 <.udiv>
2008a10: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
2008a14: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008a18: 80 a2 00 01 cmp %o0, %g1
2008a1c: 28 80 00 26 bleu,a 2008ab4 <_TOD_Validate+0xc4>
2008a20: b0 0f 60 01 and %i5, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
2008a24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2008a28: 80 a0 60 3b cmp %g1, 0x3b
2008a2c: 38 80 00 22 bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a30: b0 0f 60 01 and %i5, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
2008a34: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2008a38: 80 a0 60 3b cmp %g1, 0x3b
2008a3c: 38 80 00 1e bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a40: b0 0f 60 01 and %i5, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
2008a44: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2008a48: 80 a0 60 17 cmp %g1, 0x17
2008a4c: 38 80 00 1a bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a50: b0 0f 60 01 and %i5, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
2008a54: c2 06 20 04 ld [ %i0 + 4 ], %g1
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
2008a58: 80 a0 60 00 cmp %g1, 0
2008a5c: 02 80 00 15 be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a60: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2008a64: 38 80 00 14 bgu,a 2008ab4 <_TOD_Validate+0xc4>
2008a68: b0 0f 60 01 and %i5, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2008a6c: c4 06 00 00 ld [ %i0 ], %g2
(the_tod->ticks >= ticks_per_second) ||
(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) ||
2008a70: 80 a0 a7 c3 cmp %g2, 0x7c3
2008a74: 28 80 00 10 bleu,a 2008ab4 <_TOD_Validate+0xc4>
2008a78: b0 0f 60 01 and %i5, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
2008a7c: c6 06 20 08 ld [ %i0 + 8 ], %g3
(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) ||
2008a80: 80 a0 e0 00 cmp %g3, 0
2008a84: 02 80 00 0b be 2008ab0 <_TOD_Validate+0xc0> <== NEVER TAKEN
2008a88: 80 88 a0 03 btst 3, %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
2008a8c: 32 80 00 0c bne,a 2008abc <_TOD_Validate+0xcc>
2008a90: 83 28 60 02 sll %g1, 2, %g1
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2008a94: 82 00 60 0d add %g1, 0xd, %g1
2008a98: 05 00 80 76 sethi %hi(0x201d800), %g2
2008a9c: 83 28 60 02 sll %g1, 2, %g1
2008aa0: 84 10 a0 f8 or %g2, 0xf8, %g2
2008aa4: 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(
2008aa8: 80 a0 40 03 cmp %g1, %g3
2008aac: ba 60 3f ff subx %g0, -1, %i5
if ( the_tod->day > days_in_month )
return false;
return true;
}
2008ab0: b0 0f 60 01 and %i5, 1, %i0
2008ab4: 81 c7 e0 08 ret
2008ab8: 81 e8 00 00 restore
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 ];
2008abc: 05 00 80 76 sethi %hi(0x201d800), %g2
2008ac0: 84 10 a0 f8 or %g2, 0xf8, %g2 ! 201d8f8 <_TOD_Days_per_month>
2008ac4: 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(
2008ac8: 80 a0 40 03 cmp %g1, %g3
2008acc: 10 bf ff f9 b 2008ab0 <_TOD_Validate+0xc0>
2008ad0: ba 60 3f ff subx %g0, -1, %i5
0200a2b4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
200a2b4: 9d e3 bf a0 save %sp, -96, %sp
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
200a2b8: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
/*
* 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 );
200a2bc: 40 00 03 a3 call 200b148 <_Thread_Set_transient>
200a2c0: 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 )
200a2c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a2c8: 80 a0 40 19 cmp %g1, %i1
200a2cc: 02 80 00 05 be 200a2e0 <_Thread_Change_priority+0x2c>
200a2d0: ba 10 00 18 mov %i0, %i5
_Thread_Set_priority( the_thread, new_priority );
200a2d4: 90 10 00 18 mov %i0, %o0
200a2d8: 40 00 03 82 call 200b0e0 <_Thread_Set_priority>
200a2dc: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
200a2e0: 7f ff e0 f6 call 20026b8 <sparc_disable_interrupts>
200a2e4: 01 00 00 00 nop
200a2e8: b2 10 00 08 mov %o0, %i1
/*
* 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;
200a2ec: f6 07 60 10 ld [ %i5 + 0x10 ], %i3
if ( state != STATES_TRANSIENT ) {
200a2f0: 80 a6 e0 04 cmp %i3, 4
200a2f4: 02 80 00 18 be 200a354 <_Thread_Change_priority+0xa0>
200a2f8: 80 8f 20 04 btst 4, %i4
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
200a2fc: 02 80 00 0b be 200a328 <_Thread_Change_priority+0x74> <== ALWAYS TAKEN
200a300: 82 0e ff fb and %i3, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
200a304: 7f ff e0 f1 call 20026c8 <sparc_enable_interrupts> <== NOT EXECUTED
200a308: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
200a30c: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
200a310: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
if ( _States_Is_waiting_on_thread_queue( state ) ) {
200a314: 80 8e c0 01 btst %i3, %g1 <== NOT EXECUTED
200a318: 32 80 00 0d bne,a 200a34c <_Thread_Change_priority+0x98> <== NOT EXECUTED
200a31c: f0 07 60 44 ld [ %i5 + 0x44 ], %i0 <== NOT EXECUTED
200a320: 81 c7 e0 08 ret
200a324: 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 );
200a328: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
200a32c: 7f ff e0 e7 call 20026c8 <sparc_enable_interrupts>
200a330: 90 10 00 19 mov %i1, %o0
200a334: 03 00 00 ef sethi %hi(0x3bc00), %g1
200a338: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( state ) ) {
200a33c: 80 8e c0 01 btst %i3, %g1
200a340: 02 bf ff f8 be 200a320 <_Thread_Change_priority+0x6c>
200a344: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
200a348: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
200a34c: 40 00 03 34 call 200b01c <_Thread_queue_Requeue>
200a350: 93 e8 00 1d restore %g0, %i5, %o1
200a354: 39 00 80 71 sethi %hi(0x201c400), %i4
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
200a358: 12 80 00 08 bne 200a378 <_Thread_Change_priority+0xc4> <== NEVER TAKEN
200a35c: b8 17 23 3c or %i4, 0x33c, %i4 ! 201c73c <_Scheduler>
* 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 );
if ( prepend_it )
200a360: 80 a6 a0 00 cmp %i2, 0
200a364: 02 80 00 1b be 200a3d0 <_Thread_Change_priority+0x11c>
200a368: c0 27 60 10 clr [ %i5 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
200a36c: c2 07 20 28 ld [ %i4 + 0x28 ], %g1
200a370: 9f c0 40 00 call %g1
200a374: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
200a378: 7f ff e0 d4 call 20026c8 <sparc_enable_interrupts>
200a37c: 90 10 00 19 mov %i1, %o0
200a380: 7f ff e0 ce call 20026b8 <sparc_disable_interrupts>
200a384: 01 00 00 00 nop
200a388: b0 10 00 08 mov %o0, %i0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
200a38c: c2 07 20 08 ld [ %i4 + 8 ], %g1
200a390: 9f c0 40 00 call %g1
200a394: 01 00 00 00 nop
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
200a398: 03 00 80 75 sethi %hi(0x201d400), %g1
200a39c: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information>
200a3a0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
200a3a4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200a3a8: 80 a0 80 03 cmp %g2, %g3
200a3ac: 02 80 00 07 be 200a3c8 <_Thread_Change_priority+0x114>
200a3b0: 01 00 00 00 nop
200a3b4: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
200a3b8: 80 a0 a0 00 cmp %g2, 0
200a3bc: 02 80 00 03 be 200a3c8 <_Thread_Change_priority+0x114>
200a3c0: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
200a3c4: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
_ISR_Enable( level );
200a3c8: 7f ff e0 c0 call 20026c8 <sparc_enable_interrupts>
200a3cc: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
200a3d0: c2 07 20 24 ld [ %i4 + 0x24 ], %g1
200a3d4: 9f c0 40 00 call %g1
200a3d8: 90 10 00 1d mov %i5, %o0
200a3dc: 30 bf ff e7 b,a 200a378 <_Thread_Change_priority+0xc4>
0200a5f8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200a5f8: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a5fc: 90 10 00 18 mov %i0, %o0
200a600: 40 00 00 77 call 200a7dc <_Thread_Get>
200a604: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a608: c2 07 bf fc ld [ %fp + -4 ], %g1
200a60c: 80 a0 60 00 cmp %g1, 0
200a610: 12 80 00 09 bne 200a634 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN
200a614: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
200a618: 7f ff ff 72 call 200a3e0 <_Thread_Clear_state>
200a61c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a620: 03 00 80 74 sethi %hi(0x201d000), %g1
200a624: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
200a628: 84 00 bf ff add %g2, -1, %g2
200a62c: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a630: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
200a634: 81 c7 e0 08 ret
200a638: 81 e8 00 00 restore
0200a63c <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
200a63c: 9d e3 bf 98 save %sp, -104, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200a640: 31 00 80 74 sethi %hi(0x201d000), %i0
200a644: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
200a648: 82 00 60 01 inc %g1
200a64c: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a650: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
200a654: 39 00 80 75 sethi %hi(0x201d400), %i4
200a658: b8 17 21 e0 or %i4, 0x1e0, %i4 ! 201d5e0 <_Per_CPU_Information>
_ISR_Disable( level );
200a65c: 7f ff e0 17 call 20026b8 <sparc_disable_interrupts>
200a660: fa 07 20 0c ld [ %i4 + 0xc ], %i5
while ( _Thread_Dispatch_necessary == true ) {
200a664: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
200a668: 80 a0 60 00 cmp %g1, 0
200a66c: 02 80 00 45 be 200a780 <_Thread_Dispatch+0x144>
200a670: 01 00 00 00 nop
heir = _Thread_Heir;
200a674: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
200a678: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
200a67c: 80 a7 40 1b cmp %i5, %i3
200a680: 02 80 00 40 be 200a780 <_Thread_Dispatch+0x144>
200a684: f6 27 20 0c st %i3, [ %i4 + 0xc ]
200a688: 33 00 80 75 sethi %hi(0x201d400), %i1
#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;
200a68c: 21 00 80 74 sethi %hi(0x201d000), %l0
200a690: b2 16 60 3c or %i1, 0x3c, %i1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200a694: 10 80 00 35 b 200a768 <_Thread_Dispatch+0x12c>
200a698: 35 00 80 75 sethi %hi(0x201d400), %i2
_ISR_Enable( level );
200a69c: 7f ff e0 0b call 20026c8 <sparc_enable_interrupts>
200a6a0: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
200a6a4: 40 00 0c 1f call 200d720 <_TOD_Get_uptime>
200a6a8: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200a6ac: c4 1f 20 20 ldd [ %i4 + 0x20 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200a6b0: d4 1f 60 80 ldd [ %i5 + 0x80 ], %o2
_Timestamp_Subtract(
200a6b4: d8 1f bf f8 ldd [ %fp + -8 ], %o4
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
200a6b8: c2 06 40 00 ld [ %i1 ], %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200a6bc: 86 a3 40 03 subcc %o5, %g3, %g3
200a6c0: 84 63 00 02 subx %o4, %g2, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200a6c4: 86 82 c0 03 addcc %o3, %g3, %g3
200a6c8: 84 42 80 02 addx %o2, %g2, %g2
200a6cc: c4 3f 60 80 std %g2, [ %i5 + 0x80 ]
200a6d0: 80 a0 60 00 cmp %g1, 0
200a6d4: 02 80 00 06 be 200a6ec <_Thread_Dispatch+0xb0> <== NEVER TAKEN
200a6d8: d8 3f 20 20 std %o4, [ %i4 + 0x20 ]
executing->libc_reent = *_Thread_libc_reent;
200a6dc: c4 00 40 00 ld [ %g1 ], %g2
200a6e0: c4 27 61 4c st %g2, [ %i5 + 0x14c ]
*_Thread_libc_reent = heir->libc_reent;
200a6e4: c4 06 e1 4c ld [ %i3 + 0x14c ], %g2
200a6e8: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
200a6ec: 90 10 00 1d mov %i5, %o0
200a6f0: 40 00 03 93 call 200b53c <_User_extensions_Thread_switch>
200a6f4: 92 10 00 1b mov %i3, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
200a6f8: 90 07 60 c0 add %i5, 0xc0, %o0
200a6fc: 40 00 04 dd call 200ba70 <_CPU_Context_switch>
200a700: 92 06 e0 c0 add %i3, 0xc0, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200a704: c2 07 61 48 ld [ %i5 + 0x148 ], %g1
200a708: 80 a0 60 00 cmp %g1, 0
200a70c: 02 80 00 0c be 200a73c <_Thread_Dispatch+0x100>
200a710: d0 06 a0 38 ld [ %i2 + 0x38 ], %o0
200a714: 80 a7 40 08 cmp %i5, %o0
200a718: 02 80 00 09 be 200a73c <_Thread_Dispatch+0x100>
200a71c: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200a720: 02 80 00 04 be 200a730 <_Thread_Dispatch+0xf4>
200a724: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200a728: 40 00 04 98 call 200b988 <_CPU_Context_save_fp>
200a72c: 90 02 21 48 add %o0, 0x148, %o0
_Context_Restore_fp( &executing->fp_context );
200a730: 40 00 04 b3 call 200b9fc <_CPU_Context_restore_fp>
200a734: 90 07 61 48 add %i5, 0x148, %o0
_Thread_Allocated_fp = executing;
200a738: fa 26 a0 38 st %i5, [ %i2 + 0x38 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
200a73c: 7f ff df df call 20026b8 <sparc_disable_interrupts>
200a740: fa 07 20 0c ld [ %i4 + 0xc ], %i5
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
200a744: c2 0f 20 18 ldub [ %i4 + 0x18 ], %g1
200a748: 80 a0 60 00 cmp %g1, 0
200a74c: 02 80 00 0d be 200a780 <_Thread_Dispatch+0x144>
200a750: 01 00 00 00 nop
heir = _Thread_Heir;
200a754: f6 07 20 10 ld [ %i4 + 0x10 ], %i3
_Thread_Dispatch_necessary = false;
200a758: c0 2f 20 18 clrb [ %i4 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
200a75c: 80 a6 c0 1d cmp %i3, %i5
200a760: 02 80 00 08 be 200a780 <_Thread_Dispatch+0x144> <== NEVER TAKEN
200a764: f6 27 20 0c st %i3, [ %i4 + 0xc ]
*/
#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 )
200a768: c2 06 e0 78 ld [ %i3 + 0x78 ], %g1
200a76c: 80 a0 60 01 cmp %g1, 1
200a770: 12 bf ff cb bne 200a69c <_Thread_Dispatch+0x60>
200a774: c2 04 23 14 ld [ %l0 + 0x314 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a778: 10 bf ff c9 b 200a69c <_Thread_Dispatch+0x60>
200a77c: c2 26 e0 74 st %g1, [ %i3 + 0x74 ]
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
200a780: 7f ff df d2 call 20026c8 <sparc_enable_interrupts>
200a784: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a788: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
200a78c: 82 00 7f ff add %g1, -1, %g1
200a790: c2 26 23 b0 st %g1, [ %i0 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200a794: c2 06 23 b0 ld [ %i0 + 0x3b0 ], %g1
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
200a798: 7f ff f7 ad call 200864c <_API_extensions_Run_postswitch>
200a79c: 01 00 00 00 nop
}
200a7a0: 81 c7 e0 08 ret
200a7a4: 81 e8 00 00 restore
0200f5ac <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200f5ac: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
200f5b0: 03 00 80 75 sethi %hi(0x201d400), %g1
200f5b4: fa 00 61 ec ld [ %g1 + 0x1ec ], %i5 ! 201d5ec <_Per_CPU_Information+0xc>
/*
* 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();
200f5b8: 3f 00 80 3d sethi %hi(0x200f400), %i7
200f5bc: be 17 e1 ac or %i7, 0x1ac, %i7 ! 200f5ac <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200f5c0: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
200f5c4: 7f ff cc 41 call 20026c8 <sparc_enable_interrupts>
200f5c8: 91 2a 20 08 sll %o0, 8, %o0
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f5cc: c4 07 61 48 ld [ %i5 + 0x148 ], %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f5d0: 03 00 80 73 sethi %hi(0x201cc00), %g1
doneConstructors = true;
200f5d4: 86 10 20 01 mov 1, %g3
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f5d8: f6 08 63 d8 ldub [ %g1 + 0x3d8 ], %i3
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f5dc: 80 a0 a0 00 cmp %g2, 0
200f5e0: 02 80 00 0c be 200f610 <_Thread_Handler+0x64>
200f5e4: c6 28 63 d8 stb %g3, [ %g1 + 0x3d8 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200f5e8: 39 00 80 75 sethi %hi(0x201d400), %i4
200f5ec: d0 07 20 38 ld [ %i4 + 0x38 ], %o0 ! 201d438 <_Thread_Allocated_fp>
200f5f0: 80 a7 40 08 cmp %i5, %o0
200f5f4: 02 80 00 07 be 200f610 <_Thread_Handler+0x64>
200f5f8: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200f5fc: 22 80 00 05 be,a 200f610 <_Thread_Handler+0x64>
200f600: fa 27 20 38 st %i5, [ %i4 + 0x38 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200f604: 7f ff f0 e1 call 200b988 <_CPU_Context_save_fp>
200f608: 90 02 21 48 add %o0, 0x148, %o0
_Thread_Allocated_fp = executing;
200f60c: fa 27 20 38 st %i5, [ %i4 + 0x38 ]
/*
* 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 );
200f610: 7f ff ef 49 call 200b334 <_User_extensions_Thread_begin>
200f614: 90 10 00 1d mov %i5, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200f618: 7f ff ec 64 call 200a7a8 <_Thread_Enable_dispatch>
200f61c: 01 00 00 00 nop
/*
* _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 (doCons) /* && (volatile void *)_init) */ {
200f620: 80 8e e0 ff btst 0xff, %i3
200f624: 02 80 00 0c be 200f654 <_Thread_Handler+0xa8>
200f628: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f62c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
200f630: 80 a0 60 00 cmp %g1, 0
200f634: 22 80 00 0c be,a 200f664 <_Thread_Handler+0xb8> <== ALWAYS TAKEN
200f638: c2 07 60 8c ld [ %i5 + 0x8c ], %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 );
200f63c: 7f ff ef 52 call 200b384 <_User_extensions_Thread_exitted>
200f640: 90 10 00 1d mov %i5, %o0
_Internal_error_Occurred(
200f644: 90 10 20 00 clr %o0
200f648: 92 10 20 01 mov 1, %o1
200f64c: 7f ff e6 db call 20091b8 <_Internal_error_Occurred>
200f650: 94 10 20 05 mov 5, %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 (doCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
200f654: 40 00 33 ed call 201c608 <_init>
200f658: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f65c: 10 bf ff f5 b 200f630 <_Thread_Handler+0x84>
200f660: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200f664: 9f c0 40 00 call %g1
200f668: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
200f66c: 10 bf ff f4 b 200f63c <_Thread_Handler+0x90>
200f670: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
0200aa6c <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
200aa6c: 9d e3 bf 98 save %sp, -104, %sp
uint32_t ticks_per_timeslice =
200aa70: 05 00 80 71 sethi %hi(0x201c400), %g2
200aa74: 84 10 a2 4c or %g2, 0x24c, %g2 ! 201c64c <Configuration>
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200aa78: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
200aa7c: fa 00 a0 14 ld [ %g2 + 0x14 ], %i5
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
200aa80: f8 00 a0 0c ld [ %g2 + 0xc ], %i4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200aa84: 80 a0 e0 00 cmp %g3, 0
200aa88: 02 80 00 21 be 200ab0c <_Thread_Handler_initialization+0xa0>
200aa8c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200aa90: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3
200aa94: 80 a0 e0 00 cmp %g3, 0
200aa98: 02 80 00 1d be 200ab0c <_Thread_Handler_initialization+0xa0><== NEVER TAKEN
200aa9c: 80 a0 60 00 cmp %g1, 0
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
200aaa0: 22 80 00 05 be,a 200aab4 <_Thread_Handler_initialization+0x48>
200aaa4: 03 00 80 75 sethi %hi(0x201d400), %g1
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
200aaa8: 9f c0 40 00 call %g1
200aaac: d0 00 a0 08 ld [ %g2 + 8 ], %o0
_Thread_Dispatch_necessary = false;
200aab0: 03 00 80 75 sethi %hi(0x201d400), %g1
200aab4: 82 10 61 e0 or %g1, 0x1e0, %g1 ! 201d5e0 <_Per_CPU_Information>
200aab8: c0 28 60 18 clrb [ %g1 + 0x18 ]
_Thread_Executing = NULL;
200aabc: c0 20 60 0c clr [ %g1 + 0xc ]
_Thread_Heir = NULL;
200aac0: c0 20 60 10 clr [ %g1 + 0x10 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
200aac4: 03 00 80 75 sethi %hi(0x201d400), %g1
200aac8: c0 20 60 38 clr [ %g1 + 0x38 ] ! 201d438 <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
200aacc: 03 00 80 75 sethi %hi(0x201d400), %g1
200aad0: f8 20 60 48 st %i4, [ %g1 + 0x48 ] ! 201d448 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
200aad4: 03 00 80 74 sethi %hi(0x201d000), %g1
200aad8: fa 20 63 14 st %i5, [ %g1 + 0x314 ] ! 201d314 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
200aadc: 82 10 20 08 mov 8, %g1
200aae0: 11 00 80 75 sethi %hi(0x201d400), %o0
200aae4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200aae8: 90 12 20 c8 or %o0, 0xc8, %o0
200aaec: 92 10 20 01 mov 1, %o1
200aaf0: 94 10 20 01 mov 1, %o2
200aaf4: 96 10 20 01 mov 1, %o3
200aaf8: 98 10 21 60 mov 0x160, %o4
200aafc: 7f ff fb 45 call 2009810 <_Objects_Initialize_information>
200ab00: 9a 10 20 00 clr %o5
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
200ab04: 81 c7 e0 08 ret
200ab08: 81 e8 00 00 restore
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
200ab0c: 90 10 20 00 clr %o0
200ab10: 92 10 20 01 mov 1, %o1
200ab14: 7f ff f9 a9 call 20091b8 <_Internal_error_Occurred>
200ab18: 94 10 20 0e mov 0xe, %o2
0200a88c <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200a88c: 9d e3 bf a0 save %sp, -96, %sp
200a890: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
200a894: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2
200a898: e0 00 40 00 ld [ %g1 ], %l0
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
200a89c: c0 26 61 50 clr [ %i1 + 0x150 ]
200a8a0: c0 26 61 54 clr [ %i1 + 0x154 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
200a8a4: c0 26 61 4c clr [ %i1 + 0x14c ]
/*
* 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 );
200a8a8: 90 10 00 19 mov %i1, %o0
200a8ac: 40 00 02 36 call 200b184 <_Thread_Stack_Allocate>
200a8b0: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
200a8b4: 80 a2 00 1b cmp %o0, %i3
200a8b8: 0a 80 00 4b bcs 200a9e4 <_Thread_Initialize+0x158>
200a8bc: 80 a2 20 00 cmp %o0, 0
200a8c0: 02 80 00 49 be 200a9e4 <_Thread_Initialize+0x158> <== NEVER TAKEN
200a8c4: 80 a7 20 00 cmp %i4, 0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a8c8: c2 06 60 bc ld [ %i1 + 0xbc ], %g1
the_stack->size = size;
200a8cc: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a8d0: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
200a8d4: 12 80 00 48 bne 200a9f4 <_Thread_Initialize+0x168>
200a8d8: b6 10 20 00 clr %i3
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a8dc: 23 00 80 75 sethi %hi(0x201d400), %l1
200a8e0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 ! 201d448 <_Thread_Maximum_extensions>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
200a8e4: f6 26 61 48 st %i3, [ %i1 + 0x148 ]
the_thread->Start.fp_context = fp_area;
200a8e8: f6 26 60 b8 st %i3, [ %i1 + 0xb8 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200a8ec: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
200a8f0: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200a8f4: c0 26 60 68 clr [ %i1 + 0x68 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a8f8: 80 a0 60 00 cmp %g1, 0
200a8fc: 12 80 00 46 bne 200aa14 <_Thread_Initialize+0x188>
200a900: c0 26 60 6c clr [ %i1 + 0x6c ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200a904: c0 26 61 58 clr [ %i1 + 0x158 ]
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
200a908: b8 10 20 00 clr %i4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
200a90c: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
200a910: 03 00 80 71 sethi %hi(0x201c400), %g1
200a914: c4 26 60 a0 st %g2, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
200a918: c4 07 a0 64 ld [ %fp + 0x64 ], %g2
200a91c: c2 00 63 54 ld [ %g1 + 0x354 ], %g1
200a920: c4 26 60 a4 st %g2, [ %i1 + 0xa4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a924: c4 07 a0 68 ld [ %fp + 0x68 ], %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
200a928: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a92c: c4 26 60 a8 st %g2, [ %i1 + 0xa8 ]
the_thread->current_state = STATES_DORMANT;
200a930: 84 10 20 01 mov 1, %g2
the_thread->Wait.queue = NULL;
200a934: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
200a938: c4 26 60 10 st %g2, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
200a93c: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
200a940: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
200a944: fa 26 60 ac st %i5, [ %i1 + 0xac ]
200a948: 9f c0 40 00 call %g1
200a94c: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
200a950: b4 92 20 00 orcc %o0, 0, %i2
200a954: 22 80 00 13 be,a 200a9a0 <_Thread_Initialize+0x114>
200a958: d0 06 61 4c ld [ %i1 + 0x14c ], %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
200a95c: 90 10 00 19 mov %i1, %o0
200a960: 40 00 01 e0 call 200b0e0 <_Thread_Set_priority>
200a964: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a968: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
200a96c: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
200a970: c0 26 60 80 clr [ %i1 + 0x80 ]
200a974: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a978: 83 28 60 02 sll %g1, 2, %g1
200a97c: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200a980: e0 26 60 0c st %l0, [ %i1 + 0xc ]
* 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 );
200a984: 90 10 00 19 mov %i1, %o0
200a988: 40 00 02 a6 call 200b420 <_User_extensions_Thread_create>
200a98c: b0 10 20 01 mov 1, %i0
if ( extension_status )
200a990: 80 8a 20 ff btst 0xff, %o0
200a994: 32 80 00 12 bne,a 200a9dc <_Thread_Initialize+0x150>
200a998: b0 0e 20 01 and %i0, 1, %i0
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
200a99c: d0 06 61 4c ld [ %i1 + 0x14c ], %o0
200a9a0: 40 00 03 e5 call 200b934 <_Workspace_Free>
200a9a4: b0 10 20 00 clr %i0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
200a9a8: 40 00 03 e3 call 200b934 <_Workspace_Free>
200a9ac: d0 06 61 50 ld [ %i1 + 0x150 ], %o0
200a9b0: 40 00 03 e1 call 200b934 <_Workspace_Free>
200a9b4: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
_Workspace_Free( extensions_area );
200a9b8: 40 00 03 df call 200b934 <_Workspace_Free>
200a9bc: 90 10 00 1c mov %i4, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
200a9c0: 40 00 03 dd call 200b934 <_Workspace_Free>
200a9c4: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
200a9c8: 40 00 03 db call 200b934 <_Workspace_Free>
200a9cc: 90 10 00 1a mov %i2, %o0
_Thread_Stack_Free( the_thread );
200a9d0: 40 00 01 fe call 200b1c8 <_Thread_Stack_Free>
200a9d4: 90 10 00 19 mov %i1, %o0
return false;
}
200a9d8: b0 0e 20 01 and %i0, 1, %i0
200a9dc: 81 c7 e0 08 ret
200a9e0: 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 )
return false; /* stack allocation failed */
200a9e4: b0 10 20 00 clr %i0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
200a9e8: b0 0e 20 01 and %i0, 1, %i0
200a9ec: 81 c7 e0 08 ret
200a9f0: 81 e8 00 00 restore
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200a9f4: 40 00 03 c8 call 200b914 <_Workspace_Allocate>
200a9f8: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
200a9fc: b6 92 20 00 orcc %o0, 0, %i3
200aa00: 32 bf ff b8 bne,a 200a8e0 <_Thread_Initialize+0x54>
200aa04: 23 00 80 75 sethi %hi(0x201d400), %l1
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
200aa08: b8 10 20 00 clr %i4
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
200aa0c: 10 bf ff e4 b 200a99c <_Thread_Initialize+0x110>
200aa10: b4 10 20 00 clr %i2
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
200aa14: 82 00 60 01 inc %g1
200aa18: 40 00 03 bf call 200b914 <_Workspace_Allocate>
200aa1c: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
200aa20: b8 92 20 00 orcc %o0, 0, %i4
200aa24: 02 80 00 10 be 200aa64 <_Thread_Initialize+0x1d8>
200aa28: 86 10 00 1c mov %i4, %g3
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200aa2c: f8 26 61 58 st %i4, [ %i1 + 0x158 ]
200aa30: c8 04 60 48 ld [ %l1 + 0x48 ], %g4
* 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++ )
200aa34: 84 10 20 00 clr %g2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
200aa38: 10 80 00 03 b 200aa44 <_Thread_Initialize+0x1b8>
200aa3c: 82 10 20 00 clr %g1
200aa40: c6 06 61 58 ld [ %i1 + 0x158 ], %g3
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
200aa44: 85 28 a0 02 sll %g2, 2, %g2
200aa48: 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++ )
200aa4c: 82 00 60 01 inc %g1
200aa50: 80 a0 40 04 cmp %g1, %g4
200aa54: 08 bf ff fb bleu 200aa40 <_Thread_Initialize+0x1b4>
200aa58: 84 10 00 01 mov %g1, %g2
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
200aa5c: 10 bf ff ad b 200a910 <_Thread_Initialize+0x84>
200aa60: c4 07 a0 60 ld [ %fp + 0x60 ], %g2
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
200aa64: 10 bf ff ce b 200a99c <_Thread_Initialize+0x110>
200aa68: b4 10 20 00 clr %i2
0200b01c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200b01c: 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 )
200b020: 80 a6 20 00 cmp %i0, 0
200b024: 02 80 00 13 be 200b070 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
200b028: 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 ) {
200b02c: f8 06 20 34 ld [ %i0 + 0x34 ], %i4
200b030: 80 a7 20 01 cmp %i4, 1
200b034: 02 80 00 04 be 200b044 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
200b038: 01 00 00 00 nop
200b03c: 81 c7 e0 08 ret <== NOT EXECUTED
200b040: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
200b044: 7f ff dd 9d call 20026b8 <sparc_disable_interrupts>
200b048: 01 00 00 00 nop
200b04c: ba 10 00 08 mov %o0, %i5
200b050: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200b054: 03 00 00 ef sethi %hi(0x3bc00), %g1
200b058: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200b05c: 80 88 80 01 btst %g2, %g1
200b060: 12 80 00 06 bne 200b078 <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
200b064: 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 );
200b068: 7f ff dd 98 call 20026c8 <sparc_enable_interrupts>
200b06c: 90 10 00 1d mov %i5, %o0
200b070: 81 c7 e0 08 ret
200b074: 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 );
200b078: 92 10 00 19 mov %i1, %o1
200b07c: 94 10 20 01 mov 1, %o2
200b080: 40 00 0b 8c call 200deb0 <_Thread_queue_Extract_priority_helper>
200b084: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
200b088: 90 10 00 18 mov %i0, %o0
200b08c: 92 10 00 19 mov %i1, %o1
200b090: 7f ff ff 35 call 200ad64 <_Thread_queue_Enqueue_priority>
200b094: 94 07 bf fc add %fp, -4, %o2
200b098: 30 bf ff f4 b,a 200b068 <_Thread_queue_Requeue+0x4c>
0200b09c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200b09c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200b0a0: 90 10 00 18 mov %i0, %o0
200b0a4: 7f ff fd ce call 200a7dc <_Thread_Get>
200b0a8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200b0ac: c2 07 bf fc ld [ %fp + -4 ], %g1
200b0b0: 80 a0 60 00 cmp %g1, 0
200b0b4: 12 80 00 09 bne 200b0d8 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN
200b0b8: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200b0bc: 40 00 0b b6 call 200df94 <_Thread_queue_Process_timeout>
200b0c0: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200b0c4: 03 00 80 74 sethi %hi(0x201d000), %g1
200b0c8: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 201d3b0 <_Thread_Dispatch_disable_level>
200b0cc: 84 00 bf ff add %g2, -1, %g2
200b0d0: c4 20 63 b0 st %g2, [ %g1 + 0x3b0 ]
return _Thread_Dispatch_disable_level;
200b0d4: c2 00 63 b0 ld [ %g1 + 0x3b0 ], %g1
200b0d8: 81 c7 e0 08 ret
200b0dc: 81 e8 00 00 restore
02017c1c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
2017c1c: 9d e3 bf 88 save %sp, -120, %sp
2017c20: 21 00 80 ec sethi %hi(0x203b000), %l0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2017c24: a4 07 bf e8 add %fp, -24, %l2
2017c28: b4 07 bf ec add %fp, -20, %i2
2017c2c: b8 07 bf f4 add %fp, -12, %i4
2017c30: a2 07 bf f8 add %fp, -8, %l1
2017c34: 33 00 80 ec sethi %hi(0x203b000), %i1
2017c38: 27 00 80 ec sethi %hi(0x203b000), %l3
2017c3c: f4 27 bf e8 st %i2, [ %fp + -24 ]
head->previous = NULL;
2017c40: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
2017c44: e4 27 bf f0 st %l2, [ %fp + -16 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2017c48: e2 27 bf f4 st %l1, [ %fp + -12 ]
head->previous = NULL;
2017c4c: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2017c50: f8 27 bf fc st %i4, [ %fp + -4 ]
2017c54: a0 14 23 50 or %l0, 0x350, %l0
2017c58: ba 06 20 30 add %i0, 0x30, %i5
2017c5c: b2 16 62 d0 or %i1, 0x2d0, %i1
2017c60: b6 06 20 68 add %i0, 0x68, %i3
2017c64: a6 14 e2 40 or %l3, 0x240, %l3
2017c68: ac 06 20 08 add %i0, 8, %l6
2017c6c: aa 06 20 40 add %i0, 0x40, %l5
_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;
2017c70: a8 10 20 01 mov 1, %l4
{
/*
* 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;
2017c74: e4 26 20 78 st %l2, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2017c78: c2 04 00 00 ld [ %l0 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
2017c7c: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2017c80: 90 10 00 1d mov %i5, %o0
2017c84: 92 20 40 09 sub %g1, %o1, %o1
2017c88: 94 10 00 1c mov %i4, %o2
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2017c8c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2017c90: 40 00 12 a6 call 201c728 <_Watchdog_Adjust_to_chain>
2017c94: 01 00 00 00 nop
2017c98: d0 1e 40 00 ldd [ %i1 ], %o0
2017c9c: 94 10 20 00 clr %o2
2017ca0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ca4: 40 00 4d f9 call 202b488 <__divdi3>
2017ca8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2017cac: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
/*
* 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 ) {
2017cb0: 80 a2 40 0a cmp %o1, %o2
2017cb4: 18 80 00 2b bgu 2017d60 <_Timer_server_Body+0x144>
2017cb8: ae 10 00 09 mov %o1, %l7
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
2017cbc: 80 a2 40 0a cmp %o1, %o2
2017cc0: 0a 80 00 20 bcs 2017d40 <_Timer_server_Body+0x124>
2017cc4: 90 10 00 1b mov %i3, %o0
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
2017cc8: ee 26 20 74 st %l7, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2017ccc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2017cd0: 40 00 02 fe call 20188c8 <_Chain_Get>
2017cd4: 01 00 00 00 nop
if ( timer == NULL ) {
2017cd8: 92 92 20 00 orcc %o0, 0, %o1
2017cdc: 02 80 00 10 be 2017d1c <_Timer_server_Body+0x100>
2017ce0: 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 ) {
2017ce4: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
2017ce8: 80 a0 60 01 cmp %g1, 1
2017cec: 02 80 00 19 be 2017d50 <_Timer_server_Body+0x134>
2017cf0: 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 ) {
2017cf4: 12 bf ff f6 bne 2017ccc <_Timer_server_Body+0xb0> <== NEVER TAKEN
2017cf8: 92 02 60 10 add %o1, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2017cfc: 40 00 12 bc call 201c7ec <_Watchdog_Insert>
2017d00: 90 10 00 1b mov %i3, %o0
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2017d04: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2017d08: 40 00 02 f0 call 20188c8 <_Chain_Get>
2017d0c: 01 00 00 00 nop
if ( timer == NULL ) {
2017d10: 92 92 20 00 orcc %o0, 0, %o1
2017d14: 32 bf ff f5 bne,a 2017ce8 <_Timer_server_Body+0xcc> <== NEVER TAKEN
2017d18: c2 02 60 38 ld [ %o1 + 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 );
2017d1c: 7f ff dd a7 call 200f3b8 <sparc_disable_interrupts>
2017d20: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
2017d24: c2 07 bf e8 ld [ %fp + -24 ], %g1
2017d28: 80 a0 40 1a cmp %g1, %i2
2017d2c: 02 80 00 12 be 2017d74 <_Timer_server_Body+0x158> <== ALWAYS TAKEN
2017d30: 01 00 00 00 nop
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
2017d34: 7f ff dd a5 call 200f3c8 <sparc_enable_interrupts> <== NOT EXECUTED
2017d38: 01 00 00 00 nop <== NOT EXECUTED
2017d3c: 30 bf ff cf b,a 2017c78 <_Timer_server_Body+0x5c> <== NOT EXECUTED
/*
* 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 );
2017d40: 92 10 20 01 mov 1, %o1 ! 1 <PROM_START+0x1>
2017d44: 40 00 12 4a call 201c66c <_Watchdog_Adjust>
2017d48: 94 22 80 17 sub %o2, %l7, %o2
2017d4c: 30 bf ff df b,a 2017cc8 <_Timer_server_Body+0xac>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017d50: 90 10 00 1d mov %i5, %o0
2017d54: 40 00 12 a6 call 201c7ec <_Watchdog_Insert>
2017d58: 92 02 60 10 add %o1, 0x10, %o1
2017d5c: 30 bf ff dc b,a 2017ccc <_Timer_server_Body+0xb0>
/*
* 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 );
2017d60: 92 22 40 0a sub %o1, %o2, %o1
2017d64: 90 10 00 1b mov %i3, %o0
2017d68: 40 00 12 70 call 201c728 <_Watchdog_Adjust_to_chain>
2017d6c: 94 10 00 1c mov %i4, %o2
2017d70: 30 bf ff d6 b,a 2017cc8 <_Timer_server_Body+0xac>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
2017d74: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2017d78: 7f ff dd 94 call 200f3c8 <sparc_enable_interrupts>
2017d7c: 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 ) ) {
2017d80: c2 07 bf f4 ld [ %fp + -12 ], %g1
2017d84: 80 a0 40 11 cmp %g1, %l1
2017d88: 12 80 00 0c bne 2017db8 <_Timer_server_Body+0x19c>
2017d8c: 01 00 00 00 nop
2017d90: 30 80 00 13 b,a 2017ddc <_Timer_server_Body+0x1c0>
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
new_first->previous = head;
2017d94: f8 20 60 04 st %i4, [ %g1 + 4 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
2017d98: c2 27 bf f4 st %g1, [ %fp + -12 ]
* 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;
2017d9c: c0 25 e0 08 clr [ %l7 + 8 ]
_ISR_Enable( level );
2017da0: 7f ff dd 8a call 200f3c8 <sparc_enable_interrupts>
2017da4: 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 );
2017da8: d0 05 e0 20 ld [ %l7 + 0x20 ], %o0
2017dac: c2 05 e0 1c ld [ %l7 + 0x1c ], %g1
2017db0: 9f c0 40 00 call %g1
2017db4: d2 05 e0 24 ld [ %l7 + 0x24 ], %o1
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
2017db8: 7f ff dd 80 call 200f3b8 <sparc_disable_interrupts>
2017dbc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017dc0: ee 07 bf f4 ld [ %fp + -12 ], %l7
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2017dc4: 80 a5 c0 11 cmp %l7, %l1
2017dc8: 32 bf ff f3 bne,a 2017d94 <_Timer_server_Body+0x178>
2017dcc: c2 05 c0 00 ld [ %l7 ], %g1
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
2017dd0: 7f ff dd 7e call 200f3c8 <sparc_enable_interrupts>
2017dd4: 01 00 00 00 nop
2017dd8: 30 bf ff a7 b,a 2017c74 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
2017ddc: c0 2e 20 7c clrb [ %i0 + 0x7c ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2017de0: c2 04 c0 00 ld [ %l3 ], %g1
2017de4: 82 00 60 01 inc %g1
2017de8: c2 24 c0 00 st %g1, [ %l3 ]
return _Thread_Dispatch_disable_level;
2017dec: c2 04 c0 00 ld [ %l3 ], %g1
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
2017df0: d0 06 00 00 ld [ %i0 ], %o0
2017df4: 40 00 10 e8 call 201c194 <_Thread_Set_state>
2017df8: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
2017dfc: 7f ff ff 60 call 2017b7c <_Timer_server_Reset_interval_system_watchdog>
2017e00: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2017e04: 7f ff ff 72 call 2017bcc <_Timer_server_Reset_tod_system_watchdog>
2017e08: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
2017e0c: 40 00 0e 68 call 201b7ac <_Thread_Enable_dispatch>
2017e10: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017e14: 90 10 00 16 mov %l6, %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;
2017e18: e8 2e 20 7c stb %l4, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2017e1c: 40 00 12 d6 call 201c974 <_Watchdog_Remove>
2017e20: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2017e24: 40 00 12 d4 call 201c974 <_Watchdog_Remove>
2017e28: 90 10 00 15 mov %l5, %o0
2017e2c: 30 bf ff 92 b,a 2017c74 <_Timer_server_Body+0x58>
02017e30 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
2017e30: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
2017e34: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2017e38: 80 a0 60 00 cmp %g1, 0
2017e3c: 02 80 00 05 be 2017e50 <_Timer_server_Schedule_operation_method+0x20>
2017e40: ba 10 00 19 mov %i1, %i5
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
2017e44: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
2017e48: 40 00 02 95 call 201889c <_Chain_Append>
2017e4c: 81 e8 00 00 restore
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2017e50: 03 00 80 ec sethi %hi(0x203b000), %g1
2017e54: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 203b240 <_Thread_Dispatch_disable_level>
2017e58: 84 00 a0 01 inc %g2
2017e5c: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
return _Thread_Dispatch_disable_level;
2017e60: c2 00 62 40 ld [ %g1 + 0x240 ], %g1
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2017e64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
2017e68: 80 a0 60 01 cmp %g1, 1
2017e6c: 02 80 00 2d be 2017f20 <_Timer_server_Schedule_operation_method+0xf0>
2017e70: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2017e74: 02 80 00 04 be 2017e84 <_Timer_server_Schedule_operation_method+0x54>
2017e78: 01 00 00 00 nop
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017e7c: 40 00 0e 4c call 201b7ac <_Thread_Enable_dispatch>
2017e80: 81 e8 00 00 restore
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2017e84: 7f ff dd 4d call 200f3b8 <sparc_disable_interrupts>
2017e88: 01 00 00 00 nop
2017e8c: b8 10 00 08 mov %o0, %i4
2017e90: 03 00 80 ec sethi %hi(0x203b000), %g1
2017e94: d0 18 62 d0 ldd [ %g1 + 0x2d0 ], %o0 ! 203b2d0 <_TOD_Now>
2017e98: 94 10 20 00 clr %o2
2017e9c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ea0: 40 00 4d 7a call 202b488 <__divdi3>
2017ea4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017ea8: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2017eac: c4 06 20 74 ld [ %i0 + 0x74 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017eb0: 86 06 20 6c add %i0, 0x6c, %g3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2017eb4: 80 a0 40 03 cmp %g1, %g3
2017eb8: 02 80 00 0c be 2017ee8 <_Timer_server_Schedule_operation_method+0xb8>
2017ebc: 80 a2 40 02 cmp %o1, %g2
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
2017ec0: c8 00 60 10 ld [ %g1 + 0x10 ], %g4
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
2017ec4: 86 01 00 02 add %g4, %g2, %g3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
2017ec8: 08 80 00 07 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4>
2017ecc: 86 20 c0 09 sub %g3, %o1, %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
2017ed0: 84 22 40 02 sub %o1, %g2, %g2
if (delta_interval > delta) {
2017ed4: 80 a1 00 02 cmp %g4, %g2
2017ed8: 08 80 00 03 bleu 2017ee4 <_Timer_server_Schedule_operation_method+0xb4><== NEVER TAKEN
2017edc: 86 10 20 00 clr %g3
delta_interval -= delta;
2017ee0: 86 21 00 02 sub %g4, %g2, %g3
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
2017ee4: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
2017ee8: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
2017eec: 7f ff dd 37 call 200f3c8 <sparc_enable_interrupts>
2017ef0: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2017ef4: 90 06 20 68 add %i0, 0x68, %o0
2017ef8: 40 00 12 3d call 201c7ec <_Watchdog_Insert>
2017efc: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2017f00: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2017f04: 80 a0 60 00 cmp %g1, 0
2017f08: 12 bf ff dd bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c>
2017f0c: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
2017f10: 7f ff ff 2f call 2017bcc <_Timer_server_Reset_tod_system_watchdog>
2017f14: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
2017f18: 40 00 0e 25 call 201b7ac <_Thread_Enable_dispatch>
2017f1c: 81 e8 00 00 restore
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2017f20: 7f ff dd 26 call 200f3b8 <sparc_disable_interrupts>
2017f24: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2017f28: 05 00 80 ec sethi %hi(0x203b000), %g2
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2017f2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2017f30: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2017f34: c8 06 20 3c ld [ %i0 + 0x3c ], %g4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2017f38: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2017f3c: 80 a0 40 03 cmp %g1, %g3
2017f40: 02 80 00 08 be 2017f60 <_Timer_server_Schedule_operation_method+0x130>
2017f44: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2017f48: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
if (delta_interval > delta) {
2017f4c: 80 a1 00 1c cmp %g4, %i4
2017f50: 1a 80 00 03 bcc 2017f5c <_Timer_server_Schedule_operation_method+0x12c>
2017f54: 86 10 20 00 clr %g3
delta_interval -= delta;
2017f58: 86 27 00 04 sub %i4, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
2017f5c: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
2017f60: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2017f64: 7f ff dd 19 call 200f3c8 <sparc_enable_interrupts>
2017f68: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2017f6c: 90 06 20 30 add %i0, 0x30, %o0
2017f70: 40 00 12 1f call 201c7ec <_Watchdog_Insert>
2017f74: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2017f78: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2017f7c: 80 a0 60 00 cmp %g1, 0
2017f80: 12 bf ff bf bne 2017e7c <_Timer_server_Schedule_operation_method+0x4c>
2017f84: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
2017f88: 7f ff fe fd call 2017b7c <_Timer_server_Reset_interval_system_watchdog>
2017f8c: 90 10 00 18 mov %i0, %o0
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
2017f90: 40 00 0e 07 call 201b7ac <_Thread_Enable_dispatch>
2017f94: 81 e8 00 00 restore
0200abe8 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200abe8: 9d e3 bf 88 save %sp, -120, %sp
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200abec: da 06 40 00 ld [ %i1 ], %o5
right += rhs->tv_nsec;
200abf0: ea 06 60 04 ld [ %i1 + 4 ], %l5
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200abf4: 99 3b 60 1f sra %o5, 0x1f, %o4
200abf8: 83 2b 20 03 sll %o4, 3, %g1
200abfc: 87 2b 60 03 sll %o5, 3, %g3
200ac00: 89 33 60 1d srl %o5, 0x1d, %g4
200ac04: 84 11 00 01 or %g4, %g1, %g2
200ac08: 83 30 e0 1b srl %g3, 0x1b, %g1
200ac0c: 95 28 a0 05 sll %g2, 5, %o2
200ac10: 97 28 e0 05 sll %g3, 5, %o3
200ac14: 94 10 40 0a or %g1, %o2, %o2
200ac18: 96 a2 c0 03 subcc %o3, %g3, %o3
200ac1c: 83 32 e0 1a srl %o3, 0x1a, %g1
200ac20: 94 62 80 02 subx %o2, %g2, %o2
200ac24: 93 2a e0 06 sll %o3, 6, %o1
200ac28: 91 2a a0 06 sll %o2, 6, %o0
200ac2c: 96 a2 40 0b subcc %o1, %o3, %o3
200ac30: 90 10 40 08 or %g1, %o0, %o0
200ac34: 94 62 00 0a subx %o0, %o2, %o2
200ac38: 96 82 c0 0d addcc %o3, %o5, %o3
200ac3c: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac40: 94 42 80 0c addx %o2, %o4, %o2
200ac44: bb 2a e0 02 sll %o3, 2, %i5
200ac48: b9 2a a0 02 sll %o2, 2, %i4
200ac4c: 96 82 c0 1d addcc %o3, %i5, %o3
200ac50: b8 10 40 1c or %g1, %i4, %i4
200ac54: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac58: 94 42 80 1c addx %o2, %i4, %o2
200ac5c: a3 2a e0 02 sll %o3, 2, %l1
200ac60: a1 2a a0 02 sll %o2, 2, %l0
200ac64: 96 82 c0 11 addcc %o3, %l1, %o3
200ac68: a0 10 40 10 or %g1, %l0, %l0
200ac6c: 83 32 e0 1e srl %o3, 0x1e, %g1
200ac70: 94 42 80 10 addx %o2, %l0, %o2
200ac74: a7 2a e0 02 sll %o3, 2, %l3
200ac78: a5 2a a0 02 sll %o2, 2, %l2
200ac7c: 96 82 c0 13 addcc %o3, %l3, %o3
200ac80: a4 10 40 12 or %g1, %l2, %l2
200ac84: 83 2a e0 09 sll %o3, 9, %g1
200ac88: 94 42 80 12 addx %o2, %l2, %o2
200ac8c: 87 32 e0 17 srl %o3, 0x17, %g3
200ac90: 85 2a a0 09 sll %o2, 9, %g2
right += rhs->tv_nsec;
200ac94: 96 80 40 15 addcc %g1, %l5, %o3
200ac98: a9 3d 60 1f sra %l5, 0x1f, %l4
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200ac9c: 94 10 c0 02 or %g3, %g2, %o2
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200aca0: c8 06 00 00 ld [ %i0 ], %g4
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200aca4: 94 42 80 14 addx %o2, %l4, %o2
if ( right == 0 ) {
200aca8: 80 92 80 0b orcc %o2, %o3, %g0
200acac: 02 80 00 64 be 200ae3c <_Timespec_Divide+0x254> <== ALWAYS TAKEN
200acb0: c2 06 20 04 ld [ %i0 + 4 ], %g1
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
200acb4: c2 27 bf ec st %g1, [ %fp + -20 ] <== NOT EXECUTED
200acb8: 83 38 60 1f sra %g1, 0x1f, %g1 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200acbc: 9f 31 20 1d srl %g4, 0x1d, %o7 <== NOT EXECUTED
200acc0: ba 10 00 04 mov %g4, %i5 <== NOT EXECUTED
200acc4: b9 39 20 1f sra %g4, 0x1f, %i4 <== NOT EXECUTED
200acc8: 9b 2f 60 03 sll %i5, 3, %o5 <== NOT EXECUTED
200accc: 89 2f 20 03 sll %i4, 3, %g4 <== NOT EXECUTED
left += lhs->tv_nsec;
200acd0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200acd4: 87 2b 60 05 sll %o5, 5, %g3 <== NOT EXECUTED
200acd8: 86 a0 c0 0d subcc %g3, %o5, %g3 <== NOT EXECUTED
200acdc: 83 30 e0 1a srl %g3, 0x1a, %g1 <== NOT EXECUTED
200ace0: 98 13 c0 04 or %o7, %g4, %o4 <== NOT EXECUTED
200ace4: 93 28 e0 06 sll %g3, 6, %o1 <== NOT EXECUTED
200ace8: 89 33 60 1b srl %o5, 0x1b, %g4 <== NOT EXECUTED
200acec: 85 2b 20 05 sll %o4, 5, %g2 <== NOT EXECUTED
200acf0: 84 11 00 02 or %g4, %g2, %g2 <== NOT EXECUTED
200acf4: 84 60 80 0c subx %g2, %o4, %g2 <== NOT EXECUTED
200acf8: 86 a2 40 03 subcc %o1, %g3, %g3 <== NOT EXECUTED
200acfc: 91 28 a0 06 sll %g2, 6, %o0 <== NOT EXECUTED
200ad00: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
200ad04: 84 62 00 02 subx %o0, %g2, %g2 <== NOT EXECUTED
200ad08: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200ad0c: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad10: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200ad14: a3 28 e0 02 sll %g3, 2, %l1 <== NOT EXECUTED
200ad18: a1 28 a0 02 sll %g2, 2, %l0 <== NOT EXECUTED
200ad1c: 86 80 c0 11 addcc %g3, %l1, %g3 <== NOT EXECUTED
200ad20: a0 10 40 10 or %g1, %l0, %l0 <== NOT EXECUTED
200ad24: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad28: 84 40 80 10 addx %g2, %l0, %g2 <== NOT EXECUTED
200ad2c: a7 28 e0 02 sll %g3, 2, %l3 <== NOT EXECUTED
200ad30: a5 28 a0 02 sll %g2, 2, %l2 <== NOT EXECUTED
200ad34: 86 80 c0 13 addcc %g3, %l3, %g3 <== NOT EXECUTED
200ad38: a4 10 40 12 or %g1, %l2, %l2 <== NOT EXECUTED
200ad3c: b3 28 e0 02 sll %g3, 2, %i1 <== NOT EXECUTED
200ad40: 84 40 80 12 addx %g2, %l2, %g2 <== NOT EXECUTED
200ad44: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200ad48: b1 28 a0 02 sll %g2, 2, %i0 <== NOT EXECUTED
200ad4c: 86 80 c0 19 addcc %g3, %i1, %g3 <== NOT EXECUTED
200ad50: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED
200ad54: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED
200ad58: 84 40 80 18 addx %g2, %i0, %g2 <== NOT EXECUTED
200ad5c: 89 28 a0 09 sll %g2, 9, %g4 <== NOT EXECUTED
200ad60: 84 17 00 04 or %i4, %g4, %g2 <== NOT EXECUTED
left += lhs->tv_nsec;
200ad64: f8 1f bf e8 ldd [ %fp + -24 ], %i4 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200ad68: 83 28 e0 09 sll %g3, 9, %g1 <== NOT EXECUTED
left += lhs->tv_nsec;
200ad6c: 9a 80 40 1d addcc %g1, %i5, %o5 <== NOT EXECUTED
200ad70: 98 40 80 1c addx %g2, %i4, %o4 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200ad74: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED
200ad78: 83 2b 20 02 sll %o4, 2, %g1 <== NOT EXECUTED
200ad7c: af 2b 60 02 sll %o5, 2, %l7 <== NOT EXECUTED
200ad80: ac 10 80 01 or %g2, %g1, %l6 <== NOT EXECUTED
200ad84: ab 2d e0 05 sll %l7, 5, %l5 <== NOT EXECUTED
200ad88: 83 35 e0 1b srl %l7, 0x1b, %g1 <== NOT EXECUTED
200ad8c: 86 a5 40 17 subcc %l5, %l7, %g3 <== NOT EXECUTED
200ad90: a9 2d a0 05 sll %l6, 5, %l4 <== NOT EXECUTED
200ad94: a8 10 40 14 or %g1, %l4, %l4 <== NOT EXECUTED
200ad98: 84 65 00 16 subx %l4, %l6, %g2 <== NOT EXECUTED
200ad9c: 86 80 c0 0d addcc %g3, %o5, %g3 <== NOT EXECUTED
200ada0: 84 40 80 0c addx %g2, %o4, %g2 <== NOT EXECUTED
200ada4: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200ada8: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200adac: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200adb0: f8 27 bf fc st %i4, [ %fp + -4 ] <== NOT EXECUTED
200adb4: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200adb8: c8 27 bf f8 st %g4, [ %fp + -8 ] <== NOT EXECUTED
200adbc: f8 1f bf f8 ldd [ %fp + -8 ], %i4 <== NOT EXECUTED
200adc0: 86 80 c0 1d addcc %g3, %i5, %g3 <== NOT EXECUTED
200adc4: 84 40 80 1c addx %g2, %i4, %g2 <== NOT EXECUTED
200adc8: b9 28 e0 02 sll %g3, 2, %i4 <== NOT EXECUTED
200adcc: bb 28 a0 02 sll %g2, 2, %i5 <== NOT EXECUTED
200add0: 83 30 e0 1e srl %g3, 0x1e, %g1 <== NOT EXECUTED
200add4: f8 27 bf f4 st %i4, [ %fp + -12 ] <== NOT EXECUTED
200add8: 88 10 40 1d or %g1, %i5, %g4 <== NOT EXECUTED
200addc: c8 27 bf f0 st %g4, [ %fp + -16 ] <== NOT EXECUTED
200ade0: f8 1f bf f0 ldd [ %fp + -16 ], %i4 <== NOT EXECUTED
200ade4: 92 80 c0 1d addcc %g3, %i5, %o1 <== NOT EXECUTED
200ade8: 90 40 80 1c addx %g2, %i4, %o0 <== NOT EXECUTED
200adec: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED
200adf0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
200adf4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED
200adf8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200adfc: 40 00 38 6f call 2018fb8 <__udivdi3> <== NOT EXECUTED
200ae00: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200ae04: 94 10 20 00 clr %o2 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200ae08: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
200ae0c: b8 10 00 09 mov %o1, %i4 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200ae10: 40 00 38 6a call 2018fb8 <__udivdi3> <== NOT EXECUTED
200ae14: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
*fval_percentage = answer % 1000;
200ae18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200ae1c: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED
*fval_percentage = answer % 1000;
200ae20: 94 10 20 00 clr %o2 <== NOT EXECUTED
200ae24: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
200ae28: 40 00 39 39 call 201930c <__umoddi3> <== NOT EXECUTED
200ae2c: 92 10 00 1c mov %i4, %o1 <== NOT EXECUTED
200ae30: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
200ae34: 81 c7 e0 08 ret <== NOT EXECUTED
200ae38: 81 e8 00 00 restore <== NOT EXECUTED
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
200ae3c: c0 26 80 00 clr [ %i2 ]
*fval_percentage = 0;
200ae40: c0 26 c0 00 clr [ %i3 ]
return;
200ae44: 81 c7 e0 08 ret
200ae48: 81 e8 00 00 restore
0200ae4c <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
200ae4c: c6 02 00 00 ld [ %o0 ], %g3
200ae50: c4 02 40 00 ld [ %o1 ], %g2
200ae54: 80 a0 c0 02 cmp %g3, %g2
200ae58: 06 80 00 0a bl 200ae80 <_Timespec_Less_than+0x34> <== NEVER TAKEN
200ae5c: 82 10 20 01 mov 1, %g1
return true;
if ( lhs->tv_sec > rhs->tv_sec )
200ae60: 80 a0 c0 02 cmp %g3, %g2
200ae64: 14 80 00 07 bg 200ae80 <_Timespec_Less_than+0x34>
200ae68: 82 10 20 00 clr %g1
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
200ae6c: c6 02 20 04 ld [ %o0 + 4 ], %g3
200ae70: c4 02 60 04 ld [ %o1 + 4 ], %g2
200ae74: 80 a0 c0 02 cmp %g3, %g2
200ae78: 16 80 00 04 bge 200ae88 <_Timespec_Less_than+0x3c> <== ALWAYS TAKEN
200ae7c: 82 10 20 01 mov 1, %g1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
200ae80: 81 c3 e0 08 retl
200ae84: 90 08 60 01 and %g1, 1, %o0
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
200ae88: 82 10 20 00 clr %g1
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
200ae8c: 81 c3 e0 08 retl
200ae90: 90 08 60 01 and %g1, 1, %o0
0200c090 <_Timespec_Subtract>:
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
200c090: c2 02 20 04 ld [ %o0 + 4 ], %g1
200c094: c4 02 60 04 ld [ %o1 + 4 ], %g2
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c098: c8 02 40 00 ld [ %o1 ], %g4
const struct timespec *end,
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
200c09c: 80 a0 80 01 cmp %g2, %g1
200c0a0: 06 80 00 07 bl 200c0bc <_Timespec_Subtract+0x2c> <== NEVER TAKEN
200c0a4: c6 02 00 00 ld [ %o0 ], %g3
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
result->tv_nsec = end->tv_nsec - start->tv_nsec;
200c0a8: 82 20 80 01 sub %g2, %g1, %g1
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
200c0ac: 86 21 00 03 sub %g4, %g3, %g3
result->tv_nsec = end->tv_nsec - start->tv_nsec;
200c0b0: c2 22 a0 04 st %g1, [ %o2 + 4 ]
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
} else {
result->tv_sec = end->tv_sec - start->tv_sec;
200c0b4: 81 c3 e0 08 retl
200c0b8: c6 22 80 00 st %g3, [ %o2 ]
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0bc: 86 21 00 03 sub %g4, %g3, %g3 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0c0: 09 0e e6 b2 sethi %hi(0x3b9ac800), %g4 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0c4: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0c8: 88 11 22 00 or %g4, 0x200, %g4 <== NOT EXECUTED
struct timespec *result
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
200c0cc: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED
result->tv_nsec =
(TOD_NANOSECONDS_PER_SECOND - start->tv_nsec) + end->tv_nsec;
200c0d0: 84 00 80 04 add %g2, %g4, %g2 <== NOT EXECUTED
200c0d4: 82 20 80 01 sub %g2, %g1, %g1 <== NOT EXECUTED
)
{
if (end->tv_nsec < start->tv_nsec) {
result->tv_sec = end->tv_sec - start->tv_sec - 1;
result->tv_nsec =
200c0d8: 81 c3 e0 08 retl <== NOT EXECUTED
200c0dc: c2 22 a0 04 st %g1, [ %o2 + 4 ] <== NOT EXECUTED
0200cb54 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
200cb54: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
200cb58: d4 1e 40 00 ldd [ %i1 ], %o2
200cb5c: 80 92 80 0b orcc %o2, %o3, %g0
200cb60: 22 80 00 2f be,a 200cc1c <_Timestamp64_Divide+0xc8> <== NEVER TAKEN
200cb64: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200cb68: f8 1e 00 00 ldd [ %i0 ], %i4
200cb6c: 83 2f 20 02 sll %i4, 2, %g1
200cb70: 9b 2f 60 02 sll %i5, 2, %o5
200cb74: 89 37 60 1e srl %i5, 0x1e, %g4
200cb78: 98 11 00 01 or %g4, %g1, %o4
200cb7c: 83 33 60 1b srl %o5, 0x1b, %g1
200cb80: 85 2b 20 05 sll %o4, 5, %g2
200cb84: 87 2b 60 05 sll %o5, 5, %g3
200cb88: 84 10 40 02 or %g1, %g2, %g2
200cb8c: 86 a0 c0 0d subcc %g3, %o5, %g3
200cb90: 84 60 80 0c subx %g2, %o4, %g2
200cb94: 86 80 c0 1d addcc %g3, %i5, %g3
200cb98: 83 30 e0 1e srl %g3, 0x1e, %g1
200cb9c: 84 40 80 1c addx %g2, %i4, %g2
200cba0: 93 28 e0 02 sll %g3, 2, %o1
200cba4: 91 28 a0 02 sll %g2, 2, %o0
200cba8: 86 80 c0 09 addcc %g3, %o1, %g3
200cbac: 90 10 40 08 or %g1, %o0, %o0
200cbb0: 83 30 e0 1e srl %g3, 0x1e, %g1
200cbb4: 84 40 80 08 addx %g2, %o0, %g2
200cbb8: b3 28 e0 02 sll %g3, 2, %i1
200cbbc: b1 28 a0 02 sll %g2, 2, %i0
200cbc0: 92 80 c0 19 addcc %g3, %i1, %o1
200cbc4: b0 10 40 18 or %g1, %i0, %i0
200cbc8: 87 32 60 1b srl %o1, 0x1b, %g3
200cbcc: 90 40 80 18 addx %g2, %i0, %o0
200cbd0: 83 2a 60 05 sll %o1, 5, %g1
200cbd4: 85 2a 20 05 sll %o0, 5, %g2
200cbd8: 92 10 00 01 mov %g1, %o1
200cbdc: 40 00 38 25 call 201ac70 <__divdi3>
200cbe0: 90 10 c0 02 or %g3, %g2, %o0
*_ival_percentage = answer / 1000;
200cbe4: 94 10 20 00 clr %o2
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200cbe8: b0 10 00 08 mov %o0, %i0
200cbec: b8 10 00 09 mov %o1, %i4
*_ival_percentage = answer / 1000;
200cbf0: 40 00 38 20 call 201ac70 <__divdi3>
200cbf4: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
200cbf8: 90 10 00 18 mov %i0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
200cbfc: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
200cc00: 94 10 20 00 clr %o2
200cc04: 96 10 23 e8 mov 0x3e8, %o3
200cc08: 40 00 39 00 call 201b008 <__moddi3>
200cc0c: 92 10 00 1c mov %i4, %o1
200cc10: d2 26 c0 00 st %o1, [ %i3 ]
200cc14: 81 c7 e0 08 ret
200cc18: 81 e8 00 00 restore
{
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
*_ival_percentage = 0;
*_fval_percentage = 0;
200cc1c: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
200cc20: 81 c7 e0 08 ret <== NOT EXECUTED
200cc24: 81 e8 00 00 restore <== NOT EXECUTED
0200b3d0 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
200b3d0: 9d e3 bf a0 save %sp, -96, %sp
200b3d4: 39 00 80 75 sethi %hi(0x201d400), %i4
200b3d8: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b3dc: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b3e0: 80 a7 40 1c cmp %i5, %i4
200b3e4: 02 80 00 0d be 200b418 <_User_extensions_Fatal+0x48> <== NEVER TAKEN
200b3e8: 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.fatal != NULL )
200b3ec: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200b3f0: 80 a0 60 00 cmp %g1, 0
200b3f4: 02 80 00 05 be 200b408 <_User_extensions_Fatal+0x38>
200b3f8: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
200b3fc: 92 10 00 19 mov %i1, %o1
200b400: 9f c0 40 00 call %g1
200b404: 94 10 00 1a mov %i2, %o2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b408: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b40c: 80 a7 40 1c cmp %i5, %i4
200b410: 32 bf ff f8 bne,a 200b3f0 <_User_extensions_Fatal+0x20>
200b414: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
200b418: 81 c7 e0 08 ret
200b41c: 81 e8 00 00 restore
0200b27c <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
200b27c: 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;
200b280: 07 00 80 71 sethi %hi(0x201c400), %g3
200b284: 86 10 e2 4c or %g3, 0x24c, %g3 ! 201c64c <Configuration>
initial_extensions = Configuration.User_extension_table;
200b288: f6 00 e0 44 ld [ %g3 + 0x44 ], %i3
200b28c: 3b 00 80 75 sethi %hi(0x201d400), %i5
200b290: 09 00 80 74 sethi %hi(0x201d000), %g4
200b294: 84 17 61 98 or %i5, 0x198, %g2
200b298: 82 11 23 b4 or %g4, 0x3b4, %g1
200b29c: b4 00 a0 04 add %g2, 4, %i2
200b2a0: b8 00 60 04 add %g1, 4, %i4
200b2a4: f4 27 61 98 st %i2, [ %i5 + 0x198 ]
head->previous = NULL;
200b2a8: c0 20 a0 04 clr [ %g2 + 4 ]
tail->previous = head;
200b2ac: c4 20 a0 08 st %g2, [ %g2 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200b2b0: f8 21 23 b4 st %i4, [ %g4 + 0x3b4 ]
head->previous = NULL;
200b2b4: c0 20 60 04 clr [ %g1 + 4 ]
tail->previous = head;
200b2b8: c2 20 60 08 st %g1, [ %g1 + 8 ]
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
200b2bc: 80 a6 e0 00 cmp %i3, 0
200b2c0: 02 80 00 1b be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200b2c4: f4 00 e0 40 ld [ %g3 + 0x40 ], %i2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200b2c8: 83 2e a0 02 sll %i2, 2, %g1
200b2cc: b9 2e a0 04 sll %i2, 4, %i4
200b2d0: b8 27 00 01 sub %i4, %g1, %i4
200b2d4: b8 07 00 1a add %i4, %i2, %i4
200b2d8: b9 2f 20 02 sll %i4, 2, %i4
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200b2dc: 40 00 01 9c call 200b94c <_Workspace_Allocate_or_fatal_error>
200b2e0: 90 10 00 1c mov %i4, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200b2e4: 92 10 20 00 clr %o1
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200b2e8: ba 10 00 08 mov %o0, %i5
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200b2ec: 40 00 13 bd call 20101e0 <memset>
200b2f0: 94 10 00 1c mov %i4, %o2
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200b2f4: 80 a6 a0 00 cmp %i2, 0
200b2f8: 02 80 00 0d be 200b32c <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200b2fc: b8 10 20 00 clr %i4
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
200b300: 92 10 00 1b mov %i3, %o1
200b304: 94 10 20 20 mov 0x20, %o2
200b308: 40 00 13 7a call 20100f0 <memcpy>
200b30c: 90 07 60 14 add %i5, 0x14, %o0
_User_extensions_Add_set( extension );
200b310: 40 00 0b 44 call 200e020 <_User_extensions_Add_set>
200b314: 90 10 00 1d mov %i5, %o0
200b318: b8 07 20 01 inc %i4
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
200b31c: ba 07 60 34 add %i5, 0x34, %i5
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200b320: 80 a7 00 1a cmp %i4, %i2
200b324: 12 bf ff f7 bne 200b300 <_User_extensions_Handler_initialization+0x84>
200b328: b6 06 e0 20 add %i3, 0x20, %i3
200b32c: 81 c7 e0 08 ret
200b330: 81 e8 00 00 restore
0200b334 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
200b334: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b338: 39 00 80 75 sethi %hi(0x201d400), %i4
200b33c: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b340: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b344: b8 07 20 04 add %i4, 4, %i4
200b348: 80 a7 40 1c cmp %i5, %i4
200b34c: 02 80 00 0c be 200b37c <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
200b350: 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 )
200b354: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200b358: 80 a0 60 00 cmp %g1, 0
200b35c: 02 80 00 04 be 200b36c <_User_extensions_Thread_begin+0x38>
200b360: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
200b364: 9f c0 40 00 call %g1
200b368: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b36c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b370: 80 a7 40 1c cmp %i5, %i4
200b374: 32 bf ff f9 bne,a 200b358 <_User_extensions_Thread_begin+0x24>
200b378: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
200b37c: 81 c7 e0 08 ret
200b380: 81 e8 00 00 restore
0200b420 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
200b420: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b424: 39 00 80 75 sethi %hi(0x201d400), %i4
200b428: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b42c: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200b430: b8 07 20 04 add %i4, 4, %i4
200b434: 80 a7 40 1c cmp %i5, %i4
200b438: 02 80 00 12 be 200b480 <_User_extensions_Thread_create+0x60><== NEVER TAKEN
200b43c: 82 10 20 01 mov 1, %g1
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)(
200b440: 37 00 80 75 sethi %hi(0x201d400), %i3
!_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 ) {
200b444: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200b448: 80 a0 60 00 cmp %g1, 0
200b44c: 02 80 00 08 be 200b46c <_User_extensions_Thread_create+0x4c>
200b450: 84 16 e1 e0 or %i3, 0x1e0, %g2
status = (*the_extension->Callouts.thread_create)(
200b454: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b458: 9f c0 40 00 call %g1
200b45c: 92 10 00 18 mov %i0, %o1
_Thread_Executing,
the_thread
);
if ( !status )
200b460: 80 8a 20 ff btst 0xff, %o0
200b464: 02 80 00 0a be 200b48c <_User_extensions_Thread_create+0x6c>
200b468: 82 10 20 00 clr %g1
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b46c: fa 07 40 00 ld [ %i5 ], %i5
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
200b470: 80 a7 40 1c cmp %i5, %i4
200b474: 32 bf ff f5 bne,a 200b448 <_User_extensions_Thread_create+0x28>
200b478: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
if ( !status )
return false;
}
}
return true;
200b47c: 82 10 20 01 mov 1, %g1
}
200b480: b0 08 60 01 and %g1, 1, %i0
200b484: 81 c7 e0 08 ret
200b488: 81 e8 00 00 restore
200b48c: b0 08 60 01 and %g1, 1, %i0
200b490: 81 c7 e0 08 ret
200b494: 81 e8 00 00 restore
0200b498 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
200b498: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200b49c: 39 00 80 75 sethi %hi(0x201d400), %i4
200b4a0: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b4a4: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b4a8: 80 a7 40 1c cmp %i5, %i4
200b4ac: 02 80 00 0d be 200b4e0 <_User_extensions_Thread_delete+0x48><== NEVER TAKEN
200b4b0: 37 00 80 75 sethi %hi(0x201d400), %i3
!_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 )
200b4b4: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200b4b8: 80 a0 60 00 cmp %g1, 0
200b4bc: 02 80 00 05 be 200b4d0 <_User_extensions_Thread_delete+0x38>
200b4c0: 84 16 e1 e0 or %i3, 0x1e0, %g2
(*the_extension->Callouts.thread_delete)(
200b4c4: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b4c8: 9f c0 40 00 call %g1
200b4cc: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b4d0: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b4d4: 80 a7 40 1c cmp %i5, %i4
200b4d8: 32 bf ff f8 bne,a 200b4b8 <_User_extensions_Thread_delete+0x20>
200b4dc: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
200b4e0: 81 c7 e0 08 ret
200b4e4: 81 e8 00 00 restore
0200b384 <_User_extensions_Thread_exitted>:
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
200b384: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
200b388: 39 00 80 75 sethi %hi(0x201d400), %i4
200b38c: b8 17 21 98 or %i4, 0x198, %i4 ! 201d598 <_User_extensions_List>
200b390: fa 07 20 08 ld [ %i4 + 8 ], %i5
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b394: 80 a7 40 1c cmp %i5, %i4
200b398: 02 80 00 0c be 200b3c8 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
200b39c: 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 )
200b3a0: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200b3a4: 80 a0 60 00 cmp %g1, 0
200b3a8: 02 80 00 04 be 200b3b8 <_User_extensions_Thread_exitted+0x34>
200b3ac: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
200b3b0: 9f c0 40 00 call %g1
200b3b4: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
200b3b8: fa 07 60 04 ld [ %i5 + 4 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
200b3bc: 80 a7 40 1c cmp %i5, %i4
200b3c0: 32 bf ff f9 bne,a 200b3a4 <_User_extensions_Thread_exitted+0x20>
200b3c4: c2 07 60 2c ld [ %i5 + 0x2c ], %g1
200b3c8: 81 c7 e0 08 ret
200b3cc: 81 e8 00 00 restore
0200bd28 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
200bd28: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200bd2c: 39 00 80 78 sethi %hi(0x201e000), %i4
200bd30: fa 07 20 b8 ld [ %i4 + 0xb8 ], %i5 ! 201e0b8 <_User_extensions_List>
200bd34: b8 17 20 b8 or %i4, 0xb8, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200bd38: b8 07 20 04 add %i4, 4, %i4
200bd3c: 80 a7 40 1c cmp %i5, %i4
200bd40: 02 80 00 0d be 200bd74 <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
200bd44: 37 00 80 78 sethi %hi(0x201e000), %i3
!_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 )
200bd48: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200bd4c: 80 a0 60 00 cmp %g1, 0
200bd50: 02 80 00 05 be 200bd64 <_User_extensions_Thread_restart+0x3c>
200bd54: 84 16 e1 00 or %i3, 0x100, %g2
(*the_extension->Callouts.thread_restart)(
200bd58: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200bd5c: 9f c0 40 00 call %g1
200bd60: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200bd64: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200bd68: 80 a7 40 1c cmp %i5, %i4
200bd6c: 32 bf ff f8 bne,a 200bd4c <_User_extensions_Thread_restart+0x24>
200bd70: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
200bd74: 81 c7 e0 08 ret
200bd78: 81 e8 00 00 restore
0200b4e8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
200b4e8: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
200b4ec: 39 00 80 75 sethi %hi(0x201d400), %i4
200b4f0: fa 07 21 98 ld [ %i4 + 0x198 ], %i5 ! 201d598 <_User_extensions_List>
200b4f4: b8 17 21 98 or %i4, 0x198, %i4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b4f8: b8 07 20 04 add %i4, 4, %i4
200b4fc: 80 a7 40 1c cmp %i5, %i4
200b500: 02 80 00 0d be 200b534 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
200b504: 37 00 80 75 sethi %hi(0x201d400), %i3
!_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 )
200b508: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b50c: 80 a0 60 00 cmp %g1, 0
200b510: 02 80 00 05 be 200b524 <_User_extensions_Thread_start+0x3c>
200b514: 84 16 e1 e0 or %i3, 0x1e0, %g2
(*the_extension->Callouts.thread_start)(
200b518: d0 00 a0 0c ld [ %g2 + 0xc ], %o0
200b51c: 9f c0 40 00 call %g1
200b520: 92 10 00 18 mov %i0, %o1
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
200b524: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
200b528: 80 a7 40 1c cmp %i5, %i4
200b52c: 32 bf ff f8 bne,a 200b50c <_User_extensions_Thread_start+0x24>
200b530: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b534: 81 c7 e0 08 ret
200b538: 81 e8 00 00 restore
0200b53c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
200b53c: 9d e3 bf a0 save %sp, -96, %sp
200b540: 39 00 80 74 sethi %hi(0x201d000), %i4
200b544: fa 07 23 b4 ld [ %i4 + 0x3b4 ], %i5 ! 201d3b4 <_User_extensions_Switches_list>
200b548: b8 17 23 b4 or %i4, 0x3b4, %i4
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200b54c: b8 07 20 04 add %i4, 4, %i4
200b550: 80 a7 40 1c cmp %i5, %i4
200b554: 02 80 00 0a be 200b57c <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
200b558: 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 );
200b55c: c2 07 60 08 ld [ %i5 + 8 ], %g1
200b560: 90 10 00 18 mov %i0, %o0
200b564: 9f c0 40 00 call %g1
200b568: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
200b56c: fa 07 40 00 ld [ %i5 ], %i5
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
200b570: 80 a7 40 1c cmp %i5, %i4
200b574: 32 bf ff fb bne,a 200b560 <_User_extensions_Thread_switch+0x24>
200b578: c2 07 60 08 ld [ %i5 + 8 ], %g1
200b57c: 81 c7 e0 08 ret
200b580: 81 e8 00 00 restore
0200cf70 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200cf70: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200cf74: 7f ff d9 24 call 2003404 <sparc_disable_interrupts>
200cf78: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200cf7c: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200cf80: b6 06 20 04 add %i0, 4, %i3
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200cf84: 80 a0 40 1b cmp %g1, %i3
200cf88: 02 80 00 1e be 200d000 <_Watchdog_Adjust+0x90>
200cf8c: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200cf90: 12 80 00 1e bne 200d008 <_Watchdog_Adjust+0x98>
200cf94: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200cf98: 80 a6 a0 00 cmp %i2, 0
200cf9c: 02 80 00 19 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200cfa0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200cfa4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200cfa8: 80 a6 80 1c cmp %i2, %i4
200cfac: 1a 80 00 0a bcc 200cfd4 <_Watchdog_Adjust+0x64> <== ALWAYS TAKEN
200cfb0: b2 10 20 01 mov 1, %i1
_Watchdog_First( header )->delta_interval -= units;
200cfb4: 10 80 00 1c b 200d024 <_Watchdog_Adjust+0xb4> <== NOT EXECUTED
200cfb8: b8 27 00 1a sub %i4, %i2, %i4 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200cfbc: 02 80 00 11 be 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200cfc0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200cfc4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
200cfc8: 80 a7 00 1a cmp %i4, %i2
200cfcc: 38 80 00 16 bgu,a 200d024 <_Watchdog_Adjust+0xb4>
200cfd0: b8 27 00 1a sub %i4, %i2, %i4
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200cfd4: f2 20 60 10 st %i1, [ %g1 + 0x10 ]
_ISR_Enable( level );
200cfd8: 7f ff d9 0f call 2003414 <sparc_enable_interrupts>
200cfdc: 01 00 00 00 nop
_Watchdog_Tickle( header );
200cfe0: 40 00 00 ab call 200d28c <_Watchdog_Tickle>
200cfe4: 90 10 00 1d mov %i5, %o0
_ISR_Disable( level );
200cfe8: 7f ff d9 07 call 2003404 <sparc_disable_interrupts>
200cfec: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200cff0: c2 07 40 00 ld [ %i5 ], %g1
if ( _Chain_Is_empty( header ) )
200cff4: 80 a6 c0 01 cmp %i3, %g1
200cff8: 32 bf ff f1 bne,a 200cfbc <_Watchdog_Adjust+0x4c>
200cffc: b4 a6 80 1c subcc %i2, %i4, %i2
}
break;
}
}
_ISR_Enable( level );
200d000: 7f ff d9 05 call 2003414 <sparc_enable_interrupts>
200d004: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200d008: 12 bf ff fe bne 200d000 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200d00c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200d010: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200d014: b4 00 80 1a add %g2, %i2, %i2
200d018: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200d01c: 7f ff d8 fe call 2003414 <sparc_enable_interrupts>
200d020: 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;
200d024: 10 bf ff f7 b 200d000 <_Watchdog_Adjust+0x90>
200d028: f8 20 60 10 st %i4, [ %g1 + 0x10 ]
0200b70c <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200b70c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200b710: 7f ff db ea call 20026b8 <sparc_disable_interrupts>
200b714: 01 00 00 00 nop
previous_state = the_watchdog->state;
200b718: fa 06 20 08 ld [ %i0 + 8 ], %i5
switch ( previous_state ) {
200b71c: 80 a7 60 01 cmp %i5, 1
200b720: 02 80 00 2a be 200b7c8 <_Watchdog_Remove+0xbc>
200b724: 03 00 80 75 sethi %hi(0x201d400), %g1
200b728: 1a 80 00 09 bcc 200b74c <_Watchdog_Remove+0x40>
200b72c: 80 a7 60 03 cmp %i5, 3
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b730: 03 00 80 75 sethi %hi(0x201d400), %g1
200b734: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot>
200b738: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b73c: 7f ff db e3 call 20026c8 <sparc_enable_interrupts>
200b740: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b744: 81 c7 e0 08 ret
200b748: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
200b74c: 18 bf ff fa bgu 200b734 <_Watchdog_Remove+0x28> <== NEVER TAKEN
200b750: 03 00 80 75 sethi %hi(0x201d400), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
200b754: c2 06 00 00 ld [ %i0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200b758: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200b75c: c4 00 40 00 ld [ %g1 ], %g2
200b760: 80 a0 a0 00 cmp %g2, 0
200b764: 02 80 00 07 be 200b780 <_Watchdog_Remove+0x74>
200b768: 05 00 80 75 sethi %hi(0x201d400), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200b76c: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200b770: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
200b774: 84 00 c0 02 add %g3, %g2, %g2
200b778: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200b77c: 05 00 80 75 sethi %hi(0x201d400), %g2
200b780: c4 00 a0 bc ld [ %g2 + 0xbc ], %g2 ! 201d4bc <_Watchdog_Sync_count>
200b784: 80 a0 a0 00 cmp %g2, 0
200b788: 22 80 00 07 be,a 200b7a4 <_Watchdog_Remove+0x98>
200b78c: c4 06 20 04 ld [ %i0 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200b790: 05 00 80 75 sethi %hi(0x201d400), %g2
200b794: c6 00 a1 e8 ld [ %g2 + 0x1e8 ], %g3 ! 201d5e8 <_Per_CPU_Information+0x8>
200b798: 05 00 80 75 sethi %hi(0x201d400), %g2
200b79c: c6 20 a0 5c st %g3, [ %g2 + 0x5c ] ! 201d45c <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200b7a0: c4 06 20 04 ld [ %i0 + 4 ], %g2
next->previous = previous;
200b7a4: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200b7a8: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b7ac: 03 00 80 75 sethi %hi(0x201d400), %g1
200b7b0: c2 00 60 c0 ld [ %g1 + 0xc0 ], %g1 ! 201d4c0 <_Watchdog_Ticks_since_boot>
200b7b4: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b7b8: 7f ff db c4 call 20026c8 <sparc_enable_interrupts>
200b7bc: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b7c0: 81 c7 e0 08 ret
200b7c4: 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;
200b7c8: c2 00 60 c0 ld [ %g1 + 0xc0 ], %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;
200b7cc: 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;
200b7d0: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
200b7d4: 7f ff db bd call 20026c8 <sparc_enable_interrupts>
200b7d8: b0 10 00 1d mov %i5, %i0
return( previous_state );
}
200b7dc: 81 c7 e0 08 ret
200b7e0: 81 e8 00 00 restore
0200c924 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200c924: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200c928: 7f ff d9 98 call 2002f88 <sparc_disable_interrupts>
200c92c: 01 00 00 00 nop
200c930: ba 10 00 08 mov %o0, %i5
printk( "Watchdog Chain: %s %p\n", name, header );
200c934: 11 00 80 74 sethi %hi(0x201d000), %o0
200c938: 94 10 00 19 mov %i1, %o2
200c93c: 92 10 00 18 mov %i0, %o1
200c940: 7f ff e1 ac call 2004ff0 <printk>
200c944: 90 12 23 30 or %o0, 0x330, %o0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c948: f8 06 40 00 ld [ %i1 ], %i4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c94c: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200c950: 80 a7 00 19 cmp %i4, %i1
200c954: 02 80 00 0f be 200c990 <_Watchdog_Report_chain+0x6c>
200c958: 11 00 80 74 sethi %hi(0x201d000), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200c95c: 92 10 00 1c mov %i4, %o1
200c960: 40 00 00 0f call 200c99c <_Watchdog_Report>
200c964: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
200c968: f8 07 00 00 ld [ %i4 ], %i4
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
200c96c: 80 a7 00 19 cmp %i4, %i1
200c970: 12 bf ff fc bne 200c960 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
200c974: 92 10 00 1c mov %i4, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200c978: 11 00 80 74 sethi %hi(0x201d000), %o0
200c97c: 92 10 00 18 mov %i0, %o1
200c980: 7f ff e1 9c call 2004ff0 <printk>
200c984: 90 12 23 48 or %o0, 0x348, %o0
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
200c988: 7f ff d9 84 call 2002f98 <sparc_enable_interrupts>
200c98c: 91 e8 00 1d restore %g0, %i5, %o0
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200c990: 7f ff e1 98 call 2004ff0 <printk>
200c994: 90 12 23 58 or %o0, 0x358, %o0
200c998: 30 bf ff fc b,a 200c988 <_Watchdog_Report_chain+0x64>
0200b6fc <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
200b6fc: 9d e3 bf a0 save %sp, -96, %sp
char *dup = _Workspace_Allocate(len + 1);
200b700: 7f ff ff e2 call 200b688 <_Workspace_Allocate>
200b704: 90 06 60 01 add %i1, 1, %o0
if (dup != NULL) {
200b708: ba 92 20 00 orcc %o0, 0, %i5
200b70c: 02 80 00 05 be 200b720 <_Workspace_String_duplicate+0x24> <== NEVER TAKEN
200b710: 92 10 00 18 mov %i0, %o1
dup [len] = '\0';
200b714: c0 2f 40 19 clrb [ %i5 + %i1 ]
memcpy(dup, string, len);
200b718: 40 00 12 72 call 20100e0 <memcpy>
200b71c: 94 10 00 19 mov %i1, %o2
}
return dup;
}
200b720: 81 c7 e0 08 ret
200b724: 91 e8 00 1d restore %g0, %i5, %o0
02008934 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2008934: 9d e3 bf 98 save %sp, -104, %sp
2008938: ba 10 00 18 mov %i0, %i5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200893c: 40 00 01 8d call 2008f70 <_Chain_Get>
2008940: 90 10 00 1d mov %i5, %o0
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2008944: 92 10 20 00 clr %o1
2008948: b8 10 00 08 mov %o0, %i4
200894c: 94 10 00 1a mov %i2, %o2
2008950: 90 10 00 19 mov %i1, %o0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2008954: 80 a7 20 00 cmp %i4, 0
2008958: 12 80 00 0a bne 2008980 <rtems_chain_get_with_wait+0x4c>
200895c: 96 07 bf fc add %fp, -4, %o3
) {
rtems_event_set out;
sc = rtems_event_receive(
2008960: 7f ff fc f4 call 2007d30 <rtems_event_receive>
2008964: 01 00 00 00 nop
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
2008968: 80 a2 20 00 cmp %o0, 0
200896c: 02 bf ff f4 be 200893c <rtems_chain_get_with_wait+0x8> <== NEVER TAKEN
2008970: b0 10 00 08 mov %o0, %i0
timeout,
&out
);
}
*node_ptr = node;
2008974: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2008978: 81 c7 e0 08 ret
200897c: 81 e8 00 00 restore
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
2008980: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
2008984: f8 26 c0 00 st %i4, [ %i3 ]
return sc;
}
2008988: 81 c7 e0 08 ret
200898c: 91 e8 00 08 restore %g0, %o0, %o0
02009938 <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
)
{
2009938: 9d e3 bf a0 save %sp, -96, %sp
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
200993c: 03 00 80 85 sethi %hi(0x2021400), %g1
2009940: c4 00 61 88 ld [ %g1 + 0x188 ], %g2 ! 2021588 <_Per_CPU_Information+0x8>
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
)
{
2009944: 86 10 00 19 mov %i1, %g3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
2009948: 03 00 80 85 sethi %hi(0x2021400), %g1
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
200994c: 88 10 20 12 mov 0x12, %g4
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
2009950: 80 a0 a0 00 cmp %g2, 0
2009954: 02 80 00 04 be 2009964 <rtems_io_register_driver+0x2c>
2009958: de 00 62 24 ld [ %g1 + 0x224 ], %o7
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
200995c: 81 c7 e0 08 ret
2009960: 91 e8 00 04 restore %g0, %g4, %o0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
2009964: 80 a6 a0 00 cmp %i2, 0
2009968: 02 80 00 40 be 2009a68 <rtems_io_register_driver+0x130>
200996c: 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 )
2009970: 02 80 00 3e be 2009a68 <rtems_io_register_driver+0x130>
2009974: de 26 80 00 st %o7, [ %i2 ]
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009978: c4 06 40 00 ld [ %i1 ], %g2
200997c: 80 a0 a0 00 cmp %g2, 0
2009980: 22 80 00 37 be,a 2009a5c <rtems_io_register_driver+0x124>
2009984: 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 )
2009988: 80 a3 c0 18 cmp %o7, %i0
200998c: 08 bf ff f4 bleu 200995c <rtems_io_register_driver+0x24>
2009990: 88 10 20 0a mov 0xa, %g4
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2009994: 05 00 80 84 sethi %hi(0x2021000), %g2
2009998: c8 00 a3 50 ld [ %g2 + 0x350 ], %g4 ! 2021350 <_Thread_Dispatch_disable_level>
200999c: 88 01 20 01 inc %g4
20099a0: c8 20 a3 50 st %g4, [ %g2 + 0x350 ]
return _Thread_Dispatch_disable_level;
20099a4: c4 00 a3 50 ld [ %g2 + 0x350 ], %g2
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
20099a8: 80 a6 20 00 cmp %i0, 0
20099ac: 12 80 00 32 bne 2009a74 <rtems_io_register_driver+0x13c>
20099b0: 1f 00 80 85 sethi %hi(0x2021400), %o7
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
20099b4: c8 00 62 24 ld [ %g1 + 0x224 ], %g4
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
20099b8: 80 a1 20 00 cmp %g4, 0
20099bc: 02 80 00 45 be 2009ad0 <rtems_io_register_driver+0x198> <== NEVER TAKEN
20099c0: c2 03 e2 28 ld [ %o7 + 0x228 ], %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20099c4: 10 80 00 06 b 20099dc <rtems_io_register_driver+0xa4>
20099c8: c4 00 40 00 ld [ %g1 ], %g2
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
20099cc: 80 a6 00 04 cmp %i0, %g4
20099d0: 02 80 00 35 be 2009aa4 <rtems_io_register_driver+0x16c>
20099d4: 82 00 60 18 add %g1, 0x18, %g1
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
20099d8: c4 00 40 00 ld [ %g1 ], %g2
20099dc: 80 a0 a0 00 cmp %g2, 0
20099e0: 32 bf ff fb bne,a 20099cc <rtems_io_register_driver+0x94>
20099e4: b0 06 20 01 inc %i0
20099e8: c4 00 60 04 ld [ %g1 + 4 ], %g2
20099ec: 80 a0 a0 00 cmp %g2, 0
20099f0: 32 bf ff f7 bne,a 20099cc <rtems_io_register_driver+0x94>
20099f4: b0 06 20 01 inc %i0
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
20099f8: f0 26 80 00 st %i0, [ %i2 ]
20099fc: 83 2e 20 03 sll %i0, 3, %g1
if ( m != n )
2009a00: 80 a1 00 18 cmp %g4, %i0
2009a04: 02 80 00 29 be 2009aa8 <rtems_io_register_driver+0x170> <== NEVER TAKEN
2009a08: 9b 2e 20 05 sll %i0, 5, %o5
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a0c: c8 00 c0 00 ld [ %g3 ], %g4
2009a10: c4 03 e2 28 ld [ %o7 + 0x228 ], %g2
2009a14: 82 23 40 01 sub %o5, %g1, %g1
2009a18: c8 20 80 01 st %g4, [ %g2 + %g1 ]
2009a1c: c8 00 e0 04 ld [ %g3 + 4 ], %g4
2009a20: 82 00 80 01 add %g2, %g1, %g1
2009a24: c8 20 60 04 st %g4, [ %g1 + 4 ]
2009a28: c4 00 e0 08 ld [ %g3 + 8 ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2009a2c: b2 10 20 00 clr %i1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a30: c4 20 60 08 st %g2, [ %g1 + 8 ]
2009a34: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
2009a38: b4 10 20 00 clr %i2
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
2009a3c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
2009a40: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2009a44: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
2009a48: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
_Thread_Enable_dispatch();
2009a4c: 40 00 08 1a call 200bab4 <_Thread_Enable_dispatch>
2009a50: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
return rtems_io_initialize( major, 0, NULL );
2009a54: 40 00 1e ca call 201157c <rtems_io_initialize>
2009a58: 81 e8 00 00 restore
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009a5c: 80 a0 a0 00 cmp %g2, 0
2009a60: 12 bf ff cb bne 200998c <rtems_io_register_driver+0x54>
2009a64: 80 a3 c0 18 cmp %o7, %i0
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
2009a68: 88 10 20 09 mov 9, %g4
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
2009a6c: 81 c7 e0 08 ret
2009a70: 91 e8 00 04 restore %g0, %g4, %o0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
2009a74: c8 03 e2 28 ld [ %o7 + 0x228 ], %g4
2009a78: 83 2e 20 03 sll %i0, 3, %g1
2009a7c: 9b 2e 20 05 sll %i0, 5, %o5
2009a80: 84 23 40 01 sub %o5, %g1, %g2
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
2009a84: d8 01 00 02 ld [ %g4 + %g2 ], %o4
2009a88: 80 a3 20 00 cmp %o4, 0
2009a8c: 02 80 00 0b be 2009ab8 <rtems_io_register_driver+0x180>
2009a90: 84 01 00 02 add %g4, %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();
2009a94: 40 00 08 08 call 200bab4 <_Thread_Enable_dispatch>
2009a98: 01 00 00 00 nop
return RTEMS_RESOURCE_IN_USE;
2009a9c: 10 bf ff b0 b 200995c <rtems_io_register_driver+0x24>
2009aa0: 88 10 20 0c mov 0xc, %g4 ! c <PROM_START+0xc>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2009aa4: f0 26 80 00 st %i0, [ %i2 ]
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
2009aa8: 40 00 08 03 call 200bab4 <_Thread_Enable_dispatch>
2009aac: 01 00 00 00 nop
return sc;
2009ab0: 10 bf ff ab b 200995c <rtems_io_register_driver+0x24>
2009ab4: 88 10 20 05 mov 5, %g4 ! 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;
2009ab8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
2009abc: 80 a0 a0 00 cmp %g2, 0
2009ac0: 12 bf ff f5 bne 2009a94 <rtems_io_register_driver+0x15c>
2009ac4: 01 00 00 00 nop
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
2009ac8: 10 bf ff d1 b 2009a0c <rtems_io_register_driver+0xd4>
2009acc: f0 26 80 00 st %i0, [ %i2 ]
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
2009ad0: 10 bf ff f6 b 2009aa8 <rtems_io_register_driver+0x170> <== NOT EXECUTED
2009ad4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
0200aa54 <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)
{
200aa54: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200aa58: 80 a6 20 00 cmp %i0, 0
200aa5c: 02 80 00 23 be 200aae8 <rtems_iterate_over_all_threads+0x94><== NEVER TAKEN
200aa60: 37 00 80 7f sethi %hi(0x201fc00), %i3
200aa64: b6 16 e1 8c or %i3, 0x18c, %i3 ! 201fd8c <_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)
200aa68: b4 06 e0 0c add %i3, 0xc, %i2
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
200aa6c: c2 06 c0 00 ld [ %i3 ], %g1
200aa70: 80 a0 60 00 cmp %g1, 0
200aa74: 22 80 00 1a be,a 200aadc <rtems_iterate_over_all_threads+0x88>
200aa78: b6 06 e0 04 add %i3, 4, %i3
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
200aa7c: f8 00 60 04 ld [ %g1 + 4 ], %i4
if ( !information )
200aa80: 80 a7 20 00 cmp %i4, 0
200aa84: 22 80 00 16 be,a 200aadc <rtems_iterate_over_all_threads+0x88>
200aa88: b6 06 e0 04 add %i3, 4, %i3
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200aa8c: c2 17 20 10 lduh [ %i4 + 0x10 ], %g1
200aa90: 84 90 60 00 orcc %g1, 0, %g2
200aa94: 22 80 00 12 be,a 200aadc <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
200aa98: b6 06 e0 04 add %i3, 4, %i3 <== NOT EXECUTED
200aa9c: ba 10 20 01 mov 1, %i5
the_thread = (Thread_Control *)information->local_table[ i ];
200aaa0: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200aaa4: 83 2f 60 02 sll %i5, 2, %g1
200aaa8: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
if ( !the_thread )
200aaac: 90 90 60 00 orcc %g1, 0, %o0
200aab0: 02 80 00 05 be 200aac4 <rtems_iterate_over_all_threads+0x70>
200aab4: ba 07 60 01 inc %i5
continue;
(*routine)(the_thread);
200aab8: 9f c6 00 00 call %i0
200aabc: 01 00 00 00 nop
200aac0: c4 17 20 10 lduh [ %i4 + 0x10 ], %g2
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200aac4: 83 28 a0 10 sll %g2, 0x10, %g1
200aac8: 83 30 60 10 srl %g1, 0x10, %g1
200aacc: 80 a0 40 1d cmp %g1, %i5
200aad0: 3a bf ff f5 bcc,a 200aaa4 <rtems_iterate_over_all_threads+0x50>
200aad4: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
200aad8: b6 06 e0 04 add %i3, 4, %i3
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200aadc: 80 a6 c0 1a cmp %i3, %i2
200aae0: 32 bf ff e4 bne,a 200aa70 <rtems_iterate_over_all_threads+0x1c>
200aae4: c2 06 c0 00 ld [ %i3 ], %g1
200aae8: 81 c7 e0 08 ret
200aaec: 81 e8 00 00 restore
02009590 <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
)
{
2009590: 9d e3 bf a0 save %sp, -96, %sp
2009594: 90 10 00 18 mov %i0, %o0
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
2009598: 80 a6 a0 00 cmp %i2, 0
200959c: 02 80 00 21 be 2009620 <rtems_object_get_class_information+0x90>
20095a0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20095a4: 93 2e 60 10 sll %i1, 0x10, %o1
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
20095a8: b0 10 20 0a mov 0xa, %i0
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
20095ac: 40 00 07 74 call 200b37c <_Objects_Get_information>
20095b0: 93 32 60 10 srl %o1, 0x10, %o1
if ( !obj_info )
20095b4: 80 a2 20 00 cmp %o0, 0
20095b8: 02 80 00 1a be 2009620 <rtems_object_get_class_information+0x90>
20095bc: 01 00 00 00 nop
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
20095c0: c4 02 20 0c ld [ %o0 + 0xc ], %g2
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
20095c4: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
20095c8: c6 02 20 08 ld [ %o0 + 8 ], %g3
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
20095cc: c2 0a 20 12 ldub [ %o0 + 0x12 ], %g1
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
20095d0: c4 26 a0 04 st %g2, [ %i2 + 4 ]
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
20095d4: c6 26 80 00 st %g3, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
20095d8: c2 2e a0 0c stb %g1, [ %i2 + 0xc ]
info->maximum = obj_info->maximum;
20095dc: c8 26 a0 08 st %g4, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
20095e0: 80 a1 20 00 cmp %g4, 0
20095e4: 02 80 00 0d be 2009618 <rtems_object_get_class_information+0x88><== NEVER TAKEN
20095e8: 84 10 20 00 clr %g2
20095ec: de 02 20 1c ld [ %o0 + 0x1c ], %o7
20095f0: 86 10 20 01 mov 1, %g3
20095f4: 82 10 20 01 mov 1, %g1
if ( !obj_info->local_table[i] )
20095f8: 87 28 e0 02 sll %g3, 2, %g3
20095fc: c6 03 c0 03 ld [ %o7 + %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++ )
2009600: 82 00 60 01 inc %g1
if ( !obj_info->local_table[i] )
unallocated++;
2009604: 80 a0 00 03 cmp %g0, %g3
2009608: 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++ )
200960c: 80 a1 00 01 cmp %g4, %g1
2009610: 1a bf ff fa bcc 20095f8 <rtems_object_get_class_information+0x68>
2009614: 86 10 00 01 mov %g1, %g3
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2009618: c4 26 a0 10 st %g2, [ %i2 + 0x10 ]
return RTEMS_SUCCESSFUL;
200961c: b0 10 20 00 clr %i0
}
2009620: 81 c7 e0 08 ret
2009624: 81 e8 00 00 restore
020152ec <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
20152ec: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
20152f0: 80 a6 20 00 cmp %i0, 0
20152f4: 12 80 00 04 bne 2015304 <rtems_partition_create+0x18>
20152f8: 82 10 20 03 mov 3, %g1
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
20152fc: 81 c7 e0 08 ret
2015300: 91 e8 00 01 restore %g0, %g1, %o0
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
2015304: 80 a6 60 00 cmp %i1, 0
2015308: 02 bf ff fd be 20152fc <rtems_partition_create+0x10>
201530c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
2015310: 80 a7 60 00 cmp %i5, 0
2015314: 02 bf ff fa be 20152fc <rtems_partition_create+0x10> <== NEVER TAKEN
2015318: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
201531c: 02 bf ff f8 be 20152fc <rtems_partition_create+0x10>
2015320: 82 10 20 08 mov 8, %g1
2015324: 80 a6 a0 00 cmp %i2, 0
2015328: 02 bf ff f5 be 20152fc <rtems_partition_create+0x10>
201532c: 80 a6 80 1b cmp %i2, %i3
2015330: 0a bf ff f3 bcs 20152fc <rtems_partition_create+0x10>
2015334: 80 8e e0 07 btst 7, %i3
2015338: 12 bf ff f1 bne 20152fc <rtems_partition_create+0x10>
201533c: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2015340: 12 bf ff ef bne 20152fc <rtems_partition_create+0x10>
2015344: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2015348: 03 00 80 ec sethi %hi(0x203b000), %g1
201534c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 203b240 <_Thread_Dispatch_disable_level>
2015350: 84 00 a0 01 inc %g2
2015354: c4 20 62 40 st %g2, [ %g1 + 0x240 ]
return _Thread_Dispatch_disable_level;
2015358: c2 00 62 40 ld [ %g1 + 0x240 ], %g1
* 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 );
201535c: 23 00 80 ec sethi %hi(0x203b000), %l1
2015360: 40 00 13 b4 call 201a230 <_Objects_Allocate>
2015364: 90 14 60 54 or %l1, 0x54, %o0 ! 203b054 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2015368: a0 92 20 00 orcc %o0, 0, %l0
201536c: 02 80 00 1a be 20153d4 <rtems_partition_create+0xe8>
2015370: 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;
2015374: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2015378: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
201537c: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2015380: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2015384: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2015388: 40 00 56 b6 call 202ae60 <.udiv>
201538c: 90 10 00 1a mov %i2, %o0
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2015390: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2015394: 94 10 00 08 mov %o0, %o2
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2015398: 96 10 00 1b mov %i3, %o3
201539c: b8 04 20 24 add %l0, 0x24, %i4
20153a0: 40 00 0d 59 call 2018904 <_Chain_Initialize>
20153a4: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
20153a8: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20153ac: a2 14 60 54 or %l1, 0x54, %l1
20153b0: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
20153b4: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20153b8: 85 28 a0 02 sll %g2, 2, %g2
20153bc: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20153c0: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
20153c4: 40 00 18 fa call 201b7ac <_Thread_Enable_dispatch>
20153c8: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
20153cc: 10 bf ff cc b 20152fc <rtems_partition_create+0x10>
20153d0: 82 10 20 00 clr %g1
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
20153d4: 40 00 18 f6 call 201b7ac <_Thread_Enable_dispatch>
20153d8: 01 00 00 00 nop
return RTEMS_TOO_MANY;
20153dc: 10 bf ff c8 b 20152fc <rtems_partition_create+0x10>
20153e0: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
02043c60 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2043c60: 9d e3 bf 98 save %sp, -104, %sp
2043c64: 11 00 81 d1 sethi %hi(0x2074400), %o0
2043c68: 92 10 00 18 mov %i0, %o1
2043c6c: 90 12 20 70 or %o0, 0x70, %o0
2043c70: 7f ff 2f 9f call 200faec <_Objects_Get>
2043c74: 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 ) {
2043c78: c2 07 bf fc ld [ %fp + -4 ], %g1
2043c7c: 80 a0 60 00 cmp %g1, 0
2043c80: 12 80 00 0d bne 2043cb4 <rtems_rate_monotonic_period+0x54>
2043c84: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2043c88: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
2043c8c: 39 00 81 d0 sethi %hi(0x2074000), %i4
2043c90: b8 17 21 a0 or %i4, 0x1a0, %i4 ! 20741a0 <_Per_CPU_Information>
2043c94: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2043c98: 80 a0 80 01 cmp %g2, %g1
2043c9c: 02 80 00 08 be 2043cbc <rtems_rate_monotonic_period+0x5c>
2043ca0: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2043ca4: 7f ff 33 76 call 2010a7c <_Thread_Enable_dispatch>
2043ca8: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
2043cac: 81 c7 e0 08 ret
2043cb0: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2043cb4: 81 c7 e0 08 ret
2043cb8: 91 e8 20 04 restore %g0, 4, %o0
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2043cbc: 12 80 00 0e bne 2043cf4 <rtems_rate_monotonic_period+0x94>
2043cc0: 01 00 00 00 nop
switch ( the_period->state ) {
2043cc4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2043cc8: 80 a0 60 04 cmp %g1, 4
2043ccc: 18 80 00 06 bgu 2043ce4 <rtems_rate_monotonic_period+0x84><== NEVER TAKEN
2043cd0: b0 10 20 00 clr %i0
2043cd4: 83 28 60 02 sll %g1, 2, %g1
2043cd8: 05 00 81 b7 sethi %hi(0x206dc00), %g2
2043cdc: 84 10 a3 bc or %g2, 0x3bc, %g2 ! 206dfbc <CSWTCH.11>
2043ce0: f0 00 80 01 ld [ %g2 + %g1 ], %i0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
2043ce4: 7f ff 33 66 call 2010a7c <_Thread_Enable_dispatch>
2043ce8: 01 00 00 00 nop
return RTEMS_TIMEOUT;
2043cec: 81 c7 e0 08 ret
2043cf0: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
2043cf4: 7f ff 01 25 call 2004188 <sparc_disable_interrupts>
2043cf8: 01 00 00 00 nop
2043cfc: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
2043d00: f6 07 60 38 ld [ %i5 + 0x38 ], %i3
2043d04: 80 a6 e0 00 cmp %i3, 0
2043d08: 02 80 00 19 be 2043d6c <rtems_rate_monotonic_period+0x10c>
2043d0c: 80 a6 e0 02 cmp %i3, 2
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
2043d10: 02 80 00 2e be 2043dc8 <rtems_rate_monotonic_period+0x168>
2043d14: 80 a6 e0 04 cmp %i3, 4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
2043d18: 12 bf ff e5 bne 2043cac <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
2043d1c: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2043d20: 7f ff ff 60 call 2043aa0 <_Rate_monotonic_Update_statistics>
2043d24: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
2043d28: 7f ff 01 1c call 2004198 <sparc_enable_interrupts>
2043d2c: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2043d30: 82 10 20 02 mov 2, %g1
2043d34: 92 07 60 10 add %i5, 0x10, %o1
2043d38: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
2043d3c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043d40: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043d44: 11 00 81 d0 sethi %hi(0x2074000), %o0
2043d48: 7f ff 36 c4 call 2011858 <_Watchdog_Insert>
2043d4c: 90 12 20 30 or %o0, 0x30, %o0 ! 2074030 <_Watchdog_Ticks_chain>
2043d50: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
2043d54: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
2043d58: 03 00 81 bf sethi %hi(0x206fc00), %g1
2043d5c: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 ! 206fcd4 <_Scheduler+0x34>
2043d60: 9f c0 40 00 call %g1
2043d64: b0 10 20 06 mov 6, %i0
2043d68: 30 bf ff df b,a 2043ce4 <rtems_rate_monotonic_period+0x84>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
2043d6c: 7f ff 01 0b call 2004198 <sparc_enable_interrupts>
2043d70: 01 00 00 00 nop
the_period->next_length = length;
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2043d74: 90 10 00 1d mov %i5, %o0
2043d78: 7f ff ff 99 call 2043bdc <_Rate_monotonic_Initiate_statistics>
2043d7c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
2043d80: 82 10 20 02 mov 2, %g1
2043d84: 92 07 60 10 add %i5, 0x10, %o1
2043d88: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
2043d8c: 11 00 81 d0 sethi %hi(0x2074000), %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043d90: 03 00 81 0f sethi %hi(0x2043c00), %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043d94: 90 12 20 30 or %o0, 0x30, %o0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043d98: 82 10 62 3c or %g1, 0x23c, %g1
the_watchdog->id = id;
2043d9c: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2043da0: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2043da4: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2043da8: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2043dac: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2043db0: 7f ff 36 aa call 2011858 <_Watchdog_Insert>
2043db4: b0 10 20 00 clr %i0
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2043db8: 7f ff 33 31 call 2010a7c <_Thread_Enable_dispatch>
2043dbc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2043dc0: 81 c7 e0 08 ret
2043dc4: 81 e8 00 00 restore
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2043dc8: 7f ff ff 36 call 2043aa0 <_Rate_monotonic_Update_statistics>
2043dcc: 90 10 00 1d mov %i5, %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;
2043dd0: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
2043dd4: f2 27 60 3c st %i1, [ %i5 + 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;
2043dd8: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2043ddc: 7f ff 00 ef call 2004198 <sparc_enable_interrupts>
2043de0: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
2043de4: c2 07 20 0c ld [ %i4 + 0xc ], %g1
2043de8: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2043dec: 90 10 00 01 mov %g1, %o0
2043df0: 13 00 00 10 sethi %hi(0x4000), %o1
2043df4: 7f ff 35 78 call 20113d4 <_Thread_Set_state>
2043df8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2043dfc: 7f ff 00 e3 call 2004188 <sparc_disable_interrupts>
2043e00: 01 00 00 00 nop
local_state = the_period->state;
2043e04: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
2043e08: f6 27 60 38 st %i3, [ %i5 + 0x38 ]
_ISR_Enable( level );
2043e0c: 7f ff 00 e3 call 2004198 <sparc_enable_interrupts>
2043e10: 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 )
2043e14: 80 a6 a0 03 cmp %i2, 3
2043e18: 22 80 00 06 be,a 2043e30 <rtems_rate_monotonic_period+0x1d0>
2043e1c: d0 07 20 0c ld [ %i4 + 0xc ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
2043e20: 7f ff 33 17 call 2010a7c <_Thread_Enable_dispatch>
2043e24: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2043e28: 81 c7 e0 08 ret
2043e2c: 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 );
2043e30: 7f ff 32 21 call 20106b4 <_Thread_Clear_state>
2043e34: 13 00 00 10 sethi %hi(0x4000), %o1
2043e38: 30 bf ff fa b,a 2043e20 <rtems_rate_monotonic_period+0x1c0>
0202d334 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
202d334: 9d e3 bf 38 save %sp, -200, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
202d338: 80 a6 60 00 cmp %i1, 0
202d33c: 02 80 00 48 be 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
202d340: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
202d344: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d348: 9f c6 40 00 call %i1
202d34c: 92 12 60 60 or %o1, 0x60, %o1 ! 2069060 <_TOD_Days_per_month+0x68>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
202d350: 90 10 00 18 mov %i0, %o0
202d354: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d358: 9f c6 40 00 call %i1
202d35c: 92 12 60 80 or %o1, 0x80, %o1 ! 2069080 <_TOD_Days_per_month+0x88>
(*print)( context, "--- Wall times are in seconds ---\n" );
202d360: 90 10 00 18 mov %i0, %o0
202d364: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d368: 9f c6 40 00 call %i1
202d36c: 92 12 60 a8 or %o1, 0xa8, %o1 ! 20690a8 <_TOD_Days_per_month+0xb0>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
202d370: 90 10 00 18 mov %i0, %o0
202d374: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d378: 9f c6 40 00 call %i1
202d37c: 92 12 60 d0 or %o1, 0xd0, %o1 ! 20690d0 <_TOD_Days_per_month+0xd8>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
202d380: 90 10 00 18 mov %i0, %o0
202d384: 13 00 81 a4 sethi %hi(0x2069000), %o1
202d388: 9f c6 40 00 call %i1
202d38c: 92 12 61 20 or %o1, 0x120, %o1 ! 2069120 <_TOD_Days_per_month+0x128>
/*
* 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 ;
202d390: 39 00 81 d1 sethi %hi(0x2074400), %i4
202d394: b8 17 20 70 or %i4, 0x70, %i4 ! 2074470 <_Rate_monotonic_Information>
202d398: fa 07 20 08 ld [ %i4 + 8 ], %i5
202d39c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
202d3a0: 80 a7 40 01 cmp %i5, %g1
202d3a4: 18 80 00 2e bgu 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128><== NEVER TAKEN
202d3a8: 35 00 81 a4 sethi %hi(0x2069000), %i2
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,
202d3ac: 23 00 81 a4 sethi %hi(0x2069000), %l1
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,
202d3b0: 21 00 81 a4 sethi %hi(0x2069000), %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
202d3b4: 37 00 81 a9 sethi %hi(0x206a400), %i3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
202d3b8: b4 16 a1 70 or %i2, 0x170, %i2
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,
202d3bc: a2 14 61 88 or %l1, 0x188, %l1
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,
202d3c0: a0 14 21 a8 or %l0, 0x1a8, %l0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
202d3c4: 10 80 00 06 b 202d3dc <rtems_rate_monotonic_report_statistics_with_plugin+0xa8>
202d3c8: b6 16 e2 48 or %i3, 0x248, %i3
* 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++ ) {
202d3cc: ba 07 60 01 inc %i5
/*
* 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 ;
202d3d0: 80 a0 40 1d cmp %g1, %i5
202d3d4: 0a 80 00 22 bcs 202d45c <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
202d3d8: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
202d3dc: 90 10 00 1d mov %i5, %o0
202d3e0: 40 00 58 ce call 2043718 <rtems_rate_monotonic_get_statistics>
202d3e4: 92 07 bf a0 add %fp, -96, %o1
if ( status != RTEMS_SUCCESSFUL )
202d3e8: 80 a2 20 00 cmp %o0, 0
202d3ec: 32 bf ff f8 bne,a 202d3cc <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
202d3f0: c2 07 20 0c ld [ %i4 + 0xc ], %g1
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
202d3f4: 92 07 bf d8 add %fp, -40, %o1
202d3f8: 40 00 59 3a call 20438e0 <rtems_rate_monotonic_get_status>
202d3fc: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
202d400: d0 07 bf d8 ld [ %fp + -40 ], %o0
202d404: 92 10 20 05 mov 5, %o1
202d408: 7f ff 81 1c call 200d878 <rtems_object_get_name>
202d40c: 94 07 bf f8 add %fp, -8, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
202d410: d8 1f bf a0 ldd [ %fp + -96 ], %o4
202d414: 92 10 00 1a mov %i2, %o1
202d418: 94 10 00 1d mov %i5, %o2
202d41c: 90 10 00 18 mov %i0, %o0
202d420: 9f c6 40 00 call %i1
202d424: 96 07 bf f8 add %fp, -8, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
202d428: 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 );
202d42c: 94 07 bf f0 add %fp, -16, %o2
202d430: 90 07 bf b8 add %fp, -72, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
202d434: 80 a0 60 00 cmp %g1, 0
202d438: 12 80 00 0b bne 202d464 <rtems_rate_monotonic_report_statistics_with_plugin+0x130>
202d43c: 92 10 00 1b mov %i3, %o1
(*print)( context, "\n" );
202d440: 9f c6 40 00 call %i1
202d444: 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 ;
202d448: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
202d44c: ba 07 60 01 inc %i5
/*
* 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 ;
202d450: 80 a0 40 1d cmp %g1, %i5
202d454: 1a bf ff e3 bcc 202d3e0 <rtems_rate_monotonic_report_statistics_with_plugin+0xac><== ALWAYS TAKEN
202d458: 90 10 00 1d mov %i5, %o0
202d45c: 81 c7 e0 08 ret
202d460: 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 );
202d464: 40 00 05 36 call 202e93c <_Timespec_Divide_by_integer>
202d468: 92 10 00 01 mov %g1, %o1
(*print)( context,
202d46c: d0 07 bf ac ld [ %fp + -84 ], %o0
202d470: 40 00 cd 8d call 2060aa4 <.div>
202d474: 92 10 23 e8 mov 0x3e8, %o1
202d478: aa 10 00 08 mov %o0, %l5
202d47c: d0 07 bf b4 ld [ %fp + -76 ], %o0
202d480: 40 00 cd 89 call 2060aa4 <.div>
202d484: 92 10 23 e8 mov 0x3e8, %o1
202d488: c2 07 bf f0 ld [ %fp + -16 ], %g1
202d48c: a6 10 00 08 mov %o0, %l3
202d490: d0 07 bf f4 ld [ %fp + -12 ], %o0
202d494: e4 07 bf a8 ld [ %fp + -88 ], %l2
202d498: e8 07 bf b0 ld [ %fp + -80 ], %l4
202d49c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
202d4a0: 40 00 cd 81 call 2060aa4 <.div>
202d4a4: 92 10 23 e8 mov 0x3e8, %o1
202d4a8: 96 10 00 15 mov %l5, %o3
202d4ac: 98 10 00 14 mov %l4, %o4
202d4b0: 9a 10 00 13 mov %l3, %o5
202d4b4: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202d4b8: 92 10 00 11 mov %l1, %o1
202d4bc: 94 10 00 12 mov %l2, %o2
202d4c0: 9f c6 40 00 call %i1
202d4c4: 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);
202d4c8: d2 07 bf a0 ld [ %fp + -96 ], %o1
202d4cc: 94 07 bf f0 add %fp, -16, %o2
202d4d0: 40 00 05 1b call 202e93c <_Timespec_Divide_by_integer>
202d4d4: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
202d4d8: d0 07 bf c4 ld [ %fp + -60 ], %o0
202d4dc: 40 00 cd 72 call 2060aa4 <.div>
202d4e0: 92 10 23 e8 mov 0x3e8, %o1
202d4e4: a8 10 00 08 mov %o0, %l4
202d4e8: d0 07 bf cc ld [ %fp + -52 ], %o0
202d4ec: 40 00 cd 6e call 2060aa4 <.div>
202d4f0: 92 10 23 e8 mov 0x3e8, %o1
202d4f4: c2 07 bf f0 ld [ %fp + -16 ], %g1
202d4f8: a4 10 00 08 mov %o0, %l2
202d4fc: d0 07 bf f4 ld [ %fp + -12 ], %o0
202d500: ea 07 bf c0 ld [ %fp + -64 ], %l5
202d504: e6 07 bf c8 ld [ %fp + -56 ], %l3
202d508: 92 10 23 e8 mov 0x3e8, %o1
202d50c: 40 00 cd 66 call 2060aa4 <.div>
202d510: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
202d514: 92 10 00 10 mov %l0, %o1
202d518: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
202d51c: 94 10 00 15 mov %l5, %o2
202d520: 90 10 00 18 mov %i0, %o0
202d524: 96 10 00 14 mov %l4, %o3
202d528: 98 10 00 13 mov %l3, %o4
202d52c: 9f c6 40 00 call %i1
202d530: 9a 10 00 12 mov %l2, %o5
/*
* 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 ;
202d534: 10 bf ff a6 b 202d3cc <rtems_rate_monotonic_report_statistics_with_plugin+0x98>
202d538: c2 07 20 0c ld [ %i4 + 0xc ], %g1
0202d554 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
202d554: 9d e3 bf a0 save %sp, -96, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
202d558: 03 00 81 cf sethi %hi(0x2073c00), %g1
202d55c: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2073f70 <_Thread_Dispatch_disable_level>
202d560: 84 00 a0 01 inc %g2
202d564: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
202d568: c2 00 63 70 ld [ %g1 + 0x370 ], %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 ;
202d56c: 39 00 81 d1 sethi %hi(0x2074400), %i4
202d570: b8 17 20 70 or %i4, 0x70, %i4 ! 2074470 <_Rate_monotonic_Information>
202d574: fa 07 20 08 ld [ %i4 + 8 ], %i5
202d578: c2 07 20 0c ld [ %i4 + 0xc ], %g1
202d57c: 80 a7 40 01 cmp %i5, %g1
202d580: 18 80 00 09 bgu 202d5a4 <rtems_rate_monotonic_reset_all_statistics+0x50><== NEVER TAKEN
202d584: 01 00 00 00 nop
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
202d588: 40 00 00 09 call 202d5ac <rtems_rate_monotonic_reset_statistics>
202d58c: 90 10 00 1d mov %i5, %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 ;
202d590: c2 07 20 0c ld [ %i4 + 0xc ], %g1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
202d594: ba 07 60 01 inc %i5
/*
* 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 ;
202d598: 80 a0 40 1d cmp %g1, %i5
202d59c: 1a bf ff fb bcc 202d588 <rtems_rate_monotonic_reset_all_statistics+0x34>
202d5a0: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
202d5a4: 7f ff 8d 36 call 2010a7c <_Thread_Enable_dispatch>
202d5a8: 81 e8 00 00 restore
02008e48 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
2008e48: 9d e3 bf a0 save %sp, -96, %sp
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
uintptr_t page_alignment = control->page_alignment;
2008e4c: f8 06 20 30 ld [ %i0 + 0x30 ], %i4
#include <stdlib.h>
static uintptr_t align_up(uintptr_t page_alignment, uintptr_t value)
{
uintptr_t excess = value % page_alignment;
2008e50: 90 10 00 19 mov %i1, %o0
2008e54: 40 00 44 03 call 2019e60 <.urem>
2008e58: 92 10 00 1c mov %i4, %o1
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
2008e5c: ba 10 00 18 mov %i0, %i5
static uintptr_t align_up(uintptr_t page_alignment, uintptr_t value)
{
uintptr_t excess = value % page_alignment;
if (excess > 0) {
2008e60: b4 10 00 19 mov %i1, %i2
2008e64: 80 a2 20 00 cmp %o0, 0
2008e68: 02 80 00 06 be 2008e80 <rtems_rbheap_allocate+0x38> <== ALWAYS TAKEN
2008e6c: 82 10 20 01 mov 1, %g1
value += page_alignment - excess;
2008e70: b8 06 40 1c add %i1, %i4, %i4 <== NOT EXECUTED
2008e74: b4 27 00 08 sub %i4, %o0, %i2 <== NOT EXECUTED
2008e78: 80 a6 80 19 cmp %i2, %i1 <== NOT EXECUTED
2008e7c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
uintptr_t page_alignment = control->page_alignment;
uintptr_t aligned_size = align_up(page_alignment, size);
if (size > 0 && size <= aligned_size) {
2008e80: 80 88 60 ff btst 0xff, %g1
2008e84: 02 80 00 1f be 2008f00 <rtems_rbheap_allocate+0xb8> <== NEVER TAKEN
2008e88: 80 a6 60 00 cmp %i1, 0
2008e8c: 02 80 00 1d be 2008f00 <rtems_rbheap_allocate+0xb8>
2008e90: 82 07 60 04 add %i5, 4, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2008e94: f8 07 40 00 ld [ %i5 ], %i4
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_page *big_enough = NULL;
while (current != tail && big_enough == NULL) {
2008e98: 80 a7 00 01 cmp %i4, %g1
2008e9c: 02 80 00 12 be 2008ee4 <rtems_rbheap_allocate+0x9c>
2008ea0: b0 10 20 00 clr %i0
rtems_rbheap_page *free_page = (rtems_rbheap_page *) current;
if (free_page->size >= size) {
2008ea4: f6 07 20 1c ld [ %i4 + 0x1c ], %i3
2008ea8: 80 a6 80 1b cmp %i2, %i3
2008eac: 38 80 00 10 bgu,a 2008eec <rtems_rbheap_allocate+0xa4>
2008eb0: f8 07 00 00 ld [ %i4 ], %i4
uintptr_t aligned_size = align_up(page_alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_page *free_page = search_free_page(free_chain, aligned_size);
if (free_page != NULL) {
2008eb4: 80 a7 20 00 cmp %i4, 0
2008eb8: 02 80 00 10 be 2008ef8 <rtems_rbheap_allocate+0xb0> <== NEVER TAKEN
2008ebc: 80 a6 c0 1a cmp %i3, %i2
uintptr_t free_size = free_page->size;
if (free_size > aligned_size) {
2008ec0: 18 80 00 12 bgu 2008f08 <rtems_rbheap_allocate+0xc0>
2008ec4: 90 10 00 1d mov %i5, %o0
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008ec8: c4 07 00 00 ld [ %i4 ], %g2
previous = the_node->previous;
2008ecc: c2 07 20 04 ld [ %i4 + 4 ], %g1
ptr = (void *) new_page->begin;
}
} else {
rtems_chain_extract_unprotected(&free_page->chain_node);
rtems_chain_set_off_chain(&free_page->chain_node);
ptr = (void *) free_page->begin;
2008ed0: f0 07 20 18 ld [ %i4 + 0x18 ], %i0
next->previous = previous;
2008ed4: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
2008ed8: c4 20 40 00 st %g2, [ %g1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
2008edc: c0 27 20 04 clr [ %i4 + 4 ]
2008ee0: c0 27 00 00 clr [ %i4 ]
2008ee4: 81 c7 e0 08 ret
2008ee8: 81 e8 00 00 restore
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_page *big_enough = NULL;
while (current != tail && big_enough == NULL) {
2008eec: 80 a0 40 1c cmp %g1, %i4
2008ef0: 32 bf ff ee bne,a 2008ea8 <rtems_rbheap_allocate+0x60> <== NEVER TAKEN
2008ef4: f6 07 20 1c ld [ %i4 + 0x1c ], %i3 <== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
2008ef8: 81 c7 e0 08 ret
2008efc: 91 e8 20 00 restore %g0, 0, %o0
}
}
}
return ptr;
}
2008f00: 81 c7 e0 08 ret
2008f04: 91 e8 20 00 restore %g0, 0, %o0
if (free_page != NULL) {
uintptr_t free_size = free_page->size;
if (free_size > aligned_size) {
rtems_rbheap_page *new_page = get_page(control);
2008f08: 7f ff ff 60 call 2008c88 <get_page>
2008f0c: b0 10 20 00 clr %i0
if (new_page != NULL) {
2008f10: 80 a2 20 00 cmp %o0, 0
2008f14: 02 bf ff f4 be 2008ee4 <rtems_rbheap_allocate+0x9c> <== NEVER TAKEN
2008f18: b2 10 00 08 mov %o0, %i1
uintptr_t new_free_size = free_size - aligned_size;
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
2008f1c: c2 07 20 18 ld [ %i4 + 0x18 ], %g1
if (free_size > aligned_size) {
rtems_rbheap_page *new_page = get_page(control);
if (new_page != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
2008f20: b6 26 c0 1a sub %i3, %i2, %i3
free_page->size = new_free_size;
2008f24: f6 27 20 1c st %i3, [ %i4 + 0x1c ]
new_page->begin = free_page->begin + new_free_size;
new_page->size = aligned_size;
2008f28: f4 22 20 1c st %i2, [ %o0 + 0x1c ]
if (new_page != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
2008f2c: b6 06 c0 01 add %i3, %g1, %i3
2008f30: c0 22 20 04 clr [ %o0 + 4 ]
2008f34: f6 22 20 18 st %i3, [ %o0 + 0x18 ]
2008f38: c0 22 00 00 clr [ %o0 ]
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_page *page
)
{
_RBTree_Insert_unprotected(tree, &page->tree_node);
2008f3c: 92 06 60 08 add %i1, 8, %o1
2008f40: 40 00 07 31 call 200ac04 <_RBTree_Insert_unprotected>
2008f44: 90 07 60 18 add %i5, 0x18, %o0
free_page->size = new_free_size;
new_page->begin = free_page->begin + new_free_size;
new_page->size = aligned_size;
rtems_chain_set_off_chain(&new_page->chain_node);
insert_into_tree(page_tree, new_page);
ptr = (void *) new_page->begin;
2008f48: f0 06 60 18 ld [ %i1 + 0x18 ], %i0
2008f4c: 81 c7 e0 08 ret
2008f50: 81 e8 00 00 restore
020090ec <rtems_rbheap_extend_page_pool_with_malloc>:
void rtems_rbheap_extend_page_pool_with_malloc(rtems_rbheap_control *control)
{
20090ec: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rbheap_page *page = malloc(sizeof(*page));
20090f0: 7f ff ec a0 call 2004370 <malloc> <== NOT EXECUTED
20090f4: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
if (page != NULL) {
20090f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20090fc: 02 80 00 07 be 2009118 <rtems_rbheap_extend_page_pool_with_malloc+0x2c><== NOT EXECUTED
2009100: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED
2009104: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
after_node->next = the_node;
2009108: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
200910c: c4 22 20 04 st %g2, [ %o0 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
2009110: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
before_node->previous = the_node;
2009114: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED
2009118: 81 c7 e0 08 ret <== NOT EXECUTED
200911c: 81 e8 00 00 restore <== NOT EXECUTED
02008f54 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(page_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
2008f54: 9d e3 bf 80 save %sp, -128, %sp
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
2008f58: f8 06 20 1c ld [ %i0 + 0x1c ], %i4
#define NULL_PAGE rtems_rbheap_page_of_node(NULL)
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
2008f5c: c0 27 bf fc clr [ %fp + -4 ]
2008f60: c0 27 bf e0 clr [ %fp + -32 ]
2008f64: c0 27 bf e4 clr [ %fp + -28 ]
2008f68: c0 27 bf e8 clr [ %fp + -24 ]
2008f6c: c0 27 bf ec clr [ %fp + -20 ]
2008f70: c0 27 bf f0 clr [ %fp + -16 ]
2008f74: c0 27 bf f4 clr [ %fp + -12 ]
2008f78: f2 27 bf f8 st %i1, [ %fp + -8 ]
_RBTree_Extract_unprotected(page_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
2008f7c: ba 10 00 18 mov %i0, %i5
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2008f80: 80 a7 20 00 cmp %i4, 0
2008f84: 02 80 00 1e be 2008ffc <rtems_rbheap_free+0xa8> <== NEVER TAKEN
2008f88: b0 10 20 04 mov 4, %i0
2008f8c: b6 10 20 00 clr %i3
compare_result = the_rbtree->compare_function(the_node, iter_node);
2008f90: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
2008f94: 92 10 00 1c mov %i4, %o1
2008f98: 9f c0 40 00 call %g1
2008f9c: 90 07 bf e8 add %fp, -24, %o0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
2008fa0: 83 3a 20 1f sra %o0, 0x1f, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
2008fa4: 80 a2 20 00 cmp %o0, 0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir =
2008fa8: 82 20 40 08 sub %g1, %o0, %g1
2008fac: 83 30 60 1f srl %g1, 0x1f, %g1
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
2008fb0: 83 28 60 02 sll %g1, 2, %g1
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( _RBTree_Is_equal( compare_result ) ) {
2008fb4: 12 80 00 06 bne 2008fcc <rtems_rbheap_free+0x78>
2008fb8: 82 07 00 01 add %i4, %g1, %g1
found = iter_node;
if ( the_rbtree->is_unique )
2008fbc: c4 0f 60 2c ldub [ %i5 + 0x2c ], %g2
2008fc0: 80 a0 a0 00 cmp %g2, 0
2008fc4: 12 80 00 10 bne 2009004 <rtems_rbheap_free+0xb0> <== ALWAYS TAKEN
2008fc8: b6 10 00 1c mov %i4, %i3
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
2008fcc: f8 00 60 04 ld [ %g1 + 4 ], %i4
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2008fd0: 80 a7 20 00 cmp %i4, 0
2008fd4: 32 bf ff f0 bne,a 2008f94 <rtems_rbheap_free+0x40>
2008fd8: c2 07 60 28 ld [ %i5 + 0x28 ], %g1
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
return rtems_rbheap_page_of_node(
2008fdc: b8 06 ff f8 add %i3, -8, %i4
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
rtems_rbheap_page *page = find(page_tree, (uintptr_t) ptr);
if (page != NULL_PAGE) {
2008fe0: 80 a7 3f f8 cmp %i4, -8
2008fe4: 02 80 00 06 be 2008ffc <rtems_rbheap_free+0xa8>
2008fe8: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
2008fec: c2 06 ff f8 ld [ %i3 + -8 ], %g1
2008ff0: 80 a0 60 00 cmp %g1, 0
2008ff4: 02 80 00 06 be 200900c <rtems_rbheap_free+0xb8>
2008ff8: b0 10 20 0e mov 0xe, %i0
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
}
2008ffc: 81 c7 e0 08 ret
2009000: 81 e8 00 00 restore
static rtems_rbheap_page *find(rtems_rbtree_control *page_tree, uintptr_t key)
{
rtems_rbheap_page page = { .begin = key };
return rtems_rbheap_page_of_node(
2009004: 10 bf ff f7 b 2008fe0 <rtems_rbheap_free+0x8c>
2009008: b8 06 ff f8 add %i3, -8, %i4
200900c: c2 07 20 04 ld [ %i4 + 4 ], %g1
2009010: 80 a0 60 00 cmp %g1, 0
2009014: 12 bf ff fa bne 2008ffc <rtems_rbheap_free+0xa8> <== NEVER TAKEN
2009018: 92 10 00 1b mov %i3, %o1
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_control *free_chain = &control->free_chain;
rtems_rbtree_control *page_tree = &control->page_tree;
200901c: b4 07 60 18 add %i5, 0x18, %i2
const rtems_rbtree_control *page_tree,
const rtems_rbheap_page *page,
RBTree_Direction dir
)
{
return rtems_rbheap_page_of_node(
2009020: 94 10 20 00 clr %o2
2009024: 40 00 07 c4 call 200af34 <_RBTree_Next_unprotected>
2009028: 90 10 00 1a mov %i2, %o0
200902c: 92 10 00 1b mov %i3, %o1
2009030: b2 10 00 08 mov %o0, %i1
2009034: 94 10 20 01 mov 1, %o2
2009038: 40 00 07 bf call 200af34 <_RBTree_Next_unprotected>
200903c: 90 10 00 1a mov %i2, %o0
2009040: 96 02 3f f8 add %o0, -8, %o3
rtems_rbtree_control *page_tree,
rtems_rbheap_page *a,
rtems_rbheap_page *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_page_free(b)) {
2009044: 80 a2 ff f8 cmp %o3, -8
2009048: 02 80 00 0a be 2009070 <rtems_rbheap_free+0x11c>
200904c: b6 06 7f f8 add %i1, -8, %i3
2009050: c2 02 3f f8 ld [ %o0 + -8 ], %g1
2009054: 80 a0 60 00 cmp %g1, 0
2009058: 22 80 00 1e be,a 20090d0 <rtems_rbheap_free+0x17c>
200905c: c2 02 e0 04 ld [ %o3 + 4 ], %g1
}
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
2009060: 90 10 00 1d mov %i5, %o0
2009064: 92 10 00 1a mov %i2, %o1
2009068: 7f ff ff 16 call 2008cc0 <check_and_merge.part.0>
200906c: 94 10 00 1c mov %i4, %o2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2009070: c2 07 40 00 ld [ %i5 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2009074: fa 27 20 04 st %i5, [ %i4 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2009078: f8 27 40 00 st %i4, [ %i5 ]
the_node->next = before_node;
200907c: c2 27 00 00 st %g1, [ %i4 ]
before_node->previous = the_node;
2009080: f8 20 60 04 st %i4, [ %g1 + 4 ]
rtems_rbtree_control *page_tree,
rtems_rbheap_page *a,
rtems_rbheap_page *b
)
{
if (b != NULL_PAGE && rtems_rbheap_is_page_free(b)) {
2009084: 80 a6 ff f8 cmp %i3, -8
2009088: 02 bf ff dd be 2008ffc <rtems_rbheap_free+0xa8>
200908c: b0 10 20 00 clr %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
2009090: c2 06 7f f8 ld [ %i1 + -8 ], %g1
2009094: 80 a0 60 00 cmp %g1, 0
2009098: 22 80 00 0a be,a 20090c0 <rtems_rbheap_free+0x16c>
200909c: c2 06 e0 04 ld [ %i3 + 4 ], %g1
}
} else {
sc = RTEMS_INVALID_ID;
}
return sc;
20090a0: 90 10 00 1d mov %i5, %o0
20090a4: 92 10 00 1a mov %i2, %o1
20090a8: 94 10 00 1c mov %i4, %o2
20090ac: 96 10 00 1b mov %i3, %o3
20090b0: 7f ff ff 04 call 2008cc0 <check_and_merge.part.0>
20090b4: b0 10 20 00 clr %i0
20090b8: 81 c7 e0 08 ret
20090bc: 81 e8 00 00 restore
20090c0: 80 a0 60 00 cmp %g1, 0
20090c4: 12 bf ff f8 bne 20090a4 <rtems_rbheap_free+0x150> <== NEVER TAKEN
20090c8: 90 10 00 1d mov %i5, %o0
20090cc: 30 bf ff fb b,a 20090b8 <rtems_rbheap_free+0x164>
20090d0: 80 a0 60 00 cmp %g1, 0
20090d4: 12 bf ff e4 bne 2009064 <rtems_rbheap_free+0x110> <== NEVER TAKEN
20090d8: 90 10 00 1d mov %i5, %o0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20090dc: 10 bf ff e6 b 2009074 <rtems_rbheap_free+0x120>
20090e0: c2 07 40 00 ld [ %i5 ], %g1
02016aa8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
2016aa8: 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 )
2016aac: 80 a6 60 00 cmp %i1, 0
2016ab0: 12 80 00 04 bne 2016ac0 <rtems_signal_send+0x18>
2016ab4: 82 10 20 0a mov 0xa, %g1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016ab8: 81 c7 e0 08 ret
2016abc: 91 e8 00 01 restore %g0, %g1, %o0
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2016ac0: 90 10 00 18 mov %i0, %o0
2016ac4: 40 00 13 47 call 201b7e0 <_Thread_Get>
2016ac8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2016acc: c2 07 bf fc ld [ %fp + -4 ], %g1
2016ad0: 80 a0 60 00 cmp %g1, 0
2016ad4: 12 80 00 20 bne 2016b54 <rtems_signal_send+0xac>
2016ad8: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2016adc: fa 02 21 50 ld [ %o0 + 0x150 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2016ae0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2016ae4: 80 a0 60 00 cmp %g1, 0
2016ae8: 02 80 00 1e be 2016b60 <rtems_signal_send+0xb8>
2016aec: 01 00 00 00 nop
if ( asr->is_enabled ) {
2016af0: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
2016af4: 80 a0 60 00 cmp %g1, 0
2016af8: 02 80 00 1e be 2016b70 <rtems_signal_send+0xc8>
2016afc: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2016b00: 7f ff e2 2e call 200f3b8 <sparc_disable_interrupts>
2016b04: 01 00 00 00 nop
*signal_set |= signals;
2016b08: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2016b0c: b2 10 40 19 or %g1, %i1, %i1
2016b10: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
2016b14: 7f ff e2 2d call 200f3c8 <sparc_enable_interrupts>
2016b18: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2016b1c: 03 00 80 ed sethi %hi(0x203b400), %g1
2016b20: 82 10 60 80 or %g1, 0x80, %g1 ! 203b480 <_Per_CPU_Information>
2016b24: c4 00 60 08 ld [ %g1 + 8 ], %g2
2016b28: 80 a0 a0 00 cmp %g2, 0
2016b2c: 02 80 00 06 be 2016b44 <rtems_signal_send+0x9c>
2016b30: 01 00 00 00 nop
2016b34: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2016b38: 80 a7 00 02 cmp %i4, %g2
2016b3c: 02 80 00 15 be 2016b90 <rtems_signal_send+0xe8> <== ALWAYS TAKEN
2016b40: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2016b44: 40 00 13 1a call 201b7ac <_Thread_Enable_dispatch>
2016b48: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2016b4c: 10 bf ff db b 2016ab8 <rtems_signal_send+0x10>
2016b50: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2016b54: 82 10 20 04 mov 4, %g1
}
2016b58: 81 c7 e0 08 ret
2016b5c: 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();
2016b60: 40 00 13 13 call 201b7ac <_Thread_Enable_dispatch>
2016b64: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
2016b68: 10 bf ff d4 b 2016ab8 <rtems_signal_send+0x10>
2016b6c: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2016b70: 7f ff e2 12 call 200f3b8 <sparc_disable_interrupts>
2016b74: 01 00 00 00 nop
*signal_set |= signals;
2016b78: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2016b7c: b2 10 40 19 or %g1, %i1, %i1
2016b80: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
2016b84: 7f ff e2 11 call 200f3c8 <sparc_enable_interrupts>
2016b88: 01 00 00 00 nop
2016b8c: 30 bf ff ee b,a 2016b44 <rtems_signal_send+0x9c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
2016b90: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
2016b94: 30 bf ff ec b,a 2016b44 <rtems_signal_send+0x9c>
0200f208 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200f208: 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 )
200f20c: 80 a6 a0 00 cmp %i2, 0
200f210: 02 80 00 3b be 200f2fc <rtems_task_mode+0xf4>
200f214: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200f218: 21 00 80 75 sethi %hi(0x201d400), %l0
200f21c: a0 14 21 e0 or %l0, 0x1e0, %l0 ! 201d5e0 <_Per_CPU_Information>
200f220: fa 04 20 0c ld [ %l0 + 0xc ], %i5
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f224: c4 0f 60 70 ldub [ %i5 + 0x70 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f228: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f22c: 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 ];
200f230: f8 07 61 50 ld [ %i5 + 0x150 ], %i4
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f234: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f238: 80 a0 60 00 cmp %g1, 0
200f23c: 12 80 00 40 bne 200f33c <rtems_task_mode+0x134>
200f240: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f244: c2 0f 20 08 ldub [ %i4 + 8 ], %g1
200f248: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f24c: 7f ff f2 64 call 200bbdc <_CPU_ISR_Get_level>
200f250: a2 60 3f ff subx %g0, -1, %l1
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;
200f254: a3 2c 60 0a sll %l1, 0xa, %l1
200f258: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f25c: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f260: 80 8e 61 00 btst 0x100, %i1
200f264: 02 80 00 06 be 200f27c <rtems_task_mode+0x74>
200f268: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f26c: 82 0e 21 00 and %i0, 0x100, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200f270: 80 a0 00 01 cmp %g0, %g1
200f274: 82 60 3f ff subx %g0, -1, %g1
200f278: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200f27c: 80 8e 62 00 btst 0x200, %i1
200f280: 12 80 00 21 bne 200f304 <rtems_task_mode+0xfc>
200f284: 80 8e 22 00 btst 0x200, %i0
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f288: 80 8e 60 0f btst 0xf, %i1
200f28c: 12 80 00 27 bne 200f328 <rtems_task_mode+0x120>
200f290: 01 00 00 00 nop
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f294: 80 8e 64 00 btst 0x400, %i1
200f298: 02 80 00 14 be 200f2e8 <rtems_task_mode+0xe0>
200f29c: 86 10 20 00 clr %g3
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f2a0: c4 0f 20 08 ldub [ %i4 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR;
200f2a4: b0 0e 24 00 and %i0, 0x400, %i0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
200f2a8: 80 a0 00 18 cmp %g0, %i0
200f2ac: 82 60 3f ff subx %g0, -1, %g1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f2b0: 80 a0 80 01 cmp %g2, %g1
200f2b4: 22 80 00 0e be,a 200f2ec <rtems_task_mode+0xe4>
200f2b8: 03 00 80 75 sethi %hi(0x201d400), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200f2bc: 7f ff cc ff call 20026b8 <sparc_disable_interrupts>
200f2c0: c2 2f 20 08 stb %g1, [ %i4 + 8 ]
_signals = information->signals_pending;
200f2c4: c4 07 20 18 ld [ %i4 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
200f2c8: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
information->signals_posted = _signals;
200f2cc: c4 27 20 14 st %g2, [ %i4 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200f2d0: c2 27 20 18 st %g1, [ %i4 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200f2d4: 7f ff cc fd call 20026c8 <sparc_enable_interrupts>
200f2d8: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200f2dc: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
200f2e0: 80 a0 00 01 cmp %g0, %g1
200f2e4: 86 40 20 00 addx %g0, 0, %g3
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
200f2e8: 03 00 80 75 sethi %hi(0x201d400), %g1
200f2ec: c4 00 61 08 ld [ %g1 + 0x108 ], %g2 ! 201d508 <_System_state_Current>
200f2f0: 80 a0 a0 03 cmp %g2, 3
200f2f4: 02 80 00 1f be 200f370 <rtems_task_mode+0x168>
200f2f8: 82 10 20 00 clr %g1
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
200f2fc: 81 c7 e0 08 ret
200f300: 91 e8 00 01 restore %g0, %g1, %o0
*/
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) ) {
200f304: 22 bf ff e1 be,a 200f288 <rtems_task_mode+0x80>
200f308: c0 27 60 78 clr [ %i5 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f30c: 03 00 80 74 sethi %hi(0x201d000), %g1
200f310: c2 00 63 14 ld [ %g1 + 0x314 ], %g1 ! 201d314 <_Thread_Ticks_per_timeslice>
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f314: 80 8e 60 0f btst 0xf, %i1
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;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f318: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
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;
200f31c: 82 10 20 01 mov 1, %g1
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f320: 02 bf ff dd be 200f294 <rtems_task_mode+0x8c>
200f324: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
200f328: 90 0e 20 0f and %i0, 0xf, %o0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200f32c: 7f ff cc e7 call 20026c8 <sparc_enable_interrupts>
200f330: 91 2a 20 08 sll %o0, 8, %o0
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f334: 10 bf ff d9 b 200f298 <rtems_task_mode+0x90>
200f338: 80 8e 64 00 btst 0x400, %i1
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;
200f33c: c2 0f 20 08 ldub [ %i4 + 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;
200f340: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f344: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f348: 7f ff f2 25 call 200bbdc <_CPU_ISR_Get_level>
200f34c: a2 60 3f ff subx %g0, -1, %l1
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;
200f350: a3 2c 60 0a sll %l1, 0xa, %l1
200f354: a2 14 40 08 or %l1, %o0, %l1
old_mode |= _ISR_Get_level();
200f358: b6 14 40 1b or %l1, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f35c: 80 8e 61 00 btst 0x100, %i1
200f360: 02 bf ff c7 be 200f27c <rtems_task_mode+0x74>
200f364: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f368: 10 bf ff c2 b 200f270 <rtems_task_mode+0x68>
200f36c: 82 0e 21 00 and %i0, 0x100, %g1
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
200f370: 80 88 e0 ff btst 0xff, %g3
200f374: 12 80 00 0a bne 200f39c <rtems_task_mode+0x194>
200f378: c4 04 20 0c ld [ %l0 + 0xc ], %g2
200f37c: c6 04 20 10 ld [ %l0 + 0x10 ], %g3
200f380: 80 a0 80 03 cmp %g2, %g3
200f384: 02 bf ff de be 200f2fc <rtems_task_mode+0xf4>
200f388: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
200f38c: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
200f390: 80 a0 a0 00 cmp %g2, 0
200f394: 02 bf ff da be 200f2fc <rtems_task_mode+0xf4> <== NEVER TAKEN
200f398: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
200f39c: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
200f3a0: c2 2c 20 18 stb %g1, [ %l0 + 0x18 ]
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
200f3a4: 7f ff ec a6 call 200a63c <_Thread_Dispatch>
200f3a8: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
200f3ac: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
200f3b0: 81 c7 e0 08 ret
200f3b4: 91 e8 00 01 restore %g0, %g1, %o0
0200c2e4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200c2e4: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200c2e8: 80 a6 60 00 cmp %i1, 0
200c2ec: 02 80 00 07 be 200c308 <rtems_task_set_priority+0x24>
200c2f0: 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 ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
200c2f4: 03 00 80 82 sethi %hi(0x2020800), %g1
200c2f8: c2 08 61 64 ldub [ %g1 + 0x164 ], %g1 ! 2020964 <rtems_maximum_priority>
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
200c2fc: 80 a6 40 01 cmp %i1, %g1
200c300: 18 80 00 1c bgu 200c370 <rtems_task_set_priority+0x8c>
200c304: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200c308: 80 a6 a0 00 cmp %i2, 0
200c30c: 02 80 00 19 be 200c370 <rtems_task_set_priority+0x8c>
200c310: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200c314: 40 00 0a 13 call 200eb60 <_Thread_Get>
200c318: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200c31c: c2 07 bf fc ld [ %fp + -4 ], %g1
200c320: 80 a0 60 00 cmp %g1, 0
200c324: 12 80 00 13 bne 200c370 <rtems_task_set_priority+0x8c>
200c328: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200c32c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200c330: 80 a6 60 00 cmp %i1, 0
200c334: 02 80 00 0d be 200c368 <rtems_task_set_priority+0x84>
200c338: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200c33c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200c340: 80 a0 60 00 cmp %g1, 0
200c344: 02 80 00 06 be 200c35c <rtems_task_set_priority+0x78>
200c348: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200c34c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200c350: 80 a6 40 01 cmp %i1, %g1
200c354: 1a 80 00 05 bcc 200c368 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
200c358: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200c35c: 92 10 00 19 mov %i1, %o1
200c360: 40 00 08 b6 call 200e638 <_Thread_Change_priority>
200c364: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200c368: 40 00 09 f1 call 200eb2c <_Thread_Enable_dispatch>
200c36c: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
200c370: 81 c7 e0 08 ret
200c374: 81 e8 00 00 restore
0202da3c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
202da3c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
202da40: 80 a6 60 00 cmp %i1, 0
202da44: 02 80 00 1e be 202dabc <rtems_task_variable_delete+0x80>
202da48: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
202da4c: 90 10 00 18 mov %i0, %o0
202da50: 7f ff 8c 18 call 2010ab0 <_Thread_Get>
202da54: 92 07 bf fc add %fp, -4, %o1
switch (location) {
202da58: c2 07 bf fc ld [ %fp + -4 ], %g1
202da5c: 80 a0 60 00 cmp %g1, 0
202da60: 12 80 00 19 bne 202dac4 <rtems_task_variable_delete+0x88>
202da64: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
202da68: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
202da6c: 80 a0 60 00 cmp %g1, 0
202da70: 02 80 00 10 be 202dab0 <rtems_task_variable_delete+0x74>
202da74: 01 00 00 00 nop
if (tvp->ptr == ptr) {
202da78: c4 00 60 04 ld [ %g1 + 4 ], %g2
202da7c: 80 a0 80 19 cmp %g2, %i1
202da80: 32 80 00 09 bne,a 202daa4 <rtems_task_variable_delete+0x68>
202da84: d2 00 40 00 ld [ %g1 ], %o1
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
202da88: 10 80 00 18 b 202dae8 <rtems_task_variable_delete+0xac>
202da8c: c4 00 40 00 ld [ %g1 ], %g2
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
202da90: 80 a0 80 19 cmp %g2, %i1
202da94: 22 80 00 0e be,a 202dacc <rtems_task_variable_delete+0x90>
202da98: c4 02 40 00 ld [ %o1 ], %g2
202da9c: 82 10 00 09 mov %o1, %g1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
202daa0: d2 00 40 00 ld [ %g1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
202daa4: 80 a2 60 00 cmp %o1, 0
202daa8: 32 bf ff fa bne,a 202da90 <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
202daac: c4 02 60 04 ld [ %o1 + 4 ], %g2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
202dab0: 7f ff 8b f3 call 2010a7c <_Thread_Enable_dispatch>
202dab4: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
202dab8: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
202dabc: 81 c7 e0 08 ret
202dac0: 91 e8 00 01 restore %g0, %g1, %o0
202dac4: 81 c7 e0 08 ret
202dac8: 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;
202dacc: c4 20 40 00 st %g2, [ %g1 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
202dad0: 40 00 00 2d call 202db84 <_RTEMS_Tasks_Invoke_task_variable_dtor>
202dad4: 01 00 00 00 nop
_Thread_Enable_dispatch();
202dad8: 7f ff 8b e9 call 2010a7c <_Thread_Enable_dispatch>
202dadc: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
202dae0: 10 bf ff f7 b 202dabc <rtems_task_variable_delete+0x80>
202dae4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
202dae8: 92 10 00 01 mov %g1, %o1
202daec: 10 bf ff f9 b 202dad0 <rtems_task_variable_delete+0x94>
202daf0: c4 22 21 5c st %g2, [ %o0 + 0x15c ]
0202daf4 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
202daf4: 9d e3 bf 98 save %sp, -104, %sp
202daf8: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
202dafc: 80 a6 60 00 cmp %i1, 0
202db00: 02 80 00 1b be 202db6c <rtems_task_variable_get+0x78>
202db04: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !result )
202db08: 80 a6 a0 00 cmp %i2, 0
202db0c: 02 80 00 1c be 202db7c <rtems_task_variable_get+0x88>
202db10: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
202db14: 7f ff 8b e7 call 2010ab0 <_Thread_Get>
202db18: 92 07 bf fc add %fp, -4, %o1
switch (location) {
202db1c: c2 07 bf fc ld [ %fp + -4 ], %g1
202db20: 80 a0 60 00 cmp %g1, 0
202db24: 12 80 00 12 bne 202db6c <rtems_task_variable_get+0x78>
202db28: 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;
202db2c: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
while (tvp) {
202db30: 80 a0 60 00 cmp %g1, 0
202db34: 32 80 00 07 bne,a 202db50 <rtems_task_variable_get+0x5c>
202db38: c4 00 60 04 ld [ %g1 + 4 ], %g2
202db3c: 30 80 00 0e b,a 202db74 <rtems_task_variable_get+0x80>
202db40: 80 a0 60 00 cmp %g1, 0
202db44: 02 80 00 0c be 202db74 <rtems_task_variable_get+0x80> <== NEVER TAKEN
202db48: 01 00 00 00 nop
if (tvp->ptr == ptr) {
202db4c: c4 00 60 04 ld [ %g1 + 4 ], %g2
202db50: 80 a0 80 19 cmp %g2, %i1
202db54: 32 bf ff fb bne,a 202db40 <rtems_task_variable_get+0x4c>
202db58: 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;
202db5c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
202db60: b0 10 20 00 clr %i0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
202db64: 7f ff 8b c6 call 2010a7c <_Thread_Enable_dispatch>
202db68: c2 26 80 00 st %g1, [ %i2 ]
return RTEMS_SUCCESSFUL;
202db6c: 81 c7 e0 08 ret
202db70: 81 e8 00 00 restore
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
202db74: 7f ff 8b c2 call 2010a7c <_Thread_Enable_dispatch>
202db78: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
202db7c: 81 c7 e0 08 ret
202db80: 81 e8 00 00 restore
0201752c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
201752c: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2017530: 11 00 80 ed sethi %hi(0x203b400), %o0
2017534: 92 10 00 18 mov %i0, %o1
2017538: 90 12 21 24 or %o0, 0x124, %o0
201753c: 40 00 0c 98 call 201a79c <_Objects_Get>
2017540: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2017544: c2 07 bf fc ld [ %fp + -4 ], %g1
2017548: 80 a0 60 00 cmp %g1, 0
201754c: 12 80 00 0c bne 201757c <rtems_timer_cancel+0x50>
2017550: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2017554: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2017558: 80 a0 60 04 cmp %g1, 4
201755c: 02 80 00 04 be 201756c <rtems_timer_cancel+0x40> <== NEVER TAKEN
2017560: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2017564: 40 00 15 04 call 201c974 <_Watchdog_Remove>
2017568: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
201756c: 40 00 10 90 call 201b7ac <_Thread_Enable_dispatch>
2017570: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
2017574: 81 c7 e0 08 ret
2017578: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
201757c: 81 c7 e0 08 ret
2017580: 91 e8 20 04 restore %g0, 4, %o0
02017a70 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2017a70: 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;
2017a74: 03 00 80 ed sethi %hi(0x203b400), %g1
2017a78: fa 00 61 64 ld [ %g1 + 0x164 ], %i5 ! 203b564 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2017a7c: b8 10 00 18 mov %i0, %i4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
2017a80: 80 a7 60 00 cmp %i5, 0
2017a84: 02 80 00 3a be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017a88: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
2017a8c: 03 00 80 ec sethi %hi(0x203b000), %g1
2017a90: c2 08 62 50 ldub [ %g1 + 0x250 ], %g1 ! 203b250 <_TOD_Is_set>
2017a94: 80 a0 60 00 cmp %g1, 0
2017a98: 02 80 00 35 be 2017b6c <rtems_timer_server_fire_when+0xfc><== NEVER TAKEN
2017a9c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
2017aa0: 80 a6 a0 00 cmp %i2, 0
2017aa4: 02 80 00 32 be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017aa8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2017aac: 90 10 00 19 mov %i1, %o0
2017ab0: 7f ff f3 45 call 20147c4 <_TOD_Validate>
2017ab4: b0 10 20 14 mov 0x14, %i0
2017ab8: 80 8a 20 ff btst 0xff, %o0
2017abc: 02 80 00 2c be 2017b6c <rtems_timer_server_fire_when+0xfc>
2017ac0: 01 00 00 00 nop
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2017ac4: 7f ff f3 05 call 20146d8 <_TOD_To_seconds>
2017ac8: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
2017acc: 21 00 80 ec sethi %hi(0x203b000), %l0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2017ad0: b2 10 00 08 mov %o0, %i1
2017ad4: d0 1c 22 d0 ldd [ %l0 + 0x2d0 ], %o0
2017ad8: 94 10 20 00 clr %o2
2017adc: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017ae0: 40 00 4e 6a call 202b488 <__divdi3>
2017ae4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
2017ae8: 80 a6 40 09 cmp %i1, %o1
2017aec: 08 80 00 20 bleu 2017b6c <rtems_timer_server_fire_when+0xfc>
2017af0: 92 10 00 1c mov %i4, %o1
2017af4: 11 00 80 ed sethi %hi(0x203b400), %o0
2017af8: 94 07 bf fc add %fp, -4, %o2
2017afc: 40 00 0b 28 call 201a79c <_Objects_Get>
2017b00: 90 12 21 24 or %o0, 0x124, %o0
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2017b04: c2 07 bf fc ld [ %fp + -4 ], %g1
2017b08: 80 a0 60 00 cmp %g1, 0
2017b0c: 12 80 00 1a bne 2017b74 <rtems_timer_server_fire_when+0x104>
2017b10: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2017b14: 40 00 13 98 call 201c974 <_Watchdog_Remove>
2017b18: 90 02 20 10 add %o0, 0x10, %o0
2017b1c: d0 1c 22 d0 ldd [ %l0 + 0x2d0 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
2017b20: 82 10 20 03 mov 3, %g1
2017b24: 94 10 20 00 clr %o2
2017b28: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2017b2c: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
the_watchdog->id = id;
2017b30: f8 26 20 30 st %i4, [ %i0 + 0x30 ]
the_watchdog->user_data = user_data;
2017b34: f6 26 20 34 st %i3, [ %i0 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2017b38: c0 26 20 18 clr [ %i0 + 0x18 ]
2017b3c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2017b40: 40 00 4e 52 call 202b488 <__divdi3>
2017b44: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
2017b48: c2 07 60 04 ld [ %i5 + 4 ], %g1
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();
2017b4c: b2 26 40 09 sub %i1, %o1, %i1
(*timer_server->schedule_operation)( timer_server, the_timer );
2017b50: 90 10 00 1d mov %i5, %o0
2017b54: 92 10 00 18 mov %i0, %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();
2017b58: f2 26 20 1c st %i1, [ %i0 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
2017b5c: 9f c0 40 00 call %g1
2017b60: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2017b64: 40 00 0f 12 call 201b7ac <_Thread_Enable_dispatch>
2017b68: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2017b6c: 81 c7 e0 08 ret
2017b70: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2017b74: 81 c7 e0 08 ret
2017b78: 91 e8 20 04 restore %g0, 4, %o0