RTEMS 4.11Annotated Report
Thu Dec 20 16:38:01 2012
400105e4 <_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
)
{
400105e4: 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;
400105e8: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
400105ec: c0 26 20 48 clr [ %i0 + 0x48 ]
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
400105f0: 80 8e e0 03 btst 3, %i3
400105f4: 02 80 00 09 be 40010618 <_CORE_message_queue_Initialize+0x34>
400105f8: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
allocated_message_size += sizeof(uintptr_t);
400105fc: 96 06 e0 04 add %i3, 4, %o3
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
40010600: 96 0a ff fc and %o3, -4, %o3
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
40010604: 80 a2 c0 1b cmp %o3, %i3
40010608: 3a 80 00 06 bcc,a 40010620 <_CORE_message_queue_Initialize+0x3c>
4001060c: ba 02 e0 10 add %o3, 0x10, %i5
return false;
40010610: 10 80 00 24 b 400106a0 <_CORE_message_queue_Initialize+0xbc>
40010614: b0 10 20 00 clr %i0
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
40010618: 96 10 00 1b mov %i3, %o3
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
4001061c: ba 02 e0 10 add %o3, 0x10, %i5
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
40010620: 90 10 20 00 clr %o0
40010624: 92 10 00 1a mov %i2, %o1
40010628: 94 10 20 00 clr %o2
4001062c: 40 00 3d 92 call 4001fc74 <__muldi3>
40010630: 96 10 00 1d mov %i5, %o3
if ( x > SIZE_MAX )
40010634: 80 a2 20 00 cmp %o0, 0
40010638: 34 80 00 1a bg,a 400106a0 <_CORE_message_queue_Initialize+0xbc>
4001063c: b0 10 20 00 clr %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
40010640: 40 00 0b bf call 4001353c <_Workspace_Allocate>
40010644: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
40010648: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4001064c: 80 a2 20 00 cmp %o0, 0
40010650: 02 bf ff f0 be 40010610 <_CORE_message_queue_Initialize+0x2c><== NEVER TAKEN
40010654: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
40010658: 90 06 20 60 add %i0, 0x60, %o0
4001065c: 94 10 00 1a mov %i2, %o2
40010660: 7f ff ff d3 call 400105ac <_Chain_Initialize>
40010664: 96 10 00 1d mov %i5, %o3
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 );
40010668: 82 06 20 50 add %i0, 0x50, %g1
head->next = tail;
head->previous = NULL;
tail->previous = head;
4001066c: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
40010670: c2 06 40 00 ld [ %i1 ], %g1
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 );
40010674: 84 06 20 54 add %i0, 0x54, %g2
40010678: 82 18 60 01 xor %g1, 1, %g1
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4001067c: 80 a0 00 01 cmp %g0, %g1
head->next = tail;
40010680: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
head->previous = NULL;
40010684: c0 26 20 54 clr [ %i0 + 0x54 ]
40010688: 90 10 00 18 mov %i0, %o0
4001068c: 92 60 3f ff subx %g0, -1, %o1
40010690: 94 10 20 80 mov 0x80, %o2
40010694: 96 10 20 06 mov 6, %o3
40010698: 40 00 09 87 call 40012cb4 <_Thread_queue_Initialize>
4001069c: b0 10 20 01 mov 1, %i0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
400106a0: b0 0e 20 01 and %i0, 1, %i0
400106a4: 81 c7 e0 08 ret
400106a8: 81 e8 00 00 restore
40007e14 <_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
)
{
40007e14: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
40007e18: 90 10 00 18 mov %i0, %o0
40007e1c: 40 00 07 27 call 40009ab8 <_Thread_queue_Dequeue>
40007e20: ba 10 00 18 mov %i0, %i5
40007e24: 80 a2 20 00 cmp %o0, 0
40007e28: 12 80 00 0e bne 40007e60 <_CORE_semaphore_Surrender+0x4c>
40007e2c: b0 10 20 00 clr %i0
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
40007e30: 7f ff e8 9e call 400020a8 <sparc_disable_interrupts>
40007e34: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
40007e38: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
40007e3c: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
40007e40: 80 a0 40 02 cmp %g1, %g2
40007e44: 1a 80 00 05 bcc 40007e58 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN
40007e48: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
40007e4c: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
40007e50: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
40007e54: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
40007e58: 7f ff e8 98 call 400020b8 <sparc_enable_interrupts>
40007e5c: 01 00 00 00 nop
}
return status;
}
40007e60: 81 c7 e0 08 ret
40007e64: 81 e8 00 00 restore
40006b0c <_Event_Surrender>:
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
40006b0c: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
40006b10: e0 06 20 30 ld [ %i0 + 0x30 ], %l0
_ISR_Disable( level );
40006b14: 7f ff ed 65 call 400020a8 <sparc_disable_interrupts>
40006b18: ba 10 00 18 mov %i0, %i5
40006b1c: b0 10 00 08 mov %o0, %i0
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
40006b20: c2 06 80 00 ld [ %i2 ], %g1
40006b24: b2 16 40 01 or %i1, %g1, %i1
40006b28: f2 26 80 00 st %i1, [ %i2 ]
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
40006b2c: c4 07 60 24 ld [ %i5 + 0x24 ], %g2
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
40006b30: 82 8e 40 02 andcc %i1, %g2, %g1
40006b34: 02 80 00 3d be 40006c28 <_Event_Surrender+0x11c>
40006b38: 07 10 00 73 sethi %hi(0x4001cc00), %g3
/*
* 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() &&
40006b3c: 86 10 e2 c0 or %g3, 0x2c0, %g3 ! 4001cec0 <_Per_CPU_Information>
40006b40: c8 00 e0 08 ld [ %g3 + 8 ], %g4
40006b44: 80 a1 20 00 cmp %g4, 0
40006b48: 22 80 00 18 be,a 40006ba8 <_Event_Surrender+0x9c>
40006b4c: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
40006b50: c6 00 e0 10 ld [ %g3 + 0x10 ], %g3
40006b54: 80 a7 40 03 cmp %i5, %g3
40006b58: 32 80 00 14 bne,a 40006ba8 <_Event_Surrender+0x9c>
40006b5c: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
40006b60: c6 06 c0 00 ld [ %i3 ], %g3
40006b64: 86 00 ff ff add %g3, -1, %g3
/*
* 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 ) &&
40006b68: 80 a0 e0 01 cmp %g3, 1
40006b6c: 38 80 00 0f bgu,a 40006ba8 <_Event_Surrender+0x9c>
40006b70: c6 07 60 10 ld [ %i5 + 0x10 ], %g3
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
40006b74: 80 a0 40 02 cmp %g1, %g2
40006b78: 02 80 00 04 be 40006b88 <_Event_Surrender+0x7c>
40006b7c: 80 8c 20 02 btst 2, %l0
40006b80: 02 80 00 2a be 40006c28 <_Event_Surrender+0x11c> <== NEVER TAKEN
40006b84: 01 00 00 00 nop
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) );
40006b88: b2 2e 40 01 andn %i1, %g1, %i1
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40006b8c: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
40006b90: f2 26 80 00 st %i1, [ %i2 ]
pending_events,
seized_events
);
the_thread->Wait.count = 0;
40006b94: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40006b98: c2 20 80 00 st %g1, [ %g2 ]
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
40006b9c: 82 10 20 03 mov 3, %g1
40006ba0: 10 80 00 22 b 40006c28 <_Event_Surrender+0x11c>
40006ba4: c2 26 c0 00 st %g1, [ %i3 ]
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
40006ba8: 80 8f 00 03 btst %i4, %g3
40006bac: 02 80 00 1f be 40006c28 <_Event_Surrender+0x11c>
40006bb0: 80 a0 40 02 cmp %g1, %g2
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
40006bb4: 02 80 00 04 be 40006bc4 <_Event_Surrender+0xb8>
40006bb8: 80 8c 20 02 btst 2, %l0
40006bbc: 02 80 00 1b be 40006c28 <_Event_Surrender+0x11c> <== NEVER TAKEN
40006bc0: 01 00 00 00 nop
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40006bc4: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
40006bc8: b2 2e 40 01 andn %i1, %g1, %i1
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
40006bcc: f2 26 80 00 st %i1, [ %i2 ]
pending_events,
seized_events
);
the_thread->Wait.count = 0;
40006bd0: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40006bd4: c2 20 80 00 st %g1, [ %g2 ]
_ISR_Flash( level );
40006bd8: 7f ff ed 38 call 400020b8 <sparc_enable_interrupts>
40006bdc: 90 10 00 18 mov %i0, %o0
40006be0: 7f ff ed 32 call 400020a8 <sparc_disable_interrupts>
40006be4: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
40006be8: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
40006bec: 80 a0 60 02 cmp %g1, 2
40006bf0: 02 80 00 06 be 40006c08 <_Event_Surrender+0xfc>
40006bf4: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
40006bf8: 7f ff ed 30 call 400020b8 <sparc_enable_interrupts>
40006bfc: 33 04 01 ff sethi %hi(0x1007fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
40006c00: 10 80 00 08 b 40006c20 <_Event_Surrender+0x114>
40006c04: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1007fff8 <RAM_SIZE+0xfc7fff8>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
40006c08: c2 27 60 50 st %g1, [ %i5 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
40006c0c: 7f ff ed 2b call 400020b8 <sparc_enable_interrupts>
40006c10: 33 04 01 ff sethi %hi(0x1007fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
40006c14: 40 00 0e 35 call 4000a4e8 <_Watchdog_Remove>
40006c18: 90 07 60 48 add %i5, 0x48, %o0
40006c1c: b2 16 63 f8 or %i1, 0x3f8, %i1
40006c20: 40 00 0a 03 call 4000942c <_Thread_Clear_state>
40006c24: 91 e8 00 1d restore %g0, %i5, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
40006c28: 7f ff ed 24 call 400020b8 <sparc_enable_interrupts>
40006c2c: 81 e8 00 00 restore
40006c30 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
40006c30: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
40006c34: 90 10 00 18 mov %i0, %o0
40006c38: 40 00 0a df call 400097b4 <_Thread_Get>
40006c3c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40006c40: c2 07 bf fc ld [ %fp + -4 ], %g1
40006c44: 80 a0 60 00 cmp %g1, 0
40006c48: 12 80 00 1b bne 40006cb4 <_Event_Timeout+0x84> <== NEVER TAKEN
40006c4c: 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 );
40006c50: 7f ff ed 16 call 400020a8 <sparc_disable_interrupts>
40006c54: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
40006c58: 03 10 00 73 sethi %hi(0x4001cc00), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
40006c5c: c2 00 62 d0 ld [ %g1 + 0x2d0 ], %g1 ! 4001ced0 <_Per_CPU_Information+0x10>
40006c60: 80 a7 40 01 cmp %i5, %g1
40006c64: 12 80 00 08 bne 40006c84 <_Event_Timeout+0x54>
40006c68: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
40006c6c: c2 06 40 00 ld [ %i1 ], %g1
40006c70: 80 a0 60 01 cmp %g1, 1
40006c74: 12 80 00 05 bne 40006c88 <_Event_Timeout+0x58>
40006c78: 82 10 20 06 mov 6, %g1
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
40006c7c: 82 10 20 02 mov 2, %g1
40006c80: c2 26 40 00 st %g1, [ %i1 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
40006c84: 82 10 20 06 mov 6, %g1
40006c88: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
40006c8c: 7f ff ed 0b call 400020b8 <sparc_enable_interrupts>
40006c90: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
40006c94: 90 10 00 1d mov %i5, %o0
40006c98: 13 04 01 ff sethi %hi(0x1007fc00), %o1
40006c9c: 40 00 09 e4 call 4000942c <_Thread_Clear_state>
40006ca0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 <RAM_SIZE+0xfc7fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
40006ca4: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40006ca8: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 4001ccc0 <_Thread_Dispatch_disable_level>
--level;
40006cac: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
40006cb0: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
40006cb4: 81 c7 e0 08 ret
40006cb8: 81 e8 00 00 restore
4000c300 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4000c300: 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 ) {
4000c304: 80 a6 60 00 cmp %i1, 0
4000c308: 02 80 00 7a be 4000c4f0 <_Heap_Free+0x1f0>
4000c30c: 88 10 20 01 mov 1, %g4
4000c310: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
4000c314: 40 00 2b 89 call 40017138 <.urem>
4000c318: 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
4000c31c: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4000c320: 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);
4000c324: 90 27 40 08 sub %i5, %o0, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4000c328: 80 a2 00 1b cmp %o0, %i3
4000c32c: 0a 80 00 05 bcs 4000c340 <_Heap_Free+0x40>
4000c330: 82 10 20 00 clr %g1
4000c334: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
4000c338: 80 a0 40 08 cmp %g1, %o0
4000c33c: 82 60 3f ff subx %g0, -1, %g1
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
4000c340: 80 a0 60 00 cmp %g1, 0
4000c344: 02 80 00 6b be 4000c4f0 <_Heap_Free+0x1f0>
4000c348: 88 10 20 00 clr %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;
4000c34c: f8 02 20 04 ld [ %o0 + 4 ], %i4
4000c350: 84 0f 3f fe and %i4, -2, %g2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000c354: 82 02 00 02 add %o0, %g2, %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;
4000c358: 80 a0 40 1b cmp %g1, %i3
4000c35c: 0a 80 00 05 bcs 4000c370 <_Heap_Free+0x70> <== NEVER TAKEN
4000c360: 86 10 20 00 clr %g3
4000c364: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
4000c368: 80 a0 c0 01 cmp %g3, %g1
4000c36c: 86 60 3f ff subx %g0, -1, %g3
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
4000c370: 80 a0 e0 00 cmp %g3, 0
4000c374: 02 80 00 5f be 4000c4f0 <_Heap_Free+0x1f0> <== NEVER TAKEN
4000c378: 88 10 20 00 clr %g4
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;
4000c37c: fa 00 60 04 ld [ %g1 + 4 ], %i5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4000c380: 80 8f 60 01 btst 1, %i5
4000c384: 22 80 00 5c be,a 4000c4f4 <_Heap_Free+0x1f4> <== NEVER TAKEN
4000c388: b0 09 20 01 and %g4, 1, %i0 <== NOT EXECUTED
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4000c38c: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4000c390: 80 a0 40 04 cmp %g1, %g4
4000c394: 02 80 00 07 be 4000c3b0 <_Heap_Free+0xb0>
4000c398: ba 0f 7f fe and %i5, -2, %i5
4000c39c: 86 00 40 1d add %g1, %i5, %g3
4000c3a0: f4 00 e0 04 ld [ %g3 + 4 ], %i2
4000c3a4: b4 1e a0 01 xor %i2, 1, %i2
4000c3a8: 10 80 00 03 b 4000c3b4 <_Heap_Free+0xb4>
4000c3ac: b4 0e a0 01 and %i2, 1, %i2
4000c3b0: b4 10 20 00 clr %i2
if ( !_Heap_Is_prev_used( block ) ) {
4000c3b4: 80 8f 20 01 btst 1, %i4
4000c3b8: 12 80 00 26 bne 4000c450 <_Heap_Free+0x150>
4000c3bc: 80 8e a0 ff btst 0xff, %i2
uintptr_t const prev_size = block->prev_size;
4000c3c0: f8 02 00 00 ld [ %o0 ], %i4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000c3c4: 86 22 00 1c sub %o0, %i4, %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;
4000c3c8: 80 a0 c0 1b cmp %g3, %i3
4000c3cc: 0a 80 00 04 bcs 4000c3dc <_Heap_Free+0xdc> <== NEVER TAKEN
4000c3d0: b2 10 20 00 clr %i1
4000c3d4: 80 a1 00 03 cmp %g4, %g3
4000c3d8: b2 60 3f ff subx %g0, -1, %i1
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
4000c3dc: 80 a6 60 00 cmp %i1, 0
4000c3e0: 02 80 00 44 be 4000c4f0 <_Heap_Free+0x1f0> <== NEVER TAKEN
4000c3e4: 88 10 20 00 clr %g4
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;
4000c3e8: f6 00 e0 04 ld [ %g3 + 4 ], %i3
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) ) {
4000c3ec: 80 8e e0 01 btst 1, %i3
4000c3f0: 02 80 00 40 be 4000c4f0 <_Heap_Free+0x1f0> <== NEVER TAKEN
4000c3f4: 80 8e a0 ff btst 0xff, %i2
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4000c3f8: 22 80 00 0f be,a 4000c434 <_Heap_Free+0x134>
4000c3fc: b8 00 80 1c add %g2, %i4, %i4
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4000c400: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = block->prev;
4000c404: c2 00 60 0c ld [ %g1 + 0xc ], %g1
uintptr_t const size = block_size + prev_size + next_block_size;
4000c408: ba 00 80 1d add %g2, %i5, %i5
prev->next = next;
4000c40c: c8 20 60 08 st %g4, [ %g1 + 8 ]
next->prev = prev;
4000c410: c2 21 20 0c st %g1, [ %g4 + 0xc ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4000c414: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4000c418: b8 07 40 1c add %i5, %i4, %i4
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4000c41c: 82 00 7f ff add %g1, -1, %g1
4000c420: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4000c424: f8 20 c0 1c st %i4, [ %g3 + %i4 ]
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;
4000c428: 82 17 20 01 or %i4, 1, %g1
4000c42c: 10 80 00 27 b 4000c4c8 <_Heap_Free+0x1c8>
4000c430: c2 20 e0 04 st %g1, [ %g3 + 4 ]
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;
4000c434: 88 17 20 01 or %i4, 1, %g4
4000c438: c8 20 e0 04 st %g4, [ %g3 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000c43c: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = size;
4000c440: f8 22 00 02 st %i4, [ %o0 + %g2 ]
_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;
4000c444: 86 08 ff fe and %g3, -2, %g3
4000c448: 10 80 00 20 b 4000c4c8 <_Heap_Free+0x1c8>
4000c44c: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4000c450: 22 80 00 0d be,a 4000c484 <_Heap_Free+0x184>
4000c454: c6 06 20 08 ld [ %i0 + 8 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4000c458: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = old_block->prev;
4000c45c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
new_block->next = next;
4000c460: c8 22 20 08 st %g4, [ %o0 + 8 ]
new_block->prev = prev;
4000c464: c2 22 20 0c st %g1, [ %o0 + 0xc ]
uintptr_t const size = block_size + next_block_size;
4000c468: 86 07 40 02 add %i5, %g2, %g3
next->prev = new_block;
prev->next = new_block;
4000c46c: d0 20 60 08 st %o0, [ %g1 + 8 ]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
4000c470: d0 21 20 0c st %o0, [ %g4 + 0xc ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4000c474: 82 10 e0 01 or %g3, 1, %g1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4000c478: c6 22 00 03 st %g3, [ %o0 + %g3 ]
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;
4000c47c: 10 80 00 13 b 4000c4c8 <_Heap_Free+0x1c8>
4000c480: c2 22 20 04 st %g1, [ %o0 + 4 ]
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
4000c484: f0 22 20 0c st %i0, [ %o0 + 0xc ]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4000c488: c6 22 20 08 st %g3, [ %o0 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4000c48c: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
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;
4000c490: 86 10 a0 01 or %g2, 1, %g3
4000c494: c6 22 20 04 st %g3, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000c498: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = block_size;
4000c49c: c4 22 00 02 st %g2, [ %o0 + %g2 ]
} 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;
4000c4a0: 86 08 ff fe and %g3, -2, %g3
4000c4a4: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4000c4a8: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
if ( stats->max_free_blocks < stats->free_blocks ) {
4000c4ac: c6 06 20 3c ld [ %i0 + 0x3c ], %g3
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;
4000c4b0: 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;
4000c4b4: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
4000c4b8: 80 a0 c0 01 cmp %g3, %g1
4000c4bc: 1a 80 00 03 bcc 4000c4c8 <_Heap_Free+0x1c8>
4000c4c0: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
4000c4c4: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
}
/* Statistics */
--stats->used_blocks;
4000c4c8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
4000c4cc: 82 00 7f ff add %g1, -1, %g1
4000c4d0: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
++stats->frees;
4000c4d4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
4000c4d8: 82 00 60 01 inc %g1
4000c4dc: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
4000c4e0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
4000c4e4: 84 00 40 02 add %g1, %g2, %g2
4000c4e8: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
* 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 ) {
return true;
4000c4ec: 88 10 20 01 mov 1, %g4
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4000c4f0: b0 09 20 01 and %g4, 1, %i0
4000c4f4: 81 c7 e0 08 ret
4000c4f8: 81 e8 00 00 restore
40009dfc <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
40009dfc: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
40009e00: b6 10 20 00 clr %i3
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
40009e04: ba 10 00 18 mov %i0, %i5
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
40009e08: 10 80 00 11 b 40009e4c <_Heap_Greedy_allocate+0x50>
40009e0c: b8 10 20 00 clr %i4
* @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 );
40009e10: d2 06 40 01 ld [ %i1 + %g1 ], %o1
40009e14: 90 10 00 1d mov %i5, %o0
40009e18: 94 10 20 00 clr %o2
40009e1c: 40 00 1a f5 call 400109f0 <_Heap_Allocate_aligned_with_boundary>
40009e20: 96 10 20 00 clr %o3
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
40009e24: 82 92 20 00 orcc %o0, 0, %g1
40009e28: 22 80 00 09 be,a 40009e4c <_Heap_Greedy_allocate+0x50> <== NEVER TAKEN
40009e2c: b6 06 e0 01 inc %i3 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
40009e30: d2 07 60 10 ld [ %i5 + 0x10 ], %o1
40009e34: 40 00 30 bc call 40016124 <.urem>
40009e38: b0 00 7f f8 add %g1, -8, %i0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
40009e3c: 90 26 00 08 sub %i0, %o0, %o0
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
40009e40: f8 22 20 08 st %i4, [ %o0 + 8 ]
40009e44: b8 10 00 08 mov %o0, %i4
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
40009e48: b6 06 e0 01 inc %i3
40009e4c: 80 a6 c0 1a cmp %i3, %i2
40009e50: 12 bf ff f0 bne 40009e10 <_Heap_Greedy_allocate+0x14>
40009e54: 83 2e e0 02 sll %i3, 2, %g1
40009e58: 10 80 00 0a b 40009e80 <_Heap_Greedy_allocate+0x84>
40009e5c: b0 10 20 00 clr %i0
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
40009e60: 90 10 00 1d mov %i5, %o0
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
40009e64: 96 0a ff fe and %o3, -2, %o3
40009e68: 92 10 00 1b mov %i3, %o1
40009e6c: 94 06 e0 08 add %i3, 8, %o2
40009e70: 40 00 00 cb call 4000a19c <_Heap_Block_allocate>
40009e74: 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;
40009e78: f0 26 e0 08 st %i0, [ %i3 + 8 ]
40009e7c: b0 10 00 1b mov %i3, %i0
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40009e80: f6 07 60 08 ld [ %i5 + 8 ], %i3
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
40009e84: 80 a6 c0 1d cmp %i3, %i5
40009e88: 32 bf ff f6 bne,a 40009e60 <_Heap_Greedy_allocate+0x64>
40009e8c: d6 06 e0 04 ld [ %i3 + 4 ], %o3
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
40009e90: 10 80 00 07 b 40009eac <_Heap_Greedy_allocate+0xb0>
40009e94: 80 a7 20 00 cmp %i4, 0
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
40009e98: 92 07 20 08 add %i4, 8, %o1
40009e9c: 90 10 00 1d mov %i5, %o0
40009ea0: 40 00 1b 45 call 40010bb4 <_Heap_Free>
40009ea4: b8 10 00 1b mov %i3, %i4
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
40009ea8: 80 a7 20 00 cmp %i4, 0
40009eac: 32 bf ff fb bne,a 40009e98 <_Heap_Greedy_allocate+0x9c>
40009eb0: f6 07 20 08 ld [ %i4 + 8 ], %i3
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
40009eb4: 81 c7 e0 08 ret
40009eb8: 81 e8 00 00 restore
40011d64 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
40011d64: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
40011d68: 90 10 20 00 clr %o0 <== NOT EXECUTED
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
Heap_Block *current = heap->first_block;
40011d6c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
40011d70: 10 80 00 0a b 40011d98 <_Heap_Iterate+0x34> <== NOT EXECUTED
40011d74: f8 06 20 24 ld [ %i0 + 0x24 ], %i4 <== NOT EXECUTED
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 );
40011d78: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
40011d7c: 92 0a 7f fe and %o1, -2, %o1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40011d80: ba 00 40 09 add %g1, %o1, %i5 <== 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;
40011d84: d4 07 60 04 ld [ %i5 + 4 ], %o2 <== NOT EXECUTED
40011d88: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED
40011d8c: 9f c6 40 00 call %i1 <== NOT EXECUTED
40011d90: 94 0a a0 01 and %o2, 1, %o2 <== NOT EXECUTED
40011d94: 82 10 00 1d mov %i5, %g1 <== NOT EXECUTED
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
40011d98: 80 a0 40 1c cmp %g1, %i4 <== NOT EXECUTED
40011d9c: 02 80 00 05 be 40011db0 <_Heap_Iterate+0x4c> <== NOT EXECUTED
40011da0: 90 1a 20 01 xor %o0, 1, %o0 <== NOT EXECUTED
40011da4: 80 8a 20 ff btst 0xff, %o0 <== NOT EXECUTED
40011da8: 32 bf ff f4 bne,a 40011d78 <_Heap_Iterate+0x14> <== NOT EXECUTED
40011dac: d2 00 60 04 ld [ %g1 + 4 ], %o1 <== NOT EXECUTED
40011db0: 81 c7 e0 08 ret <== NOT EXECUTED
40011db4: 81 e8 00 00 restore <== NOT EXECUTED
4001a138 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
4001a138: 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);
4001a13c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
4001a140: 7f ff f3 fe call 40017138 <.urem>
4001a144: 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
4001a148: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4001a14c: 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);
4001a150: 90 27 40 08 sub %i5, %o0, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4001a154: 80 a2 00 04 cmp %o0, %g4
4001a158: 0a 80 00 05 bcs 4001a16c <_Heap_Size_of_alloc_area+0x34>
4001a15c: 82 10 20 00 clr %g1
4001a160: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
4001a164: 80 a0 40 08 cmp %g1, %o0
4001a168: 82 60 3f ff subx %g0, -1, %g1
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
4001a16c: 80 a0 60 00 cmp %g1, 0
4001a170: 02 80 00 15 be 4001a1c4 <_Heap_Size_of_alloc_area+0x8c>
4001a174: 86 10 20 00 clr %g3
- 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;
4001a178: c2 02 20 04 ld [ %o0 + 4 ], %g1
4001a17c: 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);
4001a180: 82 02 00 01 add %o0, %g1, %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;
4001a184: 80 a0 40 04 cmp %g1, %g4
4001a188: 0a 80 00 05 bcs 4001a19c <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN
4001a18c: 84 10 20 00 clr %g2
4001a190: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
4001a194: 80 a0 80 01 cmp %g2, %g1
4001a198: 84 60 3f ff subx %g0, -1, %g2
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
4001a19c: 80 a0 a0 00 cmp %g2, 0
4001a1a0: 02 80 00 09 be 4001a1c4 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
4001a1a4: 86 10 20 00 clr %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;
4001a1a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
4001a1ac: 80 88 a0 01 btst 1, %g2
4001a1b0: 02 80 00 05 be 4001a1c4 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
4001a1b4: 82 20 40 19 sub %g1, %i1, %g1
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
4001a1b8: 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;
4001a1bc: 82 00 60 04 add %g1, 4, %g1
4001a1c0: c2 26 80 00 st %g1, [ %i2 ]
return true;
}
4001a1c4: b0 08 e0 01 and %g3, 1, %i0
4001a1c8: 81 c7 e0 08 ret
4001a1cc: 81 e8 00 00 restore
40008bfc <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
40008bfc: 9d e3 bf 80 save %sp, -128, %sp
40008c00: ac 10 00 19 mov %i1, %l6
uintptr_t const page_size = heap->page_size;
40008c04: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
uintptr_t const min_block_size = heap->min_block_size;
40008c08: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
40008c0c: f2 06 20 20 ld [ %i0 + 0x20 ], %i1
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;
40008c10: 80 a6 a0 00 cmp %i2, 0
40008c14: 02 80 00 05 be 40008c28 <_Heap_Walk+0x2c>
40008c18: e0 06 20 24 ld [ %i0 + 0x24 ], %l0
40008c1c: 3b 10 00 22 sethi %hi(0x40008800), %i5
40008c20: 10 80 00 04 b 40008c30 <_Heap_Walk+0x34>
40008c24: ba 17 63 ac or %i5, 0x3ac, %i5 ! 40008bac <_Heap_Walk_print>
40008c28: 3b 10 00 22 sethi %hi(0x40008800), %i5
40008c2c: ba 17 63 a4 or %i5, 0x3a4, %i5 ! 40008ba4 <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
40008c30: 05 10 00 5d sethi %hi(0x40017400), %g2
40008c34: c4 00 a0 6c ld [ %g2 + 0x6c ], %g2 ! 4001746c <_System_state_Current>
40008c38: 80 a0 a0 03 cmp %g2, 3
40008c3c: 22 80 00 04 be,a 40008c4c <_Heap_Walk+0x50>
40008c40: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
return true;
40008c44: 10 80 01 2a b 400090ec <_Heap_Walk+0x4f0>
40008c48: b0 10 20 01 mov 1, %i0
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)(
40008c4c: da 06 20 18 ld [ %i0 + 0x18 ], %o5
40008c50: c4 23 a0 5c st %g2, [ %sp + 0x5c ]
40008c54: f2 23 a0 60 st %i1, [ %sp + 0x60 ]
40008c58: e0 23 a0 64 st %l0, [ %sp + 0x64 ]
40008c5c: c4 06 20 08 ld [ %i0 + 8 ], %g2
40008c60: 90 10 00 16 mov %l6, %o0
40008c64: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
40008c68: c4 06 20 0c ld [ %i0 + 0xc ], %g2
40008c6c: 92 10 20 00 clr %o1
40008c70: c4 23 a0 6c st %g2, [ %sp + 0x6c ]
40008c74: 15 10 00 52 sethi %hi(0x40014800), %o2
40008c78: 96 10 00 1c mov %i4, %o3
40008c7c: 94 12 a3 60 or %o2, 0x360, %o2
40008c80: 9f c7 40 00 call %i5
40008c84: 98 10 00 1b mov %i3, %o4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
40008c88: 80 a7 20 00 cmp %i4, 0
40008c8c: 12 80 00 07 bne 40008ca8 <_Heap_Walk+0xac>
40008c90: 80 8f 20 07 btst 7, %i4
(*printer)( source, true, "page size is zero\n" );
40008c94: 15 10 00 52 sethi %hi(0x40014800), %o2
40008c98: 90 10 00 16 mov %l6, %o0
40008c9c: 92 10 20 01 mov 1, %o1
40008ca0: 10 80 00 37 b 40008d7c <_Heap_Walk+0x180>
40008ca4: 94 12 a3 f8 or %o2, 0x3f8, %o2
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
40008ca8: 22 80 00 08 be,a 40008cc8 <_Heap_Walk+0xcc>
40008cac: 90 10 00 1b mov %i3, %o0
(*printer)(
40008cb0: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008cb4: 90 10 00 16 mov %l6, %o0
40008cb8: 92 10 20 01 mov 1, %o1
40008cbc: 94 12 a0 10 or %o2, 0x10, %o2
40008cc0: 10 80 01 12 b 40009108 <_Heap_Walk+0x50c>
40008cc4: 96 10 00 1c mov %i4, %o3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
40008cc8: 7f ff e3 af call 40001b84 <.urem>
40008ccc: 92 10 00 1c mov %i4, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
40008cd0: 80 a2 20 00 cmp %o0, 0
40008cd4: 22 80 00 08 be,a 40008cf4 <_Heap_Walk+0xf8>
40008cd8: 90 06 60 08 add %i1, 8, %o0
(*printer)(
40008cdc: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008ce0: 90 10 00 16 mov %l6, %o0
40008ce4: 92 10 20 01 mov 1, %o1
40008ce8: 94 12 a0 30 or %o2, 0x30, %o2
40008cec: 10 80 01 07 b 40009108 <_Heap_Walk+0x50c>
40008cf0: 96 10 00 1b mov %i3, %o3
40008cf4: 7f ff e3 a4 call 40001b84 <.urem>
40008cf8: 92 10 00 1c mov %i4, %o1
);
return false;
}
if (
40008cfc: 80 a2 20 00 cmp %o0, 0
40008d00: 22 80 00 07 be,a 40008d1c <_Heap_Walk+0x120>
40008d04: c4 06 60 04 ld [ %i1 + 4 ], %g2
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
40008d08: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008d0c: 90 10 00 16 mov %l6, %o0
40008d10: 92 10 20 01 mov 1, %o1
40008d14: 10 80 00 fc b 40009104 <_Heap_Walk+0x508>
40008d18: 94 12 a0 58 or %o2, 0x58, %o2
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
40008d1c: 80 88 a0 01 btst 1, %g2
40008d20: 32 80 00 07 bne,a 40008d3c <_Heap_Walk+0x140>
40008d24: f4 04 20 04 ld [ %l0 + 4 ], %i2
(*printer)(
40008d28: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008d2c: 90 10 00 16 mov %l6, %o0
40008d30: 92 10 20 01 mov 1, %o1
40008d34: 10 80 00 12 b 40008d7c <_Heap_Walk+0x180>
40008d38: 94 12 a0 90 or %o2, 0x90, %o2
- 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;
40008d3c: b4 0e bf fe and %i2, -2, %i2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40008d40: b4 04 00 1a add %l0, %i2, %i2
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;
40008d44: c4 06 a0 04 ld [ %i2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
40008d48: 80 88 a0 01 btst 1, %g2
40008d4c: 12 80 00 07 bne 40008d68 <_Heap_Walk+0x16c>
40008d50: 80 a6 80 19 cmp %i2, %i1
(*printer)(
40008d54: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008d58: 90 10 00 16 mov %l6, %o0
40008d5c: 92 10 20 01 mov 1, %o1
40008d60: 10 80 00 07 b 40008d7c <_Heap_Walk+0x180>
40008d64: 94 12 a0 c0 or %o2, 0xc0, %o2
);
return false;
}
if (
40008d68: 02 80 00 0a be 40008d90 <_Heap_Walk+0x194>
40008d6c: 15 10 00 53 sethi %hi(0x40014c00), %o2
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
40008d70: 90 10 00 16 mov %l6, %o0
40008d74: 92 10 20 01 mov 1, %o1
40008d78: 94 12 a0 d8 or %o2, 0xd8, %o2
40008d7c: 9f c7 40 00 call %i5
40008d80: b0 10 20 00 clr %i0
40008d84: b0 0e 20 ff and %i0, 0xff, %i0
40008d88: 81 c7 e0 08 ret
40008d8c: 81 e8 00 00 restore
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
40008d90: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40008d94: d6 06 20 08 ld [ %i0 + 8 ], %o3
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
40008d98: 10 80 00 30 b 40008e58 <_Heap_Walk+0x25c>
40008d9c: b2 10 00 18 mov %i0, %i1
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;
40008da0: 80 a0 c0 0b cmp %g3, %o3
40008da4: 18 80 00 05 bgu 40008db8 <_Heap_Walk+0x1bc>
40008da8: 84 10 20 00 clr %g2
40008dac: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
40008db0: 80 a0 80 0b cmp %g2, %o3
40008db4: 84 60 3f ff subx %g0, -1, %g2
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 ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
40008db8: 80 a0 a0 00 cmp %g2, 0
40008dbc: 32 80 00 07 bne,a 40008dd8 <_Heap_Walk+0x1dc>
40008dc0: 90 02 e0 08 add %o3, 8, %o0
(*printer)(
40008dc4: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008dc8: 90 10 00 16 mov %l6, %o0
40008dcc: 92 10 20 01 mov 1, %o1
40008dd0: 10 80 00 ce b 40009108 <_Heap_Walk+0x50c>
40008dd4: 94 12 a1 08 or %o2, 0x108, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
40008dd8: d6 27 bf fc st %o3, [ %fp + -4 ]
40008ddc: 7f ff e3 6a call 40001b84 <.urem>
40008de0: 92 10 00 11 mov %l1, %o1
);
return false;
}
if (
40008de4: 80 a2 20 00 cmp %o0, 0
40008de8: 02 80 00 07 be 40008e04 <_Heap_Walk+0x208>
40008dec: d6 07 bf fc ld [ %fp + -4 ], %o3
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
40008df0: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008df4: 90 10 00 16 mov %l6, %o0
40008df8: 92 10 20 01 mov 1, %o1
40008dfc: 10 80 00 c3 b 40009108 <_Heap_Walk+0x50c>
40008e00: 94 12 a1 28 or %o2, 0x128, %o2
- 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;
40008e04: c4 02 e0 04 ld [ %o3 + 4 ], %g2
40008e08: 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;
40008e0c: 84 02 c0 02 add %o3, %g2, %g2
40008e10: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
40008e14: 80 88 a0 01 btst 1, %g2
40008e18: 22 80 00 07 be,a 40008e34 <_Heap_Walk+0x238>
40008e1c: d8 02 e0 0c ld [ %o3 + 0xc ], %o4
(*printer)(
40008e20: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008e24: 90 10 00 16 mov %l6, %o0
40008e28: 92 10 20 01 mov 1, %o1
40008e2c: 10 80 00 b7 b 40009108 <_Heap_Walk+0x50c>
40008e30: 94 12 a1 58 or %o2, 0x158, %o2
);
return false;
}
if ( free_block->prev != prev_block ) {
40008e34: 80 a3 00 19 cmp %o4, %i1
40008e38: 02 80 00 07 be 40008e54 <_Heap_Walk+0x258>
40008e3c: b2 10 00 0b mov %o3, %i1
(*printer)(
40008e40: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008e44: 90 10 00 16 mov %l6, %o0
40008e48: 92 10 20 01 mov 1, %o1
40008e4c: 10 80 00 4d b 40008f80 <_Heap_Walk+0x384>
40008e50: 94 12 a1 78 or %o2, 0x178, %o2
return false;
}
prev_block = free_block;
free_block = free_block->next;
40008e54: d6 02 e0 08 ld [ %o3 + 8 ], %o3
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 ) {
40008e58: 80 a2 c0 18 cmp %o3, %i0
40008e5c: 32 bf ff d1 bne,a 40008da0 <_Heap_Walk+0x1a4>
40008e60: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
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)(
40008e64: 2b 10 00 53 sethi %hi(0x40014c00), %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 ) {
40008e68: b2 10 00 1a mov %i2, %i1
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)(
40008e6c: aa 15 62 78 or %l5, 0x278, %l5
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
40008e70: 23 10 00 53 sethi %hi(0x40014c00), %l1
40008e74: 2f 10 00 52 sethi %hi(0x40014800), %l7
- 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;
40008e78: e4 06 60 04 ld [ %i1 + 4 ], %l2
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;
40008e7c: d8 06 20 20 ld [ %i0 + 0x20 ], %o4
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;
40008e80: 9e 1e 40 10 xor %i1, %l0, %o7
40008e84: 80 a0 00 0f cmp %g0, %o7
- 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;
40008e88: a8 0c bf fe and %l2, -2, %l4
40008e8c: 9a 40 20 00 addx %g0, 0, %o5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40008e90: a6 06 40 14 add %i1, %l4, %l3
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;
40008e94: a4 0c a0 01 and %l2, 1, %l2
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;
40008e98: 80 a3 00 13 cmp %o4, %l3
40008e9c: 18 80 00 05 bgu 40008eb0 <_Heap_Walk+0x2b4> <== NEVER TAKEN
40008ea0: 9e 10 20 00 clr %o7
40008ea4: de 06 20 24 ld [ %i0 + 0x24 ], %o7
40008ea8: 80 a3 c0 13 cmp %o7, %l3
40008eac: 9e 60 3f ff subx %g0, -1, %o7
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
40008eb0: 80 a3 e0 00 cmp %o7, 0
40008eb4: 32 80 00 07 bne,a 40008ed0 <_Heap_Walk+0x2d4>
40008eb8: da 27 bf f8 st %o5, [ %fp + -8 ]
(*printer)(
40008ebc: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008ec0: 90 10 00 16 mov %l6, %o0
40008ec4: 92 10 20 01 mov 1, %o1
40008ec8: 10 80 00 2c b 40008f78 <_Heap_Walk+0x37c>
40008ecc: 94 12 a1 b0 or %o2, 0x1b0, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
40008ed0: 90 10 00 14 mov %l4, %o0
40008ed4: 7f ff e3 2c call 40001b84 <.urem>
40008ed8: 92 10 00 1c mov %i4, %o1
40008edc: da 07 bf f8 ld [ %fp + -8 ], %o5
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
40008ee0: 80 a2 20 00 cmp %o0, 0
40008ee4: 02 80 00 0c be 40008f14 <_Heap_Walk+0x318>
40008ee8: 9e 0b 60 ff and %o5, 0xff, %o7
40008eec: 80 a3 e0 00 cmp %o7, 0
40008ef0: 02 80 00 19 be 40008f54 <_Heap_Walk+0x358>
40008ef4: 80 a6 40 13 cmp %i1, %l3
(*printer)(
40008ef8: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008efc: 90 10 00 16 mov %l6, %o0
40008f00: 92 10 20 01 mov 1, %o1
40008f04: 94 12 a1 e0 or %o2, 0x1e0, %o2
40008f08: 96 10 00 19 mov %i1, %o3
40008f0c: 10 80 00 1d b 40008f80 <_Heap_Walk+0x384>
40008f10: 98 10 00 14 mov %l4, %o4
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
40008f14: 80 a3 e0 00 cmp %o7, 0
40008f18: 02 80 00 0f be 40008f54 <_Heap_Walk+0x358>
40008f1c: 80 a6 40 13 cmp %i1, %l3
40008f20: 80 a5 00 1b cmp %l4, %i3
40008f24: 1a 80 00 0c bcc 40008f54 <_Heap_Walk+0x358>
40008f28: 80 a6 40 13 cmp %i1, %l3
(*printer)(
40008f2c: 90 10 00 16 mov %l6, %o0
40008f30: 92 10 20 01 mov 1, %o1
40008f34: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008f38: 96 10 00 19 mov %i1, %o3
40008f3c: 94 12 a2 10 or %o2, 0x210, %o2
40008f40: 98 10 00 14 mov %l4, %o4
40008f44: 9f c7 40 00 call %i5
40008f48: 9a 10 00 1b mov %i3, %o5
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
40008f4c: 10 80 00 68 b 400090ec <_Heap_Walk+0x4f0>
40008f50: b0 10 20 00 clr %i0
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
40008f54: 2a 80 00 10 bcs,a 40008f94 <_Heap_Walk+0x398>
40008f58: de 04 e0 04 ld [ %l3 + 4 ], %o7
40008f5c: 80 8b 60 ff btst 0xff, %o5
40008f60: 22 80 00 0d be,a 40008f94 <_Heap_Walk+0x398>
40008f64: de 04 e0 04 ld [ %l3 + 4 ], %o7
(*printer)(
40008f68: 15 10 00 53 sethi %hi(0x40014c00), %o2
40008f6c: 90 10 00 16 mov %l6, %o0
40008f70: 92 10 20 01 mov 1, %o1
40008f74: 94 12 a2 40 or %o2, 0x240, %o2
40008f78: 96 10 00 19 mov %i1, %o3
40008f7c: 98 10 00 13 mov %l3, %o4
40008f80: 9f c7 40 00 call %i5
40008f84: b0 10 20 00 clr %i0
40008f88: b0 0e 20 ff and %i0, 0xff, %i0
40008f8c: 81 c7 e0 08 ret
40008f90: 81 e8 00 00 restore
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
40008f94: 80 8b e0 01 btst 1, %o7
40008f98: 12 80 00 3f bne 40009094 <_Heap_Walk+0x498>
40008f9c: 90 10 00 16 mov %l6, %o0
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 ?
40008fa0: da 06 60 0c ld [ %i1 + 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)(
40008fa4: d8 06 20 08 ld [ %i0 + 8 ], %o4
40008fa8: 80 a3 40 0c cmp %o5, %o4
40008fac: 02 80 00 08 be 40008fcc <_Heap_Walk+0x3d0>
40008fb0: de 06 20 0c ld [ %i0 + 0xc ], %o7
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
40008fb4: 80 a3 40 18 cmp %o5, %i0
40008fb8: 12 80 00 07 bne 40008fd4 <_Heap_Walk+0x3d8>
40008fbc: 96 14 62 e8 or %l1, 0x2e8, %o3
40008fc0: 17 10 00 52 sethi %hi(0x40014800), %o3
40008fc4: 10 80 00 04 b 40008fd4 <_Heap_Walk+0x3d8>
40008fc8: 96 12 e3 30 or %o3, 0x330, %o3 ! 40014b30 <__log2table+0x130>
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)(
40008fcc: 03 10 00 52 sethi %hi(0x40014800), %g1
40008fd0: 96 10 63 20 or %g1, 0x320, %o3 ! 40014b20 <__log2table+0x120>
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
40008fd4: d8 06 60 08 ld [ %i1 + 8 ], %o4
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)(
40008fd8: 80 a3 00 0f cmp %o4, %o7
40008fdc: 02 80 00 06 be 40008ff4 <_Heap_Walk+0x3f8>
40008fe0: 80 a3 00 18 cmp %o4, %i0
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
40008fe4: 12 80 00 06 bne 40008ffc <_Heap_Walk+0x400>
40008fe8: 9e 14 62 e8 or %l1, 0x2e8, %o7
40008fec: 10 80 00 04 b 40008ffc <_Heap_Walk+0x400>
40008ff0: 9e 15 e3 50 or %l7, 0x350, %o7
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)(
40008ff4: 03 10 00 52 sethi %hi(0x40014800), %g1
40008ff8: 9e 10 63 40 or %g1, 0x340, %o7 ! 40014b40 <__log2table+0x140>
40008ffc: d6 23 a0 5c st %o3, [ %sp + 0x5c ]
40009000: d8 23 a0 60 st %o4, [ %sp + 0x60 ]
40009004: de 23 a0 64 st %o7, [ %sp + 0x64 ]
40009008: 90 10 00 16 mov %l6, %o0
4000900c: 92 10 20 00 clr %o1
40009010: 94 10 00 15 mov %l5, %o2
40009014: 96 10 00 19 mov %i1, %o3
40009018: 9f c7 40 00 call %i5
4000901c: 98 10 00 14 mov %l4, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
40009020: da 04 c0 00 ld [ %l3 ], %o5
40009024: 80 a5 00 0d cmp %l4, %o5
40009028: 02 80 00 0c be 40009058 <_Heap_Walk+0x45c>
4000902c: 80 a4 a0 00 cmp %l2, 0
(*printer)(
40009030: e6 23 a0 5c st %l3, [ %sp + 0x5c ]
40009034: 90 10 00 16 mov %l6, %o0
40009038: 92 10 20 01 mov 1, %o1
4000903c: 15 10 00 53 sethi %hi(0x40014c00), %o2
40009040: 96 10 00 19 mov %i1, %o3
40009044: 94 12 a2 b0 or %o2, 0x2b0, %o2
40009048: 9f c7 40 00 call %i5
4000904c: 98 10 00 14 mov %l4, %o4
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
40009050: 10 bf ff ce b 40008f88 <_Heap_Walk+0x38c>
40009054: b0 10 20 00 clr %i0
);
return false;
}
if ( !prev_used ) {
40009058: 32 80 00 0a bne,a 40009080 <_Heap_Walk+0x484>
4000905c: c6 06 20 08 ld [ %i0 + 8 ], %g3
(*printer)(
40009060: 15 10 00 53 sethi %hi(0x40014c00), %o2
40009064: 90 10 00 16 mov %l6, %o0
40009068: 92 10 20 01 mov 1, %o1
4000906c: 10 80 00 26 b 40009104 <_Heap_Walk+0x508>
40009070: 94 12 a2 f0 or %o2, 0x2f0, %o2
{
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 ) {
if ( free_block == block ) {
40009074: 22 80 00 19 be,a 400090d8 <_Heap_Walk+0x4dc>
40009078: b2 10 00 13 mov %l3, %i1
return true;
}
free_block = free_block->next;
4000907c: c6 00 e0 08 ld [ %g3 + 8 ], %g3
)
{
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 ) {
40009080: 80 a0 c0 18 cmp %g3, %i0
40009084: 12 bf ff fc bne 40009074 <_Heap_Walk+0x478>
40009088: 80 a0 c0 19 cmp %g3, %i1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4000908c: 10 80 00 1b b 400090f8 <_Heap_Walk+0x4fc>
40009090: 15 10 00 53 sethi %hi(0x40014c00), %o2
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
40009094: 80 a4 a0 00 cmp %l2, 0
40009098: 02 80 00 09 be 400090bc <_Heap_Walk+0x4c0>
4000909c: 92 10 20 00 clr %o1
(*printer)(
400090a0: 15 10 00 53 sethi %hi(0x40014c00), %o2
400090a4: 96 10 00 19 mov %i1, %o3
400090a8: 94 12 a3 20 or %o2, 0x320, %o2
400090ac: 9f c7 40 00 call %i5
400090b0: 98 10 00 14 mov %l4, %o4
400090b4: 10 80 00 09 b 400090d8 <_Heap_Walk+0x4dc>
400090b8: b2 10 00 13 mov %l3, %i1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
400090bc: da 06 40 00 ld [ %i1 ], %o5
400090c0: 15 10 00 53 sethi %hi(0x40014c00), %o2
400090c4: 96 10 00 19 mov %i1, %o3
400090c8: 94 12 a3 38 or %o2, 0x338, %o2
400090cc: 9f c7 40 00 call %i5
400090d0: 98 10 00 14 mov %l4, %o4
400090d4: b2 10 00 13 mov %l3, %i1
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
400090d8: 80 a4 c0 1a cmp %l3, %i2
400090dc: 32 bf ff 68 bne,a 40008e7c <_Heap_Walk+0x280>
400090e0: e4 06 60 04 ld [ %i1 + 4 ], %l2
400090e4: 10 80 00 02 b 400090ec <_Heap_Walk+0x4f0>
400090e8: b0 10 20 01 mov 1, %i0
400090ec: b0 0e 20 ff and %i0, 0xff, %i0
400090f0: 81 c7 e0 08 ret
400090f4: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
400090f8: 90 10 00 16 mov %l6, %o0
400090fc: 92 10 20 01 mov 1, %o1
40009100: 94 12 a3 60 or %o2, 0x360, %o2
40009104: 96 10 00 19 mov %i1, %o3
40009108: 9f c7 40 00 call %i5
4000910c: b0 10 20 00 clr %i0
40009110: b0 0e 20 ff and %i0, 0xff, %i0
40009114: 81 c7 e0 08 ret
40009118: 81 e8 00 00 restore
40008338 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
40008338: 9d e3 bf 90 save %sp, -112, %sp
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
4000833c: 13 10 00 28 sethi %hi(0x4000a000), %o1
40008340: 90 07 bf f4 add %fp, -12, %o0
40008344: 92 12 62 5c or %o1, 0x25c, %o1
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
40008348: f0 27 bf f4 st %i0, [ %fp + -12 ]
4000834c: f2 2f bf f8 stb %i1, [ %fp + -8 ]
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
40008350: 40 00 07 ce call 4000a288 <_User_extensions_Iterate>
40008354: f4 27 bf fc st %i2, [ %fp + -4 ]
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
40008358: 05 10 00 73 sethi %hi(0x4001cc00), %g2 <== NOT EXECUTED
4000835c: 82 10 a2 b0 or %g2, 0x2b0, %g1 ! 4001ceb0 <_Internal_errors_What_happened><== NOT EXECUTED
40008360: f0 20 a2 b0 st %i0, [ %g2 + 0x2b0 ] <== NOT EXECUTED
_Internal_errors_What_happened.is_internal = is_internal;
40008364: f2 28 60 04 stb %i1, [ %g1 + 4 ] <== NOT EXECUTED
_Internal_errors_What_happened.the_error = the_error;
40008368: f4 20 60 08 st %i2, [ %g1 + 8 ] <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
4000836c: 84 10 20 05 mov 5, %g2 <== NOT EXECUTED
40008370: 03 10 00 73 sethi %hi(0x4001cc00), %g1 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
40008374: 7f ff e7 4d call 400020a8 <sparc_disable_interrupts> <== NOT EXECUTED
40008378: c4 20 62 bc st %g2, [ %g1 + 0x2bc ] ! 4001cebc <_System_state_Current><== NOT EXECUTED
4000837c: 82 10 00 08 mov %o0, %g1 <== NOT EXECUTED
40008380: 30 80 00 00 b,a 40008380 <_Internal_error_Occurred+0x48> <== NOT EXECUTED
400083ec <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
400083ec: 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 )
400083f0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
400083f4: 80 a0 60 00 cmp %g1, 0
400083f8: 12 80 00 04 bne 40008408 <_Objects_Allocate+0x1c> <== ALWAYS TAKEN
400083fc: ba 10 00 18 mov %i0, %i5
return NULL;
40008400: 81 c7 e0 08 ret
40008404: 91 e8 20 00 restore %g0, 0, %o0
/*
* 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 );
40008408: b8 06 20 20 add %i0, 0x20, %i4
4000840c: 7f ff fd 85 call 40007a20 <_Chain_Get>
40008410: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
40008414: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
40008418: 80 a0 60 00 cmp %g1, 0
4000841c: 02 80 00 1d be 40008490 <_Objects_Allocate+0xa4>
40008420: 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 ) {
40008424: 80 a2 20 00 cmp %o0, 0
40008428: 32 80 00 0a bne,a 40008450 <_Objects_Allocate+0x64>
4000842c: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Objects_Extend_information( information );
40008430: 40 00 00 21 call 400084b4 <_Objects_Extend_information>
40008434: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
40008438: 7f ff fd 7a call 40007a20 <_Chain_Get>
4000843c: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
40008440: b0 92 20 00 orcc %o0, 0, %i0
40008444: 02 bf ff ef be 40008400 <_Objects_Allocate+0x14>
40008448: 01 00 00 00 nop
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
4000844c: c4 07 60 08 ld [ %i5 + 8 ], %g2
40008450: d0 06 20 08 ld [ %i0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
40008454: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
40008458: 03 00 00 3f sethi %hi(0xfc00), %g1
4000845c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
40008460: 90 0a 00 01 and %o0, %g1, %o0
40008464: 82 08 80 01 and %g2, %g1, %g1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
40008468: 40 00 3a 88 call 40016e88 <.udiv>
4000846c: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
40008470: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
40008474: 91 2a 20 02 sll %o0, 2, %o0
40008478: c4 00 40 08 ld [ %g1 + %o0 ], %g2
4000847c: 84 00 bf ff add %g2, -1, %g2
40008480: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
40008484: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1
40008488: 82 00 7f ff add %g1, -1, %g1
4000848c: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
40008490: 81 c7 e0 08 ret
40008494: 81 e8 00 00 restore
4000881c <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
4000881c: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
40008820: 80 a6 60 00 cmp %i1, 0
40008824: 12 80 00 04 bne 40008834 <_Objects_Get_information+0x18>
40008828: 01 00 00 00 nop
return NULL;
4000882c: 81 c7 e0 08 ret
40008830: 91 e8 20 00 restore %g0, 0, %o0
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
40008834: 40 00 0f 32 call 4000c4fc <_Objects_API_maximum_class>
40008838: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
4000883c: 80 a2 20 00 cmp %o0, 0
40008840: 02 bf ff fb be 4000882c <_Objects_Get_information+0x10>
40008844: 80 a6 40 08 cmp %i1, %o0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
40008848: 18 bf ff f9 bgu 4000882c <_Objects_Get_information+0x10>
4000884c: 03 10 00 73 sethi %hi(0x4001cc00), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
40008850: b1 2e 20 02 sll %i0, 2, %i0
40008854: 82 10 60 24 or %g1, 0x24, %g1
40008858: c2 00 40 18 ld [ %g1 + %i0 ], %g1
4000885c: 80 a0 60 00 cmp %g1, 0
40008860: 02 bf ff f3 be 4000882c <_Objects_Get_information+0x10> <== NEVER TAKEN
40008864: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
40008868: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
4000886c: 80 a6 20 00 cmp %i0, 0
40008870: 02 bf ff ef be 4000882c <_Objects_Get_information+0x10> <== NEVER TAKEN
40008874: 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 )
40008878: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
4000887c: 80 a0 60 00 cmp %g1, 0
40008880: 02 bf ff eb be 4000882c <_Objects_Get_information+0x10>
40008884: 01 00 00 00 nop
return NULL;
#endif
return info;
}
40008888: 81 c7 e0 08 ret
4000888c: 81 e8 00 00 restore
4001ab64 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
4001ab64: c2 02 20 08 ld [ %o0 + 8 ], %g1
4001ab68: 92 22 40 01 sub %o1, %g1, %o1
if ( information->maximum >= index ) {
4001ab6c: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
4001ab70: 92 02 60 01 inc %o1
if ( information->maximum >= index ) {
4001ab74: 80 a0 40 09 cmp %g1, %o1
4001ab78: 0a 80 00 09 bcs 4001ab9c <_Objects_Get_no_protection+0x38>
4001ab7c: 93 2a 60 02 sll %o1, 2, %o1
if ( (the_object = information->local_table[ index ]) != NULL ) {
4001ab80: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
4001ab84: d0 00 40 09 ld [ %g1 + %o1 ], %o0
4001ab88: 80 a2 20 00 cmp %o0, 0
4001ab8c: 02 80 00 05 be 4001aba0 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
4001ab90: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
4001ab94: 81 c3 e0 08 retl
4001ab98: c0 22 80 00 clr [ %o2 ]
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
4001ab9c: 82 10 20 01 mov 1, %g1
return NULL;
4001aba0: 90 10 20 00 clr %o0
}
4001aba4: 81 c3 e0 08 retl
4001aba8: c2 22 80 00 st %g1, [ %o2 ]
4000c940 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
4000c940: 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;
4000c944: 80 a6 20 00 cmp %i0, 0
4000c948: 12 80 00 06 bne 4000c960 <_Objects_Id_to_name+0x20>
4000c94c: 83 36 20 18 srl %i0, 0x18, %g1
4000c950: 03 10 00 b4 sethi %hi(0x4002d000), %g1
4000c954: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 4002d1e0 <_Per_CPU_Information+0x10>
4000c958: f0 00 60 08 ld [ %g1 + 8 ], %i0
4000c95c: 83 36 20 18 srl %i0, 0x18, %g1
4000c960: 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 )
4000c964: 84 00 7f ff add %g1, -1, %g2
4000c968: 80 a0 a0 02 cmp %g2, 2
4000c96c: 08 80 00 14 bleu 4000c9bc <_Objects_Id_to_name+0x7c>
4000c970: 83 28 60 02 sll %g1, 2, %g1
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
4000c974: 81 c7 e0 08 ret
4000c978: 91 e8 20 03 restore %g0, 3, %o0
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
4000c97c: 85 28 a0 02 sll %g2, 2, %g2
4000c980: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
4000c984: 80 a2 20 00 cmp %o0, 0
4000c988: 02 bf ff fb be 4000c974 <_Objects_Id_to_name+0x34> <== NEVER TAKEN
4000c98c: 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 );
4000c990: 7f ff ff cf call 4000c8cc <_Objects_Get>
4000c994: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
4000c998: 80 a2 20 00 cmp %o0, 0
4000c99c: 02 bf ff f6 be 4000c974 <_Objects_Id_to_name+0x34>
4000c9a0: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
4000c9a4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
4000c9a8: b0 10 20 00 clr %i0
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
4000c9ac: 40 00 03 8e call 4000d7e4 <_Thread_Enable_dispatch>
4000c9b0: c2 26 40 00 st %g1, [ %i1 ]
4000c9b4: 81 c7 e0 08 ret
4000c9b8: 81 e8 00 00 restore
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
4000c9bc: 05 10 00 b3 sethi %hi(0x4002cc00), %g2
4000c9c0: 84 10 a2 f4 or %g2, 0x2f4, %g2 ! 4002cef4 <_Objects_Information_table>
4000c9c4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
4000c9c8: 80 a0 60 00 cmp %g1, 0
4000c9cc: 12 bf ff ec bne 4000c97c <_Objects_Id_to_name+0x3c>
4000c9d0: 85 36 20 1b srl %i0, 0x1b, %g2
4000c9d4: 30 bf ff e8 b,a 4000c974 <_Objects_Id_to_name+0x34>
40009644 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
40009644: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
40009648: 80 a6 60 00 cmp %i1, 0
4000964c: 02 80 00 69 be 400097f0 <_RBTree_Extract_unprotected+0x1ac>
40009650: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
40009654: c2 06 20 08 ld [ %i0 + 8 ], %g1
40009658: 80 a6 40 01 cmp %i1, %g1
4000965c: 32 80 00 07 bne,a 40009678 <_RBTree_Extract_unprotected+0x34>
40009660: c2 06 20 0c ld [ %i0 + 0xc ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
40009664: 90 10 00 19 mov %i1, %o0
40009668: 40 00 01 31 call 40009b2c <_RBTree_Next_unprotected>
4000966c: 92 10 20 01 mov 1, %o1
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
40009670: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
40009674: c2 06 20 0c ld [ %i0 + 0xc ], %g1
40009678: 80 a6 40 01 cmp %i1, %g1
4000967c: 32 80 00 07 bne,a 40009698 <_RBTree_Extract_unprotected+0x54>
40009680: fa 06 60 04 ld [ %i1 + 4 ], %i5
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
40009684: 90 10 00 19 mov %i1, %o0
40009688: 40 00 01 29 call 40009b2c <_RBTree_Next_unprotected>
4000968c: 92 10 20 00 clr %o1
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
40009690: d0 26 20 0c st %o0, [ %i0 + 0xc ]
* 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]) {
40009694: fa 06 60 04 ld [ %i1 + 4 ], %i5
40009698: 80 a7 60 00 cmp %i5, 0
4000969c: 02 80 00 36 be 40009774 <_RBTree_Extract_unprotected+0x130>
400096a0: f8 06 60 08 ld [ %i1 + 8 ], %i4
400096a4: 80 a7 20 00 cmp %i4, 0
400096a8: 32 80 00 05 bne,a 400096bc <_RBTree_Extract_unprotected+0x78>
400096ac: c2 07 60 08 ld [ %i5 + 8 ], %g1
400096b0: 10 80 00 35 b 40009784 <_RBTree_Extract_unprotected+0x140>
400096b4: 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];
400096b8: c2 07 60 08 ld [ %i5 + 8 ], %g1
400096bc: 80 a0 60 00 cmp %g1, 0
400096c0: 32 bf ff fe bne,a 400096b8 <_RBTree_Extract_unprotected+0x74>
400096c4: 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];
400096c8: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
400096cc: 80 a7 20 00 cmp %i4, 0
400096d0: 02 80 00 05 be 400096e4 <_RBTree_Extract_unprotected+0xa0>
400096d4: 01 00 00 00 nop
leaf->parent = target->parent;
400096d8: c2 07 40 00 ld [ %i5 ], %g1
400096dc: 10 80 00 04 b 400096ec <_RBTree_Extract_unprotected+0xa8>
400096e0: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
400096e4: 7f ff ff 73 call 400094b0 <_RBTree_Extract_validate_unprotected>
400096e8: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
400096ec: c4 07 40 00 ld [ %i5 ], %g2
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;
400096f0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
dir = target != target->parent->child[0];
400096f4: c6 00 a0 04 ld [ %g2 + 4 ], %g3
400096f8: 86 1f 40 03 xor %i5, %g3, %g3
400096fc: 80 a0 00 03 cmp %g0, %g3
40009700: 86 40 20 00 addx %g0, 0, %g3
target->parent->child[dir] = leaf;
40009704: 87 28 e0 02 sll %g3, 2, %g3
40009708: 84 00 80 03 add %g2, %g3, %g2
4000970c: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
40009710: c4 06 40 00 ld [ %i1 ], %g2
40009714: c6 00 a0 04 ld [ %g2 + 4 ], %g3
40009718: 86 1e 40 03 xor %i1, %g3, %g3
4000971c: 80 a0 00 03 cmp %g0, %g3
40009720: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = target;
40009724: 87 28 e0 02 sll %g3, 2, %g3
40009728: 84 00 80 03 add %g2, %g3, %g2
4000972c: fa 20 a0 04 st %i5, [ %g2 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
40009730: c4 06 60 08 ld [ %i1 + 8 ], %g2
40009734: c4 27 60 08 st %g2, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
40009738: c4 06 60 08 ld [ %i1 + 8 ], %g2
4000973c: 80 a0 a0 00 cmp %g2, 0
40009740: 32 80 00 02 bne,a 40009748 <_RBTree_Extract_unprotected+0x104><== ALWAYS TAKEN
40009744: fa 20 80 00 st %i5, [ %g2 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
40009748: c4 06 60 04 ld [ %i1 + 4 ], %g2
4000974c: c4 27 60 04 st %g2, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
40009750: c4 06 60 04 ld [ %i1 + 4 ], %g2
40009754: 80 a0 a0 00 cmp %g2, 0
40009758: 32 80 00 02 bne,a 40009760 <_RBTree_Extract_unprotected+0x11c>
4000975c: fa 20 80 00 st %i5, [ %g2 ]
/* 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;
40009760: c4 06 40 00 ld [ %i1 ], %g2
40009764: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
40009768: c4 06 60 0c ld [ %i1 + 0xc ], %g2
4000976c: 10 80 00 14 b 400097bc <_RBTree_Extract_unprotected+0x178>
40009770: c4 27 60 0c st %g2, [ %i5 + 0xc ]
* 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];
if( leaf ) {
40009774: 80 a7 20 00 cmp %i4, 0
40009778: 32 80 00 04 bne,a 40009788 <_RBTree_Extract_unprotected+0x144>
4000977c: c2 06 40 00 ld [ %i1 ], %g1
40009780: 30 80 00 04 b,a 40009790 <_RBTree_Extract_unprotected+0x14c>
leaf->parent = the_node->parent;
40009784: c2 06 40 00 ld [ %i1 ], %g1
40009788: 10 80 00 04 b 40009798 <_RBTree_Extract_unprotected+0x154>
4000978c: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
40009790: 7f ff ff 48 call 400094b0 <_RBTree_Extract_validate_unprotected>
40009794: 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];
40009798: c4 06 40 00 ld [ %i1 ], %g2
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;
4000979c: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
400097a0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
400097a4: 86 1e 40 03 xor %i1, %g3, %g3
400097a8: 80 a0 00 03 cmp %g0, %g3
400097ac: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = leaf;
400097b0: 87 28 e0 02 sll %g3, 2, %g3
400097b4: 84 00 80 03 add %g2, %g3, %g2
400097b8: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* 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 */
400097bc: 80 a0 60 00 cmp %g1, 0
400097c0: 32 80 00 06 bne,a 400097d8 <_RBTree_Extract_unprotected+0x194>
400097c4: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
400097c8: 80 a7 20 00 cmp %i4, 0
400097cc: 32 80 00 02 bne,a 400097d4 <_RBTree_Extract_unprotected+0x190>
400097d0: 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;
400097d4: 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;
400097d8: c0 26 60 08 clr [ %i1 + 8 ]
400097dc: c0 26 60 04 clr [ %i1 + 4 ]
400097e0: 80 a0 60 00 cmp %g1, 0
400097e4: 02 80 00 03 be 400097f0 <_RBTree_Extract_unprotected+0x1ac>
400097e8: c0 26 40 00 clr [ %i1 ]
400097ec: c0 20 60 0c clr [ %g1 + 0xc ]
400097f0: 81 c7 e0 08 ret
400097f4: 81 e8 00 00 restore
4000a8bc <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
4000a8bc: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
4000a8c0: 80 a6 20 00 cmp %i0, 0
4000a8c4: 02 80 00 10 be 4000a904 <_RBTree_Initialize+0x48> <== NEVER TAKEN
4000a8c8: 01 00 00 00 nop
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
4000a8cc: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
4000a8d0: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
4000a8d4: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
4000a8d8: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
4000a8dc: 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-- ) {
4000a8e0: 10 80 00 06 b 4000a8f8 <_RBTree_Initialize+0x3c>
4000a8e4: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert_unprotected(the_rbtree, next);
4000a8e8: 90 10 00 18 mov %i0, %o0
4000a8ec: 7f ff ff 2e call 4000a5a4 <_RBTree_Insert_unprotected>
4000a8f0: b4 06 80 1c add %i2, %i4, %i2
4000a8f4: b6 06 ff ff add %i3, -1, %i3
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
4000a8f8: 80 a6 e0 00 cmp %i3, 0
4000a8fc: 12 bf ff fb bne 4000a8e8 <_RBTree_Initialize+0x2c>
4000a900: 92 10 00 1a mov %i2, %o1
4000a904: 81 c7 e0 08 ret
4000a908: 81 e8 00 00 restore
40009898 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
40009898: 9d e3 bf a0 save %sp, -96, %sp
if(!the_node) return (RBTree_Node*)-1;
4000989c: 80 a6 60 00 cmp %i1, 0
400098a0: 02 80 00 7c be 40009a90 <_RBTree_Insert_unprotected+0x1f8>
400098a4: ba 10 00 18 mov %i0, %i5
RBTree_Node *iter_node = the_rbtree->root;
400098a8: f0 06 20 04 ld [ %i0 + 4 ], %i0
int compare_result;
if (!iter_node) { /* special case: first node inserted */
400098ac: b6 96 20 00 orcc %i0, 0, %i3
400098b0: 32 80 00 0c bne,a 400098e0 <_RBTree_Insert_unprotected+0x48>
400098b4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
the_node->color = RBT_BLACK;
400098b8: c0 26 60 0c clr [ %i1 + 0xc ]
the_rbtree->root = the_node;
400098bc: f2 27 60 04 st %i1, [ %i5 + 4 ]
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
400098c0: f2 27 60 0c st %i1, [ %i5 + 0xc ]
400098c4: f2 27 60 08 st %i1, [ %i5 + 8 ]
the_node->parent = (RBTree_Node *) the_rbtree;
400098c8: fa 26 40 00 st %i5, [ %i1 ]
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
400098cc: c0 26 60 08 clr [ %i1 + 8 ]
400098d0: c0 26 60 04 clr [ %i1 + 4 ]
400098d4: 81 c7 e0 08 ret
400098d8: 81 e8 00 00 restore
} 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);
400098dc: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
400098e0: 90 10 00 19 mov %i1, %o0
400098e4: 9f c0 40 00 call %g1
400098e8: 92 10 00 18 mov %i0, %o1
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
400098ec: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1
400098f0: 80 a0 60 00 cmp %g1, 0
400098f4: 02 80 00 05 be 40009908 <_RBTree_Insert_unprotected+0x70>
400098f8: b8 38 00 08 xnor %g0, %o0, %i4
400098fc: 80 a2 20 00 cmp %o0, 0
40009900: 02 80 00 65 be 40009a94 <_RBTree_Insert_unprotected+0x1fc>
40009904: 01 00 00 00 nop
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
40009908: b9 37 20 1f srl %i4, 0x1f, %i4
if (!iter_node->child[dir]) {
4000990c: 83 2f 20 02 sll %i4, 2, %g1
40009910: 82 06 00 01 add %i0, %g1, %g1
40009914: f0 00 60 04 ld [ %g1 + 4 ], %i0
40009918: 80 a6 20 00 cmp %i0, 0
4000991c: 32 bf ff f0 bne,a 400098dc <_RBTree_Insert_unprotected+0x44>
40009920: b6 10 00 18 mov %i0, %i3
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
40009924: c0 26 60 08 clr [ %i1 + 8 ]
40009928: c0 26 60 04 clr [ %i1 + 4 ]
the_node->color = RBT_RED;
4000992c: 84 10 20 01 mov 1, %g2
iter_node->child[dir] = the_node;
40009930: f2 20 60 04 st %i1, [ %g1 + 4 ]
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;
40009934: c4 26 60 0c st %g2, [ %i1 + 0xc ]
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
40009938: f6 26 40 00 st %i3, [ %i1 ]
/* update min/max */
compare_result = the_rbtree->compare_function(
4000993c: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
40009940: b6 07 20 02 add %i4, 2, %i3
40009944: 85 2e e0 02 sll %i3, 2, %g2
40009948: d2 07 40 02 ld [ %i5 + %g2 ], %o1
4000994c: 9f c0 40 00 call %g1
40009950: 90 10 00 19 mov %i1, %o0
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
40009954: 80 a7 20 00 cmp %i4, 0
40009958: 12 80 00 06 bne 40009970 <_RBTree_Insert_unprotected+0xd8>
4000995c: 80 a2 20 00 cmp %o0, 0
40009960: 36 80 00 3c bge,a 40009a50 <_RBTree_Insert_unprotected+0x1b8>
40009964: d0 06 40 00 ld [ %i1 ], %o0
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
40009968: 10 80 00 04 b 40009978 <_RBTree_Insert_unprotected+0xe0>
4000996c: b7 2e e0 02 sll %i3, 2, %i3
compare_result = the_rbtree->compare_function(
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
(dir && _RBTree_Is_greater(compare_result)) ) {
40009970: 04 80 00 37 ble 40009a4c <_RBTree_Insert_unprotected+0x1b4>
40009974: b7 2e e0 02 sll %i3, 2, %i3
the_rbtree->first[dir] = the_node;
40009978: 10 80 00 35 b 40009a4c <_RBTree_Insert_unprotected+0x1b4>
4000997c: f2 27 40 1b st %i1, [ %i5 + %i3 ]
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
40009980: 02 80 00 13 be 400099cc <_RBTree_Insert_unprotected+0x134><== NEVER TAKEN
40009984: 82 10 20 00 clr %g1
if(!(the_node->parent->parent->parent)) return NULL;
40009988: c2 07 40 00 ld [ %i5 ], %g1
4000998c: 80 a0 60 00 cmp %g1, 0
40009990: 02 80 00 0f be 400099cc <_RBTree_Insert_unprotected+0x134><== NEVER TAKEN
40009994: 82 10 20 00 clr %g1
{
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])
40009998: c2 07 60 04 ld [ %i5 + 4 ], %g1
4000999c: 80 a2 00 01 cmp %o0, %g1
400099a0: 22 80 00 02 be,a 400099a8 <_RBTree_Insert_unprotected+0x110>
400099a4: c2 07 60 08 ld [ %i5 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
400099a8: 80 a0 60 00 cmp %g1, 0
400099ac: 02 80 00 09 be 400099d0 <_RBTree_Insert_unprotected+0x138>
400099b0: 84 10 20 00 clr %g2
400099b4: c4 00 60 0c ld [ %g1 + 0xc ], %g2
400099b8: 80 a0 a0 01 cmp %g2, 1
400099bc: 32 80 00 05 bne,a 400099d0 <_RBTree_Insert_unprotected+0x138>
400099c0: 84 10 20 00 clr %g2
400099c4: 10 80 00 03 b 400099d0 <_RBTree_Insert_unprotected+0x138>
400099c8: 84 10 20 01 mov 1, %g2
400099cc: 84 10 20 00 clr %g2 <== NOT EXECUTED
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
400099d0: 80 a0 a0 00 cmp %g2, 0
400099d4: 22 80 00 08 be,a 400099f4 <_RBTree_Insert_unprotected+0x15c>
400099d8: c2 07 60 04 ld [ %i5 + 4 ], %g1
the_node->parent->color = RBT_BLACK;
400099dc: c0 22 20 0c clr [ %o0 + 0xc ]
u->color = RBT_BLACK;
400099e0: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
400099e4: b2 10 00 1d mov %i5, %i1
400099e8: 82 10 20 01 mov 1, %g1
400099ec: 10 80 00 18 b 40009a4c <_RBTree_Insert_unprotected+0x1b4>
400099f0: c2 27 60 0c st %g1, [ %i5 + 0xc ]
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
400099f4: 82 1a 00 01 xor %o0, %g1, %g1
400099f8: 80 a0 00 01 cmp %g0, %g1
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];
400099fc: c2 02 20 04 ld [ %o0 + 4 ], %g1
RBTree_Direction pdir = the_node->parent != g->child[0];
40009a00: b8 40 20 00 addx %g0, 0, %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];
40009a04: 82 1e 40 01 xor %i1, %g1, %g1
40009a08: 80 a0 00 01 cmp %g0, %g1
40009a0c: 82 40 20 00 addx %g0, 0, %g1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
40009a10: 80 a0 40 1c cmp %g1, %i4
40009a14: 22 80 00 08 be,a 40009a34 <_RBTree_Insert_unprotected+0x19c>
40009a18: c2 06 40 00 ld [ %i1 ], %g1
_RBTree_Rotate(the_node->parent, pdir);
40009a1c: 7f ff ff 80 call 4000981c <_RBTree_Rotate>
40009a20: 92 10 00 1c mov %i4, %o1
the_node = the_node->child[pdir];
40009a24: 83 2f 20 02 sll %i4, 2, %g1
40009a28: b2 06 40 01 add %i1, %g1, %i1
40009a2c: f2 06 60 04 ld [ %i1 + 4 ], %i1
}
the_node->parent->color = RBT_BLACK;
40009a30: c2 06 40 00 ld [ %i1 ], %g1
g->color = RBT_RED;
40009a34: 92 10 20 01 mov 1, %o1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
40009a38: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
40009a3c: d2 27 60 0c st %o1, [ %i5 + 0xc ]
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
40009a40: 90 10 00 1d mov %i5, %o0
40009a44: 7f ff ff 76 call 4000981c <_RBTree_Rotate>
40009a48: 92 22 40 1c sub %o1, %i4, %o1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
40009a4c: d0 06 40 00 ld [ %i1 ], %o0
40009a50: fa 02 00 00 ld [ %o0 ], %i5
40009a54: 80 a7 60 00 cmp %i5, 0
40009a58: 22 80 00 06 be,a 40009a70 <_RBTree_Insert_unprotected+0x1d8>
40009a5c: 82 10 20 00 clr %g1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
40009a60: c2 02 20 0c ld [ %o0 + 0xc ], %g1
40009a64: 82 18 60 01 xor %g1, 1, %g1
40009a68: 80 a0 00 01 cmp %g0, %g1
40009a6c: 82 60 3f ff subx %g0, -1, %g1
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
40009a70: 80 a0 60 00 cmp %g1, 0
40009a74: 12 bf ff c3 bne 40009980 <_RBTree_Insert_unprotected+0xe8>
40009a78: 80 a7 60 00 cmp %i5, 0
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
40009a7c: 12 80 00 06 bne 40009a94 <_RBTree_Insert_unprotected+0x1fc>
40009a80: 01 00 00 00 nop
40009a84: c0 26 60 0c clr [ %i1 + 0xc ]
40009a88: 81 c7 e0 08 ret
40009a8c: 81 e8 00 00 restore
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
40009a90: b0 10 3f ff mov -1, %i0
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
40009a94: 81 c7 e0 08 ret
40009a98: 81 e8 00 00 restore
40009acc <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
40009acc: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
40009ad0: b8 10 20 00 clr %i4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
40009ad4: 80 a0 00 19 cmp %g0, %i1
40009ad8: 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];
40009adc: 82 00 60 02 add %g1, 2, %g1
40009ae0: 83 28 60 02 sll %g1, 2, %g1
while ( !stop && current != NULL ) {
40009ae4: 10 80 00 0a b 40009b0c <_RBTree_Iterate_unprotected+0x40>
40009ae8: fa 06 00 01 ld [ %i0 + %g1 ], %i5
stop = (*visitor)( current, dir, visitor_arg );
40009aec: 92 10 00 19 mov %i1, %o1
40009af0: 9f c6 80 00 call %i2
40009af4: 94 10 00 1b mov %i3, %o2
current = _RBTree_Next_unprotected( current, dir );
40009af8: 92 10 00 19 mov %i1, %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 );
40009afc: b8 10 00 08 mov %o0, %i4
current = _RBTree_Next_unprotected( current, dir );
40009b00: 40 00 00 0b call 40009b2c <_RBTree_Next_unprotected>
40009b04: 90 10 00 1d mov %i5, %o0
40009b08: ba 10 00 08 mov %o0, %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 ) {
40009b0c: 80 a7 60 00 cmp %i5, 0
40009b10: 02 80 00 05 be 40009b24 <_RBTree_Iterate_unprotected+0x58>
40009b14: b8 1f 20 01 xor %i4, 1, %i4
40009b18: 80 8f 20 ff btst 0xff, %i4
40009b1c: 12 bf ff f4 bne 40009aec <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
40009b20: 90 10 00 1d mov %i5, %o0
40009b24: 81 c7 e0 08 ret
40009b28: 81 e8 00 00 restore
40009434 <_RBTree_Rotate>:
RBTree_Node *the_node,
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
40009434: 80 a2 20 00 cmp %o0, 0
40009438: 02 80 00 1c be 400094a8 <_RBTree_Rotate+0x74> <== NEVER TAKEN
4000943c: 80 a0 00 09 cmp %g0, %o1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
40009440: 86 60 3f ff subx %g0, -1, %g3
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
40009444: 87 28 e0 02 sll %g3, 2, %g3
40009448: 86 02 00 03 add %o0, %g3, %g3
4000944c: c2 00 e0 04 ld [ %g3 + 4 ], %g1
40009450: 80 a0 60 00 cmp %g1, 0
40009454: 02 80 00 15 be 400094a8 <_RBTree_Rotate+0x74> <== NEVER TAKEN
40009458: 93 2a 60 02 sll %o1, 2, %o1
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
4000945c: 84 00 40 09 add %g1, %o1, %g2
40009460: c8 00 a0 04 ld [ %g2 + 4 ], %g4
40009464: c8 20 e0 04 st %g4, [ %g3 + 4 ]
if (c->child[dir])
40009468: c4 00 a0 04 ld [ %g2 + 4 ], %g2
4000946c: 80 a0 a0 00 cmp %g2, 0
40009470: 32 80 00 02 bne,a 40009478 <_RBTree_Rotate+0x44>
40009474: d0 20 80 00 st %o0, [ %g2 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
40009478: c4 02 00 00 ld [ %o0 ], %g2
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;
4000947c: 92 00 40 09 add %g1, %o1, %o1
40009480: d0 22 60 04 st %o0, [ %o1 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
40009484: c6 00 a0 04 ld [ %g2 + 4 ], %g3
c->parent = the_node->parent;
40009488: 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;
4000948c: 86 1a 00 03 xor %o0, %g3, %g3
c->parent = the_node->parent;
the_node->parent = c;
40009490: c2 22 00 00 st %g1, [ %o0 ]
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;
40009494: 80 a0 00 03 cmp %g0, %g3
40009498: 86 40 20 00 addx %g0, 0, %g3
4000949c: 87 28 e0 02 sll %g3, 2, %g3
400094a0: 86 00 80 03 add %g2, %g3, %g3
400094a4: c2 20 e0 04 st %g1, [ %g3 + 4 ]
400094a8: 81 c3 e0 08 retl
400093e4 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
400093e4: 80 a2 20 00 cmp %o0, 0
400093e8: 02 80 00 10 be 40009428 <_RBTree_Sibling+0x44> <== NEVER TAKEN
400093ec: 82 10 20 00 clr %g1
if(!(the_node->parent)) return NULL;
400093f0: c4 02 00 00 ld [ %o0 ], %g2
400093f4: 80 a0 a0 00 cmp %g2, 0
400093f8: 22 80 00 0d be,a 4000942c <_RBTree_Sibling+0x48> <== NEVER TAKEN
400093fc: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
if(!(the_node->parent->parent)) return NULL;
40009400: c2 00 80 00 ld [ %g2 ], %g1
40009404: 80 a0 60 00 cmp %g1, 0
40009408: 02 80 00 08 be 40009428 <_RBTree_Sibling+0x44>
4000940c: 82 10 20 00 clr %g1
if(the_node == the_node->parent->child[RBT_LEFT])
40009410: c2 00 a0 04 ld [ %g2 + 4 ], %g1
40009414: 80 a2 00 01 cmp %o0, %g1
40009418: 22 80 00 04 be,a 40009428 <_RBTree_Sibling+0x44>
4000941c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
return the_node->parent->child[RBT_RIGHT];
40009420: 81 c3 e0 08 retl
40009424: 90 10 00 01 mov %g1, %o0
else
return the_node->parent->child[RBT_LEFT];
}
40009428: 90 10 00 01 mov %g1, %o0
4000942c: 81 c3 e0 08 retl
400080cc <_RTEMS_signal_Post_switch_hook>:
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
400080cc: 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 ];
400080d0: fa 06 21 4c ld [ %i0 + 0x14c ], %i5
if ( !api )
400080d4: 80 a7 60 00 cmp %i5, 0
400080d8: 02 80 00 1c be 40008148 <_RTEMS_signal_Post_switch_hook+0x7c><== NEVER TAKEN
400080dc: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
400080e0: 7f ff eb d3 call 4000302c <sparc_disable_interrupts>
400080e4: 01 00 00 00 nop
signal_set = asr->signals_posted;
400080e8: f8 07 60 14 ld [ %i5 + 0x14 ], %i4
asr->signals_posted = 0;
400080ec: c0 27 60 14 clr [ %i5 + 0x14 ]
_ISR_Enable( level );
400080f0: 7f ff eb d3 call 4000303c <sparc_enable_interrupts>
400080f4: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
400080f8: 80 a7 20 00 cmp %i4, 0
400080fc: 02 80 00 13 be 40008148 <_RTEMS_signal_Post_switch_hook+0x7c>
40008100: 94 07 bf fc add %fp, -4, %o2
return;
asr->nest_level += 1;
40008104: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
40008108: d0 07 60 10 ld [ %i5 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4000810c: 82 00 60 01 inc %g1
40008110: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
40008114: 37 00 00 3f sethi %hi(0xfc00), %i3
40008118: 40 00 01 03 call 40008524 <rtems_task_mode>
4000811c: 92 16 e3 ff or %i3, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
40008120: c2 07 60 0c ld [ %i5 + 0xc ], %g1
40008124: 9f c0 40 00 call %g1
40008128: 90 10 00 1c mov %i4, %o0
asr->nest_level -= 1;
4000812c: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
40008130: 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;
40008134: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
40008138: 92 16 e3 ff or %i3, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
4000813c: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
40008140: 40 00 00 f9 call 40008524 <rtems_task_mode>
40008144: 94 07 bf fc add %fp, -4, %o2
40008148: 81 c7 e0 08 ret
4000814c: 81 e8 00 00 restore
400318c4 <_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
)
{
400318c4: 9d e3 bf 98 save %sp, -104, %sp
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
400318c8: 13 10 01 86 sethi %hi(0x40061800), %o1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
400318cc: f6 06 20 40 ld [ %i0 + 0x40 ], %i3
400318d0: 90 07 bf f8 add %fp, -8, %o0
400318d4: 7f ff 57 de call 4000784c <_TOD_Get_with_nanoseconds>
400318d8: 92 12 63 50 or %o1, 0x350, %o1
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
400318dc: c4 1f bf f8 ldd [ %fp + -8 ], %g2
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
400318e0: f8 1e 20 50 ldd [ %i0 + 0x50 ], %i4
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
400318e4: 09 10 01 87 sethi %hi(0x40061c00), %g4
400318e8: ba a0 c0 1d subcc %g3, %i5, %i5
400318ec: 88 11 22 00 or %g4, 0x200, %g4
400318f0: b8 60 80 1c subx %g2, %i4, %i4
400318f4: f8 3e 40 00 std %i4, [ %i1 ]
400318f8: fa 01 20 10 ld [ %g4 + 0x10 ], %i5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
400318fc: d8 1e e0 80 ldd [ %i3 + 0x80 ], %o4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
40031900: 80 a6 c0 1d cmp %i3, %i5
40031904: 12 80 00 15 bne 40031958 <_Rate_monotonic_Get_status+0x94>
40031908: 82 10 20 01 mov 1, %g1
4003190c: f8 19 20 20 ldd [ %g4 + 0x20 ], %i4
40031910: 86 a0 c0 1d subcc %g3, %i5, %g3
40031914: 84 60 80 1c subx %g2, %i4, %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
40031918: ba 83 40 03 addcc %o5, %g3, %i5
4003191c: b8 43 00 02 addx %o4, %g2, %i4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40031920: c4 1e 20 48 ldd [ %i0 + 0x48 ], %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))
40031924: 80 a0 80 1c cmp %g2, %i4
40031928: 34 80 00 0c bg,a 40031958 <_Rate_monotonic_Get_status+0x94><== NEVER TAKEN
4003192c: 82 10 20 00 clr %g1 <== NOT EXECUTED
40031930: 32 80 00 06 bne,a 40031948 <_Rate_monotonic_Get_status+0x84>
40031934: 86 a7 40 03 subcc %i5, %g3, %g3
40031938: 80 a0 c0 1d cmp %g3, %i5
4003193c: 18 80 00 06 bgu 40031954 <_Rate_monotonic_Get_status+0x90>
40031940: 86 a7 40 03 subcc %i5, %g3, %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;
40031944: 82 10 20 01 mov 1, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
40031948: 84 67 00 02 subx %i4, %g2, %g2
4003194c: 10 80 00 03 b 40031958 <_Rate_monotonic_Get_status+0x94>
40031950: c4 3e 80 00 std %g2, [ %i2 ]
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
return false;
40031954: 82 10 20 00 clr %g1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
40031958: b0 08 60 01 and %g1, 1, %i0
4003195c: 81 c7 e0 08 ret
40031960: 81 e8 00 00 restore
40031ccc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
40031ccc: 9d e3 bf 98 save %sp, -104, %sp
40031cd0: 11 10 01 88 sethi %hi(0x40062000), %o0
40031cd4: 92 10 00 18 mov %i0, %o1
40031cd8: 90 12 20 28 or %o0, 0x28, %o0
40031cdc: 7f ff 59 83 call 400082e8 <_Objects_Get>
40031ce0: 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 ) {
40031ce4: c2 07 bf fc ld [ %fp + -4 ], %g1
40031ce8: 80 a0 60 00 cmp %g1, 0
40031cec: 12 80 00 24 bne 40031d7c <_Rate_monotonic_Timeout+0xb0> <== NEVER TAKEN
40031cf0: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
40031cf4: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
40031cf8: 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);
40031cfc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
40031d00: 80 88 80 01 btst %g2, %g1
40031d04: 22 80 00 0b be,a 40031d30 <_Rate_monotonic_Timeout+0x64>
40031d08: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
40031d0c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
40031d10: c2 07 60 08 ld [ %i5 + 8 ], %g1
40031d14: 80 a0 80 01 cmp %g2, %g1
40031d18: 32 80 00 06 bne,a 40031d30 <_Rate_monotonic_Timeout+0x64>
40031d1c: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
40031d20: 13 04 01 ff sethi %hi(0x1007fc00), %o1
40031d24: 7f ff 5c 11 call 40008d68 <_Thread_Clear_state>
40031d28: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1007fff8 <RAM_SIZE+0xfc7fff8>
40031d2c: 30 80 00 06 b,a 40031d44 <_Rate_monotonic_Timeout+0x78>
_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 ) {
40031d30: 80 a0 60 01 cmp %g1, 1
40031d34: 12 80 00 0d bne 40031d68 <_Rate_monotonic_Timeout+0x9c>
40031d38: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
40031d3c: 82 10 20 03 mov 3, %g1
40031d40: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
40031d44: 7f ff ff 51 call 40031a88 <_Rate_monotonic_Initiate_statistics>
40031d48: 90 10 00 1d mov %i5, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40031d4c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40031d50: 11 10 01 87 sethi %hi(0x40061c00), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40031d54: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40031d58: 90 12 20 98 or %o0, 0x98, %o0
40031d5c: 7f ff 5f da call 40009cc4 <_Watchdog_Insert>
40031d60: 92 07 60 10 add %i5, 0x10, %o1
40031d64: 30 80 00 02 b,a 40031d6c <_Rate_monotonic_Timeout+0xa0>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
40031d68: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
40031d6c: 03 10 01 87 sethi %hi(0x40061c00), %g1
40031d70: c4 00 60 00 ld [ %g1 ], %g2
--level;
40031d74: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
40031d78: c4 20 60 00 st %g2, [ %g1 ]
40031d7c: 81 c7 e0 08 ret
40031d80: 81 e8 00 00 restore
40031964 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
40031964: 9d e3 bf 90 save %sp, -112, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
40031968: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
4003196c: 82 00 60 01 inc %g1
40031970: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
40031974: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
40031978: 80 a0 60 04 cmp %g1, 4
4003197c: 12 80 00 05 bne 40031990 <_Rate_monotonic_Update_statistics+0x2c>
40031980: 90 10 00 18 mov %i0, %o0
stats->missed_count++;
40031984: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
40031988: 82 00 60 01 inc %g1
4003198c: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
/*
* Grab status for time statistics.
*/
valid_status =
40031990: 92 07 bf f8 add %fp, -8, %o1
40031994: 7f ff ff cc call 400318c4 <_Rate_monotonic_Get_status>
40031998: 94 07 bf f0 add %fp, -16, %o2
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
4003199c: 80 8a 20 ff btst 0xff, %o0
400319a0: 02 80 00 38 be 40031a80 <_Rate_monotonic_Update_statistics+0x11c>
400319a4: c4 1f bf f0 ldd [ %fp + -16 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
400319a8: f8 1e 20 70 ldd [ %i0 + 0x70 ], %i4
* 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 ) )
400319ac: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
400319b0: b6 87 40 03 addcc %i5, %g3, %i3
400319b4: b4 47 00 02 addx %i4, %g2, %i2
400319b8: 80 a0 40 02 cmp %g1, %g2
400319bc: 14 80 00 09 bg 400319e0 <_Rate_monotonic_Update_statistics+0x7c>
400319c0: f4 3e 20 70 std %i2, [ %i0 + 0x70 ]
400319c4: 80 a0 40 02 cmp %g1, %g2
400319c8: 32 80 00 08 bne,a 400319e8 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN
400319cc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
400319d0: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
400319d4: 80 a0 40 03 cmp %g1, %g3
400319d8: 28 80 00 04 bleu,a 400319e8 <_Rate_monotonic_Update_statistics+0x84>
400319dc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
400319e0: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
400319e4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
400319e8: 80 a0 40 02 cmp %g1, %g2
400319ec: 26 80 00 0a bl,a 40031a14 <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN
400319f0: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED
400319f4: 80 a0 40 02 cmp %g1, %g2
400319f8: 32 80 00 08 bne,a 40031a18 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
400319fc: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED
40031a00: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
40031a04: 80 a0 40 03 cmp %g1, %g3
40031a08: 3a 80 00 04 bcc,a 40031a18 <_Rate_monotonic_Update_statistics+0xb4>
40031a0c: c4 1f bf f8 ldd [ %fp + -8 ], %g2
stats->max_cpu_time = executed;
40031a10: c4 3e 20 68 std %g2, [ %i0 + 0x68 ]
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
40031a14: c4 1f bf f8 ldd [ %fp + -8 ], %g2
40031a18: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
40031a1c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
40031a20: b6 87 40 03 addcc %i5, %g3, %i3
40031a24: b4 47 00 02 addx %i4, %g2, %i2
40031a28: 80 a0 40 02 cmp %g1, %g2
40031a2c: 14 80 00 09 bg 40031a50 <_Rate_monotonic_Update_statistics+0xec>
40031a30: f4 3e 20 88 std %i2, [ %i0 + 0x88 ]
40031a34: 80 a0 40 02 cmp %g1, %g2
40031a38: 32 80 00 08 bne,a 40031a58 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN
40031a3c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
40031a40: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
40031a44: 80 a0 40 03 cmp %g1, %g3
40031a48: 28 80 00 04 bleu,a 40031a58 <_Rate_monotonic_Update_statistics+0xf4>
40031a4c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
40031a50: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
40031a54: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
40031a58: 80 a0 40 02 cmp %g1, %g2
40031a5c: 26 80 00 09 bl,a 40031a80 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
40031a60: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
40031a64: 80 a0 40 02 cmp %g1, %g2
40031a68: 12 80 00 06 bne 40031a80 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
40031a6c: 01 00 00 00 nop
40031a70: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
40031a74: 80 a0 40 03 cmp %g1, %g3
40031a78: 2a 80 00 02 bcs,a 40031a80 <_Rate_monotonic_Update_statistics+0x11c>
40031a7c: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
40031a80: 81 c7 e0 08 ret
40031a84: 81 e8 00 00 restore
40009794 <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
40009794: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
40009798: 40 00 06 7d call 4000b18c <_Workspace_Allocate>
4000979c: 90 10 20 1c mov 0x1c, %o0
if ( sched ) {
400097a0: 80 a2 20 00 cmp %o0, 0
400097a4: 02 80 00 06 be 400097bc <_Scheduler_CBS_Allocate+0x28> <== NEVER TAKEN
400097a8: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
400097ac: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
400097b0: f0 22 00 00 st %i0, [ %o0 ]
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
400097b4: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
schinfo->cbs_server = NULL;
400097b8: c0 22 20 18 clr [ %o0 + 0x18 ]
}
return sched;
}
400097bc: 81 c7 e0 08 ret
400097c0: 91 e8 00 08 restore %g0, %o0, %o0
4000aad4 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
4000aad4: 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;
4000aad8: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
4000aadc: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
4000aae0: 80 a0 40 09 cmp %g1, %o1
4000aae4: 32 80 00 02 bne,a 4000aaec <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
4000aae8: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
4000aaec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
4000aaf0: 80 a0 40 09 cmp %g1, %o1
4000aaf4: 02 80 00 04 be 4000ab04 <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
4000aaf8: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
4000aafc: 40 00 01 81 call 4000b100 <_Thread_Change_priority>
4000ab00: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
4000ab04: fa 06 20 88 ld [ %i0 + 0x88 ], %i5
if ( sched_info->cbs_server->cbs_budget_overrun ) {
4000ab08: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
4000ab0c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
4000ab10: 80 a0 a0 00 cmp %g2, 0
4000ab14: 02 80 00 09 be 4000ab38 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
4000ab18: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
4000ab1c: d0 00 40 00 ld [ %g1 ], %o0
4000ab20: 7f ff ff d7 call 4000aa7c <_Scheduler_CBS_Get_server_id>
4000ab24: 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 );
4000ab28: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
4000ab2c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
4000ab30: 9f c0 40 00 call %g1
4000ab34: d0 07 bf fc ld [ %fp + -4 ], %o0
4000ab38: 81 c7 e0 08 ret
4000ab3c: 81 e8 00 00 restore
4000a6dc <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
4000a6dc: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
4000a6e0: c2 06 20 04 ld [ %i0 + 4 ], %g1
4000a6e4: 80 a0 60 00 cmp %g1, 0
4000a6e8: 04 80 00 1d ble 4000a75c <_Scheduler_CBS_Create_server+0x80>
4000a6ec: 01 00 00 00 nop
4000a6f0: c2 06 00 00 ld [ %i0 ], %g1
4000a6f4: 80 a0 60 00 cmp %g1, 0
4000a6f8: 04 80 00 19 ble 4000a75c <_Scheduler_CBS_Create_server+0x80>
4000a6fc: 03 10 00 7e sethi %hi(0x4001f800), %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++ ) {
4000a700: c4 00 60 b0 ld [ %g1 + 0xb0 ], %g2 ! 4001f8b0 <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list[i] )
4000a704: 03 10 00 81 sethi %hi(0x40020400), %g1
4000a708: c6 00 62 28 ld [ %g1 + 0x228 ], %g3 ! 40020628 <_Scheduler_CBS_Server_list>
4000a70c: 10 80 00 07 b 4000a728 <_Scheduler_CBS_Create_server+0x4c>
4000a710: 82 10 20 00 clr %g1
4000a714: c8 00 c0 1c ld [ %g3 + %i4 ], %g4
4000a718: 80 a1 20 00 cmp %g4, 0
4000a71c: 02 80 00 14 be 4000a76c <_Scheduler_CBS_Create_server+0x90>
4000a720: 3b 10 00 81 sethi %hi(0x40020400), %i5
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++ ) {
4000a724: 82 00 60 01 inc %g1
4000a728: 80 a0 40 02 cmp %g1, %g2
4000a72c: 12 bf ff fa bne 4000a714 <_Scheduler_CBS_Create_server+0x38>
4000a730: b9 28 60 02 sll %g1, 2, %i4
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
4000a734: 81 c7 e0 08 ret
4000a738: 91 e8 3f e6 restore %g0, -26, %o0
_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;
4000a73c: c4 20 60 04 st %g2, [ %g1 + 4 ]
4000a740: c4 06 20 04 ld [ %i0 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
4000a744: 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;
4000a748: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
4000a74c: 84 10 3f ff mov -1, %g2
4000a750: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
4000a754: 81 c7 e0 08 ret
4000a758: 91 e8 20 00 restore %g0, 0, %o0
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
4000a75c: 81 c7 e0 08 ret
4000a760: 91 e8 3f ee restore %g0, -18, %o0
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
4000a764: 81 c7 e0 08 ret <== NOT EXECUTED
4000a768: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
4000a76c: f6 07 62 28 ld [ %i5 + 0x228 ], %i3
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
4000a770: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
4000a774: 40 00 07 6f call 4000c530 <_Workspace_Allocate>
4000a778: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
4000a77c: 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 *)
4000a780: d0 26 c0 1c st %o0, [ %i3 + %i4 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
4000a784: c4 07 62 28 ld [ %i5 + 0x228 ], %g2
4000a788: 83 28 60 02 sll %g1, 2, %g1
4000a78c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
4000a790: 80 a0 60 00 cmp %g1, 0
4000a794: 32 bf ff ea bne,a 4000a73c <_Scheduler_CBS_Create_server+0x60><== ALWAYS TAKEN
4000a798: c4 06 00 00 ld [ %i0 ], %g2
4000a79c: 30 bf ff f2 b,a 4000a764 <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED
4000a814 <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
4000a814: 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);
4000a818: 90 10 00 19 mov %i1, %o0
4000a81c: 40 00 03 5f call 4000b598 <_Thread_Get>
4000a820: 92 07 bf fc add %fp, -4, %o1
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
4000a824: ba 92 20 00 orcc %o0, 0, %i5
4000a828: 02 80 00 05 be 4000a83c <_Scheduler_CBS_Detach_thread+0x28>
4000a82c: 03 10 00 7e sethi %hi(0x4001f800), %g1
_Thread_Enable_dispatch();
4000a830: 40 00 03 4e call 4000b568 <_Thread_Enable_dispatch>
4000a834: 01 00 00 00 nop
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
4000a838: 03 10 00 7e sethi %hi(0x4001f800), %g1
4000a83c: c2 00 60 b0 ld [ %g1 + 0xb0 ], %g1 ! 4001f8b0 <_Scheduler_CBS_Maximum_servers>
4000a840: 80 a6 00 01 cmp %i0, %g1
4000a844: 1a 80 00 1b bcc 4000a8b0 <_Scheduler_CBS_Detach_thread+0x9c>
4000a848: 80 a7 60 00 cmp %i5, 0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
4000a84c: 02 80 00 19 be 4000a8b0 <_Scheduler_CBS_Detach_thread+0x9c>
4000a850: 03 10 00 81 sethi %hi(0x40020400), %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
4000a854: c2 00 62 28 ld [ %g1 + 0x228 ], %g1 ! 40020628 <_Scheduler_CBS_Server_list>
4000a858: b1 2e 20 02 sll %i0, 2, %i0
4000a85c: c2 00 40 18 ld [ %g1 + %i0 ], %g1
4000a860: 80 a0 60 00 cmp %g1, 0
4000a864: 02 80 00 11 be 4000a8a8 <_Scheduler_CBS_Detach_thread+0x94>
4000a868: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
4000a86c: c4 00 40 00 ld [ %g1 ], %g2
4000a870: 80 a0 80 19 cmp %g2, %i1
4000a874: 12 80 00 0f bne 4000a8b0 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
4000a878: 84 10 3f ff mov -1, %g2
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
4000a87c: c4 20 40 00 st %g2, [ %g1 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
4000a880: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
4000a884: c0 20 60 18 clr [ %g1 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4000a888: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
4000a88c: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
4000a890: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
4000a894: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4000a898: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
4000a89c: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
return SCHEDULER_CBS_OK;
4000a8a0: 81 c7 e0 08 ret
4000a8a4: 91 e8 20 00 restore %g0, 0, %o0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
4000a8a8: 81 c7 e0 08 ret
4000a8ac: 91 e8 3f e7 restore %g0, -25, %o0
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;
return SCHEDULER_CBS_OK;
}
4000a8b0: 81 c7 e0 08 ret
4000a8b4: 91 e8 3f ee restore %g0, -18, %o0
4000ab40 <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
4000ab40: 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*) );
4000ab44: 3b 10 00 7e sethi %hi(0x4001f800), %i5
4000ab48: d0 07 60 b0 ld [ %i5 + 0xb0 ], %o0 ! 4001f8b0 <_Scheduler_CBS_Maximum_servers>
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
4000ab4c: 40 00 06 79 call 4000c530 <_Workspace_Allocate>
4000ab50: 91 2a 20 02 sll %o0, 2, %o0
4000ab54: 05 10 00 81 sethi %hi(0x40020400), %g2
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
4000ab58: 80 a2 20 00 cmp %o0, 0
4000ab5c: 02 80 00 0d be 4000ab90 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN
4000ab60: d0 20 a2 28 st %o0, [ %g2 + 0x228 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
4000ab64: c6 07 60 b0 ld [ %i5 + 0xb0 ], %g3
4000ab68: 10 80 00 05 b 4000ab7c <_Scheduler_CBS_Initialize+0x3c>
4000ab6c: 82 10 20 00 clr %g1
_Scheduler_CBS_Server_list[i] = NULL;
4000ab70: 89 28 60 02 sll %g1, 2, %g4
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++) {
4000ab74: 82 00 60 01 inc %g1
_Scheduler_CBS_Server_list[i] = NULL;
4000ab78: c0 27 40 04 clr [ %i5 + %g4 ]
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++) {
4000ab7c: 80 a0 40 03 cmp %g1, %g3
4000ab80: 12 bf ff fc bne 4000ab70 <_Scheduler_CBS_Initialize+0x30>
4000ab84: fa 00 a2 28 ld [ %g2 + 0x228 ], %i5
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
4000ab88: 81 c7 e0 08 ret
4000ab8c: 91 e8 20 00 restore %g0, 0, %o0
}
4000ab90: 81 c7 e0 08 ret <== NOT EXECUTED
4000ab94: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED
400097c4 <_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;
400097c4: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
400097c8: 80 a2 60 00 cmp %o1, 0
400097cc: 02 80 00 10 be 4000980c <_Scheduler_CBS_Release_job+0x48>
400097d0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
400097d4: 80 a0 60 00 cmp %g1, 0
400097d8: 02 80 00 08 be 400097f8 <_Scheduler_CBS_Release_job+0x34>
400097dc: 05 10 00 7a sethi %hi(0x4001e800), %g2
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
400097e0: d2 00 a1 98 ld [ %g2 + 0x198 ], %o1 ! 4001e998 <_Watchdog_Ticks_since_boot>
400097e4: c4 00 60 04 ld [ %g1 + 4 ], %g2
400097e8: 92 02 40 02 add %o1, %g2, %o1
400097ec: 05 20 00 00 sethi %hi(0x80000000), %g2
400097f0: 10 80 00 0a b 40009818 <_Scheduler_CBS_Release_job+0x54>
400097f4: 92 2a 40 02 andn %o1, %g2, %o1
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
400097f8: c2 00 a1 98 ld [ %g2 + 0x198 ], %g1
400097fc: 92 02 40 01 add %o1, %g1, %o1
40009800: 03 20 00 00 sethi %hi(0x80000000), %g1
40009804: 10 80 00 07 b 40009820 <_Scheduler_CBS_Release_job+0x5c>
40009808: 92 2a 40 01 andn %o1, %g1, %o1
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
4000980c: 80 a0 60 00 cmp %g1, 0
40009810: 02 80 00 04 be 40009820 <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN
40009814: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
40009818: c2 00 60 08 ld [ %g1 + 8 ], %g1
4000981c: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
40009820: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
40009824: 94 10 20 01 mov 1, %o2
40009828: 82 13 c0 00 mov %o7, %g1
4000982c: 40 00 01 24 call 40009cbc <_Thread_Change_priority>
40009830: 9e 10 40 00 mov %g1, %o7
40009834 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
40009834: 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);
40009838: 40 00 00 4c call 40009968 <_Scheduler_EDF_Enqueue>
4000983c: 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;
40009840: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
40009844: 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) {
40009848: 80 a7 60 00 cmp %i5, 0
4000984c: 02 80 00 18 be 400098ac <_Scheduler_CBS_Unblock+0x78>
40009850: 03 10 00 7a sethi %hi(0x4001e800), %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 ) {
40009854: 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 -
40009858: d0 00 61 98 ld [ %g1 + 0x198 ], %o0
4000985c: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
40009860: 40 00 3b b7 call 4001873c <.umul>
40009864: 90 27 00 08 sub %i4, %o0, %o0
40009868: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
4000986c: b6 10 00 08 mov %o0, %i3
40009870: 40 00 3b b3 call 4001873c <.umul>
40009874: d0 07 60 08 ld [ %i5 + 8 ], %o0
40009878: 80 a6 c0 08 cmp %i3, %o0
4000987c: 24 80 00 0d ble,a 400098b0 <_Scheduler_CBS_Unblock+0x7c>
40009880: 3b 10 00 7a sethi %hi(0x4001e800), %i5
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
40009884: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
40009888: 80 a7 00 09 cmp %i4, %o1
4000988c: 32 80 00 02 bne,a 40009894 <_Scheduler_CBS_Unblock+0x60>
40009890: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
40009894: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
40009898: 80 a0 40 09 cmp %g1, %o1
4000989c: 02 80 00 04 be 400098ac <_Scheduler_CBS_Unblock+0x78>
400098a0: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
400098a4: 40 00 01 06 call 40009cbc <_Thread_Change_priority>
400098a8: 94 10 20 01 mov 1, %o2
* 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,
400098ac: 3b 10 00 7a sethi %hi(0x4001e800), %i5
400098b0: ba 17 62 b0 or %i5, 0x2b0, %i5 ! 4001eab0 <_Per_CPU_Information>
400098b4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
400098b8: 03 10 00 77 sethi %hi(0x4001dc00), %g1
400098bc: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
400098c0: c2 00 61 94 ld [ %g1 + 0x194 ], %g1
400098c4: 9f c0 40 00 call %g1
400098c8: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1
400098cc: 80 a2 20 00 cmp %o0, 0
400098d0: 04 80 00 0f ble 4000990c <_Scheduler_CBS_Unblock+0xd8>
400098d4: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
400098d8: c2 07 60 10 ld [ %i5 + 0x10 ], %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;
400098dc: f0 27 60 14 st %i0, [ %i5 + 0x14 ]
if ( _Thread_Executing->is_preemptible ||
400098e0: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
400098e4: 80 a0 60 00 cmp %g1, 0
400098e8: 12 80 00 06 bne 40009900 <_Scheduler_CBS_Unblock+0xcc>
400098ec: 84 10 20 01 mov 1, %g2
400098f0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
400098f4: 80 a0 60 00 cmp %g1, 0
400098f8: 12 80 00 05 bne 4000990c <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN
400098fc: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
40009900: 03 10 00 7a sethi %hi(0x4001e800), %g1
40009904: 82 10 62 b0 or %g1, 0x2b0, %g1 ! 4001eab0 <_Per_CPU_Information>
40009908: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
4000990c: 81 c7 e0 08 ret
40009910: 81 e8 00 00 restore
40009794 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
40009794: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
40009798: 40 00 06 52 call 4000b0e0 <_Workspace_Allocate>
4000979c: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
400097a0: 80 a2 20 00 cmp %o0, 0
400097a4: 02 80 00 05 be 400097b8 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
400097a8: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
400097ac: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
400097b0: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
400097b4: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
400097b8: 81 c7 e0 08 ret
400097bc: 91 e8 00 08 restore %g0, %o0, %o0
4000995c <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
4000995c: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
40009960: 7f ff ff ad call 40009814 <_Scheduler_EDF_Enqueue>
40009964: 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(
40009968: 3b 10 00 7a sethi %hi(0x4001e800), %i5
4000996c: ba 17 62 00 or %i5, 0x200, %i5 ! 4001ea00 <_Per_CPU_Information>
40009970: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
40009974: 03 10 00 77 sethi %hi(0x4001dc00), %g1
40009978: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0
4000997c: c2 00 60 e4 ld [ %g1 + 0xe4 ], %g1
40009980: 9f c0 40 00 call %g1
40009984: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
40009988: 80 a2 20 00 cmp %o0, 0
4000998c: 16 80 00 0f bge 400099c8 <_Scheduler_EDF_Unblock+0x6c>
40009990: 01 00 00 00 nop
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
40009994: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
40009998: f0 27 60 14 st %i0, [ %i5 + 0x14 ]
if ( _Thread_Executing->is_preemptible ||
4000999c: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
400099a0: 80 a0 60 00 cmp %g1, 0
400099a4: 12 80 00 06 bne 400099bc <_Scheduler_EDF_Unblock+0x60>
400099a8: 84 10 20 01 mov 1, %g2
400099ac: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
400099b0: 80 a0 60 00 cmp %g1, 0
400099b4: 12 80 00 05 bne 400099c8 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN
400099b8: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
400099bc: 03 10 00 7a sethi %hi(0x4001e800), %g1
400099c0: 82 10 62 00 or %g1, 0x200, %g1 ! 4001ea00 <_Per_CPU_Information>
400099c4: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
400099c8: 81 c7 e0 08 ret
400099cc: 81 e8 00 00 restore
40007d4c <_TOD_Validate>:
};
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
40007d4c: 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 /
40007d50: 03 10 00 71 sethi %hi(0x4001c400), %g1
40007d54: d2 00 62 dc ld [ %g1 + 0x2dc ], %o1 ! 4001c6dc <Configuration+0xc>
40007d58: 11 00 03 d0 sethi %hi(0xf4000), %o0
40007d5c: 40 00 44 bf call 40019058 <.udiv>
40007d60: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40007d64: 80 a6 20 00 cmp %i0, 0
40007d68: 02 80 00 28 be 40007e08 <_TOD_Validate+0xbc> <== NEVER TAKEN
40007d6c: 84 10 20 00 clr %g2
40007d70: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
40007d74: 80 a0 40 08 cmp %g1, %o0
40007d78: 3a 80 00 25 bcc,a 40007e0c <_TOD_Validate+0xc0>
40007d7c: b0 08 a0 01 and %g2, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
40007d80: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
40007d84: 80 a0 60 3b cmp %g1, 0x3b
40007d88: 38 80 00 21 bgu,a 40007e0c <_TOD_Validate+0xc0>
40007d8c: b0 08 a0 01 and %g2, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
40007d90: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
40007d94: 80 a0 60 3b cmp %g1, 0x3b
40007d98: 38 80 00 1d bgu,a 40007e0c <_TOD_Validate+0xc0>
40007d9c: b0 08 a0 01 and %g2, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
40007da0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
40007da4: 80 a0 60 17 cmp %g1, 0x17
40007da8: 38 80 00 19 bgu,a 40007e0c <_TOD_Validate+0xc0>
40007dac: b0 08 a0 01 and %g2, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
40007db0: 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) ||
40007db4: 80 a0 60 00 cmp %g1, 0
40007db8: 02 80 00 14 be 40007e08 <_TOD_Validate+0xbc> <== NEVER TAKEN
40007dbc: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
40007dc0: 38 80 00 13 bgu,a 40007e0c <_TOD_Validate+0xc0>
40007dc4: b0 08 a0 01 and %g2, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
40007dc8: c8 06 00 00 ld [ %i0 ], %g4
(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) ||
40007dcc: 80 a1 27 c3 cmp %g4, 0x7c3
40007dd0: 28 80 00 0f bleu,a 40007e0c <_TOD_Validate+0xc0>
40007dd4: b0 08 a0 01 and %g2, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
40007dd8: 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) ||
40007ddc: 80 a0 e0 00 cmp %g3, 0
40007de0: 02 80 00 0a be 40007e08 <_TOD_Validate+0xbc> <== NEVER TAKEN
40007de4: 80 89 20 03 btst 3, %g4
40007de8: 05 10 00 75 sethi %hi(0x4001d400), %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
40007dec: 12 80 00 03 bne 40007df8 <_TOD_Validate+0xac>
40007df0: 84 10 a3 d0 or %g2, 0x3d0, %g2 ! 4001d7d0 <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
40007df4: 82 00 60 0d add %g1, 0xd, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
40007df8: 83 28 60 02 sll %g1, 2, %g1
40007dfc: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( the_tod->day > days_in_month )
40007e00: 80 a0 40 03 cmp %g1, %g3
40007e04: 84 60 3f ff subx %g0, -1, %g2
return false;
return true;
}
40007e08: b0 08 a0 01 and %g2, 1, %i0
40007e0c: 81 c7 e0 08 ret
40007e10: 81 e8 00 00 restore
4000931c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4000931c: 9d e3 bf a0 save %sp, -96, %sp
40009320: ba 10 00 18 mov %i0, %i5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
40009324: f0 06 20 10 ld [ %i0 + 0x10 ], %i0
/*
* 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 );
40009328: 40 00 03 46 call 4000a040 <_Thread_Set_transient>
4000932c: 90 10 00 1d mov %i5, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
40009330: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
40009334: 80 a0 40 19 cmp %g1, %i1
40009338: 02 80 00 04 be 40009348 <_Thread_Change_priority+0x2c>
4000933c: 90 10 00 1d mov %i5, %o0
_Thread_Set_priority( the_thread, new_priority );
40009340: 40 00 03 27 call 40009fdc <_Thread_Set_priority>
40009344: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
40009348: 7f ff e3 58 call 400020a8 <sparc_disable_interrupts>
4000934c: 01 00 00 00 nop
40009350: b6 10 00 08 mov %o0, %i3
/*
* 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;
40009354: f8 07 60 10 ld [ %i5 + 0x10 ], %i4
if ( state != STATES_TRANSIENT ) {
40009358: 80 a7 20 04 cmp %i4, 4
4000935c: 02 80 00 10 be 4000939c <_Thread_Change_priority+0x80>
40009360: 82 0e 20 04 and %i0, 4, %g1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
40009364: 80 a0 60 00 cmp %g1, 0
40009368: 12 80 00 03 bne 40009374 <_Thread_Change_priority+0x58> <== NEVER TAKEN
4000936c: 82 0f 3f fb and %i4, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
40009370: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
40009374: 7f ff e3 51 call 400020b8 <sparc_enable_interrupts>
40009378: 90 10 00 1b mov %i3, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
4000937c: 03 00 00 ef sethi %hi(0x3bc00), %g1
40009380: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
40009384: 80 8f 00 01 btst %i4, %g1
40009388: 02 80 00 27 be 40009424 <_Thread_Change_priority+0x108>
4000938c: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
40009390: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
40009394: 40 00 02 e5 call 40009f28 <_Thread_queue_Requeue>
40009398: 93 e8 00 1d restore %g0, %i5, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4000939c: 80 a0 60 00 cmp %g1, 0
400093a0: 12 80 00 0b bne 400093cc <_Thread_Change_priority+0xb0> <== NEVER TAKEN
400093a4: 03 10 00 70 sethi %hi(0x4001c000), %g1
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
400093a8: c0 27 60 10 clr [ %i5 + 0x10 ]
if ( prepend_it )
400093ac: 80 a6 a0 00 cmp %i2, 0
400093b0: 02 80 00 04 be 400093c0 <_Thread_Change_priority+0xa4>
400093b4: 82 10 61 e4 or %g1, 0x1e4, %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
400093b8: 10 80 00 03 b 400093c4 <_Thread_Change_priority+0xa8>
400093bc: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
400093c0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
400093c4: 9f c0 40 00 call %g1
400093c8: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
400093cc: 7f ff e3 3b call 400020b8 <sparc_enable_interrupts>
400093d0: 90 10 00 1b mov %i3, %o0
400093d4: 7f ff e3 35 call 400020a8 <sparc_disable_interrupts>
400093d8: 01 00 00 00 nop
400093dc: 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();
400093e0: 03 10 00 70 sethi %hi(0x4001c000), %g1
400093e4: c2 00 61 ec ld [ %g1 + 0x1ec ], %g1 ! 4001c1ec <_Scheduler+0x8>
400093e8: 9f c0 40 00 call %g1
400093ec: 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 );
400093f0: 03 10 00 73 sethi %hi(0x4001cc00), %g1
400093f4: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 4001cec0 <_Per_CPU_Information>
* 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() &&
400093f8: c4 18 60 10 ldd [ %g1 + 0x10 ], %g2
400093fc: 80 a0 80 03 cmp %g2, %g3
40009400: 02 80 00 07 be 4000941c <_Thread_Change_priority+0x100>
40009404: 01 00 00 00 nop
40009408: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
4000940c: 80 a0 a0 00 cmp %g2, 0
40009410: 02 80 00 03 be 4000941c <_Thread_Change_priority+0x100>
40009414: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
40009418: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
_ISR_Enable( level );
4000941c: 7f ff e3 27 call 400020b8 <sparc_enable_interrupts>
40009420: 81 e8 00 00 restore
40009424: 81 c7 e0 08 ret
40009428: 81 e8 00 00 restore
400095ec <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
400095ec: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
400095f0: 90 10 00 18 mov %i0, %o0
400095f4: 40 00 00 70 call 400097b4 <_Thread_Get>
400095f8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
400095fc: c2 07 bf fc ld [ %fp + -4 ], %g1
40009600: 80 a0 60 00 cmp %g1, 0
40009604: 12 80 00 08 bne 40009624 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
40009608: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
4000960c: 7f ff ff 88 call 4000942c <_Thread_Clear_state>
40009610: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_SIZE+0xfc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
40009614: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009618: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 4001ccc0 <_Thread_Dispatch_disable_level>
--level;
4000961c: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
40009620: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
40009624: 81 c7 e0 08 ret
40009628: 81 e8 00 00 restore
4000962c <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
4000962c: 9d e3 bf 98 save %sp, -104, %sp
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
40009630: 35 10 00 73 sethi %hi(0x4001cc00), %i2
40009634: 82 16 a2 c0 or %i2, 0x2c0, %g1 ! 4001cec0 <_Per_CPU_Information>
_ISR_Disable( level );
40009638: 7f ff e2 9c call 400020a8 <sparc_disable_interrupts>
4000963c: f6 00 60 10 ld [ %g1 + 0x10 ], %i3
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
40009640: 21 10 00 73 sethi %hi(0x4001cc00), %l0
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
40009644: 27 10 00 70 sethi %hi(0x4001c000), %l3
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
40009648: 33 10 00 73 sethi %hi(0x4001cc00), %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;
4000964c: 31 10 00 73 sethi %hi(0x4001cc00), %i0
40009650: a0 14 20 10 or %l0, 0x10, %l0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40009654: 23 10 00 73 sethi %hi(0x4001cc00), %l1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
40009658: 25 10 00 70 sethi %hi(0x4001c000), %l2
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
4000965c: 10 80 00 3b b 40009748 <_Thread_Dispatch+0x11c>
40009660: a6 14 e3 10 or %l3, 0x310, %l3
40009664: 84 10 20 01 mov 1, %g2
40009668: c4 26 60 c0 st %g2, [ %i1 + 0xc0 ]
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
4000966c: c0 28 60 0c clrb [ %g1 + 0xc ]
/*
* 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 )
40009670: 80 a5 00 1b cmp %l4, %i3
40009674: 12 80 00 0a bne 4000969c <_Thread_Dispatch+0x70>
40009678: e8 20 60 10 st %l4, [ %g1 + 0x10 ]
4000967c: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009680: c0 20 60 c0 clr [ %g1 + 0xc0 ] ! 4001ccc0 <_Thread_Dispatch_disable_level>
post_switch:
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 0 );
#endif
_ISR_Enable( level );
40009684: 7f ff e2 8d call 400020b8 <sparc_enable_interrupts>
40009688: 39 10 00 73 sethi %hi(0x4001cc00), %i4
4000968c: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009690: fa 00 61 30 ld [ %g1 + 0x130 ], %i5 ! 4001cd30 <_API_extensions_Post_switch_list>
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
40009694: 10 80 00 37 b 40009770 <_Thread_Dispatch+0x144>
40009698: b8 17 21 34 or %i4, 0x134, %i4
*/
#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 )
4000969c: c2 05 20 78 ld [ %l4 + 0x78 ], %g1
400096a0: 80 a0 60 01 cmp %g1, 1
400096a4: 12 80 00 03 bne 400096b0 <_Thread_Dispatch+0x84>
400096a8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
400096ac: c2 25 20 74 st %g1, [ %l4 + 0x74 ]
_ISR_Enable( level );
400096b0: 7f ff e2 82 call 400020b8 <sparc_enable_interrupts>
400096b4: 01 00 00 00 nop
400096b8: 90 07 bf f8 add %fp, -8, %o0
400096bc: 7f ff f9 eb call 40007e68 <_TOD_Get_with_nanoseconds>
400096c0: 92 10 00 10 mov %l0, %o1
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
400096c4: c4 1f bf f8 ldd [ %fp + -8 ], %g2
400096c8: 82 16 a2 c0 or %i2, 0x2c0, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
400096cc: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4
400096d0: 96 a0 c0 1d subcc %g3, %i5, %o3
400096d4: 94 60 80 1c subx %g2, %i4, %o2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
400096d8: f8 1e e0 80 ldd [ %i3 + 0x80 ], %i4
400096dc: 9a 87 40 0b addcc %i5, %o3, %o5
400096e0: 98 47 00 0a addx %i4, %o2, %o4
400096e4: d8 3e e0 80 std %o4, [ %i3 + 0x80 ]
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
400096e8: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
400096ec: c2 04 61 2c ld [ %l1 + 0x12c ], %g1
400096f0: 80 a0 60 00 cmp %g1, 0
400096f4: 22 80 00 0c be,a 40009724 <_Thread_Dispatch+0xf8> <== NEVER TAKEN
400096f8: fa 04 a3 0c ld [ %l2 + 0x30c ], %i5 <== NOT EXECUTED
executing->libc_reent = *_Thread_libc_reent;
400096fc: c4 00 40 00 ld [ %g1 ], %g2
40009700: c4 26 e1 48 st %g2, [ %i3 + 0x148 ]
*_Thread_libc_reent = heir->libc_reent;
40009704: c4 05 21 48 ld [ %l4 + 0x148 ], %g2
40009708: c4 20 40 00 st %g2, [ %g1 ]
4000970c: 10 80 00 06 b 40009724 <_Thread_Dispatch+0xf8>
40009710: fa 04 a3 0c ld [ %l2 + 0x30c ], %i5
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
40009714: 90 10 00 1b mov %i3, %o0
40009718: 9f c0 40 00 call %g1
4000971c: 92 10 00 14 mov %l4, %o1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_next(
const Chain_Node *the_node
)
{
return the_node->next;
40009720: fa 07 40 00 ld [ %i5 ], %i5
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
40009724: 80 a7 40 13 cmp %i5, %l3
40009728: 32 bf ff fb bne,a 40009714 <_Thread_Dispatch+0xe8>
4000972c: c2 07 60 08 ld [ %i5 + 8 ], %g1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
40009730: 90 06 e0 c0 add %i3, 0xc0, %o0
40009734: 40 00 04 22 call 4000a7bc <_CPU_Context_switch>
40009738: 92 05 20 c0 add %l4, 0xc0, %o1
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
4000973c: 82 16 a2 c0 or %i2, 0x2c0, %g1
_ISR_Disable( level );
40009740: 7f ff e2 5a call 400020a8 <sparc_disable_interrupts>
40009744: f6 00 60 10 ld [ %g1 + 0x10 ], %i3
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
40009748: 82 16 a2 c0 or %i2, 0x2c0, %g1
4000974c: c4 08 60 0c ldub [ %g1 + 0xc ], %g2
40009750: 80 a0 a0 00 cmp %g2, 0
40009754: 32 bf ff c4 bne,a 40009664 <_Thread_Dispatch+0x38>
40009758: e8 00 60 14 ld [ %g1 + 0x14 ], %l4
4000975c: 10 bf ff c9 b 40009680 <_Thread_Dispatch+0x54>
40009760: 03 10 00 73 sethi %hi(0x4001cc00), %g1
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
40009764: 9f c0 40 00 call %g1
40009768: 90 10 00 1b mov %i3, %o0
4000976c: fa 07 40 00 ld [ %i5 ], %i5
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
40009770: 80 a7 40 1c cmp %i5, %i4
40009774: 32 bf ff fc bne,a 40009764 <_Thread_Dispatch+0x138>
40009778: c2 07 60 08 ld [ %i5 + 8 ], %g1
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
4000977c: 81 c7 e0 08 ret
40009780: 81 e8 00 00 restore
4000db30 <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
4000db30: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
4000db34: 03 10 00 73 sethi %hi(0x4001cc00), %g1
4000db38: fa 00 62 d0 ld [ %g1 + 0x2d0 ], %i5 ! 4001ced0 <_Per_CPU_Information+0x10>
/*
* 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();
4000db3c: 3f 10 00 36 sethi %hi(0x4000d800), %i7
4000db40: be 17 e3 30 or %i7, 0x330, %i7 ! 4000db30 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4000db44: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
4000db48: 7f ff d1 5c call 400020b8 <sparc_enable_interrupts>
4000db4c: 91 2a 20 08 sll %o0, 8, %o0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
4000db50: 03 10 00 72 sethi %hi(0x4001c800), %g1
doneConstructors = true;
4000db54: 84 10 20 01 mov 1, %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
4000db58: f8 08 61 b0 ldub [ %g1 + 0x1b0 ], %i4
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
4000db5c: 90 10 00 1d mov %i5, %o0
4000db60: 13 10 00 28 sethi %hi(0x4000a000), %o1
4000db64: 92 12 62 14 or %o1, 0x214, %o1 ! 4000a214 <_User_extensions_Thread_begin_visitor>
4000db68: 7f ff f1 c8 call 4000a288 <_User_extensions_Iterate>
4000db6c: c4 28 61 b0 stb %g2, [ %g1 + 0x1b0 ]
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4000db70: 7f ff ef 05 call 40009784 <_Thread_Enable_dispatch>
4000db74: 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) */ {
4000db78: 80 8f 20 ff btst 0xff, %i4
4000db7c: 32 80 00 05 bne,a 4000db90 <_Thread_Handler+0x60>
4000db80: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
INIT_NAME ();
4000db84: 40 00 39 63 call 4001c110 <_init>
4000db88: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4000db8c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
4000db90: 80 a0 60 00 cmp %g1, 0
4000db94: 12 80 00 07 bne 4000dbb0 <_Thread_Handler+0x80> <== NEVER TAKEN
4000db98: 90 10 00 1d mov %i5, %o0
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4000db9c: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
4000dba0: 9f c0 40 00 call %g1
4000dba4: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4000dba8: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
4000dbac: 90 10 00 1d mov %i5, %o0
4000dbb0: 13 10 00 28 sethi %hi(0x4000a000), %o1
4000dbb4: 7f ff f1 b5 call 4000a288 <_User_extensions_Iterate>
4000dbb8: 92 12 62 38 or %o1, 0x238, %o1 ! 4000a238 <_User_extensions_Thread_exitted_visitor>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
4000dbbc: 90 10 20 00 clr %o0
4000dbc0: 92 10 20 01 mov 1, %o1
4000dbc4: 7f ff e9 dd call 40008338 <_Internal_error_Occurred>
4000dbc8: 94 10 20 05 mov 5, %o2
40009a10 <_Thread_Handler_initialization>:
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
40009a10: 9d e3 bf 98 save %sp, -104, %sp
uint32_t ticks_per_timeslice =
40009a14: 03 10 00 69 sethi %hi(0x4001a400), %g1
40009a18: 82 10 60 58 or %g1, 0x58, %g1 ! 4001a458 <Configuration>
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
40009a1c: c6 00 60 28 ld [ %g1 + 0x28 ], %g3
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
40009a20: fa 00 60 14 ld [ %g1 + 0x14 ], %i5
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
40009a24: f8 00 60 08 ld [ %g1 + 8 ], %i4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
40009a28: 80 a0 e0 00 cmp %g3, 0
40009a2c: 02 80 00 06 be 40009a44 <_Thread_Handler_initialization+0x34><== NEVER TAKEN
40009a30: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
40009a34: c6 00 60 2c ld [ %g1 + 0x2c ], %g3
40009a38: 80 a0 e0 00 cmp %g3, 0
40009a3c: 12 80 00 06 bne 40009a54 <_Thread_Handler_initialization+0x44>
40009a40: 80 a0 a0 00 cmp %g2, 0
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
40009a44: 90 10 20 00 clr %o0
40009a48: 92 10 20 01 mov 1, %o1
40009a4c: 7f ff fa 3b call 40008338 <_Internal_error_Occurred>
40009a50: 94 10 20 0e mov 0xe, %o2
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
40009a54: 22 80 00 05 be,a 40009a68 <_Thread_Handler_initialization+0x58>
40009a58: 03 10 00 73 sethi %hi(0x4001cc00), %g1
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
40009a5c: 9f c0 80 00 call %g2
40009a60: d0 00 60 04 ld [ %g1 + 4 ], %o0 ! 4001cc04 <_CPU_ISR_Dispatch_disable+0x4>
_Thread_Dispatch_necessary = false;
40009a64: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009a68: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 4001cec0 <_Per_CPU_Information>
40009a6c: c0 28 60 0c clrb [ %g1 + 0xc ]
_Thread_Executing = NULL;
40009a70: c0 20 60 10 clr [ %g1 + 0x10 ]
_Thread_Heir = NULL;
40009a74: c0 20 60 14 clr [ %g1 + 0x14 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
40009a78: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009a7c: f8 20 61 3c st %i4, [ %g1 + 0x13c ] ! 4001cd3c <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
40009a80: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009a84: fa 20 60 20 st %i5, [ %g1 + 0x20 ] ! 4001cc20 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
40009a88: 82 10 20 08 mov 8, %g1
40009a8c: 11 10 00 73 sethi %hi(0x4001cc00), %o0
40009a90: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40009a94: 90 12 21 b0 or %o0, 0x1b0, %o0
40009a98: 92 10 20 01 mov 1, %o1
40009a9c: 94 10 20 01 mov 1, %o2
40009aa0: 96 10 20 01 mov 1, %o3
40009aa4: 98 10 21 60 mov 0x160, %o4
40009aa8: 7f ff fb b4 call 40008978 <_Objects_Initialize_information>
40009aac: 9a 10 20 00 clr %o5
40009ab0: 81 c7 e0 08 ret
40009ab4: 81 e8 00 00 restore
40009864 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
40009864: 9d e3 bf 98 save %sp, -104, %sp
40009868: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
4000986c: f4 0f a0 5f ldub [ %fp + 0x5f ], %i2
40009870: 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;
40009874: c0 26 61 4c clr [ %i1 + 0x14c ]
40009878: c0 26 61 50 clr [ %i1 + 0x150 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
4000987c: c0 26 61 48 clr [ %i1 + 0x148 ]
/*
* 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 );
40009880: 90 10 00 19 mov %i1, %o0
40009884: 40 00 01 fe call 4000a07c <_Thread_Stack_Allocate>
40009888: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
4000988c: 80 a2 00 1b cmp %o0, %i3
40009890: 0a 80 00 5c bcs 40009a00 <_Thread_Initialize+0x19c>
40009894: 80 a2 20 00 cmp %o0, 0
40009898: 22 80 00 5b be,a 40009a04 <_Thread_Initialize+0x1a0> <== NEVER TAKEN
4000989c: b0 10 20 00 clr %i0 <== NOT EXECUTED
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
400098a0: c2 06 60 b8 ld [ %i1 + 0xb8 ], %g1
the_stack->size = size;
400098a4: d0 26 60 b0 st %o0, [ %i1 + 0xb0 ]
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
400098a8: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
400098ac: 03 10 00 73 sethi %hi(0x4001cc00), %g1
400098b0: d0 00 61 3c ld [ %g1 + 0x13c ], %o0 ! 4001cd3c <_Thread_Maximum_extensions>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
400098b4: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
400098b8: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
400098bc: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
400098c0: c0 26 60 6c clr [ %i1 + 0x6c ]
400098c4: 80 a2 20 00 cmp %o0, 0
400098c8: 02 80 00 08 be 400098e8 <_Thread_Initialize+0x84>
400098cc: b8 10 20 00 clr %i4
extensions_area = _Workspace_Allocate(
400098d0: 90 02 20 01 inc %o0
400098d4: 40 00 03 9e call 4000a74c <_Workspace_Allocate>
400098d8: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
400098dc: b8 92 20 00 orcc %o0, 0, %i4
400098e0: 02 80 00 3c be 400099d0 <_Thread_Initialize+0x16c>
400098e4: b6 10 20 00 clr %i3
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
400098e8: 80 a7 20 00 cmp %i4, 0
400098ec: 12 80 00 17 bne 40009948 <_Thread_Initialize+0xe4>
400098f0: f8 26 61 54 st %i4, [ %i1 + 0x154 ]
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
400098f4: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
400098f8: f4 2e 60 9c stb %i2, [ %i1 + 0x9c ]
the_thread->Start.budget_algorithm = budget_algorithm;
400098fc: c2 26 60 a0 st %g1, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
40009900: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
40009904: b4 10 20 01 mov 1, %i2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
40009908: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
4000990c: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->current_state = STATES_DORMANT;
40009910: f4 26 60 10 st %i2, [ %i1 + 0x10 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
40009914: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ]
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
40009918: 03 10 00 70 sethi %hi(0x4001c000), %g1
4000991c: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 4001c1fc <_Scheduler+0x18>
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
40009920: c0 26 60 44 clr [ %i1 + 0x44 ]
the_thread->resource_count = 0;
40009924: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
40009928: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
4000992c: fa 26 60 ac st %i5, [ %i1 + 0xac ]
40009930: 9f c0 40 00 call %g1
40009934: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
40009938: b6 92 20 00 orcc %o0, 0, %i3
4000993c: 12 80 00 0f bne 40009978 <_Thread_Initialize+0x114>
40009940: 90 10 00 19 mov %i1, %o0
40009944: 30 80 00 23 b,a 400099d0 <_Thread_Initialize+0x16c>
* 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++ )
40009948: 03 10 00 73 sethi %hi(0x4001cc00), %g1
4000994c: c4 00 61 3c ld [ %g1 + 0x13c ], %g2 ! 4001cd3c <_Thread_Maximum_extensions>
40009950: 10 80 00 05 b 40009964 <_Thread_Initialize+0x100>
40009954: 82 10 20 00 clr %g1
the_thread->extensions[i] = NULL;
40009958: 87 28 60 02 sll %g1, 2, %g3
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
4000995c: 82 00 60 01 inc %g1
the_thread->extensions[i] = NULL;
40009960: c0 21 00 03 clr [ %g4 + %g3 ]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
40009964: 80 a0 40 02 cmp %g1, %g2
40009968: 28 bf ff fc bleu,a 40009958 <_Thread_Initialize+0xf4>
4000996c: c8 06 61 54 ld [ %i1 + 0x154 ], %g4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
40009970: 10 bf ff e2 b 400098f8 <_Thread_Initialize+0x94>
40009974: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
goto failed;
_Thread_Set_priority( the_thread, priority );
40009978: 40 00 01 99 call 40009fdc <_Thread_Set_priority>
4000997c: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40009980: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
40009984: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
40009988: c0 26 60 80 clr [ %i1 + 0x80 ]
4000998c: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40009990: 83 28 60 02 sll %g1, 2, %g1
40009994: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
40009998: e0 26 60 0c st %l0, [ %i1 + 0xc ]
* @{
*/
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
4000999c: f2 27 bf f8 st %i1, [ %fp + -8 ]
400099a0: f4 2f bf fc stb %i2, [ %fp + -4 ]
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
400099a4: 90 07 bf f8 add %fp, -8, %o0
400099a8: 13 10 00 28 sethi %hi(0x4000a000), %o1
400099ac: 40 00 02 37 call 4000a288 <_User_extensions_Iterate>
400099b0: 92 12 61 64 or %o1, 0x164, %o1 ! 4000a164 <_User_extensions_Thread_create_visitor>
* 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 );
if ( extension_status )
400099b4: c2 0f bf fc ldub [ %fp + -4 ], %g1
400099b8: 80 a0 60 00 cmp %g1, 0
400099bc: 02 80 00 05 be 400099d0 <_Thread_Initialize+0x16c>
400099c0: b0 10 20 01 mov 1, %i0
400099c4: b0 0e 20 01 and %i0, 1, %i0
400099c8: 81 c7 e0 08 ret
400099cc: 81 e8 00 00 restore
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
400099d0: 40 00 03 67 call 4000a76c <_Workspace_Free>
400099d4: d0 06 61 48 ld [ %i1 + 0x148 ], %o0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
400099d8: 40 00 03 65 call 4000a76c <_Workspace_Free>
400099dc: d0 06 61 4c ld [ %i1 + 0x14c ], %o0
400099e0: 40 00 03 63 call 4000a76c <_Workspace_Free>
400099e4: d0 06 61 50 ld [ %i1 + 0x150 ], %o0
_Workspace_Free( extensions_area );
400099e8: 40 00 03 61 call 4000a76c <_Workspace_Free>
400099ec: 90 10 00 1c mov %i4, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
#endif
_Workspace_Free( sched );
400099f0: 40 00 03 5f call 4000a76c <_Workspace_Free>
400099f4: 90 10 00 1b mov %i3, %o0
_Thread_Stack_Free( the_thread );
400099f8: 40 00 01 b1 call 4000a0bc <_Thread_Stack_Free>
400099fc: 90 10 00 19 mov %i1, %o0
* 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 */
40009a00: b0 10 20 00 clr %i0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
40009a04: b0 0e 20 01 and %i0, 1, %i0
40009a08: 81 c7 e0 08 ret
40009a0c: 81 e8 00 00 restore
4000dbd0 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4000dbd0: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
ISR_Level level;
_ISR_Disable( level );
4000dbd4: 7f ff d1 35 call 400020a8 <sparc_disable_interrupts> <== NOT EXECUTED
4000dbd8: 01 00 00 00 nop <== NOT EXECUTED
4000dbdc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
4000dbe0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 <== NOT EXECUTED
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4000dbe4: 03 00 00 ef sethi %hi(0x3bc00), %g1 <== NOT EXECUTED
4000dbe8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0><== NOT EXECUTED
4000dbec: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
4000dbf0: 32 80 00 04 bne,a 4000dc00 <_Thread_queue_Extract_fifo+0x30><== NOT EXECUTED
4000dbf4: c2 06 60 04 ld [ %i1 + 4 ], %g1 <== NOT EXECUTED
_ISR_Enable( level );
4000dbf8: 7f ff d1 30 call 400020b8 <sparc_enable_interrupts> <== NOT EXECUTED
4000dbfc: 81 e8 00 00 restore <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4000dc00: c4 06 40 00 ld [ %i1 ], %g2 <== NOT EXECUTED
previous = the_node->previous;
next->previous = previous;
4000dc04: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED
previous->next = next;
4000dc08: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4000dc0c: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED
4000dc10: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
4000dc14: 02 80 00 06 be 4000dc2c <_Thread_queue_Extract_fifo+0x5c> <== NOT EXECUTED
4000dc18: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED
_ISR_Enable( level );
4000dc1c: 7f ff d1 27 call 400020b8 <sparc_enable_interrupts> <== NOT EXECUTED
4000dc20: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED
4000dc24: 10 80 00 09 b 4000dc48 <_Thread_queue_Extract_fifo+0x78> <== NOT EXECUTED
4000dc28: 33 04 01 ff sethi %hi(0x1007fc00), %i1 <== NOT EXECUTED
4000dc2c: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
4000dc30: c2 26 60 50 st %g1, [ %i1 + 0x50 ] <== NOT EXECUTED
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4000dc34: 7f ff d1 21 call 400020b8 <sparc_enable_interrupts> <== NOT EXECUTED
4000dc38: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
4000dc3c: 7f ff f2 2b call 4000a4e8 <_Watchdog_Remove> <== NOT EXECUTED
4000dc40: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED
4000dc44: 33 04 01 ff sethi %hi(0x1007fc00), %i1 <== NOT EXECUTED
4000dc48: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1007fff8 <RAM_SIZE+0xfc7fff8><== NOT EXECUTED
4000dc4c: 7f ff ed f8 call 4000942c <_Thread_Clear_state> <== NOT EXECUTED
4000dc50: 81 e8 00 00 restore <== NOT EXECUTED
40009f28 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
40009f28: 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 )
40009f2c: 80 a6 20 00 cmp %i0, 0
40009f30: 02 80 00 19 be 40009f94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
40009f34: 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 ) {
40009f38: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
40009f3c: 80 a7 60 01 cmp %i5, 1
40009f40: 12 80 00 15 bne 40009f94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
40009f44: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
40009f48: 7f ff e0 58 call 400020a8 <sparc_disable_interrupts>
40009f4c: 01 00 00 00 nop
40009f50: b8 10 00 08 mov %o0, %i4
40009f54: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
40009f58: 03 00 00 ef sethi %hi(0x3bc00), %g1
40009f5c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
40009f60: 80 88 80 01 btst %g2, %g1
40009f64: 02 80 00 0a be 40009f8c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
40009f68: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
40009f6c: 92 10 00 19 mov %i1, %o1
40009f70: 94 10 20 01 mov 1, %o2
40009f74: 40 00 09 bf call 4000c670 <_Thread_queue_Extract_priority_helper>
40009f78: fa 26 20 30 st %i5, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
40009f7c: 90 10 00 18 mov %i0, %o0
40009f80: 92 10 00 19 mov %i1, %o1
40009f84: 7f ff ff 50 call 40009cc4 <_Thread_queue_Enqueue_priority>
40009f88: 94 07 bf fc add %fp, -4, %o2
}
_ISR_Enable( level );
40009f8c: 7f ff e0 4b call 400020b8 <sparc_enable_interrupts>
40009f90: 90 10 00 1c mov %i4, %o0
40009f94: 81 c7 e0 08 ret
40009f98: 81 e8 00 00 restore
40009f9c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
40009f9c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
40009fa0: 90 10 00 18 mov %i0, %o0
40009fa4: 7f ff fe 04 call 400097b4 <_Thread_Get>
40009fa8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40009fac: c2 07 bf fc ld [ %fp + -4 ], %g1
40009fb0: 80 a0 60 00 cmp %g1, 0
40009fb4: 12 80 00 08 bne 40009fd4 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
40009fb8: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
40009fbc: 40 00 09 e4 call 4000c74c <_Thread_queue_Process_timeout>
40009fc0: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
40009fc4: 03 10 00 73 sethi %hi(0x4001cc00), %g1
40009fc8: c4 00 60 c0 ld [ %g1 + 0xc0 ], %g2 ! 4001ccc0 <_Thread_Dispatch_disable_level>
--level;
40009fcc: 84 00 bf ff add %g2, -1, %g2
_Thread_Dispatch_disable_level = level;
40009fd0: c4 20 60 c0 st %g2, [ %g1 + 0xc0 ]
40009fd4: 81 c7 e0 08 ret
40009fd8: 81 e8 00 00 restore
40018288 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
40018288: 9d e3 bf 88 save %sp, -120, %sp
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
4001828c: 27 10 00 ef sethi %hi(0x4003bc00), %l3
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
40018290: a4 07 bf e8 add %fp, -24, %l2
40018294: aa 07 bf ec add %fp, -20, %l5
40018298: b8 07 bf f4 add %fp, -12, %i4
4001829c: b2 07 bf f8 add %fp, -8, %i1
400182a0: ea 27 bf e8 st %l5, [ %fp + -24 ]
head->previous = NULL;
400182a4: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
400182a8: 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;
400182ac: f2 27 bf f4 st %i1, [ %fp + -12 ]
head->previous = NULL;
400182b0: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
400182b4: f8 27 bf fc st %i4, [ %fp + -4 ]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400182b8: b4 06 20 30 add %i0, 0x30, %i2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
400182bc: 29 10 00 ef sethi %hi(0x4003bc00), %l4
/*
* 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 );
400182c0: b6 06 20 68 add %i0, 0x68, %i3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
400182c4: a2 06 20 08 add %i0, 8, %l1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
400182c8: a0 06 20 40 add %i0, 0x40, %l0
{
/*
* 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;
400182cc: 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;
400182d0: c2 04 e3 b8 ld [ %l3 + 0x3b8 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
400182d4: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400182d8: 90 10 00 1a mov %i2, %o0
400182dc: 92 20 40 09 sub %g1, %o1, %o1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
400182e0: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400182e4: 40 00 11 18 call 4001c744 <_Watchdog_Adjust_to_chain>
400182e8: 94 10 00 1c mov %i4, %o2
400182ec: d0 1d 22 18 ldd [ %l4 + 0x218 ], %o0
400182f0: 94 10 20 00 clr %o2
400182f4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
400182f8: 40 00 4b b1 call 4002b1bc <__divdi3>
400182fc: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_SIZE+0x3b5aca00>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
40018300: 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 ) {
40018304: 80 a2 40 0a cmp %o1, %o2
40018308: 08 80 00 07 bleu 40018324 <_Timer_server_Body+0x9c>
4001830c: ba 10 00 09 mov %o1, %i5
/*
* 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 );
40018310: 92 22 40 0a sub %o1, %o2, %o1
40018314: 90 10 00 1b mov %i3, %o0
40018318: 40 00 11 0b call 4001c744 <_Watchdog_Adjust_to_chain>
4001831c: 94 10 00 1c mov %i4, %o2
40018320: 30 80 00 06 b,a 40018338 <_Timer_server_Body+0xb0>
} else if ( snapshot < last_snapshot ) {
40018324: 1a 80 00 05 bcc 40018338 <_Timer_server_Body+0xb0>
40018328: 90 10 00 1b mov %i3, %o0
/*
* 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 );
4001832c: 92 10 20 01 mov 1, %o1
40018330: 40 00 10 dd call 4001c6a4 <_Watchdog_Adjust>
40018334: 94 22 80 1d sub %o2, %i5, %o2
}
watchdogs->last_snapshot = snapshot;
40018338: fa 26 20 74 st %i5, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
4001833c: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
40018340: 40 00 02 d8 call 40018ea0 <_Chain_Get>
40018344: 01 00 00 00 nop
if ( timer == NULL ) {
40018348: 92 92 20 00 orcc %o0, 0, %o1
4001834c: 02 80 00 0c be 4001837c <_Timer_server_Body+0xf4>
40018350: 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 ) {
40018354: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
40018358: 80 a0 60 01 cmp %g1, 1
4001835c: 02 80 00 05 be 40018370 <_Timer_server_Body+0xe8>
40018360: 90 10 00 1a mov %i2, %o0
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
40018364: 80 a0 60 03 cmp %g1, 3
40018368: 12 bf ff f5 bne 4001833c <_Timer_server_Body+0xb4> <== NEVER TAKEN
4001836c: 90 10 00 1b mov %i3, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
40018370: 40 00 11 1f call 4001c7ec <_Watchdog_Insert>
40018374: 92 02 60 10 add %o1, 0x10, %o1
40018378: 30 bf ff f1 b,a 4001833c <_Timer_server_Body+0xb4>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
4001837c: 7f ff df a6 call 40010214 <sparc_disable_interrupts>
40018380: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
40018384: c2 07 bf e8 ld [ %fp + -24 ], %g1
40018388: 80 a0 40 15 cmp %g1, %l5
4001838c: 12 80 00 0a bne 400183b4 <_Timer_server_Body+0x12c> <== NEVER TAKEN
40018390: 01 00 00 00 nop
ts->insert_chain = NULL;
40018394: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
40018398: 7f ff df a3 call 40010224 <sparc_enable_interrupts>
4001839c: 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 ) ) {
400183a0: c2 07 bf f4 ld [ %fp + -12 ], %g1
400183a4: 80 a0 40 19 cmp %g1, %i1
400183a8: 12 80 00 06 bne 400183c0 <_Timer_server_Body+0x138>
400183ac: 01 00 00 00 nop
400183b0: 30 80 00 18 b,a 40018410 <_Timer_server_Body+0x188>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
400183b4: 7f ff df 9c call 40010224 <sparc_enable_interrupts> <== NOT EXECUTED
400183b8: 01 00 00 00 nop <== NOT EXECUTED
400183bc: 30 bf ff c5 b,a 400182d0 <_Timer_server_Body+0x48> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
400183c0: 7f ff df 95 call 40010214 <sparc_disable_interrupts>
400183c4: 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;
400183c8: fa 07 bf f4 ld [ %fp + -12 ], %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
400183cc: 80 a7 40 19 cmp %i5, %i1
400183d0: 02 80 00 0d be 40018404 <_Timer_server_Body+0x17c>
400183d4: 01 00 00 00 nop
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
400183d8: c2 07 40 00 ld [ %i5 ], %g1
head->next = new_first;
new_first->previous = head;
400183dc: 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;
400183e0: c2 27 bf f4 st %g1, [ %fp + -12 ]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
400183e4: c0 27 60 08 clr [ %i5 + 8 ]
_ISR_Enable( level );
400183e8: 7f ff df 8f call 40010224 <sparc_enable_interrupts>
400183ec: 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 );
400183f0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
400183f4: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
400183f8: 9f c0 40 00 call %g1
400183fc: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
}
40018400: 30 bf ff f0 b,a 400183c0 <_Timer_server_Body+0x138>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
40018404: 7f ff df 88 call 40010224 <sparc_enable_interrupts>
40018408: 01 00 00 00 nop
4001840c: 30 bf ff b0 b,a 400182cc <_Timer_server_Body+0x44>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
40018410: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
40018414: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40018418: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4003bed0 <_Thread_Dispatch_disable_level>
++level;
4001841c: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
40018420: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
40018424: d0 06 00 00 ld [ %i0 ], %o0
40018428: 40 00 0f bc call 4001c318 <_Thread_Set_state>
4001842c: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
40018430: 7f ff ff 6e call 400181e8 <_Timer_server_Reset_interval_system_watchdog>
40018434: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
40018438: 7f ff ff 80 call 40018238 <_Timer_server_Reset_tod_system_watchdog>
4001843c: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
40018440: 40 00 0d 7b call 4001ba2c <_Thread_Enable_dispatch>
40018444: 01 00 00 00 nop
ts->active = true;
40018448: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
4001844c: 90 10 00 11 mov %l1, %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;
40018450: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40018454: 40 00 11 3e call 4001c94c <_Watchdog_Remove>
40018458: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
4001845c: 40 00 11 3c call 4001c94c <_Watchdog_Remove>
40018460: 90 10 00 10 mov %l0, %o0
40018464: 30 bf ff 9a b,a 400182cc <_Timer_server_Body+0x44>
40018468 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
40018468: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
4001846c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
40018470: 80 a0 60 00 cmp %g1, 0
40018474: 12 80 00 51 bne 400185b8 <_Timer_server_Schedule_operation_method+0x150>
40018478: ba 10 00 19 mov %i1, %i5
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
4001847c: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40018480: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4003bed0 <_Thread_Dispatch_disable_level>
++level;
40018484: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
40018488: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ]
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
4001848c: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
40018490: 80 a0 60 01 cmp %g1, 1
40018494: 12 80 00 1f bne 40018510 <_Timer_server_Schedule_operation_method+0xa8>
40018498: 80 a0 60 03 cmp %g1, 3
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
4001849c: 7f ff df 5e call 40010214 <sparc_disable_interrupts>
400184a0: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
400184a4: 03 10 00 ef sethi %hi(0x4003bc00), %g1
400184a8: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 4003bfb8 <_Watchdog_Ticks_since_boot>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
400184ac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
400184b0: 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 );
400184b4: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
400184b8: 80 a0 40 03 cmp %g1, %g3
400184bc: 02 80 00 08 be 400184dc <_Timer_server_Schedule_operation_method+0x74>
400184c0: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
400184c4: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
if (delta_interval > delta) {
400184c8: 80 a7 00 04 cmp %i4, %g4
400184cc: 08 80 00 03 bleu 400184d8 <_Timer_server_Schedule_operation_method+0x70>
400184d0: 86 10 20 00 clr %g3
delta_interval -= delta;
400184d4: 86 27 00 04 sub %i4, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
400184d8: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
400184dc: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
400184e0: 7f ff df 51 call 40010224 <sparc_enable_interrupts>
400184e4: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
400184e8: 90 06 20 30 add %i0, 0x30, %o0
400184ec: 40 00 10 c0 call 4001c7ec <_Watchdog_Insert>
400184f0: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
400184f4: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
400184f8: 80 a0 60 00 cmp %g1, 0
400184fc: 12 80 00 2d bne 400185b0 <_Timer_server_Schedule_operation_method+0x148>
40018500: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
40018504: 7f ff ff 39 call 400181e8 <_Timer_server_Reset_interval_system_watchdog>
40018508: 90 10 00 18 mov %i0, %o0
4001850c: 30 80 00 29 b,a 400185b0 <_Timer_server_Schedule_operation_method+0x148>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
40018510: 12 80 00 28 bne 400185b0 <_Timer_server_Schedule_operation_method+0x148>
40018514: 01 00 00 00 nop
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
40018518: 7f ff df 3f call 40010214 <sparc_disable_interrupts>
4001851c: 01 00 00 00 nop
40018520: b8 10 00 08 mov %o0, %i4
40018524: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40018528: d0 18 62 18 ldd [ %g1 + 0x218 ], %o0 ! 4003be18 <_TOD>
4001852c: 94 10 20 00 clr %o2
40018530: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
40018534: 40 00 4b 22 call 4002b1bc <__divdi3>
40018538: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_SIZE+0x3b5aca00>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4001853c: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
40018540: 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 );
40018544: 86 06 20 6c add %i0, 0x6c, %g3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
40018548: 80 a0 40 03 cmp %g1, %g3
4001854c: 02 80 00 0d be 40018580 <_Timer_server_Schedule_operation_method+0x118>
40018550: 80 a2 40 02 cmp %o1, %g2
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
40018554: 08 80 00 08 bleu 40018574 <_Timer_server_Schedule_operation_method+0x10c>
40018558: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
4001855c: 88 22 40 02 sub %o1, %g2, %g4
if (delta_interval > delta) {
40018560: 80 a0 c0 04 cmp %g3, %g4
40018564: 08 80 00 06 bleu 4001857c <_Timer_server_Schedule_operation_method+0x114><== NEVER TAKEN
40018568: 84 10 20 00 clr %g2
delta_interval -= delta;
4001856c: 10 80 00 04 b 4001857c <_Timer_server_Schedule_operation_method+0x114>
40018570: 84 20 c0 04 sub %g3, %g4, %g2
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
40018574: 84 00 c0 02 add %g3, %g2, %g2
delta_interval += delta;
40018578: 84 20 80 09 sub %g2, %o1, %g2
}
first_watchdog->delta_interval = delta_interval;
4001857c: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
40018580: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
40018584: 7f ff df 28 call 40010224 <sparc_enable_interrupts>
40018588: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
4001858c: 90 06 20 68 add %i0, 0x68, %o0
40018590: 40 00 10 97 call 4001c7ec <_Watchdog_Insert>
40018594: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
40018598: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
4001859c: 80 a0 60 00 cmp %g1, 0
400185a0: 12 80 00 04 bne 400185b0 <_Timer_server_Schedule_operation_method+0x148>
400185a4: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
400185a8: 7f ff ff 24 call 40018238 <_Timer_server_Reset_tod_system_watchdog>
400185ac: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
400185b0: 40 00 0d 1f call 4001ba2c <_Thread_Enable_dispatch>
400185b4: 81 e8 00 00 restore
* 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 );
400185b8: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
400185bc: 40 00 02 2d call 40018e70 <_Chain_Append>
400185c0: 81 e8 00 00 restore
4000ba58 <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
4000ba58: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
4000ba5c: d4 1e 40 00 ldd [ %i1 ], %o2
4000ba60: 80 92 80 0b orcc %o2, %o3, %g0
4000ba64: 32 80 00 06 bne,a 4000ba7c <_Timestamp64_Divide+0x24> <== ALWAYS TAKEN
4000ba68: d8 1e 00 00 ldd [ %i0 ], %o4
*_ival_percentage = 0;
4000ba6c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*_fval_percentage = 0;
4000ba70: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
4000ba74: 81 c7 e0 08 ret <== NOT EXECUTED
4000ba78: 81 e8 00 00 restore <== 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;
4000ba7c: 83 2b 20 02 sll %o4, 2, %g1
4000ba80: 87 2b 60 02 sll %o5, 2, %g3
4000ba84: 89 33 60 1e srl %o5, 0x1e, %g4
4000ba88: bb 28 e0 05 sll %g3, 5, %i5
4000ba8c: 84 11 00 01 or %g4, %g1, %g2
4000ba90: 83 30 e0 1b srl %g3, 0x1b, %g1
4000ba94: b9 28 a0 05 sll %g2, 5, %i4
4000ba98: 86 a7 40 03 subcc %i5, %g3, %g3
4000ba9c: b8 10 40 1c or %g1, %i4, %i4
4000baa0: 84 67 00 02 subx %i4, %g2, %g2
4000baa4: b2 80 c0 0d addcc %g3, %o5, %i1
4000baa8: b0 40 80 0c addx %g2, %o4, %i0
4000baac: 83 36 60 1e srl %i1, 0x1e, %g1
4000bab0: 87 2e 60 02 sll %i1, 2, %g3
4000bab4: 85 2e 20 02 sll %i0, 2, %g2
4000bab8: 84 10 40 02 or %g1, %g2, %g2
4000babc: ba 86 40 03 addcc %i1, %g3, %i5
4000bac0: b8 46 00 02 addx %i0, %g2, %i4
4000bac4: 83 37 60 1e srl %i5, 0x1e, %g1
4000bac8: 87 2f 60 02 sll %i5, 2, %g3
4000bacc: 85 2f 20 02 sll %i4, 2, %g2
4000bad0: 84 10 40 02 or %g1, %g2, %g2
4000bad4: 92 87 40 03 addcc %i5, %g3, %o1
4000bad8: 90 47 00 02 addx %i4, %g2, %o0
4000badc: 87 32 60 1b srl %o1, 0x1b, %g3
4000bae0: 85 2a 20 05 sll %o0, 5, %g2
4000bae4: 83 2a 60 05 sll %o1, 5, %g1
4000bae8: 90 10 c0 02 or %g3, %g2, %o0
4000baec: 40 00 36 b3 call 400195b8 <__divdi3>
4000baf0: 92 10 00 01 mov %g1, %o1
*_ival_percentage = answer / 1000;
4000baf4: 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;
4000baf8: b8 10 00 08 mov %o0, %i4
4000bafc: ba 10 00 09 mov %o1, %i5
*_ival_percentage = answer / 1000;
4000bb00: 40 00 36 ae call 400195b8 <__divdi3>
4000bb04: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
4000bb08: 90 10 00 1c mov %i4, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
4000bb0c: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
4000bb10: 94 10 20 00 clr %o2
4000bb14: 92 10 00 1d mov %i5, %o1
4000bb18: 40 00 37 93 call 40019964 <__moddi3>
4000bb1c: 96 10 23 e8 mov 0x3e8, %o3
4000bb20: d2 26 c0 00 st %o1, [ %i3 ]
4000bb24: 81 c7 e0 08 ret
4000bb28: 81 e8 00 00 restore
4000a348 <_User_extensions_Handler_initialization>:
}
}
void _User_extensions_Handler_initialization(void)
{
4000a348: 9d e3 bf 98 save %sp, -104, %sp
uint32_t number_of_initial_extensions =
4000a34c: 03 10 00 69 sethi %hi(0x4001a400), %g1
4000a350: c2 00 60 98 ld [ %g1 + 0x98 ], %g1 ! 4001a498 <Configuration+0x40>
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
4000a354: 80 a0 60 00 cmp %g1, 0
4000a358: 02 80 00 0a be 4000a380 <_User_extensions_Handler_initialization+0x38><== NEVER TAKEN
4000a35c: 91 28 60 02 sll %g1, 2, %o0
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
4000a360: 83 28 60 04 sll %g1, 4, %g1
{
uint32_t number_of_initial_extensions =
rtems_configuration_get_number_of_initial_extensions();
if ( number_of_initial_extensions > 0 ) {
User_extensions_Switch_control *initial_extension_switch_controls =
4000a364: 40 00 01 08 call 4000a784 <_Workspace_Allocate_or_fatal_error>
4000a368: 90 20 40 08 sub %g1, %o0, %o0
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
);
User_extensions_Switch_context ctx = { initial_extension_switch_controls };
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
4000a36c: 13 10 00 28 sethi %hi(0x4000a000), %o1
User_extensions_Switch_control *initial_extension_switch_controls =
_Workspace_Allocate_or_fatal_error(
number_of_initial_extensions
* sizeof( *initial_extension_switch_controls )
);
User_extensions_Switch_context ctx = { initial_extension_switch_controls };
4000a370: d0 27 bf fc st %o0, [ %fp + -4 ]
_User_extensions_Iterate( &ctx, _User_extensions_Switch_visitor );
4000a374: 92 12 63 04 or %o1, 0x304, %o1
4000a378: 7f ff ff c4 call 4000a288 <_User_extensions_Iterate>
4000a37c: 90 07 bf fc add %fp, -4, %o0
4000a380: 81 c7 e0 08 ret
4000a384: 81 e8 00 00 restore
4000bd90 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4000bd90: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
4000bd94: 7f ff dc 57 call 40002ef0 <sparc_disable_interrupts>
4000bd98: 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;
4000bd9c: 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 );
4000bda0: b8 06 20 04 add %i0, 4, %i4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4000bda4: 80 a0 40 1c cmp %g1, %i4
4000bda8: 02 80 00 20 be 4000be28 <_Watchdog_Adjust+0x98>
4000bdac: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
4000bdb0: 02 80 00 1b be 4000be1c <_Watchdog_Adjust+0x8c>
4000bdb4: b6 10 20 01 mov 1, %i3
4000bdb8: 80 a6 60 01 cmp %i1, 1
4000bdbc: 12 80 00 1b bne 4000be28 <_Watchdog_Adjust+0x98> <== NEVER TAKEN
4000bdc0: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4000bdc4: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000bdc8: 10 80 00 07 b 4000bde4 <_Watchdog_Adjust+0x54>
4000bdcc: b4 00 80 1a add %g2, %i2, %i2
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
4000bdd0: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000bdd4: 80 a6 80 02 cmp %i2, %g2
4000bdd8: 3a 80 00 05 bcc,a 4000bdec <_Watchdog_Adjust+0x5c>
4000bddc: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
4000bde0: b4 20 80 1a sub %g2, %i2, %i2
break;
4000bde4: 10 80 00 11 b 4000be28 <_Watchdog_Adjust+0x98>
4000bde8: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
} else {
units -= _Watchdog_First( header )->delta_interval;
4000bdec: b4 26 80 02 sub %i2, %g2, %i2
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
4000bdf0: 7f ff dc 44 call 40002f00 <sparc_enable_interrupts>
4000bdf4: 01 00 00 00 nop
_Watchdog_Tickle( header );
4000bdf8: 40 00 00 90 call 4000c038 <_Watchdog_Tickle>
4000bdfc: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
4000be00: 7f ff dc 3c call 40002ef0 <sparc_disable_interrupts>
4000be04: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
4000be08: c2 06 00 00 ld [ %i0 ], %g1
4000be0c: 80 a0 40 1c cmp %g1, %i4
4000be10: 12 80 00 04 bne 4000be20 <_Watchdog_Adjust+0x90>
4000be14: 80 a6 a0 00 cmp %i2, 0
4000be18: 30 80 00 04 b,a 4000be28 <_Watchdog_Adjust+0x98>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4000be1c: 80 a6 a0 00 cmp %i2, 0
4000be20: 32 bf ff ec bne,a 4000bdd0 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
4000be24: c2 06 00 00 ld [ %i0 ], %g1
}
break;
}
}
_ISR_Enable( level );
4000be28: 7f ff dc 36 call 40002f00 <sparc_enable_interrupts>
4000be2c: 91 e8 00 08 restore %g0, %o0, %o0
4000a4e8 <_Watchdog_Remove>:
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
4000a4e8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
4000a4ec: 7f ff de ef call 400020a8 <sparc_disable_interrupts>
4000a4f0: ba 10 00 18 mov %i0, %i5
previous_state = the_watchdog->state;
4000a4f4: f0 06 20 08 ld [ %i0 + 8 ], %i0
switch ( previous_state ) {
4000a4f8: 80 a6 20 01 cmp %i0, 1
4000a4fc: 22 80 00 1e be,a 4000a574 <_Watchdog_Remove+0x8c>
4000a500: c0 27 60 08 clr [ %i5 + 8 ]
4000a504: 0a 80 00 1d bcs 4000a578 <_Watchdog_Remove+0x90>
4000a508: 03 10 00 73 sethi %hi(0x4001cc00), %g1
4000a50c: 80 a6 20 03 cmp %i0, 3
4000a510: 18 80 00 1a bgu 4000a578 <_Watchdog_Remove+0x90> <== NEVER TAKEN
4000a514: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
4000a518: 10 80 00 02 b 4000a520 <_Watchdog_Remove+0x38>
4000a51c: c2 07 40 00 ld [ %i5 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
4000a520: c0 27 60 08 clr [ %i5 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
4000a524: c4 00 40 00 ld [ %g1 ], %g2
4000a528: 80 a0 a0 00 cmp %g2, 0
4000a52c: 02 80 00 07 be 4000a548 <_Watchdog_Remove+0x60>
4000a530: 05 10 00 73 sethi %hi(0x4001cc00), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
4000a534: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
4000a538: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
4000a53c: 84 00 c0 02 add %g3, %g2, %g2
4000a540: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
4000a544: 05 10 00 73 sethi %hi(0x4001cc00), %g2
4000a548: c4 00 a1 a4 ld [ %g2 + 0x1a4 ], %g2 ! 4001cda4 <_Watchdog_Sync_count>
4000a54c: 80 a0 a0 00 cmp %g2, 0
4000a550: 22 80 00 07 be,a 4000a56c <_Watchdog_Remove+0x84>
4000a554: c4 07 60 04 ld [ %i5 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
4000a558: 05 10 00 73 sethi %hi(0x4001cc00), %g2
4000a55c: c6 00 a2 c8 ld [ %g2 + 0x2c8 ], %g3 ! 4001cec8 <_Per_CPU_Information+0x8>
4000a560: 05 10 00 73 sethi %hi(0x4001cc00), %g2
4000a564: c6 20 a1 44 st %g3, [ %g2 + 0x144 ] ! 4001cd44 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4000a568: c4 07 60 04 ld [ %i5 + 4 ], %g2
next->previous = previous;
4000a56c: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
4000a570: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4000a574: 03 10 00 73 sethi %hi(0x4001cc00), %g1
4000a578: c2 00 61 a8 ld [ %g1 + 0x1a8 ], %g1 ! 4001cda8 <_Watchdog_Ticks_since_boot>
4000a57c: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
_ISR_Enable( level );
4000a580: 7f ff de ce call 400020b8 <sparc_enable_interrupts>
4000a584: 01 00 00 00 nop
return( previous_state );
}
4000a588: 81 c7 e0 08 ret
4000a58c: 81 e8 00 00 restore
4000b73c <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4000b73c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4000b740: 7f ff dc c9 call 40002a64 <sparc_disable_interrupts>
4000b744: b8 10 00 18 mov %i0, %i4
4000b748: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
4000b74c: 11 10 00 74 sethi %hi(0x4001d000), %o0
4000b750: 94 10 00 19 mov %i1, %o2
4000b754: 90 12 20 50 or %o0, 0x50, %o0
4000b758: 7f ff e4 1a call 400047c0 <printk>
4000b75c: 92 10 00 1c mov %i4, %o1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4000b760: fa 06 40 00 ld [ %i1 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4000b764: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
4000b768: 80 a7 40 19 cmp %i5, %i1
4000b76c: 12 80 00 04 bne 4000b77c <_Watchdog_Report_chain+0x40>
4000b770: 92 10 00 1d mov %i5, %o1
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4000b774: 10 80 00 0d b 4000b7a8 <_Watchdog_Report_chain+0x6c>
4000b778: 11 10 00 74 sethi %hi(0x4001d000), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4000b77c: 40 00 00 0f call 4000b7b8 <_Watchdog_Report>
4000b780: 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 )
4000b784: fa 07 40 00 ld [ %i5 ], %i5
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
4000b788: 80 a7 40 19 cmp %i5, %i1
4000b78c: 12 bf ff fc bne 4000b77c <_Watchdog_Report_chain+0x40> <== NEVER TAKEN
4000b790: 92 10 00 1d mov %i5, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4000b794: 11 10 00 74 sethi %hi(0x4001d000), %o0
4000b798: 92 10 00 1c mov %i4, %o1
4000b79c: 7f ff e4 09 call 400047c0 <printk>
4000b7a0: 90 12 20 68 or %o0, 0x68, %o0
4000b7a4: 30 80 00 03 b,a 4000b7b0 <_Watchdog_Report_chain+0x74>
} else {
printk( "Chain is empty\n" );
4000b7a8: 7f ff e4 06 call 400047c0 <printk>
4000b7ac: 90 12 20 78 or %o0, 0x78, %o0
}
_ISR_Enable( level );
4000b7b0: 7f ff dc b1 call 40002a74 <sparc_enable_interrupts>
4000b7b4: 81 e8 00 00 restore
4000a590 <_Watchdog_Tickle>:
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
4000a590: 9d e3 bf a0 save %sp, -96, %sp
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
4000a594: 7f ff de c5 call 400020a8 <sparc_disable_interrupts>
4000a598: b8 10 00 18 mov %i0, %i4
4000a59c: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
4000a5a0: fa 07 00 00 ld [ %i4 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4000a5a4: b6 07 20 04 add %i4, 4, %i3
if ( _Chain_Is_empty( header ) )
4000a5a8: 80 a7 40 1b cmp %i5, %i3
4000a5ac: 02 80 00 1f be 4000a628 <_Watchdog_Tickle+0x98>
4000a5b0: 01 00 00 00 nop
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
4000a5b4: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
4000a5b8: 80 a0 60 00 cmp %g1, 0
4000a5bc: 02 80 00 06 be 4000a5d4 <_Watchdog_Tickle+0x44> <== NEVER TAKEN
4000a5c0: 82 00 7f ff add %g1, -1, %g1
the_watchdog->delta_interval--;
4000a5c4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
if ( the_watchdog->delta_interval != 0 )
4000a5c8: 80 a0 60 00 cmp %g1, 0
4000a5cc: 12 80 00 17 bne 4000a628 <_Watchdog_Tickle+0x98>
4000a5d0: 01 00 00 00 nop
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
4000a5d4: 7f ff ff c5 call 4000a4e8 <_Watchdog_Remove>
4000a5d8: 90 10 00 1d mov %i5, %o0
4000a5dc: b4 10 00 08 mov %o0, %i2
_ISR_Enable( level );
4000a5e0: 7f ff de b6 call 400020b8 <sparc_enable_interrupts>
4000a5e4: 90 10 00 18 mov %i0, %o0
switch( watchdog_state ) {
4000a5e8: 80 a6 a0 02 cmp %i2, 2
4000a5ec: 12 80 00 06 bne 4000a604 <_Watchdog_Tickle+0x74>
4000a5f0: 01 00 00 00 nop
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
4000a5f4: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
4000a5f8: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
4000a5fc: 9f c0 40 00 call %g1
4000a600: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
4000a604: 7f ff de a9 call 400020a8 <sparc_disable_interrupts>
4000a608: 01 00 00 00 nop
4000a60c: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
4000a610: fa 07 00 00 ld [ %i4 ], %i5
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
4000a614: 80 a7 40 1b cmp %i5, %i3
4000a618: 02 80 00 04 be 4000a628 <_Watchdog_Tickle+0x98>
4000a61c: 01 00 00 00 nop
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
4000a620: 10 bf ff ea b 4000a5c8 <_Watchdog_Tickle+0x38>
4000a624: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
4000a628: 7f ff de a4 call 400020b8 <sparc_enable_interrupts>
4000a62c: 81 e8 00 00 restore
4000a630 <_Workspace_Handler_initialization>:
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
4000a630: 9d e3 bf a0 save %sp, -96, %sp
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
4000a634: 05 10 00 69 sethi %hi(0x4001a400), %g2
4000a638: 82 10 a0 58 or %g2, 0x58, %g1 ! 4001a458 <Configuration>
4000a63c: c6 08 60 32 ldub [ %g1 + 0x32 ], %g3
4000a640: fa 00 a0 58 ld [ %g2 + 0x58 ], %i5
4000a644: 80 a0 e0 00 cmp %g3, 0
4000a648: 12 80 00 03 bne 4000a654 <_Workspace_Handler_initialization+0x24>
4000a64c: 84 10 20 00 clr %g2
4000a650: c4 00 60 04 ld [ %g1 + 4 ], %g2
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
4000a654: 21 10 00 20 sethi %hi(0x40008000), %l0
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
4000a658: 27 10 00 73 sethi %hi(0x4001cc00), %l3
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
4000a65c: ba 00 80 1d add %g2, %i5, %i5
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
4000a660: b6 10 20 00 clr %i3
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
4000a664: a0 14 20 ec or %l0, 0xec, %l0
size_t i;
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
4000a668: e2 08 60 30 ldub [ %g1 + 0x30 ], %l1
if ( area->size > overhead ) {
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
4000a66c: e4 08 60 31 ldub [ %g1 + 0x31 ], %l2
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
4000a670: 10 80 00 2c b 4000a720 <_Workspace_Handler_initialization+0xf0>
4000a674: a6 14 e0 d0 or %l3, 0xd0, %l3
Heap_Area *area = &areas [i];
if ( do_zero ) {
4000a678: 22 80 00 07 be,a 4000a694 <_Workspace_Handler_initialization+0x64>
4000a67c: f8 06 20 04 ld [ %i0 + 4 ], %i4
memset( area->begin, 0, area->size );
4000a680: d0 06 00 00 ld [ %i0 ], %o0
4000a684: d4 06 20 04 ld [ %i0 + 4 ], %o2
4000a688: 40 00 10 1f call 4000e704 <memset>
4000a68c: 92 10 20 00 clr %o1
}
if ( area->size > overhead ) {
4000a690: f8 06 20 04 ld [ %i0 + 4 ], %i4
4000a694: 80 a7 20 16 cmp %i4, 0x16
4000a698: 28 80 00 21 bleu,a 4000a71c <_Workspace_Handler_initialization+0xec>
4000a69c: b6 06 e0 01 inc %i3
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
4000a6a0: 80 a4 a0 00 cmp %l2, 0
4000a6a4: 32 80 00 0c bne,a 4000a6d4 <_Workspace_Handler_initialization+0xa4>
4000a6a8: d2 06 00 00 ld [ %i0 ], %o1
size = area->size;
} else {
if ( remaining > 0 ) {
4000a6ac: 80 a7 60 00 cmp %i5, 0
4000a6b0: 22 80 00 08 be,a 4000a6d0 <_Workspace_Handler_initialization+0xa0><== NEVER TAKEN
4000a6b4: b8 10 20 00 clr %i4 <== NOT EXECUTED
size = remaining < area->size - overhead ?
4000a6b8: 82 07 3f ea add %i4, -22, %g1
remaining + overhead : area->size;
4000a6bc: 80 a7 40 01 cmp %i5, %g1
4000a6c0: 2a 80 00 04 bcs,a 4000a6d0 <_Workspace_Handler_initialization+0xa0><== ALWAYS TAKEN
4000a6c4: b8 07 60 16 add %i5, 0x16, %i4
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
4000a6c8: 10 80 00 03 b 4000a6d4 <_Workspace_Handler_initialization+0xa4><== NOT EXECUTED
4000a6cc: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
4000a6d0: d2 06 00 00 ld [ %i0 ], %o1
4000a6d4: 94 10 00 1c mov %i4, %o2
4000a6d8: 90 10 00 13 mov %l3, %o0
4000a6dc: 9f c4 00 00 call %l0
4000a6e0: 96 10 20 08 mov 8, %o3
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
4000a6e4: c2 06 00 00 ld [ %i0 ], %g1
area->size -= size;
if ( space_available < remaining ) {
4000a6e8: 80 a2 00 1d cmp %o0, %i5
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
4000a6ec: 82 00 40 1c add %g1, %i4, %g1
4000a6f0: c2 26 00 00 st %g1, [ %i0 ]
area->size -= size;
4000a6f4: c2 06 20 04 ld [ %i0 + 4 ], %g1
4000a6f8: b8 20 40 1c sub %g1, %i4, %i4
if ( space_available < remaining ) {
4000a6fc: 1a 80 00 05 bcc 4000a710 <_Workspace_Handler_initialization+0xe0><== ALWAYS TAKEN
4000a700: f8 26 20 04 st %i4, [ %i0 + 4 ]
remaining -= space_available;
4000a704: ba 27 40 08 sub %i5, %o0, %i5 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
4000a708: 10 80 00 04 b 4000a718 <_Workspace_Handler_initialization+0xe8><== NOT EXECUTED
4000a70c: a0 10 00 1a mov %i2, %l0 <== NOT EXECUTED
4000a710: a0 10 00 1a mov %i2, %l0
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
4000a714: ba 10 20 00 clr %i5
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
4000a718: b6 06 e0 01 inc %i3
4000a71c: b0 06 20 08 add %i0, 8, %i0
4000a720: 80 a6 c0 19 cmp %i3, %i1
4000a724: 12 bf ff d5 bne 4000a678 <_Workspace_Handler_initialization+0x48>
4000a728: 80 a4 60 00 cmp %l1, 0
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
4000a72c: 80 a7 60 00 cmp %i5, 0
4000a730: 02 80 00 05 be 4000a744 <_Workspace_Handler_initialization+0x114>
4000a734: 90 10 20 00 clr %o0
_Internal_error_Occurred(
4000a738: 92 10 20 01 mov 1, %o1
4000a73c: 7f ff f6 ff call 40008338 <_Internal_error_Occurred>
4000a740: 94 10 20 02 mov 2, %o2
4000a744: 81 c7 e0 08 ret
4000a748: 81 e8 00 00 restore
4000a2b8 <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
4000a2b8: 9d e3 bf a0 save %sp, -96, %sp
char *dup = _Workspace_Allocate(len + 1);
4000a2bc: 7f ff ff e3 call 4000a248 <_Workspace_Allocate>
4000a2c0: 90 06 60 01 add %i1, 1, %o0
if (dup != NULL) {
4000a2c4: ba 92 20 00 orcc %o0, 0, %i5
4000a2c8: 02 80 00 05 be 4000a2dc <_Workspace_String_duplicate+0x24><== NEVER TAKEN
4000a2cc: 92 10 00 18 mov %i0, %o1
dup [len] = '\0';
4000a2d0: c0 2f 40 19 clrb [ %i5 + %i1 ]
memcpy(dup, string, len);
4000a2d4: 40 00 0f cd call 4000e208 <memcpy>
4000a2d8: 94 10 00 19 mov %i1, %o2
}
return dup;
}
4000a2dc: 81 c7 e0 08 ret
4000a2e0: 91 e8 00 1d restore %g0, %i5, %o0
400078e4 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
400078e4: 9d e3 bf 98 save %sp, -104, %sp
400078e8: 30 80 00 08 b,a 40007908 <rtems_chain_get_with_wait+0x24>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
400078ec: 92 10 20 00 clr %o1
400078f0: 94 10 00 1a mov %i2, %o2
400078f4: 7f ff fc fb call 40006ce0 <rtems_event_receive>
400078f8: 96 07 bf fc add %fp, -4, %o3
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
400078fc: 80 a2 20 00 cmp %o0, 0
40007900: 32 80 00 09 bne,a 40007924 <rtems_chain_get_with_wait+0x40><== ALWAYS TAKEN
40007904: fa 26 c0 00 st %i5, [ %i3 ]
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
40007908: 40 00 01 67 call 40007ea4 <_Chain_Get>
4000790c: 90 10 00 18 mov %i0, %o0
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
40007910: ba 92 20 00 orcc %o0, 0, %i5
40007914: 02 bf ff f6 be 400078ec <rtems_chain_get_with_wait+0x8>
40007918: 90 10 00 19 mov %i1, %o0
4000791c: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
40007920: fa 26 c0 00 st %i5, [ %i3 ]
return sc;
}
40007924: 81 c7 e0 08 ret
40007928: 91 e8 00 08 restore %g0, %o0, %o0
4000fccc <rtems_event_system_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
4000fccc: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
if ( event_out != NULL ) {
4000fcd0: 80 a6 e0 00 cmp %i3, 0
4000fcd4: 02 80 00 1e be 4000fd4c <rtems_event_system_receive+0x80> <== NEVER TAKEN
4000fcd8: 82 10 20 09 mov 9, %g1
Thread_Control *executing = _Thread_Executing;
4000fcdc: 03 10 00 65 sethi %hi(0x40019400), %g1
4000fce0: fa 00 61 40 ld [ %g1 + 0x140 ], %i5 ! 40019540 <_Per_CPU_Information+0x10>
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
4000fce4: 80 a6 20 00 cmp %i0, 0
4000fce8: 02 80 00 16 be 4000fd40 <rtems_event_system_receive+0x74> <== NEVER TAKEN
4000fcec: da 07 61 4c ld [ %i5 + 0x14c ], %o5
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
4000fcf0: 03 10 00 64 sethi %hi(0x40019000), %g1
4000fcf4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 40019330 <_Thread_Dispatch_disable_level>
++level;
4000fcf8: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
4000fcfc: c4 20 63 30 st %g2, [ %g1 + 0x330 ]
_Thread_Disable_dispatch();
_Event_Seize(
4000fd00: 03 10 00 65 sethi %hi(0x40019400), %g1
4000fd04: 82 10 61 90 or %g1, 0x190, %g1 ! 40019590 <_System_event_Sync_state>
4000fd08: 90 10 00 18 mov %i0, %o0
4000fd0c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
4000fd10: 92 10 00 19 mov %i1, %o1
4000fd14: 03 00 01 00 sethi %hi(0x40000), %g1
4000fd18: 94 10 00 1a mov %i2, %o2
4000fd1c: 96 10 00 1b mov %i3, %o3
4000fd20: 98 10 00 1d mov %i5, %o4
4000fd24: 9a 03 60 04 add %o5, 4, %o5
4000fd28: 7f ff df df call 40007ca4 <_Event_Seize>
4000fd2c: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
4000fd30: 7f ff eb 1f call 4000a9ac <_Thread_Enable_dispatch>
4000fd34: 01 00 00 00 nop
sc = executing->Wait.return_code;
4000fd38: 10 80 00 05 b 4000fd4c <rtems_event_system_receive+0x80>
4000fd3c: c2 07 60 34 ld [ %i5 + 0x34 ], %g1
} else {
*event_out = event->pending_events;
4000fd40: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED
4000fd44: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
4000fd48: 82 10 20 00 clr %g1 <== NOT EXECUTED
} else {
sc = RTEMS_INVALID_ADDRESS;
}
return sc;
}
4000fd4c: 81 c7 e0 08 ret
4000fd50: 91 e8 00 01 restore %g0, %g1, %o0
40007148 <rtems_event_system_send>:
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
40007148: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
4000714c: 90 10 00 18 mov %i0, %o0
40007150: 40 00 09 99 call 400097b4 <_Thread_Get>
40007154: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40007158: c4 07 bf fc ld [ %fp + -4 ], %g2
4000715c: 80 a0 a0 00 cmp %g2, 0
40007160: 12 80 00 0d bne 40007194 <rtems_event_system_send+0x4c> <== NEVER TAKEN
40007164: 92 10 00 19 mov %i1, %o1
case OBJECTS_LOCAL:
api = thread->API_Extensions[ THREAD_API_RTEMS ];
_Event_Surrender(
40007168: d4 02 21 4c ld [ %o0 + 0x14c ], %o2
4000716c: 94 02 a0 04 add %o2, 4, %o2
40007170: 19 00 01 00 sethi %hi(0x40000), %o4
40007174: 17 10 00 73 sethi %hi(0x4001cc00), %o3
40007178: 96 12 e3 20 or %o3, 0x320, %o3 ! 4001cf20 <_System_event_Sync_state>
4000717c: 7f ff fe 64 call 40006b0c <_Event_Surrender>
40007180: b0 10 20 00 clr %i0
event_in,
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
40007184: 40 00 09 80 call 40009784 <_Thread_Enable_dispatch>
40007188: 01 00 00 00 nop
sc = RTEMS_SUCCESSFUL;
break;
4000718c: 81 c7 e0 08 ret
40007190: 81 e8 00 00 restore
sc = RTEMS_INVALID_ID;
break;
}
return sc;
}
40007194: 81 c7 e0 08 ret <== NOT EXECUTED
40007198: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED
40009c04 <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)
{
40009c04: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
40009c08: ba 10 20 01 mov 1, %i5
40009c0c: 80 a6 20 00 cmp %i0, 0
40009c10: 02 80 00 0c be 40009c40 <rtems_iterate_over_all_threads+0x3c><== NEVER TAKEN
40009c14: 35 10 00 7e sethi %hi(0x4001f800), %i2
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
40009c18: 83 2f 60 02 sll %i5, 2, %g1
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 ] )
40009c1c: 84 16 a0 74 or %i2, 0x74, %g2
40009c20: c2 00 80 01 ld [ %g2 + %g1 ], %g1
40009c24: 80 a0 60 00 cmp %g1, 0
40009c28: 32 80 00 08 bne,a 40009c48 <rtems_iterate_over_all_threads+0x44>
40009c2c: f6 00 60 04 ld [ %g1 + 4 ], %i3
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
40009c30: ba 07 60 01 inc %i5
40009c34: 80 a7 60 04 cmp %i5, 4
40009c38: 12 bf ff f9 bne 40009c1c <rtems_iterate_over_all_threads+0x18>
40009c3c: 83 2f 60 02 sll %i5, 2, %g1
40009c40: 81 c7 e0 08 ret
40009c44: 81 e8 00 00 restore
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
40009c48: 80 a6 e0 00 cmp %i3, 0
40009c4c: 02 bf ff f9 be 40009c30 <rtems_iterate_over_all_threads+0x2c>
40009c50: b8 10 20 01 mov 1, %i4
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
40009c54: 10 80 00 0a b 40009c7c <rtems_iterate_over_all_threads+0x78>
40009c58: c2 16 e0 10 lduh [ %i3 + 0x10 ], %g1
the_thread = (Thread_Control *)information->local_table[ i ];
40009c5c: 83 2f 20 02 sll %i4, 2, %g1
40009c60: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !the_thread )
40009c64: 80 a2 20 00 cmp %o0, 0
40009c68: 02 80 00 04 be 40009c78 <rtems_iterate_over_all_threads+0x74><== NEVER TAKEN
40009c6c: b8 07 20 01 inc %i4
continue;
(*routine)(the_thread);
40009c70: 9f c6 00 00 call %i0
40009c74: 01 00 00 00 nop
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
40009c78: c2 16 e0 10 lduh [ %i3 + 0x10 ], %g1
40009c7c: 80 a7 00 01 cmp %i4, %g1
40009c80: 28 bf ff f7 bleu,a 40009c5c <rtems_iterate_over_all_threads+0x58>
40009c84: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
40009c88: 10 bf ff eb b 40009c34 <rtems_iterate_over_all_threads+0x30>
40009c8c: ba 07 60 01 inc %i5
400159f4 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
400159f4: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
400159f8: 80 a6 20 00 cmp %i0, 0
400159fc: 02 80 00 38 be 40015adc <rtems_partition_create+0xe8>
40015a00: 82 10 20 03 mov 3, %g1
return RTEMS_INVALID_NAME;
if ( !starting_address )
40015a04: 80 a6 60 00 cmp %i1, 0
40015a08: 02 80 00 35 be 40015adc <rtems_partition_create+0xe8>
40015a0c: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
40015a10: 80 a7 60 00 cmp %i5, 0
40015a14: 02 80 00 32 be 40015adc <rtems_partition_create+0xe8> <== NEVER TAKEN
40015a18: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
40015a1c: 02 80 00 30 be 40015adc <rtems_partition_create+0xe8>
40015a20: 82 10 20 08 mov 8, %g1
40015a24: 80 a6 a0 00 cmp %i2, 0
40015a28: 02 80 00 2d be 40015adc <rtems_partition_create+0xe8>
40015a2c: 80 a6 80 1b cmp %i2, %i3
40015a30: 0a 80 00 2b bcs 40015adc <rtems_partition_create+0xe8>
40015a34: 80 8e e0 07 btst 7, %i3
40015a38: 12 80 00 29 bne 40015adc <rtems_partition_create+0xe8>
40015a3c: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
40015a40: 12 80 00 27 bne 40015adc <rtems_partition_create+0xe8>
40015a44: 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)
{
uint32_t level = _Thread_Dispatch_disable_level;
40015a48: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40015a4c: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 4003bed0 <_Thread_Dispatch_disable_level>
++level;
40015a50: 84 00 a0 01 inc %g2
_Thread_Dispatch_disable_level = level;
40015a54: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ]
* 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 );
40015a58: 23 10 00 ef sethi %hi(0x4003bc00), %l1
40015a5c: 40 00 12 fc call 4001a64c <_Objects_Allocate>
40015a60: 90 14 60 c4 or %l1, 0xc4, %o0 ! 4003bcc4 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
40015a64: a0 92 20 00 orcc %o0, 0, %l0
40015a68: 32 80 00 06 bne,a 40015a80 <rtems_partition_create+0x8c>
40015a6c: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
40015a70: 40 00 17 ef call 4001ba2c <_Thread_Enable_dispatch>
40015a74: 01 00 00 00 nop
return RTEMS_TOO_MANY;
40015a78: 10 80 00 19 b 40015adc <rtems_partition_create+0xe8>
40015a7c: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
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,
length / buffer_size, buffer_size );
40015a80: 92 10 00 1b mov %i3, %o1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
40015a84: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
40015a88: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
40015a8c: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
40015a90: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
40015a94: 40 00 54 40 call 4002ab94 <.udiv>
40015a98: 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,
40015a9c: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
40015aa0: 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,
40015aa4: 96 10 00 1b mov %i3, %o3
40015aa8: b8 04 20 24 add %l0, 0x24, %i4
40015aac: 40 00 0d 0c call 40018edc <_Chain_Initialize>
40015ab0: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
40015ab4: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40015ab8: a2 14 60 c4 or %l1, 0xc4, %l1
40015abc: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
40015ac0: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40015ac4: 85 28 a0 02 sll %g2, 2, %g2
40015ac8: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
40015acc: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
40015ad0: 40 00 17 d7 call 4001ba2c <_Thread_Enable_dispatch>
40015ad4: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
40015ad8: 82 10 20 00 clr %g1
}
40015adc: 81 c7 e0 08 ret
40015ae0: 91 e8 00 01 restore %g0, %g1, %o0
40015c10 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
40015c10: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
40015c14: 11 10 00 ef sethi %hi(0x4003bc00), %o0
40015c18: 92 10 00 18 mov %i0, %o1
40015c1c: 90 12 20 c4 or %o0, 0xc4, %o0
40015c20: 40 00 13 e3 call 4001abac <_Objects_Get>
40015c24: 94 07 bf fc add %fp, -4, %o2
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
40015c28: c2 07 bf fc ld [ %fp + -4 ], %g1
40015c2c: 80 a0 60 00 cmp %g1, 0
40015c30: 12 80 00 21 bne 40015cb4 <rtems_partition_return_buffer+0xa4>
40015c34: ba 10 00 08 mov %o0, %i5
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
40015c38: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
40015c3c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
40015c40: 82 02 00 01 add %o0, %g1, %g1
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
40015c44: 80 a6 40 01 cmp %i1, %g1
40015c48: 18 80 00 0b bgu 40015c74 <rtems_partition_return_buffer+0x64><== NEVER TAKEN
40015c4c: 82 10 20 00 clr %g1
40015c50: 80 a6 40 08 cmp %i1, %o0
40015c54: 0a 80 00 09 bcs 40015c78 <rtems_partition_return_buffer+0x68>
40015c58: 80 a0 60 00 cmp %g1, 0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
40015c5c: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
40015c60: 40 00 54 79 call 4002ae44 <.urem>
40015c64: 90 26 40 08 sub %i1, %o0, %o0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
40015c68: 80 a0 00 08 cmp %g0, %o0
40015c6c: 10 80 00 02 b 40015c74 <rtems_partition_return_buffer+0x64>
40015c70: 82 60 3f ff subx %g0, -1, %g1
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
40015c74: 80 a0 60 00 cmp %g1, 0
40015c78: 02 80 00 0b be 40015ca4 <rtems_partition_return_buffer+0x94>
40015c7c: 90 07 60 24 add %i5, 0x24, %o0
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
40015c80: 40 00 0c 7c call 40018e70 <_Chain_Append>
40015c84: 92 10 00 19 mov %i1, %o1
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
40015c88: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
40015c8c: b0 10 20 00 clr %i0
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
40015c90: 82 00 7f ff add %g1, -1, %g1
_Thread_Enable_dispatch();
40015c94: 40 00 17 66 call 4001ba2c <_Thread_Enable_dispatch>
40015c98: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
40015c9c: 81 c7 e0 08 ret
40015ca0: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
40015ca4: 40 00 17 62 call 4001ba2c <_Thread_Enable_dispatch>
40015ca8: b0 10 20 09 mov 9, %i0
40015cac: 81 c7 e0 08 ret
40015cb0: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40015cb4: 81 c7 e0 08 ret
40015cb8: 91 e8 20 04 restore %g0, 4, %o0
40031af8 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
40031af8: 9d e3 bf 98 save %sp, -104, %sp
40031afc: 11 10 01 88 sethi %hi(0x40062000), %o0
40031b00: 92 10 00 18 mov %i0, %o1
40031b04: 90 12 20 28 or %o0, 0x28, %o0
40031b08: 7f ff 59 f8 call 400082e8 <_Objects_Get>
40031b0c: 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 ) {
40031b10: c2 07 bf fc ld [ %fp + -4 ], %g1
40031b14: 80 a0 60 00 cmp %g1, 0
40031b18: 12 80 00 6a bne 40031cc0 <rtems_rate_monotonic_period+0x1c8>
40031b1c: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
40031b20: 37 10 01 87 sethi %hi(0x40061c00), %i3
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
40031b24: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
40031b28: b6 16 e2 00 or %i3, 0x200, %i3
40031b2c: c2 06 e0 10 ld [ %i3 + 0x10 ], %g1
40031b30: 80 a0 80 01 cmp %g2, %g1
40031b34: 02 80 00 06 be 40031b4c <rtems_rate_monotonic_period+0x54>
40031b38: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
40031b3c: 7f ff 5d 61 call 400090c0 <_Thread_Enable_dispatch>
40031b40: b0 10 20 17 mov 0x17, %i0
40031b44: 81 c7 e0 08 ret
40031b48: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
40031b4c: 12 80 00 0d bne 40031b80 <rtems_rate_monotonic_period+0x88>
40031b50: 01 00 00 00 nop
switch ( the_period->state ) {
40031b54: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
40031b58: 80 a0 60 04 cmp %g1, 4
40031b5c: 18 80 00 05 bgu 40031b70 <rtems_rate_monotonic_period+0x78><== NEVER TAKEN
40031b60: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40031b64: 05 10 01 6e sethi %hi(0x4005b800), %g2
40031b68: 84 10 a3 40 or %g2, 0x340, %g2 ! 4005bb40 <CSWTCH.24>
40031b6c: f0 08 80 01 ldub [ %g2 + %g1 ], %i0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
40031b70: 7f ff 5d 54 call 400090c0 <_Thread_Enable_dispatch>
40031b74: 01 00 00 00 nop
40031b78: 81 c7 e0 08 ret
40031b7c: 81 e8 00 00 restore
return( return_value );
}
_ISR_Disable( level );
40031b80: 7f ff 40 ad call 40001e34 <sparc_disable_interrupts>
40031b84: 01 00 00 00 nop
40031b88: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
40031b8c: f8 07 60 38 ld [ %i5 + 0x38 ], %i4
40031b90: 80 a7 20 00 cmp %i4, 0
40031b94: 12 80 00 15 bne 40031be8 <rtems_rate_monotonic_period+0xf0>
40031b98: 80 a7 20 02 cmp %i4, 2
_ISR_Enable( level );
40031b9c: 7f ff 40 aa call 40001e44 <sparc_enable_interrupts>
40031ba0: 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 );
40031ba4: 90 10 00 1d mov %i5, %o0
40031ba8: 7f ff ff b8 call 40031a88 <_Rate_monotonic_Initiate_statistics>
40031bac: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
40031bb0: 82 10 20 02 mov 2, %g1
40031bb4: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40031bb8: 03 10 00 c7 sethi %hi(0x40031c00), %g1
40031bbc: 82 10 60 cc or %g1, 0xcc, %g1 ! 40031ccc <_Rate_monotonic_Timeout>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40031bc0: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
40031bc4: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
the_watchdog->id = id;
40031bc8: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
40031bcc: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40031bd0: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40031bd4: 11 10 01 87 sethi %hi(0x40061c00), %o0
40031bd8: 92 07 60 10 add %i5, 0x10, %o1
40031bdc: 7f ff 60 3a call 40009cc4 <_Watchdog_Insert>
40031be0: 90 12 20 98 or %o0, 0x98, %o0
40031be4: 30 80 00 1b b,a 40031c50 <rtems_rate_monotonic_period+0x158>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
40031be8: 12 80 00 1e bne 40031c60 <rtems_rate_monotonic_period+0x168>
40031bec: 80 a7 20 04 cmp %i4, 4
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
40031bf0: 7f ff ff 5d call 40031964 <_Rate_monotonic_Update_statistics>
40031bf4: 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;
40031bf8: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
40031bfc: 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;
40031c00: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
40031c04: 7f ff 40 90 call 40001e44 <sparc_enable_interrupts>
40031c08: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
40031c0c: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
40031c10: c2 07 60 08 ld [ %i5 + 8 ], %g1
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40031c14: 13 00 00 10 sethi %hi(0x4000), %o1
40031c18: 7f ff 5f 48 call 40009938 <_Thread_Set_state>
40031c1c: c2 22 20 20 st %g1, [ %o0 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
40031c20: 7f ff 40 85 call 40001e34 <sparc_disable_interrupts>
40031c24: 01 00 00 00 nop
local_state = the_period->state;
40031c28: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
40031c2c: f8 27 60 38 st %i4, [ %i5 + 0x38 ]
_ISR_Enable( level );
40031c30: 7f ff 40 85 call 40001e44 <sparc_enable_interrupts>
40031c34: 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 )
40031c38: 80 a6 a0 03 cmp %i2, 3
40031c3c: 12 80 00 05 bne 40031c50 <rtems_rate_monotonic_period+0x158>
40031c40: 01 00 00 00 nop
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40031c44: d0 06 e0 10 ld [ %i3 + 0x10 ], %o0
40031c48: 7f ff 5c 48 call 40008d68 <_Thread_Clear_state>
40031c4c: 13 00 00 10 sethi %hi(0x4000), %o1
_Thread_Enable_dispatch();
40031c50: 7f ff 5d 1c call 400090c0 <_Thread_Enable_dispatch>
40031c54: b0 10 20 00 clr %i0
40031c58: 81 c7 e0 08 ret
40031c5c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
40031c60: 12 bf ff b9 bne 40031b44 <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
40031c64: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
40031c68: 7f ff ff 3f call 40031964 <_Rate_monotonic_Update_statistics>
40031c6c: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
40031c70: 7f ff 40 75 call 40001e44 <sparc_enable_interrupts>
40031c74: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
40031c78: 82 10 20 02 mov 2, %g1
40031c7c: 92 07 60 10 add %i5, 0x10, %o1
40031c80: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
40031c84: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40031c88: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40031c8c: 11 10 01 87 sethi %hi(0x40061c00), %o0
40031c90: 7f ff 60 0d call 40009cc4 <_Watchdog_Insert>
40031c94: 90 12 20 98 or %o0, 0x98, %o0 ! 40061c98 <_Watchdog_Ticks_chain>
40031c98: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
40031c9c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
40031ca0: 03 10 01 76 sethi %hi(0x4005d800), %g1
40031ca4: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 4005da04 <_Scheduler+0x34>
40031ca8: 9f c0 40 00 call %g1
40031cac: b0 10 20 06 mov 6, %i0
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
40031cb0: 7f ff 5d 04 call 400090c0 <_Thread_Enable_dispatch>
40031cb4: 01 00 00 00 nop
40031cb8: 81 c7 e0 08 ret
40031cbc: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
40031cc0: b0 10 20 04 mov 4, %i0
}
40031cc4: 81 c7 e0 08 ret
40031cc8: 81 e8 00 00 restore
40024bb8 <rtems_rate_monotonic_report_statistics_with_plugin>:
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
40024bb8: 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 )
40024bbc: 80 a6 60 00 cmp %i1, 0
40024bc0: 02 80 00 75 be 40024d94 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NEVER TAKEN
40024bc4: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
40024bc8: 13 10 01 63 sethi %hi(0x40058c00), %o1
40024bcc: 9f c6 40 00 call %i1
40024bd0: 92 12 61 98 or %o1, 0x198, %o1 ! 40058d98 <_TOD_Days_per_month+0x68>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
40024bd4: 90 10 00 18 mov %i0, %o0
40024bd8: 13 10 01 63 sethi %hi(0x40058c00), %o1
40024bdc: 9f c6 40 00 call %i1
40024be0: 92 12 61 b8 or %o1, 0x1b8, %o1 ! 40058db8 <_TOD_Days_per_month+0x88>
(*print)( context, "--- Wall times are in seconds ---\n" );
40024be4: 90 10 00 18 mov %i0, %o0
40024be8: 13 10 01 63 sethi %hi(0x40058c00), %o1
40024bec: 9f c6 40 00 call %i1
40024bf0: 92 12 61 e0 or %o1, 0x1e0, %o1 ! 40058de0 <_TOD_Days_per_month+0xb0>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
40024bf4: 90 10 00 18 mov %i0, %o0
40024bf8: 13 10 01 63 sethi %hi(0x40058c00), %o1
40024bfc: 9f c6 40 00 call %i1
40024c00: 92 12 62 08 or %o1, 0x208, %o1 ! 40058e08 <_TOD_Days_per_month+0xd8>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
40024c04: 90 10 00 18 mov %i0, %o0
40024c08: 13 10 01 63 sethi %hi(0x40058c00), %o1
40024c0c: 9f c6 40 00 call %i1
40024c10: 92 12 62 58 or %o1, 0x258, %o1 ! 40058e58 <_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 ;
40024c14: 03 10 01 88 sethi %hi(0x40062000), %g1
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40024c18: 39 10 01 63 sethi %hi(0x40058c00), %i4
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,
40024c1c: 37 10 01 63 sethi %hi(0x40058c00), %i3
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,
40024c20: 35 10 01 63 sethi %hi(0x40058c00), %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
40024c24: 21 10 01 68 sethi %hi(0x4005a000), %l0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40024c28: fa 00 60 30 ld [ %g1 + 0x30 ], %i5
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40024c2c: b8 17 22 a8 or %i4, 0x2a8, %i4
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,
40024c30: b6 16 e2 c0 or %i3, 0x2c0, %i3
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,
40024c34: b4 16 a2 e0 or %i2, 0x2e0, %i2
/*
* 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 ;
40024c38: 10 80 00 52 b 40024d80 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
40024c3c: a0 14 23 68 or %l0, 0x368, %l0
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
40024c40: 40 00 32 6b call 400315ec <rtems_rate_monotonic_get_statistics>
40024c44: 92 07 bf c8 add %fp, -56, %o1
if ( status != RTEMS_SUCCESSFUL )
40024c48: 80 a2 20 00 cmp %o0, 0
40024c4c: 32 80 00 4d bne,a 40024d80 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
40024c50: ba 07 60 01 inc %i5
#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 );
40024c54: 92 07 bf b0 add %fp, -80, %o1
40024c58: 40 00 32 d6 call 400317b0 <rtems_rate_monotonic_get_status>
40024c5c: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
40024c60: d0 07 bf b0 ld [ %fp + -80 ], %o0
40024c64: 92 10 20 05 mov 5, %o1
40024c68: 7f ff a3 75 call 4000da3c <rtems_object_get_name>
40024c6c: 94 07 bf a0 add %fp, -96, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40024c70: d8 1f bf c8 ldd [ %fp + -56 ], %o4
40024c74: 92 10 00 1c mov %i4, %o1
40024c78: 90 10 00 18 mov %i0, %o0
40024c7c: 94 10 00 1d mov %i5, %o2
40024c80: 9f c6 40 00 call %i1
40024c84: 96 07 bf a0 add %fp, -96, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
40024c88: d2 07 bf c8 ld [ %fp + -56 ], %o1
40024c8c: 80 a2 60 00 cmp %o1, 0
40024c90: 12 80 00 07 bne 40024cac <rtems_rate_monotonic_report_statistics_with_plugin+0xf4>
40024c94: 94 07 bf a8 add %fp, -88, %o2
(*print)( context, "\n" );
40024c98: 90 10 00 18 mov %i0, %o0
40024c9c: 9f c6 40 00 call %i1
40024ca0: 92 10 00 10 mov %l0, %o1
continue;
40024ca4: 10 80 00 37 b 40024d80 <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
40024ca8: ba 07 60 01 inc %i5
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 );
40024cac: 40 00 03 21 call 40025930 <_Timespec_Divide_by_integer>
40024cb0: 90 07 bf e0 add %fp, -32, %o0
(*print)( context,
40024cb4: d0 07 bf d4 ld [ %fp + -44 ], %o0
40024cb8: 40 00 a8 c6 call 4004efd0 <.div>
40024cbc: 92 10 23 e8 mov 0x3e8, %o1
40024cc0: a6 10 00 08 mov %o0, %l3
40024cc4: d0 07 bf dc ld [ %fp + -36 ], %o0
40024cc8: 40 00 a8 c2 call 4004efd0 <.div>
40024ccc: 92 10 23 e8 mov 0x3e8, %o1
40024cd0: c2 07 bf a8 ld [ %fp + -88 ], %g1
40024cd4: a2 10 00 08 mov %o0, %l1
40024cd8: d0 07 bf ac ld [ %fp + -84 ], %o0
40024cdc: e8 07 bf d0 ld [ %fp + -48 ], %l4
40024ce0: e4 07 bf d8 ld [ %fp + -40 ], %l2
40024ce4: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40024ce8: 40 00 a8 ba call 4004efd0 <.div>
40024cec: 92 10 23 e8 mov 0x3e8, %o1
40024cf0: 96 10 00 13 mov %l3, %o3
40024cf4: 98 10 00 12 mov %l2, %o4
40024cf8: 9a 10 00 11 mov %l1, %o5
40024cfc: 94 10 00 14 mov %l4, %o2
40024d00: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40024d04: 92 10 00 1b mov %i3, %o1
40024d08: 9f c6 40 00 call %i1
40024d0c: 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);
40024d10: d2 07 bf c8 ld [ %fp + -56 ], %o1
40024d14: 94 07 bf a8 add %fp, -88, %o2
40024d18: 40 00 03 06 call 40025930 <_Timespec_Divide_by_integer>
40024d1c: 90 07 bf f8 add %fp, -8, %o0
(*print)( context,
40024d20: d0 07 bf ec ld [ %fp + -20 ], %o0
40024d24: 40 00 a8 ab call 4004efd0 <.div>
40024d28: 92 10 23 e8 mov 0x3e8, %o1
40024d2c: a6 10 00 08 mov %o0, %l3
40024d30: d0 07 bf f4 ld [ %fp + -12 ], %o0
40024d34: 40 00 a8 a7 call 4004efd0 <.div>
40024d38: 92 10 23 e8 mov 0x3e8, %o1
40024d3c: c2 07 bf a8 ld [ %fp + -88 ], %g1
40024d40: a2 10 00 08 mov %o0, %l1
40024d44: d0 07 bf ac ld [ %fp + -84 ], %o0
40024d48: e8 07 bf e8 ld [ %fp + -24 ], %l4
40024d4c: e4 07 bf f0 ld [ %fp + -16 ], %l2
40024d50: 92 10 23 e8 mov 0x3e8, %o1
40024d54: 40 00 a8 9f call 4004efd0 <.div>
40024d58: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40024d5c: 92 10 00 1a mov %i2, %o1
40024d60: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40024d64: 94 10 00 14 mov %l4, %o2
40024d68: 90 10 00 18 mov %i0, %o0
40024d6c: 96 10 00 13 mov %l3, %o3
40024d70: 98 10 00 12 mov %l2, %o4
40024d74: 9f c6 40 00 call %i1
40024d78: 9a 10 00 11 mov %l1, %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 ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
40024d7c: 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 ;
id <= _Rate_monotonic_Information.maximum_id ;
40024d80: 03 10 01 88 sethi %hi(0x40062000), %g1
/*
* 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 ;
40024d84: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 ! 40062034 <_Rate_monotonic_Information+0xc>
40024d88: 80 a7 40 01 cmp %i5, %g1
40024d8c: 08 bf ff ad bleu 40024c40 <rtems_rate_monotonic_report_statistics_with_plugin+0x88>
40024d90: 90 10 00 1d mov %i5, %o0
40024d94: 81 c7 e0 08 ret
40024d98: 81 e8 00 00 restore
40007d98 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
40007d98: 9d e3 bf a0 save %sp, -96, %sp
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
40007d9c: fa 06 20 30 ld [ %i0 + 0x30 ], %i5
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
40007da0: 90 10 00 19 mov %i1, %o0
40007da4: 92 10 00 1d mov %i5, %o1
40007da8: 40 00 2a 1f call 40012624 <.urem>
40007dac: b6 10 00 19 mov %i1, %i3
if (excess > 0) {
40007db0: 80 a2 20 00 cmp %o0, 0
40007db4: 02 80 00 05 be 40007dc8 <rtems_rbheap_allocate+0x30> <== ALWAYS TAKEN
40007db8: 80 a6 c0 19 cmp %i3, %i1
value += alignment - excess;
40007dbc: b6 06 40 1d add %i1, %i5, %i3 <== NOT EXECUTED
40007dc0: b6 26 c0 08 sub %i3, %o0, %i3 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
40007dc4: 80 a6 c0 19 cmp %i3, %i1 <== NOT EXECUTED
40007dc8: 0a 80 00 04 bcs 40007dd8 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
40007dcc: 80 a6 60 00 cmp %i1, 0
40007dd0: 32 80 00 04 bne,a 40007de0 <rtems_rbheap_allocate+0x48>
40007dd4: c2 06 00 00 ld [ %i0 ], %g1
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
40007dd8: 81 c7 e0 08 ret
40007ddc: 91 e8 20 00 restore %g0, 0, %o0
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
40007de0: 84 06 20 04 add %i0, 4, %g2
rtems_rbheap_chunk *big_enough = NULL;
40007de4: 10 80 00 06 b 40007dfc <rtems_rbheap_allocate+0x64>
40007de8: ba 10 20 00 clr %i5
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
40007dec: 80 a0 c0 1b cmp %g3, %i3
40007df0: ba 40 3f ff addx %g0, -1, %i5
40007df4: ba 08 40 1d and %g1, %i5, %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
40007df8: c2 00 40 00 ld [ %g1 ], %g1
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
40007dfc: 80 a7 60 00 cmp %i5, 0
40007e00: 12 80 00 04 bne 40007e10 <rtems_rbheap_allocate+0x78>
40007e04: 80 a0 40 02 cmp %g1, %g2
40007e08: 32 bf ff f9 bne,a 40007dec <rtems_rbheap_allocate+0x54>
40007e0c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
40007e10: 80 a7 60 00 cmp %i5, 0
40007e14: 02 bf ff f1 be 40007dd8 <rtems_rbheap_allocate+0x40>
40007e18: 01 00 00 00 nop
uintptr_t free_size = free_chunk->size;
40007e1c: f4 07 60 1c ld [ %i5 + 0x1c ], %i2
if (free_size > aligned_size) {
40007e20: 80 a6 80 1b cmp %i2, %i3
40007e24: 28 80 00 14 bleu,a 40007e74 <rtems_rbheap_allocate+0xdc>
40007e28: c4 07 40 00 ld [ %i5 ], %g2
rtems_rbheap_chunk *new_chunk = get_chunk(control);
40007e2c: 7f ff ff 80 call 40007c2c <get_chunk>
40007e30: 90 10 00 18 mov %i0, %o0
if (new_chunk != NULL) {
40007e34: b8 92 20 00 orcc %o0, 0, %i4
40007e38: 02 bf ff e8 be 40007dd8 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
40007e3c: b4 26 80 1b sub %i2, %i3, %i2
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
40007e40: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
40007e44: f4 27 60 1c st %i2, [ %i5 + 0x1c ]
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
40007e48: f6 27 20 1c st %i3, [ %i4 + 0x1c ]
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
40007e4c: b4 06 80 01 add %i2, %g1, %i2
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
40007e50: c0 27 20 04 clr [ %i4 + 4 ]
40007e54: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
40007e58: c0 27 00 00 clr [ %i4 ]
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
40007e5c: 90 06 20 18 add %i0, 0x18, %o0
40007e60: 40 00 06 8e call 40009898 <_RBTree_Insert_unprotected>
40007e64: 92 07 20 08 add %i4, 8, %o1
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
40007e68: f0 07 20 18 ld [ %i4 + 0x18 ], %i0
40007e6c: 81 c7 e0 08 ret
40007e70: 81 e8 00 00 restore
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
40007e74: c2 07 60 04 ld [ %i5 + 4 ], %g1
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
40007e78: f0 07 60 18 ld [ %i5 + 0x18 ], %i0
next->previous = previous;
40007e7c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
40007e80: c4 20 40 00 st %g2, [ %g1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
40007e84: c0 27 60 04 clr [ %i5 + 4 ]
40007e88: c0 27 40 00 clr [ %i5 ]
}
}
}
return ptr;
}
40007e8c: 81 c7 e0 08 ret
40007e90: 81 e8 00 00 restore
40007fc4 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
40007fc4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
40007fc8: 7f ff ee 0b call 400037f4 <malloc> <== NOT EXECUTED
40007fcc: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
if (chunk != NULL) {
40007fd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
40007fd4: 02 80 00 07 be 40007ff0 <rtems_rbheap_extend_descriptors_with_malloc+0x2c><== NOT EXECUTED
40007fd8: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
40007fdc: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
40007fe0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
after_node->next = the_node;
40007fe4: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED
the_node->next = before_node;
40007fe8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
before_node->previous = the_node;
40007fec: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED
40007ff0: 81 c7 e0 08 ret <== NOT EXECUTED
40007ff4: 81 e8 00 00 restore <== NOT EXECUTED
40007e94 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
40007e94: 9d e3 bf 80 save %sp, -128, %sp
40007e98: b6 10 00 18 mov %i0, %i3
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
40007e9c: 80 a6 60 00 cmp %i1, 0
40007ea0: 02 80 00 45 be 40007fb4 <rtems_rbheap_free+0x120>
40007ea4: b0 10 20 00 clr %i0
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
40007ea8: 90 07 bf e0 add %fp, -32, %o0
40007eac: 92 10 20 00 clr %o1
40007eb0: 94 10 20 20 mov 0x20, %o2
40007eb4: 40 00 1d bf call 4000f5b0 <memset>
40007eb8: b4 06 e0 18 add %i3, 0x18, %i2
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
40007ebc: ba 10 20 00 clr %i5
40007ec0: f2 27 bf f8 st %i1, [ %fp + -8 ]
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
40007ec4: 10 80 00 12 b 40007f0c <rtems_rbheap_free+0x78>
40007ec8: f8 06 e0 1c ld [ %i3 + 0x1c ], %i4
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
40007ecc: 90 07 bf e8 add %fp, -24, %o0
40007ed0: 9f c0 40 00 call %g1
40007ed4: 92 10 00 1c mov %i4, %o1
if ( _RBTree_Is_equal( compare_result ) ) {
40007ed8: 80 a2 20 00 cmp %o0, 0
40007edc: 12 80 00 07 bne 40007ef8 <rtems_rbheap_free+0x64>
40007ee0: 83 3a 20 1f sra %o0, 0x1f, %g1
found = iter_node;
if ( the_rbtree->is_unique )
40007ee4: c2 0e a0 14 ldub [ %i2 + 0x14 ], %g1
40007ee8: 80 a0 60 00 cmp %g1, 0
40007eec: 12 80 00 0c bne 40007f1c <rtems_rbheap_free+0x88> <== ALWAYS TAKEN
40007ef0: ba 10 00 1c mov %i4, %i5
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
40007ef4: 83 3a 20 1f sra %o0, 0x1f, %g1 <== NOT EXECUTED
40007ef8: 90 20 40 08 sub %g1, %o0, %o0
40007efc: 91 32 20 1f srl %o0, 0x1f, %o0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
40007f00: 91 2a 20 02 sll %o0, 2, %o0
40007f04: b8 07 00 08 add %i4, %o0, %i4
40007f08: f8 07 20 04 ld [ %i4 + 4 ], %i4
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
40007f0c: 80 a7 20 00 cmp %i4, 0
40007f10: 32 bf ff ef bne,a 40007ecc <rtems_rbheap_free+0x38>
40007f14: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
40007f18: b8 10 00 1d mov %i5, %i4
return rtems_rbheap_chunk_of_node(
40007f1c: ba 07 3f f8 add %i4, -8, %i5
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
40007f20: 80 a7 7f f8 cmp %i5, -8
40007f24: 02 80 00 24 be 40007fb4 <rtems_rbheap_free+0x120>
40007f28: 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);
40007f2c: c4 07 3f f8 ld [ %i4 + -8 ], %g2
40007f30: 80 a0 a0 00 cmp %g2, 0
40007f34: 12 80 00 05 bne 40007f48 <rtems_rbheap_free+0xb4>
40007f38: 82 10 20 00 clr %g1
40007f3c: c2 07 60 04 ld [ %i5 + 4 ], %g1
40007f40: 80 a0 00 01 cmp %g0, %g1
40007f44: 82 60 3f ff subx %g0, -1, %g1
if (!rtems_rbheap_is_chunk_free(chunk)) {
40007f48: 80 a0 60 00 cmp %g1, 0
40007f4c: 02 80 00 1a be 40007fb4 <rtems_rbheap_free+0x120>
40007f50: b0 10 20 0e mov 0xe, %i0
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
40007f54: b8 07 60 08 add %i5, 8, %i4
40007f58: 92 10 20 00 clr %o1
40007f5c: 40 00 06 f4 call 40009b2c <_RBTree_Next_unprotected>
40007f60: 90 10 00 1c mov %i4, %o0
40007f64: 92 10 20 01 mov 1, %o1
40007f68: b2 10 00 08 mov %o0, %i1
40007f6c: 40 00 06 f0 call 40009b2c <_RBTree_Next_unprotected>
40007f70: 90 10 00 1c mov %i4, %o0
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
40007f74: 92 10 00 1a mov %i2, %o1
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
40007f78: 96 02 3f f8 add %o0, -8, %o3
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
40007f7c: 94 10 00 1d mov %i5, %o2
40007f80: 7f ff ff 02 call 40007b88 <check_and_merge>
40007f84: 90 10 00 1b mov %i3, %o0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
40007f88: c2 06 c0 00 ld [ %i3 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
40007f8c: f6 27 60 04 st %i3, [ %i5 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
40007f90: fa 26 c0 00 st %i5, [ %i3 ]
the_node->next = before_node;
40007f94: c2 27 40 00 st %g1, [ %i5 ]
before_node->previous = the_node;
40007f98: fa 20 60 04 st %i5, [ %g1 + 4 ]
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
40007f9c: 90 10 00 1b mov %i3, %o0
40007fa0: 92 10 00 1a mov %i2, %o1
40007fa4: 94 10 00 1d mov %i5, %o2
40007fa8: 96 06 7f f8 add %i1, -8, %o3
40007fac: 7f ff fe f7 call 40007b88 <check_and_merge>
40007fb0: b0 10 20 00 clr %i0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
40007fb4: 81 c7 e0 08 ret
40007fb8: 81 e8 00 00 restore
40017148 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
40017148: 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 )
4001714c: 80 a6 60 00 cmp %i1, 0
40017150: 02 80 00 35 be 40017224 <rtems_signal_send+0xdc>
40017154: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
40017158: 90 10 00 18 mov %i0, %o0
4001715c: 40 00 12 40 call 4001ba5c <_Thread_Get>
40017160: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40017164: c2 07 bf fc ld [ %fp + -4 ], %g1
40017168: 80 a0 60 00 cmp %g1, 0
4001716c: 12 80 00 2d bne 40017220 <rtems_signal_send+0xd8>
40017170: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
40017174: fa 02 21 4c ld [ %o0 + 0x14c ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
40017178: c2 07 60 0c ld [ %i5 + 0xc ], %g1
4001717c: 80 a0 60 00 cmp %g1, 0
40017180: 02 80 00 24 be 40017210 <rtems_signal_send+0xc8>
40017184: 01 00 00 00 nop
if ( asr->is_enabled ) {
40017188: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
4001718c: 80 a0 60 00 cmp %g1, 0
40017190: 02 80 00 15 be 400171e4 <rtems_signal_send+0x9c>
40017194: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
40017198: 7f ff e4 1f call 40010214 <sparc_disable_interrupts>
4001719c: 01 00 00 00 nop
*signal_set |= signals;
400171a0: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
400171a4: b2 10 40 19 or %g1, %i1, %i1
400171a8: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
400171ac: 7f ff e4 1e call 40010224 <sparc_enable_interrupts>
400171b0: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
400171b4: 03 10 00 f0 sethi %hi(0x4003c000), %g1
400171b8: 82 10 60 e0 or %g1, 0xe0, %g1 ! 4003c0e0 <_Per_CPU_Information>
400171bc: c4 00 60 08 ld [ %g1 + 8 ], %g2
400171c0: 80 a0 a0 00 cmp %g2, 0
400171c4: 02 80 00 0f be 40017200 <rtems_signal_send+0xb8>
400171c8: 01 00 00 00 nop
400171cc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
400171d0: 80 a7 00 02 cmp %i4, %g2
400171d4: 12 80 00 0b bne 40017200 <rtems_signal_send+0xb8> <== NEVER TAKEN
400171d8: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
400171dc: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
400171e0: 30 80 00 08 b,a 40017200 <rtems_signal_send+0xb8>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
400171e4: 7f ff e4 0c call 40010214 <sparc_disable_interrupts>
400171e8: 01 00 00 00 nop
*signal_set |= signals;
400171ec: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
400171f0: b2 10 40 19 or %g1, %i1, %i1
400171f4: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
400171f8: 7f ff e4 0b call 40010224 <sparc_enable_interrupts>
400171fc: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
40017200: 40 00 12 0b call 4001ba2c <_Thread_Enable_dispatch>
40017204: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
40017208: 10 80 00 07 b 40017224 <rtems_signal_send+0xdc>
4001720c: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
_Thread_Enable_dispatch();
40017210: 40 00 12 07 call 4001ba2c <_Thread_Enable_dispatch>
40017214: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
40017218: 10 80 00 03 b 40017224 <rtems_signal_send+0xdc>
4001721c: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
40017220: 82 10 20 04 mov 4, %g1
}
40017224: 81 c7 e0 08 ret
40017228: 91 e8 00 01 restore %g0, %g1, %o0
4000fd54 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4000fd54: 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 )
4000fd58: 80 a6 a0 00 cmp %i2, 0
4000fd5c: 02 80 00 5a be 4000fec4 <rtems_task_mode+0x170>
4000fd60: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4000fd64: 03 10 00 65 sethi %hi(0x40019400), %g1
4000fd68: f8 00 61 40 ld [ %g1 + 0x140 ], %i4 ! 40019540 <_Per_CPU_Information+0x10>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000fd6c: c2 0f 20 70 ldub [ %i4 + 0x70 ], %g1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4000fd70: fa 07 21 4c ld [ %i4 + 0x14c ], %i5
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000fd74: 80 a0 00 01 cmp %g0, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000fd78: c2 07 20 78 ld [ %i4 + 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;
4000fd7c: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000fd80: 80 a0 60 00 cmp %g1, 0
4000fd84: 02 80 00 03 be 4000fd90 <rtems_task_mode+0x3c>
4000fd88: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4000fd8c: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4000fd90: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
4000fd94: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
4000fd98: 7f ff ef 40 call 4000ba98 <_CPU_ISR_Get_level>
4000fd9c: a0 60 3f ff subx %g0, -1, %l0
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;
4000fda0: a1 2c 20 0a sll %l0, 0xa, %l0
4000fda4: 90 14 00 08 or %l0, %o0, %o0
old_mode |= _ISR_Get_level();
4000fda8: b6 12 00 1b or %o0, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4000fdac: 80 8e 61 00 btst 0x100, %i1
4000fdb0: 02 80 00 06 be 4000fdc8 <rtems_task_mode+0x74>
4000fdb4: 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;
4000fdb8: 83 36 20 08 srl %i0, 8, %g1
4000fdbc: 82 18 60 01 xor %g1, 1, %g1
4000fdc0: 82 08 60 01 and %g1, 1, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4000fdc4: c2 2f 20 70 stb %g1, [ %i4 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
4000fdc8: 80 8e 62 00 btst 0x200, %i1
4000fdcc: 02 80 00 0b be 4000fdf8 <rtems_task_mode+0xa4>
4000fdd0: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
4000fdd4: 80 8e 22 00 btst 0x200, %i0
4000fdd8: 22 80 00 07 be,a 4000fdf4 <rtems_task_mode+0xa0>
4000fddc: c0 27 20 78 clr [ %i4 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4000fde0: 82 10 20 01 mov 1, %g1
4000fde4: c2 27 20 78 st %g1, [ %i4 + 0x78 ]
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4000fde8: 03 10 00 64 sethi %hi(0x40019000), %g1
4000fdec: c2 00 62 90 ld [ %g1 + 0x290 ], %g1 ! 40019290 <_Thread_Ticks_per_timeslice>
4000fdf0: c2 27 20 74 st %g1, [ %i4 + 0x74 ]
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4000fdf4: 80 8e 60 0f btst 0xf, %i1
4000fdf8: 02 80 00 06 be 4000fe10 <rtems_task_mode+0xbc>
4000fdfc: 80 8e 64 00 btst 0x400, %i1
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4000fe00: 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 ) );
4000fe04: 7f ff ca e0 call 40002984 <sparc_enable_interrupts>
4000fe08: 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 ) {
4000fe0c: 80 8e 64 00 btst 0x400, %i1
4000fe10: 02 80 00 14 be 4000fe60 <rtems_task_mode+0x10c>
4000fe14: 88 10 20 00 clr %g4
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4000fe18: c2 0f 60 08 ldub [ %i5 + 8 ], %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;
4000fe1c: b1 36 20 0a srl %i0, 0xa, %i0
4000fe20: b0 1e 20 01 xor %i0, 1, %i0
4000fe24: b0 0e 20 01 and %i0, 1, %i0
if ( is_asr_enabled != asr->is_enabled ) {
4000fe28: 80 a6 00 01 cmp %i0, %g1
4000fe2c: 22 80 00 0e be,a 4000fe64 <rtems_task_mode+0x110>
4000fe30: 03 10 00 65 sethi %hi(0x40019400), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4000fe34: 7f ff ca d0 call 40002974 <sparc_disable_interrupts>
4000fe38: f0 2f 60 08 stb %i0, [ %i5 + 8 ]
_signals = information->signals_pending;
4000fe3c: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
4000fe40: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
information->signals_posted = _signals;
4000fe44: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
4000fe48: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
4000fe4c: 7f ff ca ce call 40002984 <sparc_enable_interrupts>
4000fe50: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
4000fe54: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
4000fe58: 80 a0 00 01 cmp %g0, %g1
4000fe5c: 88 40 20 00 addx %g0, 0, %g4
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4000fe60: 03 10 00 65 sethi %hi(0x40019400), %g1
4000fe64: c4 00 61 2c ld [ %g1 + 0x12c ], %g2 ! 4001952c <_System_state_Current>
4000fe68: 80 a0 a0 03 cmp %g2, 3
4000fe6c: 12 80 00 16 bne 4000fec4 <rtems_task_mode+0x170>
4000fe70: 82 10 20 00 clr %g1
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4000fe74: 07 10 00 65 sethi %hi(0x40019400), %g3
if ( are_signals_pending ||
4000fe78: 80 89 20 ff btst 0xff, %g4
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4000fe7c: 86 10 e1 30 or %g3, 0x130, %g3
if ( are_signals_pending ||
4000fe80: 12 80 00 0a bne 4000fea8 <rtems_task_mode+0x154>
4000fe84: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
4000fe88: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
4000fe8c: 80 a0 80 03 cmp %g2, %g3
4000fe90: 02 80 00 0d be 4000fec4 <rtems_task_mode+0x170>
4000fe94: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4000fe98: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
4000fe9c: 80 a0 a0 00 cmp %g2, 0
4000fea0: 02 80 00 09 be 4000fec4 <rtems_task_mode+0x170> <== NEVER TAKEN
4000fea4: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
4000fea8: 84 10 20 01 mov 1, %g2 ! 1 <PROM_START+0x1>
4000feac: 03 10 00 65 sethi %hi(0x40019400), %g1
4000feb0: 82 10 61 30 or %g1, 0x130, %g1 ! 40019530 <_Per_CPU_Information>
4000feb4: c4 28 60 0c stb %g2, [ %g1 + 0xc ]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4000feb8: 40 00 02 67 call 40010854 <_Thread_Dispatch>
4000febc: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
4000fec0: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
4000fec4: 81 c7 e0 08 ret
4000fec8: 91 e8 00 01 restore %g0, %g1, %o0
4000b4d0 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4000b4d0: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4000b4d4: 80 a6 60 00 cmp %i1, 0
4000b4d8: 02 80 00 08 be 4000b4f8 <rtems_task_set_priority+0x28>
4000b4dc: 80 a6 a0 00 cmp %i2, 0
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 ) );
4000b4e0: 03 10 00 62 sethi %hi(0x40018800), %g1
4000b4e4: c4 08 61 ac ldub [ %g1 + 0x1ac ], %g2 ! 400189ac <rtems_maximum_priority>
4000b4e8: 80 a6 40 02 cmp %i1, %g2
4000b4ec: 18 80 00 1e bgu 4000b564 <rtems_task_set_priority+0x94>
4000b4f0: 82 10 20 13 mov 0x13, %g1
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4000b4f4: 80 a6 a0 00 cmp %i2, 0
4000b4f8: 02 80 00 1b be 4000b564 <rtems_task_set_priority+0x94>
4000b4fc: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4000b500: 90 10 00 18 mov %i0, %o0
4000b504: 40 00 09 55 call 4000da58 <_Thread_Get>
4000b508: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
4000b50c: c2 07 bf fc ld [ %fp + -4 ], %g1
4000b510: 80 a0 60 00 cmp %g1, 0
4000b514: 12 80 00 14 bne 4000b564 <rtems_task_set_priority+0x94>
4000b518: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4000b51c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4000b520: 80 a6 60 00 cmp %i1, 0
4000b524: 02 80 00 0d be 4000b558 <rtems_task_set_priority+0x88>
4000b528: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
4000b52c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
4000b530: 80 a0 60 00 cmp %g1, 0
4000b534: 02 80 00 06 be 4000b54c <rtems_task_set_priority+0x7c>
4000b538: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
4000b53c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
4000b540: 80 a0 40 19 cmp %g1, %i1
4000b544: 08 80 00 05 bleu 4000b558 <rtems_task_set_priority+0x88> <== ALWAYS TAKEN
4000b548: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
4000b54c: 92 10 00 19 mov %i1, %o1
4000b550: 40 00 08 1c call 4000d5c0 <_Thread_Change_priority>
4000b554: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
4000b558: 40 00 09 34 call 4000da28 <_Thread_Enable_dispatch>
4000b55c: 01 00 00 00 nop
4000b560: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4000b564: 81 c7 e0 08 ret
4000b568: 91 e8 00 01 restore %g0, %g1, %o0
40017bd0 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
40017bd0: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
40017bd4: 11 10 00 f0 sethi %hi(0x4003c000), %o0
40017bd8: 92 10 00 18 mov %i0, %o1
40017bdc: 90 12 21 88 or %o0, 0x188, %o0
40017be0: 40 00 0b f3 call 4001abac <_Objects_Get>
40017be4: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
40017be8: c2 07 bf fc ld [ %fp + -4 ], %g1
40017bec: 80 a0 60 00 cmp %g1, 0
40017bf0: 12 80 00 0c bne 40017c20 <rtems_timer_cancel+0x50>
40017bf4: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
40017bf8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
40017bfc: 80 a0 60 04 cmp %g1, 4
40017c00: 02 80 00 04 be 40017c10 <rtems_timer_cancel+0x40> <== NEVER TAKEN
40017c04: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
40017c08: 40 00 13 51 call 4001c94c <_Watchdog_Remove>
40017c0c: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
40017c10: 40 00 0f 87 call 4001ba2c <_Thread_Enable_dispatch>
40017c14: b0 10 20 00 clr %i0
40017c18: 81 c7 e0 08 ret
40017c1c: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40017c20: 81 c7 e0 08 ret
40017c24: 91 e8 20 04 restore %g0, 4, %o0
400180e0 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
400180e0: 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;
400180e4: 03 10 00 f0 sethi %hi(0x4003c000), %g1
400180e8: f8 00 61 c8 ld [ %g1 + 0x1c8 ], %i4 ! 4003c1c8 <_Timer_server>
if ( !timer_server )
400180ec: 80 a7 20 00 cmp %i4, 0
400180f0: 02 80 00 3c be 400181e0 <rtems_timer_server_fire_when+0x100>
400180f4: 82 10 20 0e mov 0xe, %g1
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
400180f8: 21 10 00 ef sethi %hi(0x4003bc00), %l0
400180fc: 82 14 22 18 or %l0, 0x218, %g1 ! 4003be18 <_TOD>
40018100: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
40018104: 80 a0 a0 00 cmp %g2, 0
40018108: 02 80 00 36 be 400181e0 <rtems_timer_server_fire_when+0x100><== NEVER TAKEN
4001810c: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( !routine )
40018110: 80 a6 a0 00 cmp %i2, 0
40018114: 02 80 00 33 be 400181e0 <rtems_timer_server_fire_when+0x100>
40018118: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
4001811c: 7f ff f3 7f call 40014f18 <_TOD_Validate>
40018120: 90 10 00 19 mov %i1, %o0
40018124: 80 8a 20 ff btst 0xff, %o0
40018128: 02 80 00 2e be 400181e0 <rtems_timer_server_fire_when+0x100>
4001812c: 82 10 20 14 mov 0x14, %g1
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
40018130: 7f ff f3 40 call 40014e30 <_TOD_To_seconds>
40018134: 90 10 00 19 mov %i1, %o0
40018138: b2 10 00 08 mov %o0, %i1
4001813c: d0 1c 22 18 ldd [ %l0 + 0x218 ], %o0
40018140: 94 10 20 00 clr %o2
40018144: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
40018148: 40 00 4c 1d call 4002b1bc <__divdi3>
4001814c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_SIZE+0x3b5aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
40018150: 80 a6 40 09 cmp %i1, %o1
40018154: 08 80 00 23 bleu 400181e0 <rtems_timer_server_fire_when+0x100>
40018158: 82 10 20 14 mov 0x14, %g1
4001815c: 11 10 00 f0 sethi %hi(0x4003c000), %o0
40018160: 92 10 00 18 mov %i0, %o1
40018164: 90 12 21 88 or %o0, 0x188, %o0
40018168: 40 00 0a 91 call 4001abac <_Objects_Get>
4001816c: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
40018170: c2 07 bf fc ld [ %fp + -4 ], %g1
40018174: 80 a0 60 00 cmp %g1, 0
40018178: 12 80 00 19 bne 400181dc <rtems_timer_server_fire_when+0xfc>
4001817c: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
40018180: 40 00 11 f3 call 4001c94c <_Watchdog_Remove>
40018184: 90 02 20 10 add %o0, 0x10, %o0
40018188: d0 1c 22 18 ldd [ %l0 + 0x218 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
4001818c: 82 10 20 03 mov 3, %g1
40018190: 94 10 20 00 clr %o2
40018194: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40018198: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
4001819c: f4 27 60 2c st %i2, [ %i5 + 0x2c ]
the_watchdog->id = id;
400181a0: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
400181a4: f6 27 60 34 st %i3, [ %i5 + 0x34 ]
400181a8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
400181ac: 40 00 4c 04 call 4002b1bc <__divdi3>
400181b0: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_SIZE+0x3b5aca00>
_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 );
400181b4: c2 07 20 04 ld [ %i4 + 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();
400181b8: 92 26 40 09 sub %i1, %o1, %o1
(*timer_server->schedule_operation)( timer_server, the_timer );
400181bc: 90 10 00 1c mov %i4, %o0
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();
400181c0: d2 27 60 1c st %o1, [ %i5 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
400181c4: 9f c0 40 00 call %g1
400181c8: 92 10 00 1d mov %i5, %o1
_Thread_Enable_dispatch();
400181cc: 40 00 0e 18 call 4001ba2c <_Thread_Enable_dispatch>
400181d0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
400181d4: 10 80 00 03 b 400181e0 <rtems_timer_server_fire_when+0x100>
400181d8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
400181dc: 82 10 20 04 mov 4, %g1
}
400181e0: 81 c7 e0 08 ret
400181e4: 91 e8 00 01 restore %g0, %g1, %o0