RTEMS 4.10Annotated Report
Thu May 27 18:10:54 2010
40015afc <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
40015afc: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
40015b00: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
40015b04: a0 10 00 18 mov %i0, %l0
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
40015b08: 80 a6 80 01 cmp %i2, %g1
40015b0c: 18 80 00 17 bgu 40015b68 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
40015b10: b0 10 20 01 mov 1, %i0
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
40015b14: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
40015b18: 80 a0 60 00 cmp %g1, 0
40015b1c: 02 80 00 0a be 40015b44 <_CORE_message_queue_Broadcast+0x48>
40015b20: a2 10 20 00 clr %l1
*count = 0;
40015b24: c0 27 40 00 clr [ %i5 ]
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
40015b28: 81 c7 e0 08 ret
40015b2c: 91 e8 20 00 restore %g0, 0, %o0
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
40015b30: d0 04 a0 2c ld [ %l2 + 0x2c ], %o0
40015b34: 40 00 22 0d call 4001e368 <memcpy>
40015b38: a2 04 60 01 inc %l1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
40015b3c: c2 04 a0 28 ld [ %l2 + 0x28 ], %g1
40015b40: f4 20 40 00 st %i2, [ %g1 ]
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
40015b44: 40 00 09 e6 call 400182dc <_Thread_queue_Dequeue>
40015b48: 90 10 00 10 mov %l0, %o0
40015b4c: 92 10 00 19 mov %i1, %o1
40015b50: a4 10 00 08 mov %o0, %l2
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
40015b54: 80 a2 20 00 cmp %o0, 0
40015b58: 12 bf ff f6 bne 40015b30 <_CORE_message_queue_Broadcast+0x34>
40015b5c: 94 10 00 1a mov %i2, %o2
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
40015b60: e2 27 40 00 st %l1, [ %i5 ]
40015b64: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
40015b68: 81 c7 e0 08 ret
40015b6c: 81 e8 00 00 restore
4000f64c <_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
)
{
4000f64c: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
4000f650: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
4000f654: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
4000f658: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4000f65c: 80 8e e0 03 btst 3, %i3
4000f660: 02 80 00 07 be 4000f67c <_CORE_message_queue_Initialize+0x30>
4000f664: a2 10 00 1b mov %i3, %l1
allocated_message_size += sizeof(uint32_t);
4000f668: a2 06 e0 04 add %i3, 4, %l1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4000f66c: a2 0c 7f fc and %l1, -4, %l1
}
if (allocated_message_size < maximum_message_size)
4000f670: 80 a4 40 1b cmp %l1, %i3
4000f674: 0a 80 00 23 bcs 4000f700 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN
4000f678: 01 00 00 00 nop
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
4000f67c: a0 04 60 10 add %l1, 0x10, %l0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
4000f680: 92 10 00 1a mov %i2, %o1
4000f684: 40 00 4a e1 call 40022208 <.umul>
4000f688: 90 10 00 10 mov %l0, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
4000f68c: 80 a2 00 11 cmp %o0, %l1
4000f690: 0a 80 00 1c bcs 4000f700 <_CORE_message_queue_Initialize+0xb4><== NEVER TAKEN
4000f694: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4000f698: 40 00 0b 7d call 4001248c <_Workspace_Allocate>
4000f69c: 01 00 00 00 nop
4000f6a0: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4000f6a4: 80 a2 20 00 cmp %o0, 0
4000f6a8: 02 80 00 16 be 4000f700 <_CORE_message_queue_Initialize+0xb4>
4000f6ac: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
4000f6b0: 90 06 20 60 add %i0, 0x60, %o0
4000f6b4: 94 10 00 1a mov %i2, %o2
4000f6b8: 40 00 13 56 call 40014410 <_Chain_Initialize>
4000f6bc: 96 10 00 10 mov %l0, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4000f6c0: c2 06 40 00 ld [ %i1 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4000f6c4: c0 26 20 54 clr [ %i0 + 0x54 ]
4000f6c8: 82 18 60 01 xor %g1, 1, %g1
4000f6cc: 80 a0 00 01 cmp %g0, %g1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4000f6d0: 82 06 20 54 add %i0, 0x54, %g1
4000f6d4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
4000f6d8: 82 06 20 50 add %i0, 0x50, %g1
4000f6dc: 90 10 00 18 mov %i0, %o0
4000f6e0: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
4000f6e4: 92 60 3f ff subx %g0, -1, %o1
4000f6e8: 94 10 20 80 mov 0x80, %o2
4000f6ec: 96 10 20 06 mov 6, %o3
4000f6f0: 40 00 08 5a call 40011858 <_Thread_queue_Initialize>
4000f6f4: b0 10 20 01 mov 1, %i0
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4000f6f8: 81 c7 e0 08 ret
4000f6fc: 81 e8 00 00 restore
}
4000f700: 81 c7 e0 08 ret
4000f704: 91 e8 20 00 restore %g0, 0, %o0
4000f708 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4000f708: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
4000f70c: 23 10 00 a7 sethi %hi(0x40029c00), %l1
4000f710: e0 04 62 7c ld [ %l1 + 0x27c ], %l0 ! 40029e7c <_Thread_Executing>
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
4000f714: a4 10 00 19 mov %i1, %l2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4000f718: 7f ff de d4 call 40007268 <sparc_disable_interrupts>
4000f71c: c0 24 20 34 clr [ %l0 + 0x34 ]
4000f720: 82 10 00 08 mov %o0, %g1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000f724: e6 06 20 50 ld [ %i0 + 0x50 ], %l3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4000f728: 84 06 20 54 add %i0, 0x54, %g2
4000f72c: 80 a4 c0 02 cmp %l3, %g2
4000f730: 02 80 00 15 be 4000f784 <_CORE_message_queue_Seize+0x7c>
4000f734: 86 06 20 50 add %i0, 0x50, %g3
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
4000f738: c4 04 c0 00 ld [ %l3 ], %g2
the_chain->first = new_first;
4000f73c: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
4000f740: 80 a4 e0 00 cmp %l3, 0
4000f744: 02 80 00 10 be 4000f784 <_CORE_message_queue_Seize+0x7c> <== NEVER TAKEN
4000f748: c6 20 a0 04 st %g3, [ %g2 + 4 ]
the_message_queue->number_of_pending_messages -= 1;
4000f74c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
4000f750: 82 00 7f ff add %g1, -1, %g1
4000f754: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
4000f758: 7f ff de c8 call 40007278 <sparc_enable_interrupts>
4000f75c: b0 06 20 60 add %i0, 0x60, %i0
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
4000f760: c2 04 62 7c ld [ %l1 + 0x27c ], %g1
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
4000f764: d4 04 e0 08 ld [ %l3 + 8 ], %o2
_Thread_Executing->Wait.count =
4000f768: c0 20 60 24 clr [ %g1 + 0x24 ]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
4000f76c: d4 26 c0 00 st %o2, [ %i3 ]
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
4000f770: 90 10 00 1a mov %i2, %o0
4000f774: 40 00 1e 0b call 40016fa0 <memcpy>
4000f778: 92 04 e0 0c add %l3, 0xc, %o1
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
4000f77c: 7f ff ff 83 call 4000f588 <_Chain_Append>
4000f780: 93 e8 00 13 restore %g0, %l3, %o1
return;
}
#endif
}
if ( !wait ) {
4000f784: 80 8f 20 ff btst 0xff, %i4
4000f788: 12 80 00 08 bne 4000f7a8 <_CORE_message_queue_Seize+0xa0>
4000f78c: 84 10 20 01 mov 1, %g2
_ISR_Enable( level );
4000f790: 7f ff de ba call 40007278 <sparc_enable_interrupts>
4000f794: 90 10 00 01 mov %g1, %o0
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4000f798: 82 10 20 04 mov 4, %g1
4000f79c: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
4000f7a0: 81 c7 e0 08 ret
4000f7a4: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4000f7a8: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
4000f7ac: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
4000f7b0: e4 24 20 20 st %l2, [ %l0 + 0x20 ]
executing->Wait.return_argument_second.mutable_object = buffer;
4000f7b4: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
4000f7b8: f0 24 20 44 st %i0, [ %l0 + 0x44 ]
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
4000f7bc: 90 10 00 01 mov %g1, %o0
4000f7c0: 7f ff de ae call 40007278 <sparc_enable_interrupts>
4000f7c4: 35 10 00 46 sethi %hi(0x40011800), %i2
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4000f7c8: b2 10 00 1d mov %i5, %i1
4000f7cc: 40 00 07 7e call 400115c4 <_Thread_queue_Enqueue_with_handler>
4000f7d0: 95 ee a1 24 restore %i2, 0x124, %o2
4000605c <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
4000605c: 9d e3 bf a0 save %sp, -96, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
40006060: 03 10 00 6c sethi %hi(0x4001b000), %g1
40006064: c2 00 63 80 ld [ %g1 + 0x380 ], %g1 ! 4001b380 <_Thread_Dispatch_disable_level>
40006068: 80 a0 60 00 cmp %g1, 0
4000606c: 02 80 00 0d be 400060a0 <_CORE_mutex_Seize+0x44>
40006070: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
40006074: 80 8e a0 ff btst 0xff, %i2
40006078: 02 80 00 0b be 400060a4 <_CORE_mutex_Seize+0x48> <== NEVER TAKEN
4000607c: 90 10 00 18 mov %i0, %o0
40006080: 03 10 00 6d sethi %hi(0x4001b400), %g1
40006084: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current>
40006088: 80 a0 60 01 cmp %g1, 1
4000608c: 08 80 00 05 bleu 400060a0 <_CORE_mutex_Seize+0x44>
40006090: 90 10 20 00 clr %o0
40006094: 92 10 20 00 clr %o1
40006098: 40 00 01 b4 call 40006768 <_Internal_error_Occurred>
4000609c: 94 10 20 13 mov 0x13, %o2
400060a0: 90 10 00 18 mov %i0, %o0
400060a4: 40 00 13 04 call 4000acb4 <_CORE_mutex_Seize_interrupt_trylock>
400060a8: 92 07 a0 54 add %fp, 0x54, %o1
400060ac: 80 a2 20 00 cmp %o0, 0
400060b0: 02 80 00 09 be 400060d4 <_CORE_mutex_Seize+0x78>
400060b4: 80 8e a0 ff btst 0xff, %i2
400060b8: 12 80 00 09 bne 400060dc <_CORE_mutex_Seize+0x80>
400060bc: 35 10 00 6d sethi %hi(0x4001b400), %i2
400060c0: 7f ff ee fa call 40001ca8 <sparc_enable_interrupts>
400060c4: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
400060c8: c2 06 a0 3c ld [ %i2 + 0x3c ], %g1
400060cc: 84 10 20 01 mov 1, %g2
400060d0: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
400060d4: 81 c7 e0 08 ret
400060d8: 81 e8 00 00 restore
400060dc: c4 06 a0 3c ld [ %i2 + 0x3c ], %g2
400060e0: 03 10 00 6c sethi %hi(0x4001b000), %g1
400060e4: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 ! 4001b380 <_Thread_Dispatch_disable_level>
400060e8: f2 20 a0 20 st %i1, [ %g2 + 0x20 ]
400060ec: f0 20 a0 44 st %i0, [ %g2 + 0x44 ]
400060f0: 84 00 e0 01 add %g3, 1, %g2
400060f4: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
400060f8: 82 10 20 01 mov 1, %g1
400060fc: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
40006100: 7f ff ee ea call 40001ca8 <sparc_enable_interrupts>
40006104: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
40006108: 90 10 00 18 mov %i0, %o0
4000610c: 7f ff ff bb call 40005ff8 <_CORE_mutex_Seize_interrupt_blocking>
40006110: 92 10 00 1b mov %i3, %o1
40006114: 81 c7 e0 08 ret
40006118: 81 e8 00 00 restore
4000acb4 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
4000acb4: 9d e3 bf a0 save %sp, -96, %sp
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
4000acb8: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000acbc: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing>
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4000acc0: c0 20 60 34 clr [ %g1 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4000acc4: c4 06 20 50 ld [ %i0 + 0x50 ], %g2
4000acc8: 80 a0 a0 00 cmp %g2, 0
4000accc: 22 80 00 31 be,a 4000ad90 <_CORE_mutex_Seize_interrupt_trylock+0xdc>
4000acd0: c4 06 20 5c ld [ %i0 + 0x5c ], %g2
the_mutex->lock = CORE_MUTEX_LOCKED;
4000acd4: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
4000acd8: c6 00 60 08 ld [ %g1 + 8 ], %g3
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
4000acdc: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
4000ace0: c6 26 20 60 st %g3, [ %i0 + 0x60 ]
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
4000ace4: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4000ace8: 86 10 20 01 mov 1, %g3
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4000acec: 80 a0 a0 02 cmp %g2, 2
4000acf0: 02 80 00 05 be 4000ad04 <_CORE_mutex_Seize_interrupt_trylock+0x50>
4000acf4: c6 26 20 54 st %g3, [ %i0 + 0x54 ]
4000acf8: 80 a0 a0 03 cmp %g2, 3
4000acfc: 12 80 00 07 bne 4000ad18 <_CORE_mutex_Seize_interrupt_trylock+0x64>
4000ad00: 01 00 00 00 nop
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4000ad04: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
4000ad08: 80 a0 a0 03 cmp %g2, 3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4000ad0c: 84 00 e0 01 add %g3, 1, %g2
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
4000ad10: 02 80 00 03 be 4000ad1c <_CORE_mutex_Seize_interrupt_trylock+0x68>
4000ad14: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
4000ad18: 30 80 00 2d b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118>
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
4000ad1c: c4 06 20 4c ld [ %i0 + 0x4c ], %g2
current = executing->current_priority;
4000ad20: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
if ( current == ceiling ) {
4000ad24: 80 a0 c0 02 cmp %g3, %g2
4000ad28: 12 80 00 03 bne 4000ad34 <_CORE_mutex_Seize_interrupt_trylock+0x80>
4000ad2c: 01 00 00 00 nop
_ISR_Enable( *level_p );
4000ad30: 30 80 00 27 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
}
if ( current > ceiling ) {
4000ad34: 08 80 00 0f bleu 4000ad70 <_CORE_mutex_Seize_interrupt_trylock+0xbc>
4000ad38: 84 10 20 06 mov 6, %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4000ad3c: 03 10 00 6c sethi %hi(0x4001b000), %g1
4000ad40: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level>
4000ad44: 84 00 a0 01 inc %g2
4000ad48: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
4000ad4c: 7f ff db d7 call 40001ca8 <sparc_enable_interrupts>
4000ad50: d0 06 40 00 ld [ %i1 ], %o0
_Thread_Change_priority(
4000ad54: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
4000ad58: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
4000ad5c: 7f ff f0 c1 call 40007060 <_Thread_Change_priority>
4000ad60: 94 10 20 00 clr %o2
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
4000ad64: 7f ff f2 2f call 40007620 <_Thread_Enable_dispatch>
4000ad68: b0 10 20 00 clr %i0
4000ad6c: 30 80 00 1b b,a 4000add8 <_CORE_mutex_Seize_interrupt_trylock+0x124>
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4000ad70: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4000ad74: 84 10 20 01 mov 1, %g2
the_mutex->nest_count = 0; /* undo locking above */
4000ad78: c0 26 20 54 clr [ %i0 + 0x54 ]
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4000ad7c: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
4000ad80: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
4000ad84: 84 00 bf ff add %g2, -1, %g2
4000ad88: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
_ISR_Enable( *level_p );
4000ad8c: 30 80 00 10 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118>
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
4000ad90: 80 a0 80 01 cmp %g2, %g1
4000ad94: 12 80 00 13 bne 4000ade0 <_CORE_mutex_Seize_interrupt_trylock+0x12c>
4000ad98: 01 00 00 00 nop
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4000ad9c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
4000ada0: 80 a0 60 00 cmp %g1, 0
4000ada4: 22 80 00 07 be,a 4000adc0 <_CORE_mutex_Seize_interrupt_trylock+0x10c>
4000ada8: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
4000adac: 80 a0 60 01 cmp %g1, 1
4000adb0: 12 80 00 0c bne 4000ade0 <_CORE_mutex_Seize_interrupt_trylock+0x12c><== ALWAYS TAKEN
4000adb4: 82 10 20 02 mov 2, %g1
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
4000adb8: 10 80 00 05 b 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118><== NOT EXECUTED
4000adbc: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
4000adc0: 82 00 60 01 inc %g1
4000adc4: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( *level_p );
4000adc8: 30 80 00 01 b,a 4000adcc <_CORE_mutex_Seize_interrupt_trylock+0x118>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
4000adcc: 7f ff db b7 call 40001ca8 <sparc_enable_interrupts>
4000add0: d0 06 40 00 ld [ %i1 ], %o0
4000add4: b0 10 20 00 clr %i0
4000add8: 81 c7 e0 08 ret
4000addc: 81 e8 00 00 restore
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
4000ade0: 81 c7 e0 08 ret
4000ade4: 91 e8 20 01 restore %g0, 1, %o0
400062c0 <_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
)
{
400062c0: 9d e3 bf a0 save %sp, -96, %sp
400062c4: a0 10 00 18 mov %i0, %l0
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
400062c8: b0 10 20 00 clr %i0
400062cc: 40 00 05 b9 call 400079b0 <_Thread_queue_Dequeue>
400062d0: 90 10 00 10 mov %l0, %o0
400062d4: 80 a2 20 00 cmp %o0, 0
400062d8: 12 80 00 0e bne 40006310 <_CORE_semaphore_Surrender+0x50>
400062dc: 01 00 00 00 nop
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
400062e0: 7f ff ee 6e call 40001c98 <sparc_disable_interrupts>
400062e4: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
400062e8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
400062ec: c4 04 20 40 ld [ %l0 + 0x40 ], %g2
400062f0: 80 a0 40 02 cmp %g1, %g2
400062f4: 1a 80 00 05 bcc 40006308 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
400062f8: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
400062fc: 82 00 60 01 inc %g1
40006300: b0 10 20 00 clr %i0
40006304: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
40006308: 7f ff ee 68 call 40001ca8 <sparc_enable_interrupts>
4000630c: 01 00 00 00 nop
}
return status;
}
40006310: 81 c7 e0 08 ret
40006314: 81 e8 00 00 restore
40004f58 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
40004f58: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
40004f5c: 03 10 00 6d sethi %hi(0x4001b400), %g1
40004f60: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
40004f64: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
40004f68: 7f ff f3 4c call 40001c98 <sparc_disable_interrupts>
40004f6c: e4 04 21 5c ld [ %l0 + 0x15c ], %l2
pending_events = api->pending_events;
40004f70: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
40004f74: a2 8e 00 01 andcc %i0, %g1, %l1
40004f78: 02 80 00 0e be 40004fb0 <_Event_Seize+0x58>
40004f7c: 80 8e 60 01 btst 1, %i1
40004f80: 80 a4 40 18 cmp %l1, %i0
40004f84: 02 80 00 04 be 40004f94 <_Event_Seize+0x3c>
40004f88: 80 8e 60 02 btst 2, %i1
40004f8c: 02 80 00 09 be 40004fb0 <_Event_Seize+0x58> <== NEVER TAKEN
40004f90: 80 8e 60 01 btst 1, %i1
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
40004f94: 82 28 40 11 andn %g1, %l1, %g1
40004f98: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
40004f9c: 7f ff f3 43 call 40001ca8 <sparc_enable_interrupts>
40004fa0: 01 00 00 00 nop
40004fa4: e2 26 c0 00 st %l1, [ %i3 ]
40004fa8: 81 c7 e0 08 ret
40004fac: 81 e8 00 00 restore
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
40004fb0: 22 80 00 09 be,a 40004fd4 <_Event_Seize+0x7c>
40004fb4: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
_ISR_Enable( level );
40004fb8: 7f ff f3 3c call 40001ca8 <sparc_enable_interrupts>
40004fbc: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
40004fc0: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
40004fc4: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
40004fc8: e2 26 c0 00 st %l1, [ %i3 ]
40004fcc: 81 c7 e0 08 ret
40004fd0: 81 e8 00 00 restore
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
40004fd4: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
40004fd8: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40004fdc: 84 10 20 01 mov 1, %g2
40004fe0: 03 10 00 6d sethi %hi(0x4001b400), %g1
40004fe4: c4 20 62 08 st %g2, [ %g1 + 0x208 ] ! 4001b608 <_Event_Sync_state>
_ISR_Enable( level );
40004fe8: 7f ff f3 30 call 40001ca8 <sparc_enable_interrupts>
40004fec: 01 00 00 00 nop
if ( ticks ) {
40004ff0: 80 a6 a0 00 cmp %i2, 0
40004ff4: 02 80 00 0f be 40005030 <_Event_Seize+0xd8>
40004ff8: 90 10 00 10 mov %l0, %o0
_Watchdog_Initialize(
40004ffc: c2 04 20 08 ld [ %l0 + 8 ], %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40005000: 11 10 00 6d sethi %hi(0x4001b400), %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
40005004: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40005008: 03 10 00 14 sethi %hi(0x40005000), %g1
4000500c: 82 10 62 04 or %g1, 0x204, %g1 ! 40005204 <_Event_Timeout>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40005010: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40005014: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40005018: c0 24 20 6c clr [ %l0 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4000501c: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40005020: 90 12 20 5c or %o0, 0x5c, %o0
40005024: 40 00 0d ba call 4000870c <_Watchdog_Insert>
40005028: 92 04 20 48 add %l0, 0x48, %o1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4000502c: 90 10 00 10 mov %l0, %o0
40005030: 40 00 0b c5 call 40007f44 <_Thread_Set_state>
40005034: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
40005038: 7f ff f3 18 call 40001c98 <sparc_disable_interrupts>
4000503c: 01 00 00 00 nop
sync_state = _Event_Sync_state;
40005040: 03 10 00 6d sethi %hi(0x4001b400), %g1
40005044: f0 00 62 08 ld [ %g1 + 0x208 ], %i0 ! 4001b608 <_Event_Sync_state>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
40005048: c0 20 62 08 clr [ %g1 + 0x208 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
4000504c: 80 a6 20 01 cmp %i0, 1
40005050: 12 80 00 04 bne 40005060 <_Event_Seize+0x108>
40005054: b2 10 00 10 mov %l0, %i1
_ISR_Enable( level );
40005058: 7f ff f3 14 call 40001ca8 <sparc_enable_interrupts>
4000505c: 91 e8 00 08 restore %g0, %o0, %o0
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
40005060: 40 00 07 eb call 4000700c <_Thread_blocking_operation_Cancel>
40005064: 95 e8 00 08 restore %g0, %o0, %o2
400050c4 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
400050c4: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
400050c8: e2 06 21 5c ld [ %i0 + 0x15c ], %l1
option_set = (rtems_option) the_thread->Wait.option;
400050cc: e4 06 20 30 ld [ %i0 + 0x30 ], %l2
_ISR_Disable( level );
400050d0: 7f ff f2 f2 call 40001c98 <sparc_disable_interrupts>
400050d4: a0 10 00 18 mov %i0, %l0
400050d8: b0 10 00 08 mov %o0, %i0
pending_events = api->pending_events;
400050dc: c4 04 40 00 ld [ %l1 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
400050e0: c6 04 20 24 ld [ %l0 + 0x24 ], %g3
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
400050e4: 82 88 c0 02 andcc %g3, %g2, %g1
400050e8: 12 80 00 03 bne 400050f4 <_Event_Surrender+0x30>
400050ec: 09 10 00 6d sethi %hi(0x4001b400), %g4
_ISR_Enable( level );
400050f0: 30 80 00 42 b,a 400051f8 <_Event_Surrender+0x134>
/*
* 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() &&
400050f4: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 ! 4001b418 <_ISR_Nest_level>
400050f8: 80 a1 20 00 cmp %g4, 0
400050fc: 22 80 00 1e be,a 40005174 <_Event_Surrender+0xb0>
40005100: c8 04 20 10 ld [ %l0 + 0x10 ], %g4
40005104: 09 10 00 6d sethi %hi(0x4001b400), %g4
40005108: c8 01 20 3c ld [ %g4 + 0x3c ], %g4 ! 4001b43c <_Thread_Executing>
4000510c: 80 a4 00 04 cmp %l0, %g4
40005110: 32 80 00 19 bne,a 40005174 <_Event_Surrender+0xb0>
40005114: c8 04 20 10 ld [ %l0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
40005118: 09 10 00 6d sethi %hi(0x4001b400), %g4
4000511c: da 01 22 08 ld [ %g4 + 0x208 ], %o5 ! 4001b608 <_Event_Sync_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
40005120: 80 a3 60 02 cmp %o5, 2
40005124: 02 80 00 07 be 40005140 <_Event_Surrender+0x7c> <== NEVER TAKEN
40005128: 80 a0 40 03 cmp %g1, %g3
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4000512c: c8 01 22 08 ld [ %g4 + 0x208 ], %g4
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
40005130: 80 a1 20 01 cmp %g4, 1
40005134: 32 80 00 10 bne,a 40005174 <_Event_Surrender+0xb0>
40005138: c8 04 20 10 ld [ %l0 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
4000513c: 80 a0 40 03 cmp %g1, %g3
40005140: 02 80 00 04 be 40005150 <_Event_Surrender+0x8c>
40005144: 80 8c a0 02 btst 2, %l2
40005148: 02 80 00 0a be 40005170 <_Event_Surrender+0xac> <== NEVER TAKEN
4000514c: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
40005150: 84 28 80 01 andn %g2, %g1, %g2
40005154: c4 24 40 00 st %g2, [ %l1 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40005158: c4 04 20 28 ld [ %l0 + 0x28 ], %g2
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
4000515c: c0 24 20 24 clr [ %l0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40005160: c2 20 80 00 st %g1, [ %g2 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
40005164: 84 10 20 03 mov 3, %g2
40005168: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000516c: c4 20 62 08 st %g2, [ %g1 + 0x208 ] ! 4001b608 <_Event_Sync_state>
}
_ISR_Enable( level );
40005170: 30 80 00 22 b,a 400051f8 <_Event_Surrender+0x134>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
40005174: 80 89 21 00 btst 0x100, %g4
40005178: 02 80 00 20 be 400051f8 <_Event_Surrender+0x134>
4000517c: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
40005180: 02 80 00 04 be 40005190 <_Event_Surrender+0xcc>
40005184: 80 8c a0 02 btst 2, %l2
40005188: 02 80 00 1c be 400051f8 <_Event_Surrender+0x134> <== NEVER TAKEN
4000518c: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
40005190: 84 28 80 01 andn %g2, %g1, %g2
40005194: c4 24 40 00 st %g2, [ %l1 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
40005198: c4 04 20 28 ld [ %l0 + 0x28 ], %g2
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
4000519c: c0 24 20 24 clr [ %l0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
400051a0: c2 20 80 00 st %g1, [ %g2 ]
_ISR_Flash( level );
400051a4: 7f ff f2 c1 call 40001ca8 <sparc_enable_interrupts>
400051a8: 90 10 00 18 mov %i0, %o0
400051ac: 7f ff f2 bb call 40001c98 <sparc_disable_interrupts>
400051b0: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
400051b4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1
400051b8: 80 a0 60 02 cmp %g1, 2
400051bc: 02 80 00 06 be 400051d4 <_Event_Surrender+0x110>
400051c0: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
400051c4: 7f ff f2 b9 call 40001ca8 <sparc_enable_interrupts>
400051c8: 90 10 00 18 mov %i0, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
400051cc: 10 80 00 08 b 400051ec <_Event_Surrender+0x128>
400051d0: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
400051d4: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
400051d8: 7f ff f2 b4 call 40001ca8 <sparc_enable_interrupts>
400051dc: 90 10 00 18 mov %i0, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
400051e0: 40 00 0d a8 call 40008880 <_Watchdog_Remove>
400051e4: 90 04 20 48 add %l0, 0x48, %o0
400051e8: 33 04 00 ff sethi %hi(0x1003fc00), %i1
400051ec: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
400051f0: 40 00 08 15 call 40007244 <_Thread_Clear_state>
400051f4: 91 e8 00 10 restore %g0, %l0, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
400051f8: 7f ff f2 ac call 40001ca8 <sparc_enable_interrupts>
400051fc: 81 e8 00 00 restore
40005204 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
40005204: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
40005208: 90 10 00 18 mov %i0, %o0
4000520c: 40 00 09 12 call 40007654 <_Thread_Get>
40005210: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40005214: c2 07 bf fc ld [ %fp + -4 ], %g1
40005218: 80 a0 60 00 cmp %g1, 0
4000521c: 12 80 00 1c bne 4000528c <_Event_Timeout+0x88> <== NEVER TAKEN
40005220: a0 10 00 08 mov %o0, %l0
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
40005224: 7f ff f2 9d call 40001c98 <sparc_disable_interrupts>
40005228: 01 00 00 00 nop
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
4000522c: 03 10 00 6d sethi %hi(0x4001b400), %g1
40005230: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing>
40005234: 80 a4 00 01 cmp %l0, %g1
40005238: 12 80 00 09 bne 4000525c <_Event_Timeout+0x58>
4000523c: c0 24 20 24 clr [ %l0 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
40005240: 03 10 00 6d sethi %hi(0x4001b400), %g1
40005244: c4 00 62 08 ld [ %g1 + 0x208 ], %g2 ! 4001b608 <_Event_Sync_state>
40005248: 80 a0 a0 01 cmp %g2, 1
4000524c: 32 80 00 05 bne,a 40005260 <_Event_Timeout+0x5c>
40005250: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
40005254: 84 10 20 02 mov 2, %g2
40005258: c4 20 62 08 st %g2, [ %g1 + 0x208 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
4000525c: 82 10 20 06 mov 6, %g1
40005260: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
_ISR_Enable( level );
40005264: 7f ff f2 91 call 40001ca8 <sparc_enable_interrupts>
40005268: 01 00 00 00 nop
4000526c: 90 10 00 10 mov %l0, %o0
40005270: 13 04 00 ff sethi %hi(0x1003fc00), %o1
40005274: 40 00 07 f4 call 40007244 <_Thread_Clear_state>
40005278: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4000527c: 03 10 00 6c sethi %hi(0x4001b000), %g1
40005280: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level>
40005284: 84 00 bf ff add %g2, -1, %g2
40005288: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
4000528c: 81 c7 e0 08 ret
40005290: 81 e8 00 00 restore
4000aee0 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4000aee0: 9d e3 bf 90 save %sp, -112, %sp
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
4000aee4: ac 06 60 04 add %i1, 4, %l6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4000aee8: e4 06 20 08 ld [ %i0 + 8 ], %l2
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4000aeec: 80 a5 80 19 cmp %l6, %i1
4000aef0: 0a 80 00 6d bcs 4000b0a4 <_Heap_Allocate_aligned_with_boundary+0x1c4>
4000aef4: e8 06 20 10 ld [ %i0 + 0x10 ], %l4
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4000aef8: 80 a6 e0 00 cmp %i3, 0
4000aefc: 02 80 00 08 be 4000af1c <_Heap_Allocate_aligned_with_boundary+0x3c>
4000af00: 82 10 20 04 mov 4, %g1
if ( boundary < alloc_size ) {
4000af04: 80 a6 c0 19 cmp %i3, %i1
4000af08: 0a 80 00 67 bcs 4000b0a4 <_Heap_Allocate_aligned_with_boundary+0x1c4>
4000af0c: 80 a6 a0 00 cmp %i2, 0
return NULL;
}
if ( alignment == 0 ) {
4000af10: 22 80 00 03 be,a 4000af1c <_Heap_Allocate_aligned_with_boundary+0x3c>
4000af14: b4 10 00 14 mov %l4, %i2
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000af18: 82 10 20 04 mov 4, %g1
4000af1c: 82 20 40 19 sub %g1, %i1, %g1
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4000af20: a2 10 20 00 clr %l1
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000af24: c2 27 bf f4 st %g1, [ %fp + -12 ]
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4000af28: b8 10 3f f8 mov -8, %i4
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4000af2c: 82 05 20 07 add %l4, 7, %g1
4000af30: 10 80 00 4b b 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c>
4000af34: c2 27 bf f8 st %g1, [ %fp + -8 ]
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4000af38: 80 a4 c0 16 cmp %l3, %l6
4000af3c: 08 80 00 47 bleu 4000b058 <_Heap_Allocate_aligned_with_boundary+0x178>
4000af40: a2 04 60 01 inc %l1
if ( alignment == 0 ) {
4000af44: 80 a6 a0 00 cmp %i2, 0
4000af48: 12 80 00 04 bne 4000af58 <_Heap_Allocate_aligned_with_boundary+0x78>
4000af4c: aa 04 a0 08 add %l2, 8, %l5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4000af50: 10 80 00 3f b 4000b04c <_Heap_Allocate_aligned_with_boundary+0x16c>
4000af54: a0 10 00 15 mov %l5, %l0
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000af58: c4 07 bf f4 ld [ %fp + -12 ], %g2
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4000af5c: ee 06 20 14 ld [ %i0 + 0x14 ], %l7
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4000af60: a6 0c ff fe and %l3, -2, %l3
4000af64: a6 04 80 13 add %l2, %l3, %l3
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4000af68: a0 00 80 13 add %g2, %l3, %l0
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4000af6c: c4 07 bf f8 ld [ %fp + -8 ], %g2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4000af70: 90 10 00 10 mov %l0, %o0
4000af74: 82 20 80 17 sub %g2, %l7, %g1
4000af78: 92 10 00 1a mov %i2, %o1
4000af7c: 40 00 2e f1 call 40016b40 <.urem>
4000af80: a6 00 40 13 add %g1, %l3, %l3
4000af84: a0 24 00 08 sub %l0, %o0, %l0
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4000af88: 80 a4 00 13 cmp %l0, %l3
4000af8c: 08 80 00 07 bleu 4000afa8 <_Heap_Allocate_aligned_with_boundary+0xc8>
4000af90: 80 a6 e0 00 cmp %i3, 0
4000af94: 90 10 00 13 mov %l3, %o0
4000af98: 40 00 2e ea call 40016b40 <.urem>
4000af9c: 92 10 00 1a mov %i2, %o1
4000afa0: a0 24 c0 08 sub %l3, %o0, %l0
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4000afa4: 80 a6 e0 00 cmp %i3, 0
4000afa8: 02 80 00 1d be 4000b01c <_Heap_Allocate_aligned_with_boundary+0x13c>
4000afac: 80 a4 00 15 cmp %l0, %l5
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4000afb0: a6 04 00 19 add %l0, %i1, %l3
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4000afb4: 82 05 40 19 add %l5, %i1, %g1
4000afb8: 92 10 00 1b mov %i3, %o1
4000afbc: 90 10 00 13 mov %l3, %o0
4000afc0: 10 80 00 0b b 4000afec <_Heap_Allocate_aligned_with_boundary+0x10c>
4000afc4: c2 27 bf fc st %g1, [ %fp + -4 ]
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4000afc8: 80 a0 40 02 cmp %g1, %g2
4000afcc: 2a 80 00 24 bcs,a 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c>
4000afd0: e4 04 a0 08 ld [ %l2 + 8 ], %l2
4000afd4: 40 00 2e db call 40016b40 <.urem>
4000afd8: 01 00 00 00 nop
4000afdc: 92 10 00 1b mov %i3, %o1
4000afe0: a0 27 40 08 sub %i5, %o0, %l0
return 0;
}
alloc_begin = boundary_line - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4000afe4: a6 04 00 19 add %l0, %i1, %l3
4000afe8: 90 10 00 13 mov %l3, %o0
4000afec: 40 00 2e d5 call 40016b40 <.urem>
4000aff0: 01 00 00 00 nop
4000aff4: 92 10 00 1a mov %i2, %o1
4000aff8: 82 24 c0 08 sub %l3, %o0, %g1
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
return 0;
}
alloc_begin = boundary_line - alloc_size;
4000affc: ba 20 40 19 sub %g1, %i1, %i5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4000b000: 80 a0 40 13 cmp %g1, %l3
4000b004: 1a 80 00 05 bcc 4000b018 <_Heap_Allocate_aligned_with_boundary+0x138>
4000b008: 90 10 00 1d mov %i5, %o0
4000b00c: 80 a4 00 01 cmp %l0, %g1
4000b010: 0a bf ff ee bcs 4000afc8 <_Heap_Allocate_aligned_with_boundary+0xe8>
4000b014: c4 07 bf fc ld [ %fp + -4 ], %g2
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4000b018: 80 a4 00 15 cmp %l0, %l5
4000b01c: 0a 80 00 0f bcs 4000b058 <_Heap_Allocate_aligned_with_boundary+0x178>
4000b020: a6 27 00 12 sub %i4, %l2, %l3
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4000b024: 90 10 00 10 mov %l0, %o0
4000b028: a6 04 c0 10 add %l3, %l0, %l3
4000b02c: 40 00 2e c5 call 40016b40 <.urem>
4000b030: 92 10 00 14 mov %l4, %o1
if ( free_size >= min_block_size || free_size == 0 ) {
4000b034: 90 a4 c0 08 subcc %l3, %o0, %o0
4000b038: 02 80 00 06 be 4000b050 <_Heap_Allocate_aligned_with_boundary+0x170>
4000b03c: 80 a4 20 00 cmp %l0, 0
4000b040: 80 a2 00 17 cmp %o0, %l7
4000b044: 2a 80 00 06 bcs,a 4000b05c <_Heap_Allocate_aligned_with_boundary+0x17c>
4000b048: e4 04 a0 08 ld [ %l2 + 8 ], %l2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4000b04c: 80 a4 20 00 cmp %l0, 0
4000b050: 32 80 00 08 bne,a 4000b070 <_Heap_Allocate_aligned_with_boundary+0x190><== ALWAYS TAKEN
4000b054: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
break;
}
block = block->next;
4000b058: e4 04 a0 08 ld [ %l2 + 8 ], %l2
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4000b05c: 80 a4 80 18 cmp %l2, %i0
4000b060: 32 bf ff b6 bne,a 4000af38 <_Heap_Allocate_aligned_with_boundary+0x58>
4000b064: e6 04 a0 04 ld [ %l2 + 4 ], %l3
4000b068: 10 80 00 09 b 4000b08c <_Heap_Allocate_aligned_with_boundary+0x1ac>
4000b06c: a0 10 20 00 clr %l0
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000b070: 92 10 00 12 mov %l2, %o1
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4000b074: 82 00 40 11 add %g1, %l1, %g1
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000b078: 96 10 00 19 mov %i1, %o3
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4000b07c: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4000b080: 90 10 00 18 mov %i0, %o0
4000b084: 7f ff ed 68 call 40006624 <_Heap_Block_allocate>
4000b088: 94 10 00 10 mov %l0, %o2
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4000b08c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
4000b090: 80 a0 40 11 cmp %g1, %l1
4000b094: 2a 80 00 02 bcs,a 4000b09c <_Heap_Allocate_aligned_with_boundary+0x1bc>
4000b098: e2 26 20 44 st %l1, [ %i0 + 0x44 ]
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
4000b09c: 81 c7 e0 08 ret
4000b0a0: 91 e8 00 10 restore %g0, %l0, %o0
}
4000b0a4: 81 c7 e0 08 ret
4000b0a8: 91 e8 20 00 restore %g0, 0, %o0
400104dc <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
400104dc: 9d e3 bf a0 save %sp, -96, %sp
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
400104e0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
400104e4: a0 10 00 18 mov %i0, %l0
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
400104e8: 80 a6 40 01 cmp %i1, %g1
400104ec: 1a 80 00 07 bcc 40010508 <_Heap_Extend+0x2c>
400104f0: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
400104f4: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
400104f8: 80 a6 40 02 cmp %i1, %g2
400104fc: 1a 80 00 28 bcc 4001059c <_Heap_Extend+0xc0>
40010500: b0 10 20 01 mov 1, %i0
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
40010504: 80 a6 40 01 cmp %i1, %g1
40010508: 12 80 00 25 bne 4001059c <_Heap_Extend+0xc0>
4001050c: b0 10 20 02 mov 2, %i0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
40010510: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
40010514: b4 06 40 1a add %i1, %i2, %i2
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
40010518: b2 26 80 11 sub %i2, %l1, %i1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
4001051c: f4 24 20 1c st %i2, [ %l0 + 0x1c ]
extend_size = new_heap_area_end
40010520: b2 06 7f f8 add %i1, -8, %i1
40010524: 7f ff cf 09 call 40004148 <.urem>
40010528: 90 10 00 19 mov %i1, %o0
4001052c: 90 26 40 08 sub %i1, %o0, %o0
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
40010530: d0 26 c0 00 st %o0, [ %i3 ]
if( extend_size >= heap->min_block_size ) {
40010534: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
40010538: 80 a2 00 01 cmp %o0, %g1
4001053c: 0a 80 00 18 bcs 4001059c <_Heap_Extend+0xc0> <== NEVER TAKEN
40010540: b0 10 20 00 clr %i0
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
40010544: c2 04 60 04 ld [ %l1 + 4 ], %g1
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
40010548: c4 04 20 20 ld [ %l0 + 0x20 ], %g2
4001054c: 82 08 60 01 and %g1, 1, %g1
40010550: 82 12 00 01 or %o0, %g1, %g1
40010554: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40010558: 82 02 00 11 add %o0, %l1, %g1
4001055c: 84 20 80 01 sub %g2, %g1, %g2
40010560: 84 10 a0 01 or %g2, 1, %g2
40010564: c4 20 60 04 st %g2, [ %g1 + 4 ]
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
40010568: c6 04 20 40 ld [ %l0 + 0x40 ], %g3
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
4001056c: f2 04 20 2c ld [ %l0 + 0x2c ], %i1
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
40010570: c4 04 20 50 ld [ %l0 + 0x50 ], %g2
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
40010574: c2 24 20 24 st %g1, [ %l0 + 0x24 ]
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
40010578: 82 00 e0 01 add %g3, 1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
4001057c: 90 06 40 08 add %i1, %o0, %o0
++stats->used_blocks;
40010580: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
--stats->frees; /* Do not count subsequent call as actual free() */
40010584: 82 00 bf ff add %g2, -1, %g1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
40010588: d0 24 20 2c st %o0, [ %l0 + 0x2c ]
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
4001058c: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
40010590: 90 10 00 10 mov %l0, %o0
40010594: 7f ff ea fa call 4000b17c <_Heap_Free>
40010598: 92 04 60 08 add %l1, 8, %o1
}
return HEAP_EXTEND_SUCCESSFUL;
}
4001059c: 81 c7 e0 08 ret
400105a0: 81 e8 00 00 restore
4000b0ac <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4000b0ac: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4000b0b0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
4000b0b4: 40 00 2e a3 call 40016b40 <.urem>
4000b0b8: 90 10 00 19 mov %i1, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4000b0bc: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4000b0c0: b2 06 7f f8 add %i1, -8, %i1
4000b0c4: 90 26 40 08 sub %i1, %o0, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000b0c8: 80 a2 00 01 cmp %o0, %g1
4000b0cc: 0a 80 00 05 bcs 4000b0e0 <_Heap_Free+0x34>
4000b0d0: 84 10 20 00 clr %g2
4000b0d4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
4000b0d8: 80 a0 80 08 cmp %g2, %o0
4000b0dc: 84 60 3f ff subx %g0, -1, %g2
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
4000b0e0: 80 a0 a0 00 cmp %g2, 0
4000b0e4: 02 80 00 6a be 4000b28c <_Heap_Free+0x1e0>
4000b0e8: 01 00 00 00 nop
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4000b0ec: c8 02 20 04 ld [ %o0 + 4 ], %g4
4000b0f0: 86 09 3f fe and %g4, -2, %g3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000b0f4: 84 02 00 03 add %o0, %g3, %g2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4000b0f8: 80 a0 80 01 cmp %g2, %g1
4000b0fc: 0a 80 00 05 bcs 4000b110 <_Heap_Free+0x64> <== NEVER TAKEN
4000b100: 9a 10 20 00 clr %o5
4000b104: da 06 20 24 ld [ %i0 + 0x24 ], %o5
4000b108: 80 a3 40 02 cmp %o5, %g2
4000b10c: 9a 60 3f ff subx %g0, -1, %o5
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
4000b110: 80 a3 60 00 cmp %o5, 0
4000b114: 02 80 00 5e be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN
4000b118: 01 00 00 00 nop
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4000b11c: da 00 a0 04 ld [ %g2 + 4 ], %o5
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4000b120: 80 8b 60 01 btst 1, %o5
4000b124: 02 80 00 5a be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN
4000b128: 9a 0b 7f fe and %o5, -2, %o5
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4000b12c: d2 06 20 24 ld [ %i0 + 0x24 ], %o1
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4000b130: 80 a0 80 09 cmp %g2, %o1
4000b134: 02 80 00 06 be 4000b14c <_Heap_Free+0xa0>
4000b138: 96 10 20 00 clr %o3
4000b13c: 98 00 80 0d add %g2, %o5, %o4
4000b140: d6 03 20 04 ld [ %o4 + 4 ], %o3
4000b144: 96 0a e0 01 and %o3, 1, %o3
4000b148: 96 1a e0 01 xor %o3, 1, %o3
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4000b14c: 80 89 20 01 btst 1, %g4
4000b150: 12 80 00 26 bne 4000b1e8 <_Heap_Free+0x13c>
4000b154: 80 a2 e0 00 cmp %o3, 0
uintptr_t const prev_size = block->prev_size;
4000b158: d8 02 00 00 ld [ %o0 ], %o4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4000b15c: 88 22 00 0c sub %o0, %o4, %g4
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
4000b160: 80 a1 00 01 cmp %g4, %g1
4000b164: 0a 80 00 04 bcs 4000b174 <_Heap_Free+0xc8> <== NEVER TAKEN
4000b168: 94 10 20 00 clr %o2
4000b16c: 80 a2 40 04 cmp %o1, %g4
4000b170: 94 60 3f ff subx %g0, -1, %o2
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
4000b174: 80 a2 a0 00 cmp %o2, 0
4000b178: 02 80 00 45 be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN
4000b17c: 01 00 00 00 nop
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
4000b180: c2 01 20 04 ld [ %g4 + 4 ], %g1
4000b184: 80 88 60 01 btst 1, %g1
4000b188: 02 80 00 41 be 4000b28c <_Heap_Free+0x1e0> <== NEVER TAKEN
4000b18c: 80 a2 e0 00 cmp %o3, 0
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4000b190: 22 80 00 0f be,a 4000b1cc <_Heap_Free+0x120>
4000b194: 98 00 c0 0c add %g3, %o4, %o4
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4000b198: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4000b19c: d6 00 a0 0c ld [ %g2 + 0xc ], %o3
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4000b1a0: c4 00 a0 08 ld [ %g2 + 8 ], %g2
4000b1a4: 82 00 7f ff add %g1, -1, %g1
4000b1a8: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4000b1ac: 9a 00 c0 0d add %g3, %o5, %o5
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4000b1b0: d6 20 a0 0c st %o3, [ %g2 + 0xc ]
4000b1b4: 98 03 40 0c add %o5, %o4, %o4
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4000b1b8: c4 22 e0 08 st %g2, [ %o3 + 8 ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4000b1bc: d8 21 00 0c st %o4, [ %g4 + %o4 ]
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;
4000b1c0: 98 13 20 01 or %o4, 1, %o4
4000b1c4: 10 80 00 27 b 4000b260 <_Heap_Free+0x1b4>
4000b1c8: d8 21 20 04 st %o4, [ %g4 + 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;
4000b1cc: 82 13 20 01 or %o4, 1, %g1
4000b1d0: c2 21 20 04 st %g1, [ %g4 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000b1d4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
next_block->prev_size = size;
4000b1d8: d8 22 00 03 st %o4, [ %o0 + %g3 ]
_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;
4000b1dc: 82 08 7f fe and %g1, -2, %g1
4000b1e0: 10 80 00 20 b 4000b260 <_Heap_Free+0x1b4>
4000b1e4: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4000b1e8: 02 80 00 0d be 4000b21c <_Heap_Free+0x170>
4000b1ec: 82 10 e0 01 or %g3, 1, %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4000b1f0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4000b1f4: c4 00 a0 08 ld [ %g2 + 8 ], %g2
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4000b1f8: c2 22 20 0c st %g1, [ %o0 + 0xc ]
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4000b1fc: c4 22 20 08 st %g2, [ %o0 + 8 ]
new_block->prev = prev;
next->prev = new_block;
prev->next = new_block;
4000b200: 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;
4000b204: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
uintptr_t const size = block_size + next_block_size;
4000b208: 82 03 40 03 add %o5, %g3, %g1
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4000b20c: c2 22 00 01 st %g1, [ %o0 + %g1 ]
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;
4000b210: 82 10 60 01 or %g1, 1, %g1
4000b214: 10 80 00 13 b 4000b260 <_Heap_Free+0x1b4>
4000b218: c2 22 20 04 st %g1, [ %o0 + 4 ]
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;
4000b21c: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4000b220: c2 00 a0 04 ld [ %g2 + 4 ], %g1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4000b224: c8 06 20 08 ld [ %i0 + 8 ], %g4
4000b228: 82 08 7f fe and %g1, -2, %g1
next_block->prev_size = block_size;
4000b22c: c6 22 00 03 st %g3, [ %o0 + %g3 ]
} 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;
4000b230: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4000b234: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
new_block->next = next;
4000b238: c8 22 20 08 st %g4, [ %o0 + 8 ]
new_block->prev = block_before;
4000b23c: f0 22 20 0c st %i0, [ %o0 + 0xc ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4000b240: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4000b244: 82 00 60 01 inc %g1
block_before->next = new_block;
next->prev = new_block;
4000b248: d0 21 20 0c st %o0, [ %g4 + 0xc ]
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4000b24c: d0 26 20 08 st %o0, [ %i0 + 8 ]
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4000b250: 80 a0 80 01 cmp %g2, %g1
4000b254: 1a 80 00 03 bcc 4000b260 <_Heap_Free+0x1b4>
4000b258: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
4000b25c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
}
/* Statistics */
--stats->used_blocks;
4000b260: c4 06 20 40 ld [ %i0 + 0x40 ], %g2
++stats->frees;
4000b264: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
stats->free_size += block_size;
4000b268: c8 06 20 30 ld [ %i0 + 0x30 ], %g4
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4000b26c: 84 00 bf ff add %g2, -1, %g2
++stats->frees;
stats->free_size += block_size;
4000b270: 86 01 00 03 add %g4, %g3, %g3
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4000b274: c4 26 20 40 st %g2, [ %i0 + 0x40 ]
++stats->frees;
stats->free_size += block_size;
4000b278: c6 26 20 30 st %g3, [ %i0 + 0x30 ]
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
4000b27c: 82 00 60 01 inc %g1
4000b280: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
return( true );
4000b284: 81 c7 e0 08 ret
4000b288: 91 e8 20 01 restore %g0, 1, %o0
}
4000b28c: 81 c7 e0 08 ret
4000b290: 91 e8 20 00 restore %g0, 0, %o0
4001933c <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
4001933c: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
40019340: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
40019344: 7f ff f5 ff call 40016b40 <.urem>
40019348: 90 10 00 19 mov %i1, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4001934c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
40019350: 84 06 7f f8 add %i1, -8, %g2
40019354: 90 20 80 08 sub %g2, %o0, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
40019358: 80 a2 00 01 cmp %o0, %g1
4001935c: 0a 80 00 05 bcs 40019370 <_Heap_Size_of_alloc_area+0x34>
40019360: 84 10 20 00 clr %g2
40019364: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
40019368: 80 a0 80 08 cmp %g2, %o0
4001936c: 84 60 3f ff subx %g0, -1, %g2
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 ) ) {
40019370: 80 a0 a0 00 cmp %g2, 0
40019374: 02 80 00 16 be 400193cc <_Heap_Size_of_alloc_area+0x90>
40019378: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4001937c: c4 02 20 04 ld [ %o0 + 4 ], %g2
40019380: 84 08 bf fe and %g2, -2, %g2
40019384: 84 02 00 02 add %o0, %g2, %g2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
40019388: 80 a0 80 01 cmp %g2, %g1
4001938c: 0a 80 00 05 bcs 400193a0 <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN
40019390: 86 10 20 00 clr %g3
40019394: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40019398: 80 a0 40 02 cmp %g1, %g2
4001939c: 86 60 3f ff subx %g0, -1, %g3
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
400193a0: 80 a0 e0 00 cmp %g3, 0
400193a4: 02 80 00 0a be 400193cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN
400193a8: 01 00 00 00 nop
400193ac: c2 00 a0 04 ld [ %g2 + 4 ], %g1
400193b0: 80 88 60 01 btst 1, %g1
400193b4: 02 80 00 06 be 400193cc <_Heap_Size_of_alloc_area+0x90> <== NEVER TAKEN
400193b8: 84 20 80 19 sub %g2, %i1, %g2
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
400193bc: 84 00 a0 04 add %g2, 4, %g2
400193c0: c4 26 80 00 st %g2, [ %i2 ]
return true;
400193c4: 81 c7 e0 08 ret
400193c8: 91 e8 20 01 restore %g0, 1, %o0
}
400193cc: 81 c7 e0 08 ret
400193d0: 91 e8 20 00 restore %g0, 0, %o0
400075a4 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
400075a4: 9d e3 bf 88 save %sp, -120, %sp
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
400075a8: 23 10 00 1e sethi %hi(0x40007800), %l1
400075ac: 80 8e a0 ff btst 0xff, %i2
400075b0: a2 14 62 7c or %l1, 0x27c, %l1
Heap_Control *heap,
int source,
bool dump
)
{
uintptr_t const page_size = heap->page_size;
400075b4: e4 06 20 10 ld [ %i0 + 0x10 ], %l2
uintptr_t const min_block_size = heap->min_block_size;
400075b8: e6 06 20 14 ld [ %i0 + 0x14 ], %l3
Heap_Block *const last_block = heap->last_block;
400075bc: e8 06 20 24 ld [ %i0 + 0x24 ], %l4
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
400075c0: 12 80 00 04 bne 400075d0 <_Heap_Walk+0x2c>
400075c4: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
400075c8: 23 10 00 1d sethi %hi(0x40007400), %l1
400075cc: a2 14 61 9c or %l1, 0x19c, %l1 ! 4000759c <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
400075d0: 03 10 00 76 sethi %hi(0x4001d800), %g1
400075d4: c2 00 63 e0 ld [ %g1 + 0x3e0 ], %g1 ! 4001dbe0 <_System_state_Current>
400075d8: 80 a0 60 03 cmp %g1, 3
400075dc: 12 80 01 1e bne 40007a54 <_Heap_Walk+0x4b0>
400075e0: 90 10 00 19 mov %i1, %o0
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
400075e4: da 06 20 18 ld [ %i0 + 0x18 ], %o5
400075e8: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
400075ec: c4 06 20 08 ld [ %i0 + 8 ], %g2
400075f0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
400075f4: c6 23 a0 5c st %g3, [ %sp + 0x5c ]
400075f8: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
400075fc: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
40007600: e0 23 a0 60 st %l0, [ %sp + 0x60 ]
40007604: e8 23 a0 64 st %l4, [ %sp + 0x64 ]
40007608: 92 10 20 00 clr %o1
4000760c: 15 10 00 6b sethi %hi(0x4001ac00), %o2
40007610: 96 10 00 12 mov %l2, %o3
40007614: 94 12 a3 60 or %o2, 0x360, %o2
40007618: 9f c4 40 00 call %l1
4000761c: 98 10 00 13 mov %l3, %o4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
40007620: 80 a4 a0 00 cmp %l2, 0
40007624: 12 80 00 07 bne 40007640 <_Heap_Walk+0x9c>
40007628: 80 8c a0 07 btst 7, %l2
(*printer)( source, true, "page size is zero\n" );
4000762c: 15 10 00 6b sethi %hi(0x4001ac00), %o2
40007630: 90 10 00 19 mov %i1, %o0
40007634: 92 10 20 01 mov 1, %o1
40007638: 10 80 00 27 b 400076d4 <_Heap_Walk+0x130>
4000763c: 94 12 a3 f8 or %o2, 0x3f8, %o2
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
40007640: 22 80 00 08 be,a 40007660 <_Heap_Walk+0xbc>
40007644: 90 10 00 13 mov %l3, %o0
(*printer)(
40007648: 15 10 00 6c sethi %hi(0x4001b000), %o2
4000764c: 90 10 00 19 mov %i1, %o0
40007650: 96 10 00 12 mov %l2, %o3
40007654: 92 10 20 01 mov 1, %o1
40007658: 10 80 01 05 b 40007a6c <_Heap_Walk+0x4c8>
4000765c: 94 12 a0 10 or %o2, 0x10, %o2
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
40007660: 7f ff e9 1e call 40001ad8 <.urem>
40007664: 92 10 00 12 mov %l2, %o1
40007668: 80 a2 20 00 cmp %o0, 0
4000766c: 22 80 00 08 be,a 4000768c <_Heap_Walk+0xe8>
40007670: 90 04 20 08 add %l0, 8, %o0
(*printer)(
40007674: 15 10 00 6c sethi %hi(0x4001b000), %o2
40007678: 90 10 00 19 mov %i1, %o0
4000767c: 96 10 00 13 mov %l3, %o3
40007680: 92 10 20 01 mov 1, %o1
40007684: 10 80 00 fa b 40007a6c <_Heap_Walk+0x4c8>
40007688: 94 12 a0 30 or %o2, 0x30, %o2
);
return false;
}
if (
4000768c: 7f ff e9 13 call 40001ad8 <.urem>
40007690: 92 10 00 12 mov %l2, %o1
40007694: 80 a2 20 00 cmp %o0, 0
40007698: 22 80 00 08 be,a 400076b8 <_Heap_Walk+0x114>
4000769c: c2 04 20 04 ld [ %l0 + 4 ], %g1
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
400076a0: 15 10 00 6c sethi %hi(0x4001b000), %o2
400076a4: 90 10 00 19 mov %i1, %o0
400076a8: 96 10 00 10 mov %l0, %o3
400076ac: 92 10 20 01 mov 1, %o1
400076b0: 10 80 00 ef b 40007a6c <_Heap_Walk+0x4c8>
400076b4: 94 12 a0 58 or %o2, 0x58, %o2
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
400076b8: 80 88 60 01 btst 1, %g1
400076bc: 32 80 00 09 bne,a 400076e0 <_Heap_Walk+0x13c>
400076c0: ea 04 00 00 ld [ %l0 ], %l5
(*printer)(
400076c4: 15 10 00 6c sethi %hi(0x4001b000), %o2
400076c8: 90 10 00 19 mov %i1, %o0
400076cc: 92 10 20 01 mov 1, %o1
400076d0: 94 12 a0 90 or %o2, 0x90, %o2
400076d4: 9f c4 40 00 call %l1
400076d8: b0 10 20 00 clr %i0
400076dc: 30 80 00 e6 b,a 40007a74 <_Heap_Walk+0x4d0>
);
return false;
}
if ( first_block->prev_size != page_size ) {
400076e0: 80 a5 40 12 cmp %l5, %l2
400076e4: 22 80 00 09 be,a 40007708 <_Heap_Walk+0x164>
400076e8: c2 05 20 04 ld [ %l4 + 4 ], %g1
(*printer)(
400076ec: 15 10 00 6c sethi %hi(0x4001b000), %o2
400076f0: 90 10 00 19 mov %i1, %o0
400076f4: 96 10 00 15 mov %l5, %o3
400076f8: 98 10 00 12 mov %l2, %o4
400076fc: 92 10 20 01 mov 1, %o1
40007700: 10 80 00 88 b 40007920 <_Heap_Walk+0x37c>
40007704: 94 12 a0 c0 or %o2, 0xc0, %o2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
40007708: 82 08 7f fe and %g1, -2, %g1
4000770c: 82 05 00 01 add %l4, %g1, %g1
40007710: c2 00 60 04 ld [ %g1 + 4 ], %g1
40007714: 80 88 60 01 btst 1, %g1
40007718: 32 80 00 07 bne,a 40007734 <_Heap_Walk+0x190>
4000771c: d6 06 20 08 ld [ %i0 + 8 ], %o3
(*printer)(
40007720: 15 10 00 6c sethi %hi(0x4001b000), %o2
40007724: 90 10 00 19 mov %i1, %o0
40007728: 92 10 20 01 mov 1, %o1
4000772c: 10 bf ff ea b 400076d4 <_Heap_Walk+0x130>
40007730: 94 12 a0 f0 or %o2, 0xf0, %o2
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
40007734: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007738: a4 10 00 18 mov %i0, %l2
4000773c: 10 80 00 32 b 40007804 <_Heap_Walk+0x260>
40007740: ae 10 00 0b mov %o3, %l7
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
40007744: 80 a0 80 17 cmp %g2, %l7
40007748: 18 80 00 05 bgu 4000775c <_Heap_Walk+0x1b8>
4000774c: 82 10 20 00 clr %g1
40007750: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40007754: 80 a0 40 17 cmp %g1, %l7
40007758: 82 60 3f ff subx %g0, -1, %g1
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 ) ) {
4000775c: 80 a0 60 00 cmp %g1, 0
40007760: 32 80 00 08 bne,a 40007780 <_Heap_Walk+0x1dc>
40007764: 90 05 e0 08 add %l7, 8, %o0
(*printer)(
40007768: 15 10 00 6c sethi %hi(0x4001b000), %o2
4000776c: 96 10 00 17 mov %l7, %o3
40007770: 90 10 00 19 mov %i1, %o0
40007774: 92 10 20 01 mov 1, %o1
40007778: 10 80 00 bd b 40007a6c <_Heap_Walk+0x4c8>
4000777c: 94 12 a1 08 or %o2, 0x108, %o2
);
return false;
}
if (
40007780: 7f ff e8 d6 call 40001ad8 <.urem>
40007784: 92 10 00 16 mov %l6, %o1
40007788: 80 a2 20 00 cmp %o0, 0
4000778c: 22 80 00 08 be,a 400077ac <_Heap_Walk+0x208>
40007790: c2 05 e0 04 ld [ %l7 + 4 ], %g1
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
40007794: 15 10 00 6c sethi %hi(0x4001b000), %o2
40007798: 96 10 00 17 mov %l7, %o3
4000779c: 90 10 00 19 mov %i1, %o0
400077a0: 92 10 20 01 mov 1, %o1
400077a4: 10 80 00 b2 b 40007a6c <_Heap_Walk+0x4c8>
400077a8: 94 12 a1 28 or %o2, 0x128, %o2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
400077ac: 82 08 7f fe and %g1, -2, %g1
400077b0: 82 05 c0 01 add %l7, %g1, %g1
400077b4: c2 00 60 04 ld [ %g1 + 4 ], %g1
400077b8: 80 88 60 01 btst 1, %g1
400077bc: 22 80 00 08 be,a 400077dc <_Heap_Walk+0x238>
400077c0: d8 05 e0 0c ld [ %l7 + 0xc ], %o4
(*printer)(
400077c4: 15 10 00 6c sethi %hi(0x4001b000), %o2
400077c8: 96 10 00 17 mov %l7, %o3
400077cc: 90 10 00 19 mov %i1, %o0
400077d0: 92 10 20 01 mov 1, %o1
400077d4: 10 80 00 a6 b 40007a6c <_Heap_Walk+0x4c8>
400077d8: 94 12 a1 58 or %o2, 0x158, %o2
);
return false;
}
if ( free_block->prev != prev_block ) {
400077dc: 80 a3 00 12 cmp %o4, %l2
400077e0: 02 80 00 08 be 40007800 <_Heap_Walk+0x25c>
400077e4: a4 10 00 17 mov %l7, %l2
(*printer)(
400077e8: 15 10 00 6c sethi %hi(0x4001b000), %o2
400077ec: 96 10 00 17 mov %l7, %o3
400077f0: 90 10 00 19 mov %i1, %o0
400077f4: 92 10 20 01 mov 1, %o1
400077f8: 10 80 00 4a b 40007920 <_Heap_Walk+0x37c>
400077fc: 94 12 a1 78 or %o2, 0x178, %o2
return false;
}
prev_block = free_block;
free_block = free_block->next;
40007800: ee 05 e0 08 ld [ %l7 + 8 ], %l7
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 ) {
40007804: 80 a5 c0 18 cmp %l7, %i0
40007808: 32 bf ff cf bne,a 40007744 <_Heap_Walk+0x1a0>
4000780c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007810: 10 80 00 89 b 40007a34 <_Heap_Walk+0x490>
40007814: 37 10 00 6c sethi %hi(0x4001b000), %i3
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
40007818: 80 8d a0 01 btst 1, %l6
- 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;
4000781c: ac 0d bf fe and %l6, -2, %l6
40007820: 02 80 00 0a be 40007848 <_Heap_Walk+0x2a4>
40007824: a4 04 00 16 add %l0, %l6, %l2
(*printer)(
40007828: 90 10 00 19 mov %i1, %o0
4000782c: 92 10 20 00 clr %o1
40007830: 94 10 00 1a mov %i2, %o2
40007834: 96 10 00 10 mov %l0, %o3
40007838: 9f c4 40 00 call %l1
4000783c: 98 10 00 16 mov %l6, %o4
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
40007840: 10 80 00 0a b 40007868 <_Heap_Walk+0x2c4>
40007844: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007848: da 04 00 00 ld [ %l0 ], %o5
4000784c: 90 10 00 19 mov %i1, %o0
40007850: 92 10 20 00 clr %o1
40007854: 94 10 00 1b mov %i3, %o2
40007858: 96 10 00 10 mov %l0, %o3
4000785c: 9f c4 40 00 call %l1
40007860: 98 10 00 16 mov %l6, %o4
40007864: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
40007868: 80 a0 80 12 cmp %g2, %l2
4000786c: 18 80 00 05 bgu 40007880 <_Heap_Walk+0x2dc> <== NEVER TAKEN
40007870: 82 10 20 00 clr %g1
40007874: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
40007878: 80 a0 40 12 cmp %g1, %l2
4000787c: 82 60 3f ff subx %g0, -1, %g1
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
40007880: 80 a0 60 00 cmp %g1, 0
40007884: 32 80 00 09 bne,a 400078a8 <_Heap_Walk+0x304>
40007888: 90 10 00 16 mov %l6, %o0
(*printer)(
4000788c: 15 10 00 6c sethi %hi(0x4001b000), %o2
40007890: 90 10 00 19 mov %i1, %o0
40007894: 96 10 00 10 mov %l0, %o3
40007898: 98 10 00 12 mov %l2, %o4
4000789c: 92 10 20 01 mov 1, %o1
400078a0: 10 80 00 20 b 40007920 <_Heap_Walk+0x37c>
400078a4: 94 12 a1 f0 or %o2, 0x1f0, %o2
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
400078a8: 7f ff e8 8c call 40001ad8 <.urem>
400078ac: 92 10 00 15 mov %l5, %o1
400078b0: 80 a2 20 00 cmp %o0, 0
400078b4: 02 80 00 09 be 400078d8 <_Heap_Walk+0x334>
400078b8: 80 a5 80 13 cmp %l6, %l3
(*printer)(
400078bc: 15 10 00 6c sethi %hi(0x4001b000), %o2
400078c0: 90 10 00 19 mov %i1, %o0
400078c4: 96 10 00 10 mov %l0, %o3
400078c8: 98 10 00 16 mov %l6, %o4
400078cc: 92 10 20 01 mov 1, %o1
400078d0: 10 80 00 14 b 40007920 <_Heap_Walk+0x37c>
400078d4: 94 12 a2 20 or %o2, 0x220, %o2
);
return false;
}
if ( block_size < min_block_size ) {
400078d8: 1a 80 00 0a bcc 40007900 <_Heap_Walk+0x35c>
400078dc: 80 a4 80 10 cmp %l2, %l0
(*printer)(
400078e0: 15 10 00 6c sethi %hi(0x4001b000), %o2
400078e4: 90 10 00 19 mov %i1, %o0
400078e8: 96 10 00 10 mov %l0, %o3
400078ec: 98 10 00 16 mov %l6, %o4
400078f0: 9a 10 00 13 mov %l3, %o5
400078f4: 92 10 20 01 mov 1, %o1
400078f8: 10 80 00 3b b 400079e4 <_Heap_Walk+0x440>
400078fc: 94 12 a2 50 or %o2, 0x250, %o2
);
return false;
}
if ( next_block_begin <= block_begin ) {
40007900: 38 80 00 0b bgu,a 4000792c <_Heap_Walk+0x388>
40007904: c2 04 a0 04 ld [ %l2 + 4 ], %g1
(*printer)(
40007908: 15 10 00 6c sethi %hi(0x4001b000), %o2
4000790c: 90 10 00 19 mov %i1, %o0
40007910: 96 10 00 10 mov %l0, %o3
40007914: 98 10 00 12 mov %l2, %o4
40007918: 92 10 20 01 mov 1, %o1
4000791c: 94 12 a2 80 or %o2, 0x280, %o2
40007920: 9f c4 40 00 call %l1
40007924: b0 10 20 00 clr %i0
40007928: 30 80 00 53 b,a 40007a74 <_Heap_Walk+0x4d0>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4000792c: 80 88 60 01 btst 1, %g1
40007930: 32 80 00 46 bne,a 40007a48 <_Heap_Walk+0x4a4>
40007934: a0 10 00 12 mov %l2, %l0
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;
40007938: fa 04 20 04 ld [ %l0 + 4 ], %i5
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)(
4000793c: d8 04 20 0c ld [ %l0 + 0xc ], %o4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007940: c2 06 20 08 ld [ %i0 + 8 ], %g1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
40007944: ac 0f 7f fe and %i5, -2, %l6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007948: 1b 10 00 6c sethi %hi(0x4001b000), %o5
4000794c: 80 a3 00 01 cmp %o4, %g1
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
40007950: c6 06 20 0c ld [ %i0 + 0xc ], %g3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
40007954: ae 04 00 16 add %l0, %l6, %l7
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
40007958: 02 80 00 07 be 40007974 <_Heap_Walk+0x3d0>
4000795c: 9a 13 62 b8 or %o5, 0x2b8, %o5
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
40007960: 1b 10 00 6c sethi %hi(0x4001b000), %o5
40007964: 80 a3 00 18 cmp %o4, %i0
40007968: 02 80 00 03 be 40007974 <_Heap_Walk+0x3d0>
4000796c: 9a 13 62 d0 or %o5, 0x2d0, %o5
40007970: 9a 10 00 1c mov %i4, %o5
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
40007974: c4 04 20 08 ld [ %l0 + 8 ], %g2
40007978: 03 10 00 6c sethi %hi(0x4001b000), %g1
4000797c: 80 a0 80 03 cmp %g2, %g3
40007980: 02 80 00 07 be 4000799c <_Heap_Walk+0x3f8>
40007984: 82 10 62 e0 or %g1, 0x2e0, %g1
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007988: 03 10 00 6c sethi %hi(0x4001b000), %g1
4000798c: 80 a0 80 18 cmp %g2, %i0
40007990: 02 80 00 03 be 4000799c <_Heap_Walk+0x3f8>
40007994: 82 10 62 f0 or %g1, 0x2f0, %g1
40007998: 82 10 00 1c mov %i4, %g1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
4000799c: c4 23 a0 5c st %g2, [ %sp + 0x5c ]
400079a0: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
400079a4: 90 10 00 19 mov %i1, %o0
400079a8: 92 10 20 00 clr %o1
400079ac: 15 10 00 6c sethi %hi(0x4001b000), %o2
400079b0: 96 10 00 10 mov %l0, %o3
400079b4: 9f c4 40 00 call %l1
400079b8: 94 12 a3 00 or %o2, 0x300, %o2
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
400079bc: da 05 c0 00 ld [ %l7 ], %o5
400079c0: 80 a5 80 0d cmp %l6, %o5
400079c4: 02 80 00 0b be 400079f0 <_Heap_Walk+0x44c>
400079c8: 15 10 00 6c sethi %hi(0x4001b000), %o2
(*printer)(
400079cc: ee 23 a0 5c st %l7, [ %sp + 0x5c ]
400079d0: 90 10 00 19 mov %i1, %o0
400079d4: 96 10 00 10 mov %l0, %o3
400079d8: 98 10 00 16 mov %l6, %o4
400079dc: 92 10 20 01 mov 1, %o1
400079e0: 94 12 a3 30 or %o2, 0x330, %o2
400079e4: 9f c4 40 00 call %l1
400079e8: b0 10 20 00 clr %i0
400079ec: 30 80 00 22 b,a 40007a74 <_Heap_Walk+0x4d0>
);
return false;
}
if ( !prev_used ) {
400079f0: 80 8f 60 01 btst 1, %i5
400079f4: 32 80 00 0b bne,a 40007a20 <_Heap_Walk+0x47c>
400079f8: c2 06 20 08 ld [ %i0 + 8 ], %g1
(*printer)(
400079fc: 15 10 00 6c sethi %hi(0x4001b000), %o2
40007a00: 90 10 00 19 mov %i1, %o0
40007a04: 96 10 00 10 mov %l0, %o3
40007a08: 92 10 20 01 mov 1, %o1
40007a0c: 10 80 00 18 b 40007a6c <_Heap_Walk+0x4c8>
40007a10: 94 12 a3 70 or %o2, 0x370, %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 ) {
40007a14: 22 80 00 0d be,a 40007a48 <_Heap_Walk+0x4a4>
40007a18: a0 10 00 12 mov %l2, %l0
return true;
}
free_block = free_block->next;
40007a1c: c2 00 60 08 ld [ %g1 + 8 ], %g1
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
40007a20: 80 a0 40 18 cmp %g1, %i0
40007a24: 12 bf ff fc bne 40007a14 <_Heap_Walk+0x470>
40007a28: 80 a0 40 10 cmp %g1, %l0
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
40007a2c: 10 80 00 0c b 40007a5c <_Heap_Walk+0x4b8>
40007a30: 15 10 00 6c sethi %hi(0x4001b000), %o2
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
40007a34: 35 10 00 6c sethi %hi(0x4001b000), %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007a38: 39 10 00 6c sethi %hi(0x4001b000), %i4
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
40007a3c: b6 16 e1 c8 or %i3, 0x1c8, %i3
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
40007a40: b4 16 a1 b0 or %i2, 0x1b0, %i2
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
40007a44: b8 17 22 c8 or %i4, 0x2c8, %i4
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
40007a48: 80 a4 00 14 cmp %l0, %l4
40007a4c: 32 bf ff 73 bne,a 40007818 <_Heap_Walk+0x274>
40007a50: ec 04 20 04 ld [ %l0 + 4 ], %l6
block = next_block;
}
return true;
}
40007a54: 81 c7 e0 08 ret
40007a58: 91 e8 20 01 restore %g0, 1, %o0
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
40007a5c: 90 10 00 19 mov %i1, %o0
40007a60: 96 10 00 10 mov %l0, %o3
40007a64: 92 10 20 01 mov 1, %o1
40007a68: 94 12 a3 a0 or %o2, 0x3a0, %o2
40007a6c: 9f c4 40 00 call %l1
40007a70: b0 10 20 00 clr %i0
40007a74: 81 c7 e0 08 ret
40007a78: 81 e8 00 00 restore
40006820 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
40006820: 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 )
40006824: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
40006828: a0 10 00 18 mov %i0, %l0
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
4000682c: 80 a0 60 00 cmp %g1, 0
40006830: 02 80 00 20 be 400068b0 <_Objects_Allocate+0x90> <== NEVER TAKEN
40006834: b0 10 20 00 clr %i0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
40006838: a2 04 20 20 add %l0, 0x20, %l1
4000683c: 40 00 11 00 call 4000ac3c <_Chain_Get>
40006840: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
40006844: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
40006848: 80 a0 60 00 cmp %g1, 0
4000684c: 02 80 00 19 be 400068b0 <_Objects_Allocate+0x90>
40006850: 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 ) {
40006854: 80 a2 20 00 cmp %o0, 0
40006858: 32 80 00 0a bne,a 40006880 <_Objects_Allocate+0x60>
4000685c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
_Objects_Extend_information( information );
40006860: 40 00 00 1e call 400068d8 <_Objects_Extend_information>
40006864: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
40006868: 40 00 10 f5 call 4000ac3c <_Chain_Get>
4000686c: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
40006870: b0 92 20 00 orcc %o0, 0, %i0
40006874: 02 80 00 0f be 400068b0 <_Objects_Allocate+0x90>
40006878: 01 00 00 00 nop
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
4000687c: c2 14 20 0a lduh [ %l0 + 0xa ], %g1
40006880: d0 16 20 0a lduh [ %i0 + 0xa ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
40006884: d2 14 20 14 lduh [ %l0 + 0x14 ], %o1
40006888: 40 00 40 02 call 40016890 <.udiv>
4000688c: 90 22 00 01 sub %o0, %g1, %o0
40006890: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
40006894: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
40006898: c6 14 20 2c lduh [ %l0 + 0x2c ], %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
4000689c: c4 00 40 08 ld [ %g1 + %o0 ], %g2
information->inactive--;
400068a0: 86 00 ff ff add %g3, -1, %g3
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
400068a4: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
400068a8: c6 34 20 2c sth %g3, [ %l0 + 0x2c ]
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
400068ac: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
}
}
return the_object;
}
400068b0: 81 c7 e0 08 ret
400068b4: 81 e8 00 00 restore
400068d8 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
400068d8: 9d e3 bf 90 save %sp, -112, %sp
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
400068dc: e4 06 20 34 ld [ %i0 + 0x34 ], %l2
400068e0: 80 a4 a0 00 cmp %l2, 0
400068e4: 12 80 00 06 bne 400068fc <_Objects_Extend_information+0x24>
400068e8: e6 16 20 0a lduh [ %i0 + 0xa ], %l3
400068ec: a0 10 00 13 mov %l3, %l0
400068f0: a8 10 20 00 clr %l4
400068f4: 10 80 00 15 b 40006948 <_Objects_Extend_information+0x70>
400068f8: a2 10 20 00 clr %l1
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
400068fc: e2 16 20 14 lduh [ %i0 + 0x14 ], %l1
40006900: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
40006904: 40 00 3f e3 call 40016890 <.udiv>
40006908: 92 10 00 11 mov %l1, %o1
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
4000690c: 82 10 00 11 mov %l1, %g1
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
40006910: 91 2a 20 10 sll %o0, 0x10, %o0
40006914: a0 10 00 13 mov %l3, %l0
40006918: a9 32 20 10 srl %o0, 0x10, %l4
for ( ; block < block_count; block++ ) {
4000691c: 10 80 00 08 b 4000693c <_Objects_Extend_information+0x64>
40006920: a2 10 20 00 clr %l1
if ( information->object_blocks[ block ] == NULL )
40006924: c4 04 80 02 ld [ %l2 + %g2 ], %g2
40006928: 80 a0 a0 00 cmp %g2, 0
4000692c: 22 80 00 08 be,a 4000694c <_Objects_Extend_information+0x74>
40006930: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
40006934: a0 04 00 01 add %l0, %g1, %l0
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
40006938: a2 04 60 01 inc %l1
4000693c: 80 a4 40 14 cmp %l1, %l4
40006940: 0a bf ff f9 bcs 40006924 <_Objects_Extend_information+0x4c>
40006944: 85 2c 60 02 sll %l1, 2, %g2
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
40006948: d0 16 20 14 lduh [ %i0 + 0x14 ], %o0
4000694c: ec 16 20 10 lduh [ %i0 + 0x10 ], %l6
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
40006950: 03 00 00 3f sethi %hi(0xfc00), %g1
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
40006954: ac 02 00 16 add %o0, %l6, %l6
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
40006958: 82 10 63 ff or %g1, 0x3ff, %g1
4000695c: 80 a5 80 01 cmp %l6, %g1
40006960: 18 80 00 88 bgu 40006b80 <_Objects_Extend_information+0x2a8><== NEVER TAKEN
40006964: 01 00 00 00 nop
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
40006968: 40 00 3f 90 call 400167a8 <.umul>
4000696c: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
if ( information->auto_extend ) {
40006970: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
40006974: 80 a0 60 00 cmp %g1, 0
40006978: 02 80 00 09 be 4000699c <_Objects_Extend_information+0xc4>
4000697c: 01 00 00 00 nop
new_object_block = _Workspace_Allocate( block_size );
40006980: 40 00 08 21 call 40008a04 <_Workspace_Allocate>
40006984: 01 00 00 00 nop
if ( !new_object_block )
40006988: a4 92 20 00 orcc %o0, 0, %l2
4000698c: 32 80 00 08 bne,a 400069ac <_Objects_Extend_information+0xd4>
40006990: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
40006994: 81 c7 e0 08 ret
40006998: 81 e8 00 00 restore
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
4000699c: 40 00 08 0c call 400089cc <_Workspace_Allocate_or_fatal_error>
400069a0: 01 00 00 00 nop
400069a4: a4 10 00 08 mov %o0, %l2
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
400069a8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
400069ac: 80 a4 00 01 cmp %l0, %g1
400069b0: 2a 80 00 53 bcs,a 40006afc <_Objects_Extend_information+0x224>
400069b4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
400069b8: 82 05 80 13 add %l6, %l3, %g1
*/
/*
* Up the block count and maximum
*/
block_count++;
400069bc: ae 05 20 01 add %l4, 1, %l7
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
400069c0: 91 2d e0 01 sll %l7, 1, %o0
400069c4: 90 02 00 17 add %o0, %l7, %o0
400069c8: 90 00 40 08 add %g1, %o0, %o0
400069cc: 40 00 08 0e call 40008a04 <_Workspace_Allocate>
400069d0: 91 2a 20 02 sll %o0, 2, %o0
if ( !object_blocks ) {
400069d4: aa 92 20 00 orcc %o0, 0, %l5
400069d8: 32 80 00 06 bne,a 400069f0 <_Objects_Extend_information+0x118>
400069dc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
_Workspace_Free( new_object_block );
400069e0: 40 00 08 12 call 40008a28 <_Workspace_Free>
400069e4: 90 10 00 12 mov %l2, %o0
return;
400069e8: 81 c7 e0 08 ret
400069ec: 81 e8 00 00 restore
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
400069f0: af 2d e0 02 sll %l7, 2, %l7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
400069f4: 80 a0 40 13 cmp %g1, %l3
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
400069f8: ba 05 40 17 add %l5, %l7, %i5
400069fc: 82 10 20 00 clr %g1
40006a00: 08 80 00 14 bleu 40006a50 <_Objects_Extend_information+0x178>
40006a04: ae 07 40 17 add %i5, %l7, %l7
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
40006a08: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
information->object_blocks,
block_count * sizeof(void*) );
40006a0c: b9 2d 20 02 sll %l4, 2, %i4
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
40006a10: 40 00 1c 44 call 4000db20 <memcpy>
40006a14: 94 10 00 1c mov %i4, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
40006a18: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
40006a1c: 94 10 00 1c mov %i4, %o2
40006a20: 40 00 1c 40 call 4000db20 <memcpy>
40006a24: 90 10 00 1d mov %i5, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
40006a28: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
40006a2c: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
40006a30: a6 04 c0 01 add %l3, %g1, %l3
40006a34: 90 10 00 17 mov %l7, %o0
40006a38: 40 00 1c 3a call 4000db20 <memcpy>
40006a3c: 95 2c e0 02 sll %l3, 2, %o2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006a40: 10 80 00 08 b 40006a60 <_Objects_Extend_information+0x188>
40006a44: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
40006a48: 82 00 60 01 inc %g1
local_table[ index ] = NULL;
40006a4c: c0 20 80 17 clr [ %g2 + %l7 ]
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
40006a50: 80 a0 40 13 cmp %g1, %l3
40006a54: 2a bf ff fd bcs,a 40006a48 <_Objects_Extend_information+0x170>
40006a58: 85 28 60 02 sll %g1, 2, %g2
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006a5c: c6 16 20 14 lduh [ %i0 + 0x14 ], %g3
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
40006a60: a9 2d 20 02 sll %l4, 2, %l4
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006a64: 85 2c 20 02 sll %l0, 2, %g2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
40006a68: c0 27 40 14 clr [ %i5 + %l4 ]
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
40006a6c: c0 25 40 14 clr [ %l5 + %l4 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
40006a70: 86 04 00 03 add %l0, %g3, %g3
40006a74: 84 05 c0 02 add %l7, %g2, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
40006a78: 10 80 00 04 b 40006a88 <_Objects_Extend_information+0x1b0>
40006a7c: 82 10 00 10 mov %l0, %g1
index < ( information->allocation_size + index_base );
index++ ) {
40006a80: 82 00 60 01 inc %g1
40006a84: 84 00 a0 04 add %g2, 4, %g2
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
40006a88: 80 a0 40 03 cmp %g1, %g3
40006a8c: 2a bf ff fd bcs,a 40006a80 <_Objects_Extend_information+0x1a8>
40006a90: c0 20 80 00 clr [ %g2 ]
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
40006a94: 7f ff ec 81 call 40001c98 <sparc_disable_interrupts>
40006a98: 01 00 00 00 nop
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40006a9c: c8 06 00 00 ld [ %i0 ], %g4
40006aa0: c4 16 20 04 lduh [ %i0 + 4 ], %g2
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
40006aa4: ec 36 20 10 sth %l6, [ %i0 + 0x10 ]
information->maximum_id = _Objects_Build_id(
40006aa8: ad 2d a0 10 sll %l6, 0x10, %l6
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
40006aac: e6 06 20 34 ld [ %i0 + 0x34 ], %l3
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40006ab0: 83 35 a0 10 srl %l6, 0x10, %g1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
40006ab4: fa 26 20 30 st %i5, [ %i0 + 0x30 ]
information->local_table = local_table;
40006ab8: ee 26 20 1c st %l7, [ %i0 + 0x1c ]
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40006abc: 89 29 20 18 sll %g4, 0x18, %g4
40006ac0: 85 28 a0 1b sll %g2, 0x1b, %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
40006ac4: ea 26 20 34 st %l5, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
40006ac8: 07 00 00 40 sethi %hi(0x10000), %g3
40006acc: ac 11 00 03 or %g4, %g3, %l6
40006ad0: ac 15 80 02 or %l6, %g2, %l6
40006ad4: ac 15 80 01 or %l6, %g1, %l6
40006ad8: ec 26 20 0c st %l6, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
40006adc: 7f ff ec 73 call 40001ca8 <sparc_enable_interrupts>
40006ae0: 01 00 00 00 nop
if ( old_tables )
40006ae4: 80 a4 e0 00 cmp %l3, 0
40006ae8: 22 80 00 05 be,a 40006afc <_Objects_Extend_information+0x224>
40006aec: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
_Workspace_Free( old_tables );
40006af0: 40 00 07 ce call 40008a28 <_Workspace_Free>
40006af4: 90 10 00 13 mov %l3, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40006af8: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
40006afc: d4 16 20 14 lduh [ %i0 + 0x14 ], %o2
40006b00: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
40006b04: 92 10 00 12 mov %l2, %o1
40006b08: 90 07 bf f4 add %fp, -12, %o0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40006b0c: a3 2c 60 02 sll %l1, 2, %l1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
40006b10: a8 06 20 20 add %i0, 0x20, %l4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
40006b14: e4 20 40 11 st %l2, [ %g1 + %l1 ]
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
40006b18: 27 00 00 40 sethi %hi(0x10000), %l3
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
40006b1c: 40 00 10 58 call 4000ac7c <_Chain_Initialize>
40006b20: a4 10 00 08 mov %o0, %l2
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
40006b24: 30 80 00 0c b,a 40006b54 <_Objects_Extend_information+0x27c>
the_object->id = _Objects_Build_id(
40006b28: c4 16 20 04 lduh [ %i0 + 4 ], %g2
40006b2c: 83 28 60 18 sll %g1, 0x18, %g1
40006b30: 85 28 a0 1b sll %g2, 0x1b, %g2
40006b34: 82 10 40 13 or %g1, %l3, %g1
40006b38: 82 10 40 02 or %g1, %g2, %g1
40006b3c: 82 10 40 10 or %g1, %l0, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
40006b40: 92 10 00 08 mov %o0, %o1
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
40006b44: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
40006b48: a0 04 20 01 inc %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
40006b4c: 7f ff fc ee call 40005f04 <_Chain_Append>
40006b50: 90 10 00 14 mov %l4, %o0
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
40006b54: 40 00 10 3a call 4000ac3c <_Chain_Get>
40006b58: 90 10 00 12 mov %l2, %o0
40006b5c: 80 a2 20 00 cmp %o0, 0
40006b60: 32 bf ff f2 bne,a 40006b28 <_Objects_Extend_information+0x250>
40006b64: c2 06 00 00 ld [ %i0 ], %g1
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
40006b68: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
40006b6c: c8 16 20 14 lduh [ %i0 + 0x14 ], %g4
40006b70: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive =
40006b74: 82 01 00 01 add %g4, %g1, %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
40006b78: c8 20 80 11 st %g4, [ %g2 + %l1 ]
information->inactive =
40006b7c: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
40006b80: 81 c7 e0 08 ret
40006b84: 81 e8 00 00 restore
40006c30 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
40006c30: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
40006c34: 80 a6 60 00 cmp %i1, 0
40006c38: 22 80 00 1a be,a 40006ca0 <_Objects_Get_information+0x70>
40006c3c: b0 10 20 00 clr %i0
/*
* 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 );
40006c40: 40 00 11 95 call 4000b294 <_Objects_API_maximum_class>
40006c44: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
40006c48: 80 a2 20 00 cmp %o0, 0
40006c4c: 22 80 00 15 be,a 40006ca0 <_Objects_Get_information+0x70>
40006c50: b0 10 20 00 clr %i0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
40006c54: 80 a6 40 08 cmp %i1, %o0
40006c58: 38 80 00 12 bgu,a 40006ca0 <_Objects_Get_information+0x70>
40006c5c: b0 10 20 00 clr %i0
return NULL;
if ( !_Objects_Information_table[ the_api ] )
40006c60: b1 2e 20 02 sll %i0, 2, %i0
40006c64: 03 10 00 6c sethi %hi(0x4001b000), %g1
40006c68: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 4001b2e0 <_Objects_Information_table>
40006c6c: c2 00 40 18 ld [ %g1 + %i0 ], %g1
40006c70: 80 a0 60 00 cmp %g1, 0
40006c74: 02 80 00 0b be 40006ca0 <_Objects_Get_information+0x70> <== NEVER TAKEN
40006c78: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
40006c7c: b3 2e 60 02 sll %i1, 2, %i1
40006c80: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
40006c84: 80 a6 20 00 cmp %i0, 0
40006c88: 02 80 00 06 be 40006ca0 <_Objects_Get_information+0x70> <== NEVER TAKEN
40006c8c: 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 )
40006c90: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
40006c94: 80 a0 60 00 cmp %g1, 0
40006c98: 22 80 00 02 be,a 40006ca0 <_Objects_Get_information+0x70>
40006c9c: b0 10 20 00 clr %i0
return NULL;
#endif
return info;
}
40006ca0: 81 c7 e0 08 ret
40006ca4: 81 e8 00 00 restore
4001750c <_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;
4001750c: c4 02 20 08 ld [ %o0 + 8 ], %g2
if ( information->maximum >= index ) {
40017510: 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;
40017514: 84 22 40 02 sub %o1, %g2, %g2
40017518: 84 00 a0 01 inc %g2
if ( information->maximum >= index ) {
4001751c: 80 a0 40 02 cmp %g1, %g2
40017520: 0a 80 00 09 bcs 40017544 <_Objects_Get_no_protection+0x38>
40017524: 85 28 a0 02 sll %g2, 2, %g2
if ( (the_object = information->local_table[ index ]) != NULL ) {
40017528: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
4001752c: d0 00 40 02 ld [ %g1 + %g2 ], %o0
40017530: 80 a2 20 00 cmp %o0, 0
40017534: 02 80 00 05 be 40017548 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
40017538: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
4001753c: 81 c3 e0 08 retl
40017540: 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;
40017544: 82 10 20 01 mov 1, %g1
40017548: 90 10 20 00 clr %o0
return NULL;
}
4001754c: 81 c3 e0 08 retl
40017550: c2 22 80 00 st %g1, [ %o2 ]
400083a4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
400083a4: 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;
400083a8: 92 96 20 00 orcc %i0, 0, %o1
400083ac: 12 80 00 06 bne 400083c4 <_Objects_Id_to_name+0x20>
400083b0: 83 32 60 18 srl %o1, 0x18, %g1
400083b4: 03 10 00 83 sethi %hi(0x40020c00), %g1
400083b8: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 40020cbc <_Thread_Executing>
400083bc: d2 00 60 08 ld [ %g1 + 8 ], %o1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
400083c0: 83 32 60 18 srl %o1, 0x18, %g1
400083c4: 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 )
400083c8: 84 00 7f ff add %g1, -1, %g2
400083cc: 80 a0 a0 03 cmp %g2, 3
400083d0: 18 80 00 14 bgu 40008420 <_Objects_Id_to_name+0x7c>
400083d4: 83 28 60 02 sll %g1, 2, %g1
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
400083d8: 10 80 00 14 b 40008428 <_Objects_Id_to_name+0x84>
400083dc: 05 10 00 82 sethi %hi(0x40020800), %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
400083e0: 85 28 a0 02 sll %g2, 2, %g2
400083e4: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
400083e8: 80 a2 20 00 cmp %o0, 0
400083ec: 02 80 00 0d be 40008420 <_Objects_Id_to_name+0x7c> <== NEVER TAKEN
400083f0: 01 00 00 00 nop
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
400083f4: 7f ff ff cf call 40008330 <_Objects_Get>
400083f8: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
400083fc: 80 a2 20 00 cmp %o0, 0
40008400: 02 80 00 08 be 40008420 <_Objects_Id_to_name+0x7c>
40008404: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
40008408: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
4000840c: b0 10 20 00 clr %i0
40008410: 40 00 02 30 call 40008cd0 <_Thread_Enable_dispatch>
40008414: c2 26 40 00 st %g1, [ %i1 ]
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
40008418: 81 c7 e0 08 ret
4000841c: 81 e8 00 00 restore
}
40008420: 81 c7 e0 08 ret
40008424: 91 e8 20 03 restore %g0, 3, %o0
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
40008428: 84 10 a3 60 or %g2, 0x360, %g2
4000842c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
40008430: 80 a0 60 00 cmp %g1, 0
40008434: 12 bf ff eb bne 400083e0 <_Objects_Id_to_name+0x3c>
40008438: 85 32 60 1b srl %o1, 0x1b, %g2
4000843c: 30 bf ff f9 b,a 40008420 <_Objects_Id_to_name+0x7c>
40006d90 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
40006d90: 9d e3 bf a0 save %sp, -96, %sp
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
40006d94: 05 10 00 6c sethi %hi(0x4001b000), %g2
40006d98: 83 2e 60 02 sll %i1, 2, %g1
40006d9c: 84 10 a2 e0 or %g2, 0x2e0, %g2
40006da0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
40006da4: 85 2f 20 10 sll %i4, 0x10, %g2
40006da8: 85 30 a0 10 srl %g2, 0x10, %g2
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
40006dac: 87 2e a0 02 sll %i2, 2, %g3
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
40006db0: c4 26 20 18 st %g2, [ %i0 + 0x18 ]
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
40006db4: f0 20 40 03 st %i0, [ %g1 + %g3 ]
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
40006db8: 85 36 e0 1f srl %i3, 0x1f, %g2
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
40006dbc: 03 20 00 00 sethi %hi(0x80000000), %g1
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
40006dc0: f2 26 00 00 st %i1, [ %i0 ]
information->the_class = the_class;
40006dc4: f4 36 20 04 sth %i2, [ %i0 + 4 ]
information->size = size;
information->local_table = 0;
40006dc8: c0 26 20 1c clr [ %i0 + 0x1c ]
information->inactive_per_block = 0;
40006dcc: c0 26 20 30 clr [ %i0 + 0x30 ]
information->object_blocks = 0;
40006dd0: c0 26 20 34 clr [ %i0 + 0x34 ]
information->inactive = 0;
40006dd4: c0 36 20 2c clrh [ %i0 + 0x2c ]
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
40006dd8: c0 36 20 10 clrh [ %i0 + 0x10 ]
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
40006ddc: c4 2e 20 12 stb %g2, [ %i0 + 0x12 ]
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
40006de0: b6 2e c0 01 andn %i3, %g1, %i3
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
40006de4: 80 a0 a0 00 cmp %g2, 0
40006de8: 02 80 00 09 be 40006e0c <_Objects_Initialize_information+0x7c>
40006dec: c2 07 a0 5c ld [ %fp + 0x5c ], %g1
40006df0: 80 a6 e0 00 cmp %i3, 0
40006df4: 12 80 00 07 bne 40006e10 <_Objects_Initialize_information+0x80>
40006df8: 07 10 00 6c sethi %hi(0x4001b000), %g3
_Internal_error_Occurred(
40006dfc: 90 10 20 00 clr %o0
40006e00: 92 10 20 01 mov 1, %o1
40006e04: 7f ff fe 59 call 40006768 <_Internal_error_Occurred>
40006e08: 94 10 20 14 mov 0x14, %o2
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
40006e0c: 07 10 00 6c sethi %hi(0x4001b000), %g3
40006e10: 86 10 e1 28 or %g3, 0x128, %g3 ! 4001b128 <null_local_table.3551>
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
40006e14: 80 a0 00 1b cmp %g0, %i3
40006e18: b3 2e 60 18 sll %i1, 0x18, %i1
40006e1c: 84 40 20 00 addx %g0, 0, %g2
40006e20: b5 2e a0 1b sll %i2, 0x1b, %i2
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
40006e24: c6 26 20 1c st %g3, [ %i0 + 0x1c ]
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
40006e28: f6 36 20 14 sth %i3, [ %i0 + 0x14 ]
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
40006e2c: 07 00 00 40 sethi %hi(0x10000), %g3
40006e30: b2 16 40 03 or %i1, %g3, %i1
40006e34: b4 16 40 1a or %i1, %i2, %i2
40006e38: b4 16 80 02 or %i2, %g2, %i2
40006e3c: f4 26 20 08 st %i2, [ %i0 + 8 ]
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
40006e40: 84 00 60 04 add %g1, 4, %g2
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
40006e44: 80 88 60 03 btst 3, %g1
40006e48: 12 80 00 03 bne 40006e54 <_Objects_Initialize_information+0xc4><== NEVER TAKEN
40006e4c: 84 08 bf fc and %g2, -4, %g2
40006e50: 84 10 00 01 mov %g1, %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40006e54: 82 06 20 24 add %i0, 0x24, %g1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
40006e58: c4 36 20 38 sth %g2, [ %i0 + 0x38 ]
40006e5c: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
the_chain->permanent_null = NULL;
40006e60: c0 26 20 24 clr [ %i0 + 0x24 ]
the_chain->last = _Chain_Head(the_chain);
40006e64: 82 06 20 20 add %i0, 0x20, %g1
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
40006e68: 80 a6 e0 00 cmp %i3, 0
40006e6c: 02 80 00 04 be 40006e7c <_Objects_Initialize_information+0xec>
40006e70: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
40006e74: 7f ff fe 99 call 400068d8 <_Objects_Extend_information>
40006e78: 81 e8 00 00 restore
40006e7c: 81 c7 e0 08 ret
40006e80: 81 e8 00 00 restore
4000a9d4 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4000a9d4: 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 ];
4000a9d8: e0 06 21 5c ld [ %i0 + 0x15c ], %l0
if ( !api )
4000a9dc: 80 a4 20 00 cmp %l0, 0
4000a9e0: 02 80 00 1d be 4000aa54 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
4000a9e4: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4000a9e8: 7f ff dc ac call 40001c98 <sparc_disable_interrupts>
4000a9ec: 01 00 00 00 nop
signal_set = asr->signals_posted;
4000a9f0: e6 04 20 14 ld [ %l0 + 0x14 ], %l3
asr->signals_posted = 0;
4000a9f4: c0 24 20 14 clr [ %l0 + 0x14 ]
_ISR_Enable( level );
4000a9f8: 7f ff dc ac call 40001ca8 <sparc_enable_interrupts>
4000a9fc: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4000aa00: 80 a4 e0 00 cmp %l3, 0
4000aa04: 02 80 00 14 be 4000aa54 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
4000aa08: a2 07 bf fc add %fp, -4, %l1
return;
asr->nest_level += 1;
4000aa0c: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000aa10: d0 04 20 10 ld [ %l0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4000aa14: 82 00 60 01 inc %g1
4000aa18: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000aa1c: 94 10 00 11 mov %l1, %o2
4000aa20: 25 00 00 3f sethi %hi(0xfc00), %l2
4000aa24: 40 00 07 4c call 4000c754 <rtems_task_mode>
4000aa28: 92 14 a3 ff or %l2, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
4000aa2c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
4000aa30: 9f c0 40 00 call %g1
4000aa34: 90 10 00 13 mov %l3, %o0
asr->nest_level -= 1;
4000aa38: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000aa3c: 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;
4000aa40: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000aa44: 92 14 a3 ff or %l2, 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;
4000aa48: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4000aa4c: 40 00 07 42 call 4000c754 <rtems_task_mode>
4000aa50: 94 10 00 11 mov %l1, %o2
4000aa54: 81 c7 e0 08 ret
4000aa58: 81 e8 00 00 restore
40006bd8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
40006bd8: 9d e3 bf 98 save %sp, -104, %sp
40006bdc: 11 10 00 84 sethi %hi(0x40021000), %o0
40006be0: 92 10 00 18 mov %i0, %o1
40006be4: 90 12 20 60 or %o0, 0x60, %o0
40006be8: 40 00 07 81 call 400089ec <_Objects_Get>
40006bec: 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 ) {
40006bf0: c2 07 bf fc ld [ %fp + -4 ], %g1
40006bf4: 80 a0 60 00 cmp %g1, 0
40006bf8: 12 80 00 26 bne 40006c90 <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN
40006bfc: a0 10 00 08 mov %o0, %l0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
40006c00: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
40006c04: 03 00 00 10 sethi %hi(0x4000), %g1
40006c08: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
40006c0c: 80 88 80 01 btst %g2, %g1
40006c10: 22 80 00 0c be,a 40006c40 <_Rate_monotonic_Timeout+0x68>
40006c14: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
the_thread->Wait.id == the_period->Object.id ) {
40006c18: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
40006c1c: c2 04 20 08 ld [ %l0 + 8 ], %g1
40006c20: 80 a0 80 01 cmp %g2, %g1
40006c24: 32 80 00 07 bne,a 40006c40 <_Rate_monotonic_Timeout+0x68>
40006c28: c2 04 20 38 ld [ %l0 + 0x38 ], %g1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
40006c2c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
40006c30: 40 00 08 b9 call 40008f14 <_Thread_Clear_state>
40006c34: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_SIZE+0xfc3fff8>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
40006c38: 10 80 00 08 b 40006c58 <_Rate_monotonic_Timeout+0x80>
40006c3c: 90 10 00 10 mov %l0, %o0
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
40006c40: 80 a0 60 01 cmp %g1, 1
40006c44: 12 80 00 0e bne 40006c7c <_Rate_monotonic_Timeout+0xa4>
40006c48: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
40006c4c: 82 10 20 03 mov 3, %g1
_Rate_monotonic_Initiate_statistics( the_period );
40006c50: 90 10 00 10 mov %l0, %o0
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
40006c54: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
40006c58: 7f ff fe 3e call 40006550 <_Rate_monotonic_Initiate_statistics>
40006c5c: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40006c60: c2 04 20 3c ld [ %l0 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006c64: 92 04 20 10 add %l0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40006c68: c2 24 20 1c st %g1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006c6c: 11 10 00 84 sethi %hi(0x40021000), %o0
40006c70: 40 00 0e ba call 4000a758 <_Watchdog_Insert>
40006c74: 90 12 22 ac or %o0, 0x2ac, %o0 ! 400212ac <_Watchdog_Ticks_chain>
40006c78: 30 80 00 02 b,a 40006c80 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
40006c7c: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
40006c80: 03 10 00 84 sethi %hi(0x40021000), %g1
40006c84: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 400211d0 <_Thread_Dispatch_disable_level>
40006c88: 84 00 bf ff add %g2, -1, %g2
40006c8c: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ]
40006c90: 81 c7 e0 08 ret
40006c94: 81 e8 00 00 restore
400065e8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
400065e8: 9d e3 bf a0 save %sp, -96, %sp
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
400065ec: 03 10 00 84 sethi %hi(0x40021000), %g1
if ((!the_tod) ||
400065f0: 80 a6 20 00 cmp %i0, 0
400065f4: 02 80 00 2d be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN
400065f8: d2 00 62 04 ld [ %g1 + 0x204 ], %o1
(the_tod->ticks >= ticks_per_second) ||
400065fc: 11 00 03 d0 sethi %hi(0xf4000), %o0
40006600: 40 00 55 b8 call 4001bce0 <.udiv>
40006604: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
40006608: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
4000660c: 80 a0 40 08 cmp %g1, %o0
40006610: 1a 80 00 26 bcc 400066a8 <_TOD_Validate+0xc0>
40006614: 01 00 00 00 nop
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
40006618: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
4000661c: 80 a0 60 3b cmp %g1, 0x3b
40006620: 18 80 00 22 bgu 400066a8 <_TOD_Validate+0xc0>
40006624: 01 00 00 00 nop
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
40006628: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
4000662c: 80 a0 60 3b cmp %g1, 0x3b
40006630: 18 80 00 1e bgu 400066a8 <_TOD_Validate+0xc0>
40006634: 01 00 00 00 nop
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
40006638: c2 06 20 0c ld [ %i0 + 0xc ], %g1
4000663c: 80 a0 60 17 cmp %g1, 0x17
40006640: 18 80 00 1a bgu 400066a8 <_TOD_Validate+0xc0>
40006644: 01 00 00 00 nop
(the_tod->month == 0) ||
40006648: c2 06 20 04 ld [ %i0 + 4 ], %g1
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
4000664c: 80 a0 60 00 cmp %g1, 0
40006650: 02 80 00 16 be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN
40006654: 80 a0 60 0c cmp %g1, 0xc
40006658: 18 80 00 14 bgu 400066a8 <_TOD_Validate+0xc0>
4000665c: 01 00 00 00 nop
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
40006660: c6 06 00 00 ld [ %i0 ], %g3
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40006664: 80 a0 e7 c3 cmp %g3, 0x7c3
40006668: 08 80 00 10 bleu 400066a8 <_TOD_Validate+0xc0>
4000666c: 01 00 00 00 nop
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
40006670: c4 06 20 08 ld [ %i0 + 8 ], %g2
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
40006674: 80 a0 a0 00 cmp %g2, 0
40006678: 02 80 00 0c be 400066a8 <_TOD_Validate+0xc0> <== NEVER TAKEN
4000667c: 80 88 e0 03 btst 3, %g3
40006680: 07 10 00 7e sethi %hi(0x4001f800), %g3
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
40006684: 12 80 00 03 bne 40006690 <_TOD_Validate+0xa8>
40006688: 86 10 e3 1c or %g3, 0x31c, %g3 ! 4001fb1c <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
4000668c: 82 00 60 0d add %g1, 0xd, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
40006690: 83 28 60 02 sll %g1, 2, %g1
40006694: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
40006698: 80 a0 40 02 cmp %g1, %g2
4000669c: b0 60 3f ff subx %g0, -1, %i0
400066a0: 81 c7 e0 08 ret
400066a4: 81 e8 00 00 restore
if ( the_tod->day > days_in_month )
return false;
return true;
}
400066a8: 81 c7 e0 08 ret
400066ac: 91 e8 20 00 restore %g0, 0, %o0
40007060 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
40007060: 9d e3 bf a0 save %sp, -96, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
40007064: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
40007068: 40 00 04 1a call 400080d0 <_Thread_Set_transient>
4000706c: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
40007070: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
40007074: a0 10 00 18 mov %i0, %l0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
40007078: 80 a0 40 19 cmp %g1, %i1
4000707c: 02 80 00 04 be 4000708c <_Thread_Change_priority+0x2c>
40007080: 92 10 00 19 mov %i1, %o1
_Thread_Set_priority( the_thread, new_priority );
40007084: 40 00 03 96 call 40007edc <_Thread_Set_priority>
40007088: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
4000708c: 7f ff eb 03 call 40001c98 <sparc_disable_interrupts>
40007090: 01 00 00 00 nop
40007094: b0 10 00 08 mov %o0, %i0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
40007098: e4 04 20 10 ld [ %l0 + 0x10 ], %l2
if ( state != STATES_TRANSIENT ) {
4000709c: 80 a4 a0 04 cmp %l2, 4
400070a0: 02 80 00 10 be 400070e0 <_Thread_Change_priority+0x80>
400070a4: a2 0c 60 04 and %l1, 4, %l1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
400070a8: 80 a4 60 00 cmp %l1, 0
400070ac: 12 80 00 03 bne 400070b8 <_Thread_Change_priority+0x58> <== NEVER TAKEN
400070b0: 82 0c bf fb and %l2, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
400070b4: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
400070b8: 7f ff ea fc call 40001ca8 <sparc_enable_interrupts>
400070bc: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
400070c0: 03 00 00 ef sethi %hi(0x3bc00), %g1
400070c4: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
400070c8: 80 8c 80 01 btst %l2, %g1
400070cc: 02 80 00 5c be 4000723c <_Thread_Change_priority+0x1dc>
400070d0: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
400070d4: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
400070d8: 40 00 03 54 call 40007e28 <_Thread_queue_Requeue>
400070dc: 93 e8 00 10 restore %g0, %l0, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
400070e0: 80 a4 60 00 cmp %l1, 0
400070e4: 12 80 00 1c bne 40007154 <_Thread_Change_priority+0xf4> <== NEVER TAKEN
400070e8: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
400070ec: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
400070f0: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
400070f4: c8 10 80 00 lduh [ %g2 ], %g4
_Priority_Major_bit_map |= the_priority_map->ready_major;
400070f8: 03 10 00 6d sethi %hi(0x4001b400), %g1
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
400070fc: 86 11 00 03 or %g4, %g3, %g3
40007100: c6 30 80 00 sth %g3, [ %g2 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
40007104: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
40007108: c6 14 20 94 lduh [ %l0 + 0x94 ], %g3
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
4000710c: c0 24 20 10 clr [ %l0 + 0x10 ]
40007110: 84 10 c0 02 or %g3, %g2, %g2
40007114: c4 30 60 30 sth %g2, [ %g1 + 0x30 ]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
40007118: 80 8e a0 ff btst 0xff, %i2
4000711c: 02 80 00 08 be 4000713c <_Thread_Change_priority+0xdc>
40007120: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
40007124: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
40007128: c2 24 20 04 st %g1, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
4000712c: e0 20 40 00 st %l0, [ %g1 ]
the_node->next = before_node;
before_node->previous = the_node;
40007130: e0 20 a0 04 st %l0, [ %g2 + 4 ]
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
40007134: 10 80 00 08 b 40007154 <_Thread_Change_priority+0xf4>
40007138: c4 24 00 00 st %g2, [ %l0 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000713c: 84 00 60 04 add %g1, 4, %g2
40007140: c4 24 00 00 st %g2, [ %l0 ]
old_last_node = the_chain->last;
40007144: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_chain->last = the_node;
40007148: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
4000714c: c4 24 20 04 st %g2, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
40007150: e0 20 80 00 st %l0, [ %g2 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
40007154: 7f ff ea d5 call 40001ca8 <sparc_enable_interrupts>
40007158: 90 10 00 18 mov %i0, %o0
4000715c: 7f ff ea cf call 40001c98 <sparc_disable_interrupts>
40007160: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
40007164: 03 10 00 6d sethi %hi(0x4001b400), %g1
40007168: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 ! 4001b430 <_Priority_Major_bit_map>
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
4000716c: 03 10 00 6c sethi %hi(0x4001b000), %g1
40007170: 85 28 a0 10 sll %g2, 0x10, %g2
40007174: da 00 62 d4 ld [ %g1 + 0x2d4 ], %o5
40007178: 87 30 a0 10 srl %g2, 0x10, %g3
4000717c: 03 10 00 67 sethi %hi(0x40019c00), %g1
40007180: 80 a0 e0 ff cmp %g3, 0xff
40007184: 18 80 00 05 bgu 40007198 <_Thread_Change_priority+0x138>
40007188: 82 10 60 30 or %g1, 0x30, %g1
4000718c: c4 08 40 03 ldub [ %g1 + %g3 ], %g2
40007190: 10 80 00 04 b 400071a0 <_Thread_Change_priority+0x140>
40007194: 84 00 a0 08 add %g2, 8, %g2
40007198: 85 30 a0 18 srl %g2, 0x18, %g2
4000719c: c4 08 40 02 ldub [ %g1 + %g2 ], %g2
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
400071a0: 83 28 a0 10 sll %g2, 0x10, %g1
400071a4: 07 10 00 6d sethi %hi(0x4001b400), %g3
400071a8: 83 30 60 0f srl %g1, 0xf, %g1
400071ac: 86 10 e0 b0 or %g3, 0xb0, %g3
400071b0: c6 10 c0 01 lduh [ %g3 + %g1 ], %g3
400071b4: 03 10 00 67 sethi %hi(0x40019c00), %g1
400071b8: 87 28 e0 10 sll %g3, 0x10, %g3
400071bc: 89 30 e0 10 srl %g3, 0x10, %g4
400071c0: 80 a1 20 ff cmp %g4, 0xff
400071c4: 18 80 00 05 bgu 400071d8 <_Thread_Change_priority+0x178>
400071c8: 82 10 60 30 or %g1, 0x30, %g1
400071cc: c2 08 40 04 ldub [ %g1 + %g4 ], %g1
400071d0: 10 80 00 04 b 400071e0 <_Thread_Change_priority+0x180>
400071d4: 82 00 60 08 add %g1, 8, %g1
400071d8: 87 30 e0 18 srl %g3, 0x18, %g3
400071dc: c2 08 40 03 ldub [ %g1 + %g3 ], %g1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
400071e0: 83 28 60 10 sll %g1, 0x10, %g1
400071e4: 83 30 60 10 srl %g1, 0x10, %g1
400071e8: 85 28 a0 10 sll %g2, 0x10, %g2
400071ec: 85 30 a0 0c srl %g2, 0xc, %g2
400071f0: 84 00 40 02 add %g1, %g2, %g2
400071f4: 83 28 a0 04 sll %g2, 4, %g1
400071f8: 85 28 a0 02 sll %g2, 2, %g2
400071fc: 84 20 40 02 sub %g1, %g2, %g2
40007200: c4 03 40 02 ld [ %o5 + %g2 ], %g2
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
40007204: 03 10 00 6d sethi %hi(0x4001b400), %g1
40007208: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
4000720c: 07 10 00 6d sethi %hi(0x4001b400), %g3
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
40007210: 80 a0 40 02 cmp %g1, %g2
40007214: 02 80 00 08 be 40007234 <_Thread_Change_priority+0x1d4>
40007218: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
_Thread_Executing->is_preemptible )
4000721c: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1
40007220: 80 a0 60 00 cmp %g1, 0
40007224: 02 80 00 04 be 40007234 <_Thread_Change_priority+0x1d4>
40007228: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
4000722c: 03 10 00 6d sethi %hi(0x4001b400), %g1
40007230: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary>
_ISR_Enable( level );
40007234: 7f ff ea 9d call 40001ca8 <sparc_enable_interrupts>
40007238: 81 e8 00 00 restore
4000723c: 81 c7 e0 08 ret
40007240: 81 e8 00 00 restore
40007244 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
40007244: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
40007248: 7f ff ea 94 call 40001c98 <sparc_disable_interrupts>
4000724c: a0 10 00 18 mov %i0, %l0
40007250: b0 10 00 08 mov %o0, %i0
current_state = the_thread->current_state;
40007254: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & state ) {
40007258: 80 8e 40 01 btst %i1, %g1
4000725c: 02 80 00 2d be 40007310 <_Thread_Clear_state+0xcc>
40007260: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
40007264: b2 28 40 19 andn %g1, %i1, %i1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
40007268: 80 a6 60 00 cmp %i1, 0
4000726c: 12 80 00 29 bne 40007310 <_Thread_Clear_state+0xcc>
40007270: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
40007274: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
40007278: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
4000727c: c8 10 80 00 lduh [ %g2 ], %g4
40007280: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
40007284: 86 11 00 03 or %g4, %g3, %g3
40007288: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000728c: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
40007290: da 14 20 94 lduh [ %l0 + 0x94 ], %o5
40007294: c4 24 00 00 st %g2, [ %l0 ]
40007298: 07 10 00 6d sethi %hi(0x4001b400), %g3
old_last_node = the_chain->last;
4000729c: c4 00 60 08 ld [ %g1 + 8 ], %g2
400072a0: c8 10 e0 30 lduh [ %g3 + 0x30 ], %g4
the_chain->last = the_node;
400072a4: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
400072a8: c4 24 20 04 st %g2, [ %l0 + 4 ]
400072ac: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
400072b0: e0 20 80 00 st %l0, [ %g2 ]
400072b4: c2 30 e0 30 sth %g1, [ %g3 + 0x30 ]
_ISR_Flash( level );
400072b8: 7f ff ea 7c call 40001ca8 <sparc_enable_interrupts>
400072bc: 01 00 00 00 nop
400072c0: 7f ff ea 76 call 40001c98 <sparc_disable_interrupts>
400072c4: 01 00 00 00 nop
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
400072c8: 05 10 00 6d sethi %hi(0x4001b400), %g2
400072cc: c6 00 a0 0c ld [ %g2 + 0xc ], %g3 ! 4001b40c <_Thread_Heir>
400072d0: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
400072d4: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
400072d8: 80 a0 40 03 cmp %g1, %g3
400072dc: 1a 80 00 0d bcc 40007310 <_Thread_Clear_state+0xcc>
400072e0: 07 10 00 6d sethi %hi(0x4001b400), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
400072e4: c6 00 e0 3c ld [ %g3 + 0x3c ], %g3 ! 4001b43c <_Thread_Executing>
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
400072e8: e0 20 a0 0c st %l0, [ %g2 + 0xc ]
if ( _Thread_Executing->is_preemptible ||
400072ec: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2
400072f0: 80 a0 a0 00 cmp %g2, 0
400072f4: 12 80 00 05 bne 40007308 <_Thread_Clear_state+0xc4>
400072f8: 84 10 20 01 mov 1, %g2
400072fc: 80 a0 60 00 cmp %g1, 0
40007300: 12 80 00 04 bne 40007310 <_Thread_Clear_state+0xcc> <== ALWAYS TAKEN
40007304: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
40007308: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000730c: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
40007310: 7f ff ea 66 call 40001ca8 <sparc_enable_interrupts>
40007314: 81 e8 00 00 restore
4000749c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
4000749c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
400074a0: 90 10 00 18 mov %i0, %o0
400074a4: 40 00 00 6c call 40007654 <_Thread_Get>
400074a8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
400074ac: c2 07 bf fc ld [ %fp + -4 ], %g1
400074b0: 80 a0 60 00 cmp %g1, 0
400074b4: 12 80 00 08 bne 400074d4 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
400074b8: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
400074bc: 7f ff ff 62 call 40007244 <_Thread_Clear_state>
400074c0: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_SIZE+0xfc00018>
400074c4: 03 10 00 6c sethi %hi(0x4001b000), %g1
400074c8: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level>
400074cc: 84 00 bf ff add %g2, -1, %g2
400074d0: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
400074d4: 81 c7 e0 08 ret
400074d8: 81 e8 00 00 restore
400074dc <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
400074dc: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
400074e0: 2d 10 00 6d sethi %hi(0x4001b400), %l6
_ISR_Disable( level );
400074e4: 7f ff e9 ed call 40001c98 <sparc_disable_interrupts>
400074e8: e0 05 a0 3c ld [ %l6 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
while ( _Context_Switch_necessary == true ) {
400074ec: 2b 10 00 6d sethi %hi(0x4001b400), %l5
400074f0: 35 10 00 6c sethi %hi(0x4001b000), %i2
heir = _Thread_Heir;
400074f4: 37 10 00 6d sethi %hi(0x4001b400), %i3
#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;
400074f8: 39 10 00 6c sethi %hi(0x4001b000), %i4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
400074fc: 25 10 00 6d sethi %hi(0x4001b400), %l2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40007500: 3b 10 00 6d sethi %hi(0x4001b400), %i5
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
40007504: ac 15 a0 3c or %l6, 0x3c, %l6
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
40007508: aa 15 60 4c or %l5, 0x4c, %l5
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
4000750c: b4 16 a3 80 or %i2, 0x380, %i2
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
40007510: b6 16 e0 0c or %i3, 0xc, %i3
#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;
40007514: b8 17 22 d8 or %i4, 0x2d8, %i4
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
40007518: a4 14 a0 44 or %l2, 0x44, %l2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
4000751c: ba 17 60 08 or %i5, 8, %i5
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
40007520: ae 10 20 01 mov 1, %l7
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
40007524: a8 07 bf f8 add %fp, -8, %l4
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
40007528: 10 80 00 29 b 400075cc <_Thread_Dispatch+0xf0>
4000752c: a6 07 bf f0 add %fp, -16, %l3
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
40007530: ee 26 80 00 st %l7, [ %i2 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
40007534: c2 04 60 7c ld [ %l1 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
40007538: c0 2d 40 00 clrb [ %l5 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
4000753c: 80 a0 60 01 cmp %g1, 1
40007540: 12 80 00 04 bne 40007550 <_Thread_Dispatch+0x74>
40007544: e2 25 80 00 st %l1, [ %l6 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
40007548: c2 07 00 00 ld [ %i4 ], %g1
4000754c: c2 24 60 78 st %g1, [ %l1 + 0x78 ]
_ISR_Enable( level );
40007550: 7f ff e9 d6 call 40001ca8 <sparc_enable_interrupts>
40007554: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
40007558: 40 00 0e 43 call 4000ae64 <_TOD_Get_uptime>
4000755c: 90 10 00 14 mov %l4, %o0
_Timestamp_Subtract(
40007560: 90 10 00 12 mov %l2, %o0
40007564: 92 10 00 14 mov %l4, %o1
40007568: 40 00 03 a4 call 400083f8 <_Timespec_Subtract>
4000756c: 94 10 00 13 mov %l3, %o2
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
40007570: 92 10 00 13 mov %l3, %o1
40007574: 40 00 03 87 call 40008390 <_Timespec_Add_to>
40007578: 90 04 20 84 add %l0, 0x84, %o0
_Thread_Time_of_last_context_switch = uptime;
4000757c: c4 07 bf f8 ld [ %fp + -8 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40007580: c2 07 40 00 ld [ %i5 ], %g1
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
40007584: c4 24 80 00 st %g2, [ %l2 ]
40007588: c4 07 bf fc ld [ %fp + -4 ], %g2
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
4000758c: 90 10 00 10 mov %l0, %o0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
40007590: c4 24 a0 04 st %g2, [ %l2 + 4 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
40007594: 80 a0 60 00 cmp %g1, 0
40007598: 02 80 00 06 be 400075b0 <_Thread_Dispatch+0xd4> <== NEVER TAKEN
4000759c: 92 10 00 11 mov %l1, %o1
executing->libc_reent = *_Thread_libc_reent;
400075a0: c4 00 40 00 ld [ %g1 ], %g2
400075a4: c4 24 21 58 st %g2, [ %l0 + 0x158 ]
*_Thread_libc_reent = heir->libc_reent;
400075a8: c4 04 61 58 ld [ %l1 + 0x158 ], %g2
400075ac: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
400075b0: 40 00 04 47 call 400086cc <_User_extensions_Thread_switch>
400075b4: 01 00 00 00 nop
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
400075b8: 90 04 20 d0 add %l0, 0xd0, %o0
400075bc: 40 00 05 3b call 40008aa8 <_CPU_Context_switch>
400075c0: 92 04 60 d0 add %l1, 0xd0, %o1
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
400075c4: 7f ff e9 b5 call 40001c98 <sparc_disable_interrupts>
400075c8: e0 05 80 00 ld [ %l6 ], %l0
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
400075cc: c2 0d 40 00 ldub [ %l5 ], %g1
400075d0: 80 a0 60 00 cmp %g1, 0
400075d4: 32 bf ff d7 bne,a 40007530 <_Thread_Dispatch+0x54>
400075d8: e2 06 c0 00 ld [ %i3 ], %l1
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
400075dc: 03 10 00 6c sethi %hi(0x4001b000), %g1
400075e0: c0 20 63 80 clr [ %g1 + 0x380 ] ! 4001b380 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
400075e4: 7f ff e9 b1 call 40001ca8 <sparc_enable_interrupts>
400075e8: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
400075ec: 03 10 00 6d sethi %hi(0x4001b400), %g1
400075f0: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 ! 4001b420 <_Thread_Do_post_task_switch_extension>
400075f4: 80 a0 60 00 cmp %g1, 0
400075f8: 12 80 00 06 bne 40007610 <_Thread_Dispatch+0x134> <== NEVER TAKEN
400075fc: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
40007600: c2 0c 20 74 ldub [ %l0 + 0x74 ], %g1
40007604: 80 a0 60 00 cmp %g1, 0
40007608: 02 80 00 04 be 40007618 <_Thread_Dispatch+0x13c>
4000760c: 01 00 00 00 nop
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
40007610: 7f ff f9 eb call 40005dbc <_API_extensions_Run_postswitch>
40007614: c0 2c 20 74 clrb [ %l0 + 0x74 ]
40007618: 81 c7 e0 08 ret
4000761c: 81 e8 00 00 restore
4000cb54 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
4000cb54: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000cb58: c2 00 60 3c ld [ %g1 + 0x3c ], %g1 ! 4001b43c <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
4000cb5c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000cb60: 80 a0 a0 00 cmp %g2, 0
4000cb64: 12 80 00 0b bne 4000cb90 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
4000cb68: 84 10 20 01 mov 1, %g2
4000cb6c: 05 10 00 6d sethi %hi(0x4001b400), %g2
4000cb70: c4 00 a0 0c ld [ %g2 + 0xc ], %g2 ! 4001b40c <_Thread_Heir>
4000cb74: 80 a0 40 02 cmp %g1, %g2
4000cb78: 02 80 00 0b be 4000cba4 <_Thread_Evaluate_mode+0x50>
4000cb7c: 01 00 00 00 nop
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4000cb80: c2 08 60 75 ldub [ %g1 + 0x75 ], %g1
4000cb84: 80 a0 60 00 cmp %g1, 0
4000cb88: 02 80 00 07 be 4000cba4 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
4000cb8c: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
4000cb90: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000cb94: 90 10 20 01 mov 1, %o0
4000cb98: c4 28 60 4c stb %g2, [ %g1 + 0x4c ]
return true;
4000cb9c: 81 c3 e0 08 retl
4000cba0: 01 00 00 00 nop
}
return false;
}
4000cba4: 81 c3 e0 08 retl
4000cba8: 90 10 20 00 clr %o0 ! 0 <PROM_START>
4000cbac <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4000cbac: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4000cbb0: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000cbb4: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
4000cbb8: 3f 10 00 32 sethi %hi(0x4000c800), %i7
4000cbbc: be 17 e3 ac or %i7, 0x3ac, %i7 ! 4000cbac <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4000cbc0: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
4000cbc4: 7f ff d4 39 call 40001ca8 <sparc_enable_interrupts>
4000cbc8: 91 2a 20 08 sll %o0, 8, %o0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4000cbcc: 03 10 00 6c sethi %hi(0x4001b000), %g1
doneConstructors = 1;
4000cbd0: 84 10 20 01 mov 1, %g2
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4000cbd4: e2 08 61 38 ldub [ %g1 + 0x138 ], %l1
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
4000cbd8: 90 10 00 10 mov %l0, %o0
4000cbdc: 7f ff ee 49 call 40008500 <_User_extensions_Thread_begin>
4000cbe0: c4 28 61 38 stb %g2, [ %g1 + 0x138 ]
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4000cbe4: 7f ff ea 8f call 40007620 <_Thread_Enable_dispatch>
4000cbe8: a3 2c 60 18 sll %l1, 0x18, %l1
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
4000cbec: 80 a4 60 00 cmp %l1, 0
4000cbf0: 32 80 00 05 bne,a 4000cc04 <_Thread_Handler+0x58>
4000cbf4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
INIT_NAME ();
4000cbf8: 40 00 37 68 call 4001a998 <_init>
4000cbfc: 01 00 00 00 nop
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4000cc00: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
4000cc04: 80 a0 60 00 cmp %g1, 0
4000cc08: 12 80 00 06 bne 4000cc20 <_Thread_Handler+0x74> <== NEVER TAKEN
4000cc0c: 01 00 00 00 nop
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4000cc10: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
4000cc14: 9f c0 40 00 call %g1
4000cc18: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4000cc1c: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4000cc20: 7f ff ee 49 call 40008544 <_User_extensions_Thread_exitted>
4000cc24: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
4000cc28: 90 10 20 00 clr %o0
4000cc2c: 92 10 20 01 mov 1, %o1
4000cc30: 7f ff e6 ce call 40006768 <_Internal_error_Occurred>
4000cc34: 94 10 20 06 mov 6, %o2
40007700 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
40007700: 9d e3 bf a0 save %sp, -96, %sp
40007704: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
40007708: c0 26 61 5c clr [ %i1 + 0x15c ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
4000770c: 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;
40007710: c0 26 61 60 clr [ %i1 + 0x160 ]
40007714: c0 26 61 64 clr [ %i1 + 0x164 ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
40007718: c0 26 61 58 clr [ %i1 + 0x158 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
4000771c: e2 0f a0 5f ldub [ %fp + 0x5f ], %l1
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
40007720: 90 10 00 19 mov %i1, %o0
40007724: 40 00 02 90 call 40008164 <_Thread_Stack_Allocate>
40007728: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
4000772c: 80 a2 00 1b cmp %o0, %i3
40007730: 0a 80 00 04 bcs 40007740 <_Thread_Initialize+0x40>
40007734: 80 a2 20 00 cmp %o0, 0
40007738: 32 80 00 04 bne,a 40007748 <_Thread_Initialize+0x48> <== ALWAYS TAKEN
4000773c: c4 06 60 c8 ld [ %i1 + 0xc8 ], %g2
40007740: 81 c7 e0 08 ret
40007744: 91 e8 20 00 restore %g0, 0, %o0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
40007748: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000774c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 ! 4001b41c <_Thread_Maximum_extensions>
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
40007750: c4 26 60 c4 st %g2, [ %i1 + 0xc4 ]
the_stack->size = size;
40007754: d0 26 60 c0 st %o0, [ %i1 + 0xc0 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40007758: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
4000775c: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
40007760: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
40007764: c0 26 60 6c clr [ %i1 + 0x6c ]
40007768: 80 a0 60 00 cmp %g1, 0
4000776c: 02 80 00 08 be 4000778c <_Thread_Initialize+0x8c>
40007770: b6 10 20 00 clr %i3
extensions_area = _Workspace_Allocate(
40007774: 82 00 60 01 inc %g1
40007778: 40 00 04 a3 call 40008a04 <_Workspace_Allocate>
4000777c: 91 28 60 02 sll %g1, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
40007780: b6 92 20 00 orcc %o0, 0, %i3
40007784: 22 80 00 2d be,a 40007838 <_Thread_Initialize+0x138>
40007788: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
4000778c: 80 a6 e0 00 cmp %i3, 0
40007790: 02 80 00 0c be 400077c0 <_Thread_Initialize+0xc0>
40007794: f6 26 61 68 st %i3, [ %i1 + 0x168 ]
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
40007798: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000779c: c4 00 60 1c ld [ %g1 + 0x1c ], %g2 ! 4001b41c <_Thread_Maximum_extensions>
400077a0: 10 80 00 05 b 400077b4 <_Thread_Initialize+0xb4>
400077a4: 82 10 20 00 clr %g1
the_thread->extensions[i] = NULL;
400077a8: 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++ )
400077ac: 82 00 60 01 inc %g1
the_thread->extensions[i] = NULL;
400077b0: 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++ )
400077b4: 80 a0 40 02 cmp %g1, %g2
400077b8: 28 bf ff fc bleu,a 400077a8 <_Thread_Initialize+0xa8>
400077bc: c8 06 61 68 ld [ %i1 + 0x168 ], %g4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
400077c0: c2 07 a0 60 ld [ %fp + 0x60 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
400077c4: 92 10 00 1d mov %i5, %o1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
400077c8: c2 26 60 b0 st %g1, [ %i1 + 0xb0 ]
the_thread->Start.budget_callout = budget_callout;
400077cc: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
400077d0: 90 10 00 19 mov %i1, %o0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
400077d4: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
400077d8: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
400077dc: e2 2e 60 ac stb %l1, [ %i1 + 0xac ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
400077e0: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
400077e4: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
400077e8: c0 26 60 44 clr [ %i1 + 0x44 ]
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
400077ec: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
400077f0: c0 26 60 1c clr [ %i1 + 0x1c ]
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
400077f4: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
400077f8: 40 00 01 b9 call 40007edc <_Thread_Set_priority>
400077fc: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40007800: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
40007804: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
40007808: 83 28 60 02 sll %g1, 2, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4000780c: e0 26 60 0c st %l0, [ %i1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40007810: f2 20 80 01 st %i1, [ %g2 + %g1 ]
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
40007814: c0 26 60 84 clr [ %i1 + 0x84 ]
40007818: c0 26 60 88 clr [ %i1 + 0x88 ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
4000781c: 90 10 00 19 mov %i1, %o0
40007820: 40 00 03 6d call 400085d4 <_User_extensions_Thread_create>
40007824: b0 10 20 01 mov 1, %i0
if ( extension_status )
40007828: 80 8a 20 ff btst 0xff, %o0
4000782c: 12 80 00 22 bne 400078b4 <_Thread_Initialize+0x1b4>
40007830: 01 00 00 00 nop
return true;
failed:
if ( the_thread->libc_reent )
40007834: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
40007838: 80 a2 20 00 cmp %o0, 0
4000783c: 22 80 00 05 be,a 40007850 <_Thread_Initialize+0x150>
40007840: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( the_thread->libc_reent );
40007844: 40 00 04 79 call 40008a28 <_Workspace_Free>
40007848: 01 00 00 00 nop
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
4000784c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
40007850: 80 a2 20 00 cmp %o0, 0
40007854: 22 80 00 05 be,a 40007868 <_Thread_Initialize+0x168>
40007858: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
4000785c: 40 00 04 73 call 40008a28 <_Workspace_Free>
40007860: 01 00 00 00 nop
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
40007864: d0 06 61 60 ld [ %i1 + 0x160 ], %o0
40007868: 80 a2 20 00 cmp %o0, 0
4000786c: 22 80 00 05 be,a 40007880 <_Thread_Initialize+0x180> <== ALWAYS TAKEN
40007870: d0 06 61 64 ld [ %i1 + 0x164 ], %o0
_Workspace_Free( the_thread->API_Extensions[i] );
40007874: 40 00 04 6d call 40008a28 <_Workspace_Free> <== NOT EXECUTED
40007878: 01 00 00 00 nop <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
4000787c: d0 06 61 64 ld [ %i1 + 0x164 ], %o0 <== NOT EXECUTED
40007880: 80 a2 20 00 cmp %o0, 0
40007884: 02 80 00 05 be 40007898 <_Thread_Initialize+0x198> <== ALWAYS TAKEN
40007888: 80 a6 e0 00 cmp %i3, 0
_Workspace_Free( the_thread->API_Extensions[i] );
4000788c: 40 00 04 67 call 40008a28 <_Workspace_Free> <== NOT EXECUTED
40007890: 01 00 00 00 nop <== NOT EXECUTED
if ( extensions_area )
40007894: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED
40007898: 02 80 00 05 be 400078ac <_Thread_Initialize+0x1ac>
4000789c: 90 10 00 19 mov %i1, %o0
(void) _Workspace_Free( extensions_area );
400078a0: 40 00 04 62 call 40008a28 <_Workspace_Free>
400078a4: 90 10 00 1b mov %i3, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
400078a8: 90 10 00 19 mov %i1, %o0
400078ac: 40 00 02 45 call 400081c0 <_Thread_Stack_Free>
400078b0: b0 10 20 00 clr %i0
return false;
}
400078b4: 81 c7 e0 08 ret
400078b8: 81 e8 00 00 restore
4000b700 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4000b700: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
4000b704: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000b708: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
4000b70c: 7f ff d9 63 call 40001c98 <sparc_disable_interrupts>
4000b710: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
4000b714: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
4000b718: c4 04 40 00 ld [ %l1 ], %g2
4000b71c: c2 04 60 08 ld [ %l1 + 8 ], %g1
4000b720: 80 a0 80 01 cmp %g2, %g1
4000b724: 32 80 00 03 bne,a 4000b730 <_Thread_Reset_timeslice+0x30>
4000b728: c2 04 00 00 ld [ %l0 ], %g1
_ISR_Enable( level );
4000b72c: 30 80 00 18 b,a 4000b78c <_Thread_Reset_timeslice+0x8c>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4000b730: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000b734: 86 04 60 04 add %l1, 4, %g3
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
4000b738: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000b73c: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4000b740: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4000b744: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
4000b748: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
4000b74c: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4000b750: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4000b754: 7f ff d9 55 call 40001ca8 <sparc_enable_interrupts>
4000b758: 01 00 00 00 nop
4000b75c: 7f ff d9 4f call 40001c98 <sparc_disable_interrupts>
4000b760: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
4000b764: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000b768: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4001b40c <_Thread_Heir>
4000b76c: 80 a4 00 02 cmp %l0, %g2
4000b770: 12 80 00 05 bne 4000b784 <_Thread_Reset_timeslice+0x84> <== NEVER TAKEN
4000b774: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
4000b778: c4 04 40 00 ld [ %l1 ], %g2
4000b77c: c4 20 60 0c st %g2, [ %g1 + 0xc ]
_Context_Switch_necessary = true;
4000b780: 84 10 20 01 mov 1, %g2
4000b784: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000b788: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary>
_ISR_Enable( level );
4000b78c: 7f ff d9 47 call 40001ca8 <sparc_enable_interrupts>
4000b790: 81 e8 00 00 restore
4000c10c <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4000c10c: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4000c110: 7f ff d7 5e call 40001e88 <sparc_disable_interrupts>
4000c114: a0 10 00 18 mov %i0, %l0
4000c118: b0 10 00 08 mov %o0, %i0
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4000c11c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
if ( current_state & STATES_SUSPENDED ) {
4000c120: 80 88 60 02 btst 2, %g1
4000c124: 02 80 00 2c be 4000c1d4 <_Thread_Resume+0xc8> <== NEVER TAKEN
4000c128: 82 08 7f fd and %g1, -3, %g1
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4000c12c: 80 a0 60 00 cmp %g1, 0
4000c130: 12 80 00 29 bne 4000c1d4 <_Thread_Resume+0xc8>
4000c134: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4000c138: c4 04 20 90 ld [ %l0 + 0x90 ], %g2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4000c13c: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
4000c140: c8 10 80 00 lduh [ %g2 ], %g4
4000c144: c6 14 20 96 lduh [ %l0 + 0x96 ], %g3
4000c148: 86 11 00 03 or %g4, %g3, %g3
4000c14c: c6 30 80 00 sth %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4000c150: 84 00 60 04 add %g1, 4, %g2
_Priority_Major_bit_map |= the_priority_map->ready_major;
4000c154: da 14 20 94 lduh [ %l0 + 0x94 ], %o5
4000c158: c4 24 00 00 st %g2, [ %l0 ]
4000c15c: 07 10 00 84 sethi %hi(0x40021000), %g3
old_last_node = the_chain->last;
4000c160: c4 00 60 08 ld [ %g1 + 8 ], %g2
4000c164: c8 10 e1 30 lduh [ %g3 + 0x130 ], %g4
the_chain->last = the_node;
4000c168: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
4000c16c: c4 24 20 04 st %g2, [ %l0 + 4 ]
4000c170: 82 13 40 04 or %o5, %g4, %g1
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4000c174: e0 20 80 00 st %l0, [ %g2 ]
4000c178: c2 30 e1 30 sth %g1, [ %g3 + 0x130 ]
_ISR_Flash( level );
4000c17c: 7f ff d7 47 call 40001e98 <sparc_enable_interrupts>
4000c180: 01 00 00 00 nop
4000c184: 7f ff d7 41 call 40001e88 <sparc_disable_interrupts>
4000c188: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4000c18c: 05 10 00 84 sethi %hi(0x40021000), %g2
4000c190: c6 00 a1 0c ld [ %g2 + 0x10c ], %g3 ! 4002110c <_Thread_Heir>
4000c194: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
4000c198: c6 00 e0 14 ld [ %g3 + 0x14 ], %g3
4000c19c: 80 a0 40 03 cmp %g1, %g3
4000c1a0: 1a 80 00 0d bcc 4000c1d4 <_Thread_Resume+0xc8>
4000c1a4: 07 10 00 84 sethi %hi(0x40021000), %g3
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4000c1a8: c6 00 e1 3c ld [ %g3 + 0x13c ], %g3 ! 4002113c <_Thread_Executing>
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
4000c1ac: e0 20 a1 0c st %l0, [ %g2 + 0x10c ]
if ( _Thread_Executing->is_preemptible ||
4000c1b0: c4 08 e0 75 ldub [ %g3 + 0x75 ], %g2
4000c1b4: 80 a0 a0 00 cmp %g2, 0
4000c1b8: 12 80 00 05 bne 4000c1cc <_Thread_Resume+0xc0>
4000c1bc: 84 10 20 01 mov 1, %g2
4000c1c0: 80 a0 60 00 cmp %g1, 0
4000c1c4: 12 80 00 04 bne 4000c1d4 <_Thread_Resume+0xc8> <== ALWAYS TAKEN
4000c1c8: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4000c1cc: 03 10 00 84 sethi %hi(0x40021000), %g1
4000c1d0: c4 28 61 4c stb %g2, [ %g1 + 0x14c ] ! 4002114c <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4000c1d4: 7f ff d7 31 call 40001e98 <sparc_enable_interrupts>
4000c1d8: 81 e8 00 00 restore
400082ec <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
400082ec: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
400082f0: 03 10 00 6d sethi %hi(0x4001b400), %g1
400082f4: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
400082f8: 7f ff e6 68 call 40001c98 <sparc_disable_interrupts>
400082fc: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
40008300: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
40008304: c4 04 40 00 ld [ %l1 ], %g2
40008308: c2 04 60 08 ld [ %l1 + 8 ], %g1
4000830c: 80 a0 80 01 cmp %g2, %g1
40008310: 02 80 00 17 be 4000836c <_Thread_Yield_processor+0x80>
40008314: 25 10 00 6d sethi %hi(0x4001b400), %l2
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
40008318: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
4000831c: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
40008320: 86 04 60 04 add %l1, 4, %g3
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
40008324: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
40008328: c6 24 00 00 st %g3, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4000832c: c4 20 60 04 st %g2, [ %g1 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
40008330: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
40008334: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
40008338: c2 24 20 04 st %g1, [ %l0 + 4 ]
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4000833c: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
40008340: 7f ff e6 5a call 40001ca8 <sparc_enable_interrupts>
40008344: 01 00 00 00 nop
40008348: 7f ff e6 54 call 40001c98 <sparc_disable_interrupts>
4000834c: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
40008350: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
40008354: 80 a4 00 01 cmp %l0, %g1
40008358: 12 80 00 09 bne 4000837c <_Thread_Yield_processor+0x90> <== NEVER TAKEN
4000835c: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
40008360: c2 04 40 00 ld [ %l1 ], %g1
40008364: 10 80 00 06 b 4000837c <_Thread_Yield_processor+0x90>
40008368: c2 24 a0 0c st %g1, [ %l2 + 0xc ]
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
4000836c: c2 04 a0 0c ld [ %l2 + 0xc ], %g1
40008370: 80 a4 00 01 cmp %l0, %g1
40008374: 02 80 00 04 be 40008384 <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN
40008378: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = true;
4000837c: 03 10 00 6d sethi %hi(0x4001b400), %g1
40008380: c4 28 60 4c stb %g2, [ %g1 + 0x4c ] ! 4001b44c <_Context_Switch_necessary>
_ISR_Enable( level );
40008384: 7f ff e6 49 call 40001ca8 <sparc_enable_interrupts>
40008388: 81 e8 00 00 restore
40007bd0 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
40007bd0: 9d e3 bf a0 save %sp, -96, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
40007bd4: e0 06 60 14 ld [ %i1 + 0x14 ], %l0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40007bd8: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
40007bdc: c0 26 60 3c clr [ %i1 + 0x3c ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40007be0: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
40007be4: 82 06 60 38 add %i1, 0x38, %g1
40007be8: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
40007bec: 2d 10 00 6a sethi %hi(0x4001a800), %l6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
40007bf0: 83 34 20 06 srl %l0, 6, %g1
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
40007bf4: 80 8c 20 20 btst 0x20, %l0
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
40007bf8: a7 28 60 04 sll %g1, 4, %l3
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
40007bfc: ac 15 a2 94 or %l6, 0x294, %l6
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
40007c00: 83 28 60 02 sll %g1, 2, %g1
block_state = the_thread_queue->state;
40007c04: ea 06 20 38 ld [ %i0 + 0x38 ], %l5
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
40007c08: a6 24 c0 01 sub %l3, %g1, %l3
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
40007c0c: 12 80 00 28 bne 40007cac <_Thread_queue_Enqueue_priority+0xdc>
40007c10: a6 06 00 13 add %i0, %l3, %l3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
40007c14: ac 04 e0 04 add %l3, 4, %l6
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
40007c18: 7f ff e8 20 call 40001c98 <sparc_disable_interrupts>
40007c1c: 01 00 00 00 nop
40007c20: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->first;
40007c24: a8 10 3f ff mov -1, %l4
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
40007c28: 10 80 00 10 b 40007c68 <_Thread_queue_Enqueue_priority+0x98>
40007c2c: e2 04 c0 00 ld [ %l3 ], %l1
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
40007c30: 80 a4 00 14 cmp %l0, %l4
40007c34: 28 80 00 11 bleu,a 40007c78 <_Thread_queue_Enqueue_priority+0xa8>
40007c38: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
40007c3c: 7f ff e8 1b call 40001ca8 <sparc_enable_interrupts>
40007c40: 90 10 00 12 mov %l2, %o0
40007c44: 7f ff e8 15 call 40001c98 <sparc_disable_interrupts>
40007c48: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
40007c4c: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
40007c50: 80 8d 40 01 btst %l5, %g1
40007c54: 32 80 00 05 bne,a 40007c68 <_Thread_queue_Enqueue_priority+0x98><== ALWAYS TAKEN
40007c58: e2 04 40 00 ld [ %l1 ], %l1
_ISR_Enable( level );
40007c5c: 7f ff e8 13 call 40001ca8 <sparc_enable_interrupts> <== NOT EXECUTED
40007c60: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
goto restart_forward_search;
40007c64: 30 bf ff ed b,a 40007c18 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
40007c68: 80 a4 40 16 cmp %l1, %l6
40007c6c: 32 bf ff f1 bne,a 40007c30 <_Thread_queue_Enqueue_priority+0x60>
40007c70: e8 04 60 14 ld [ %l1 + 0x14 ], %l4
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
40007c74: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
40007c78: 80 a0 60 01 cmp %g1, 1
40007c7c: 12 80 00 3c bne 40007d6c <_Thread_queue_Enqueue_priority+0x19c>
40007c80: 90 10 00 12 mov %l2, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
40007c84: 80 a4 00 14 cmp %l0, %l4
40007c88: 02 80 00 2e be 40007d40 <_Thread_queue_Enqueue_priority+0x170>
40007c8c: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
40007c90: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
40007c94: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
40007c98: c2 26 60 04 st %g1, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
40007c9c: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
40007ca0: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
40007ca4: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40007ca8: 30 80 00 2d b,a 40007d5c <_Thread_queue_Enqueue_priority+0x18c>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
40007cac: 7f ff e7 fb call 40001c98 <sparc_disable_interrupts>
40007cb0: e8 0d 80 00 ldub [ %l6 ], %l4
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
40007cb4: a8 05 20 01 inc %l4
_ISR_Disable( level );
40007cb8: a4 10 00 08 mov %o0, %l2
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
40007cbc: 10 80 00 10 b 40007cfc <_Thread_queue_Enqueue_priority+0x12c>
40007cc0: e2 04 e0 08 ld [ %l3 + 8 ], %l1
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
40007cc4: 80 a4 00 14 cmp %l0, %l4
40007cc8: 3a 80 00 11 bcc,a 40007d0c <_Thread_queue_Enqueue_priority+0x13c>
40007ccc: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
40007cd0: 7f ff e7 f6 call 40001ca8 <sparc_enable_interrupts>
40007cd4: 90 10 00 12 mov %l2, %o0
40007cd8: 7f ff e7 f0 call 40001c98 <sparc_disable_interrupts>
40007cdc: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
40007ce0: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
40007ce4: 80 8d 40 01 btst %l5, %g1
40007ce8: 32 80 00 05 bne,a 40007cfc <_Thread_queue_Enqueue_priority+0x12c><== ALWAYS TAKEN
40007cec: e2 04 60 04 ld [ %l1 + 4 ], %l1
_ISR_Enable( level );
40007cf0: 7f ff e7 ee call 40001ca8 <sparc_enable_interrupts> <== NOT EXECUTED
40007cf4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
goto restart_reverse_search;
40007cf8: 30 bf ff ed b,a 40007cac <_Thread_queue_Enqueue_priority+0xdc><== NOT EXECUTED
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
40007cfc: 80 a4 40 13 cmp %l1, %l3
40007d00: 32 bf ff f1 bne,a 40007cc4 <_Thread_queue_Enqueue_priority+0xf4>
40007d04: e8 04 60 14 ld [ %l1 + 0x14 ], %l4
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
40007d08: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
40007d0c: 80 a0 60 01 cmp %g1, 1
40007d10: 12 80 00 17 bne 40007d6c <_Thread_queue_Enqueue_priority+0x19c>
40007d14: 90 10 00 12 mov %l2, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
40007d18: 80 a4 00 14 cmp %l0, %l4
40007d1c: 02 80 00 09 be 40007d40 <_Thread_queue_Enqueue_priority+0x170>
40007d20: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
40007d24: c2 04 40 00 ld [ %l1 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
40007d28: e2 26 60 04 st %l1, [ %i1 + 4 ]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
40007d2c: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
40007d30: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
40007d34: f2 24 40 00 st %i1, [ %l1 ]
next_node->previous = the_node;
40007d38: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40007d3c: 30 80 00 08 b,a 40007d5c <_Thread_queue_Enqueue_priority+0x18c>
40007d40: a2 04 60 3c add %l1, 0x3c, %l1
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
40007d44: c2 04 60 04 ld [ %l1 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
40007d48: e2 26 40 00 st %l1, [ %i1 ]
the_node->previous = previous_node;
40007d4c: c2 26 60 04 st %g1, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
40007d50: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
40007d54: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
40007d58: f2 24 60 04 st %i1, [ %l1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
40007d5c: 7f ff e7 d3 call 40001ca8 <sparc_enable_interrupts>
40007d60: b0 10 20 01 mov 1, %i0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
40007d64: 81 c7 e0 08 ret
40007d68: 81 e8 00 00 restore
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
40007d6c: f0 06 20 30 ld [ %i0 + 0x30 ], %i0
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
40007d70: d0 26 80 00 st %o0, [ %i2 ]
return the_thread_queue->sync_state;
}
40007d74: 81 c7 e0 08 ret
40007d78: 81 e8 00 00 restore
40007e28 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
40007e28: 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 )
40007e2c: 80 a6 20 00 cmp %i0, 0
40007e30: 02 80 00 19 be 40007e94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
40007e34: 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 ) {
40007e38: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
40007e3c: 80 a4 60 01 cmp %l1, 1
40007e40: 12 80 00 15 bne 40007e94 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
40007e44: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
40007e48: 7f ff e7 94 call 40001c98 <sparc_disable_interrupts>
40007e4c: 01 00 00 00 nop
40007e50: a0 10 00 08 mov %o0, %l0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
40007e54: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
40007e58: 03 00 00 ef sethi %hi(0x3bc00), %g1
40007e5c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
40007e60: 80 88 80 01 btst %g2, %g1
40007e64: 02 80 00 0a be 40007e8c <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
40007e68: 94 10 20 01 mov 1, %o2
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
40007e6c: 90 10 00 18 mov %i0, %o0
40007e70: 92 10 00 19 mov %i1, %o1
40007e74: 40 00 0d 81 call 4000b478 <_Thread_queue_Extract_priority_helper>
40007e78: e2 26 20 30 st %l1, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
40007e7c: 90 10 00 18 mov %i0, %o0
40007e80: 92 10 00 19 mov %i1, %o1
40007e84: 7f ff ff 53 call 40007bd0 <_Thread_queue_Enqueue_priority>
40007e88: 94 07 bf fc add %fp, -4, %o2
}
_ISR_Enable( level );
40007e8c: 7f ff e7 87 call 40001ca8 <sparc_enable_interrupts>
40007e90: 90 10 00 10 mov %l0, %o0
40007e94: 81 c7 e0 08 ret
40007e98: 81 e8 00 00 restore
40007e9c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
40007e9c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
40007ea0: 90 10 00 18 mov %i0, %o0
40007ea4: 7f ff fd ec call 40007654 <_Thread_Get>
40007ea8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40007eac: c2 07 bf fc ld [ %fp + -4 ], %g1
40007eb0: 80 a0 60 00 cmp %g1, 0
40007eb4: 12 80 00 08 bne 40007ed4 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
40007eb8: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
40007ebc: 40 00 0d a7 call 4000b558 <_Thread_queue_Process_timeout>
40007ec0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
40007ec4: 03 10 00 6c sethi %hi(0x4001b000), %g1
40007ec8: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001b380 <_Thread_Dispatch_disable_level>
40007ecc: 84 00 bf ff add %g2, -1, %g2
40007ed0: c4 20 63 80 st %g2, [ %g1 + 0x380 ]
40007ed4: 81 c7 e0 08 ret
40007ed8: 81 e8 00 00 restore
40015048 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
40015048: 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;
4001504c: 35 10 00 ef sethi %hi(0x4003bc00), %i2
40015050: b2 07 bf f4 add %fp, -12, %i1
40015054: ac 07 bf f8 add %fp, -8, %l6
40015058: a2 07 bf e8 add %fp, -24, %l1
4001505c: a6 07 bf ec add %fp, -20, %l3
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
40015060: 37 10 00 ef sethi %hi(0x4003bc00), %i3
40015064: 2b 10 00 ef sethi %hi(0x4003bc00), %l5
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
40015068: c0 27 bf f8 clr [ %fp + -8 ]
4001506c: c0 27 bf ec clr [ %fp + -20 ]
the_chain->last = _Chain_Head(the_chain);
40015070: f2 27 bf fc st %i1, [ %fp + -4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
40015074: ec 27 bf f4 st %l6, [ %fp + -12 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
40015078: e2 27 bf f0 st %l1, [ %fp + -16 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4001507c: e6 27 bf e8 st %l3, [ %fp + -24 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
40015080: b4 16 a3 44 or %i2, 0x344, %i2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
40015084: b6 16 e2 80 or %i3, 0x280, %i3
40015088: aa 15 61 f0 or %l5, 0x1f0, %l5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
4001508c: a8 06 20 30 add %i0, 0x30, %l4
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
40015090: a4 06 20 68 add %i0, 0x68, %l2
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40015094: b8 06 20 08 add %i0, 8, %i4
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
40015098: ba 06 20 40 add %i0, 0x40, %i5
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
4001509c: ae 10 20 01 mov 1, %l7
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
400150a0: f2 26 20 78 st %i1, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
400150a4: c2 06 80 00 ld [ %i2 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
400150a8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400150ac: 94 10 00 11 mov %l1, %o2
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
400150b0: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400150b4: 92 20 40 09 sub %g1, %o1, %o1
400150b8: 40 00 10 f0 call 40019478 <_Watchdog_Adjust_to_chain>
400150bc: 90 10 00 14 mov %l4, %o0
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
400150c0: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
400150c4: e0 06 c0 00 ld [ %i3 ], %l0
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
400150c8: 80 a4 00 0a cmp %l0, %o2
400150cc: 08 80 00 06 bleu 400150e4 <_Timer_server_Body+0x9c>
400150d0: 92 24 00 0a sub %l0, %o2, %o1
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
400150d4: 90 10 00 12 mov %l2, %o0
400150d8: 40 00 10 e8 call 40019478 <_Watchdog_Adjust_to_chain>
400150dc: 94 10 00 11 mov %l1, %o2
400150e0: 30 80 00 06 b,a 400150f8 <_Timer_server_Body+0xb0>
} else if ( snapshot < last_snapshot ) {
400150e4: 1a 80 00 05 bcc 400150f8 <_Timer_server_Body+0xb0>
400150e8: 94 22 80 10 sub %o2, %l0, %o2
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
400150ec: 90 10 00 12 mov %l2, %o0
400150f0: 40 00 10 bb call 400193dc <_Watchdog_Adjust>
400150f4: 92 10 20 01 mov 1, %o1
}
watchdogs->last_snapshot = snapshot;
400150f8: e0 26 20 74 st %l0, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
400150fc: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
40015100: 40 00 02 61 call 40015a84 <_Chain_Get>
40015104: 01 00 00 00 nop
if ( timer == NULL ) {
40015108: 80 a2 20 00 cmp %o0, 0
4001510c: 02 80 00 0f be 40015148 <_Timer_server_Body+0x100>
40015110: 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 ) {
40015114: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
40015118: 80 a0 60 01 cmp %g1, 1
4001511c: 12 80 00 05 bne 40015130 <_Timer_server_Body+0xe8>
40015120: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
40015124: 92 02 20 10 add %o0, 0x10, %o1
40015128: 10 80 00 05 b 4001513c <_Timer_server_Body+0xf4>
4001512c: 90 10 00 14 mov %l4, %o0
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
40015130: 12 bf ff f3 bne 400150fc <_Timer_server_Body+0xb4> <== NEVER TAKEN
40015134: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
40015138: 90 10 00 12 mov %l2, %o0
4001513c: 40 00 11 04 call 4001954c <_Watchdog_Insert>
40015140: 01 00 00 00 nop
40015144: 30 bf ff ee b,a 400150fc <_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 );
40015148: 7f ff e5 03 call 4000e554 <sparc_disable_interrupts>
4001514c: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
40015150: c2 07 bf f4 ld [ %fp + -12 ], %g1
40015154: 80 a0 40 16 cmp %g1, %l6
40015158: 12 80 00 0a bne 40015180 <_Timer_server_Body+0x138> <== NEVER TAKEN
4001515c: 01 00 00 00 nop
ts->insert_chain = NULL;
40015160: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
40015164: 7f ff e5 00 call 4000e564 <sparc_enable_interrupts>
40015168: 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 ) ) {
4001516c: c2 07 bf e8 ld [ %fp + -24 ], %g1
40015170: 80 a0 40 13 cmp %g1, %l3
40015174: 12 80 00 06 bne 4001518c <_Timer_server_Body+0x144>
40015178: 01 00 00 00 nop
4001517c: 30 80 00 1a b,a 400151e4 <_Timer_server_Body+0x19c>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
40015180: 7f ff e4 f9 call 4000e564 <sparc_enable_interrupts> <== NOT EXECUTED
40015184: 01 00 00 00 nop <== NOT EXECUTED
40015188: 30 bf ff c7 b,a 400150a4 <_Timer_server_Body+0x5c> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
4001518c: 7f ff e4 f2 call 4000e554 <sparc_disable_interrupts>
40015190: 01 00 00 00 nop
40015194: 84 10 00 08 mov %o0, %g2
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
40015198: e0 07 bf e8 ld [ %fp + -24 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
4001519c: 80 a4 00 13 cmp %l0, %l3
400151a0: 02 80 00 0e be 400151d8 <_Timer_server_Body+0x190>
400151a4: 80 a4 20 00 cmp %l0, 0
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
400151a8: c2 04 00 00 ld [ %l0 ], %g1
the_chain->first = new_first;
400151ac: c2 27 bf e8 st %g1, [ %fp + -24 ]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
400151b0: 02 80 00 0a be 400151d8 <_Timer_server_Body+0x190> <== NEVER TAKEN
400151b4: e2 20 60 04 st %l1, [ %g1 + 4 ]
watchdog->state = WATCHDOG_INACTIVE;
400151b8: c0 24 20 08 clr [ %l0 + 8 ]
_ISR_Enable( level );
400151bc: 7f ff e4 ea call 4000e564 <sparc_enable_interrupts>
400151c0: 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 );
400151c4: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
400151c8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
400151cc: 9f c0 40 00 call %g1
400151d0: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
}
400151d4: 30 bf ff ee b,a 4001518c <_Timer_server_Body+0x144>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
400151d8: 7f ff e4 e3 call 4000e564 <sparc_enable_interrupts>
400151dc: 90 10 00 02 mov %g2, %o0
400151e0: 30 bf ff b0 b,a 400150a0 <_Timer_server_Body+0x58>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
400151e4: c0 2e 20 7c clrb [ %i0 + 0x7c ]
400151e8: c2 05 40 00 ld [ %l5 ], %g1
400151ec: 82 00 60 01 inc %g1
400151f0: c2 25 40 00 st %g1, [ %l5 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
400151f4: d0 06 00 00 ld [ %i0 ], %o0
400151f8: 40 00 0d ee call 400189b0 <_Thread_Set_state>
400151fc: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
40015200: 7f ff ff 68 call 40014fa0 <_Timer_server_Reset_interval_system_watchdog>
40015204: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
40015208: 7f ff ff 7b call 40014ff4 <_Timer_server_Reset_tod_system_watchdog>
4001520c: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
40015210: 40 00 0b 39 call 40017ef4 <_Thread_Enable_dispatch>
40015214: 01 00 00 00 nop
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40015218: 90 10 00 1c mov %i4, %o0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
4001521c: ee 2e 20 7c stb %l7, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
40015220: 40 00 11 28 call 400196c0 <_Watchdog_Remove>
40015224: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
40015228: 40 00 11 26 call 400196c0 <_Watchdog_Remove>
4001522c: 90 10 00 1d mov %i5, %o0
40015230: 30 bf ff 9c b,a 400150a0 <_Timer_server_Body+0x58>
4000a3bc <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
4000a3bc: c6 02 00 00 ld [ %o0 ], %g3
4000a3c0: c4 02 40 00 ld [ %o1 ], %g2
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
4000a3c4: 82 10 00 08 mov %o0, %g1
if ( lhs->tv_sec > rhs->tv_sec )
4000a3c8: 80 a0 c0 02 cmp %g3, %g2
4000a3cc: 14 80 00 0b bg 4000a3f8 <_Timespec_Greater_than+0x3c>
4000a3d0: 90 10 20 01 mov 1, %o0
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4000a3d4: 80 a0 c0 02 cmp %g3, %g2
4000a3d8: 06 80 00 08 bl 4000a3f8 <_Timespec_Greater_than+0x3c> <== NEVER TAKEN
4000a3dc: 90 10 20 00 clr %o0
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4000a3e0: c4 00 60 04 ld [ %g1 + 4 ], %g2
4000a3e4: c2 02 60 04 ld [ %o1 + 4 ], %g1
4000a3e8: 80 a0 80 01 cmp %g2, %g1
4000a3ec: 14 80 00 03 bg 4000a3f8 <_Timespec_Greater_than+0x3c>
4000a3f0: 90 10 20 01 mov 1, %o0
4000a3f4: 90 10 20 00 clr %o0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4000a3f8: 81 c3 e0 08 retl
4000a8ec <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4000a8ec: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
4000a8f0: 7f ff e0 d4 call 40002c40 <sparc_disable_interrupts>
4000a8f4: a0 10 00 18 mov %i0, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000a8f8: c2 06 00 00 ld [ %i0 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4000a8fc: a2 06 20 04 add %i0, 4, %l1
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4000a900: 80 a0 40 11 cmp %g1, %l1
4000a904: 02 80 00 1e be 4000a97c <_Watchdog_Adjust+0x90>
4000a908: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
4000a90c: 02 80 00 19 be 4000a970 <_Watchdog_Adjust+0x84>
4000a910: a4 10 20 01 mov 1, %l2
4000a914: 80 a6 60 01 cmp %i1, 1
4000a918: 12 80 00 19 bne 4000a97c <_Watchdog_Adjust+0x90> <== NEVER TAKEN
4000a91c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4000a920: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
4000a924: 10 80 00 07 b 4000a940 <_Watchdog_Adjust+0x54>
4000a928: b4 00 80 1a add %g2, %i2, %i2
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
4000a92c: f2 00 60 10 ld [ %g1 + 0x10 ], %i1
4000a930: 80 a6 80 19 cmp %i2, %i1
4000a934: 3a 80 00 05 bcc,a 4000a948 <_Watchdog_Adjust+0x5c>
4000a938: e4 20 60 10 st %l2, [ %g1 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
4000a93c: b4 26 40 1a sub %i1, %i2, %i2
break;
4000a940: 10 80 00 0f b 4000a97c <_Watchdog_Adjust+0x90>
4000a944: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
4000a948: 7f ff e0 c2 call 40002c50 <sparc_enable_interrupts>
4000a94c: 01 00 00 00 nop
_Watchdog_Tickle( header );
4000a950: 40 00 00 95 call 4000aba4 <_Watchdog_Tickle>
4000a954: 90 10 00 10 mov %l0, %o0
_ISR_Disable( level );
4000a958: 7f ff e0 ba call 40002c40 <sparc_disable_interrupts>
4000a95c: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
4000a960: c2 04 00 00 ld [ %l0 ], %g1
4000a964: 80 a0 40 11 cmp %g1, %l1
4000a968: 02 80 00 05 be 4000a97c <_Watchdog_Adjust+0x90>
4000a96c: b4 26 80 19 sub %i2, %i1, %i2
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4000a970: 80 a6 a0 00 cmp %i2, 0
4000a974: 32 bf ff ee bne,a 4000a92c <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
4000a978: c2 04 00 00 ld [ %l0 ], %g1
}
break;
}
}
_ISR_Enable( level );
4000a97c: 7f ff e0 b5 call 40002c50 <sparc_enable_interrupts>
4000a980: 91 e8 00 08 restore %g0, %o0, %o0
40008880 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
40008880: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
40008884: 7f ff e5 05 call 40001c98 <sparc_disable_interrupts>
40008888: a0 10 00 18 mov %i0, %l0
previous_state = the_watchdog->state;
4000888c: f0 06 20 08 ld [ %i0 + 8 ], %i0
switch ( previous_state ) {
40008890: 80 a6 20 01 cmp %i0, 1
40008894: 22 80 00 1e be,a 4000890c <_Watchdog_Remove+0x8c>
40008898: c0 24 20 08 clr [ %l0 + 8 ]
4000889c: 0a 80 00 1d bcs 40008910 <_Watchdog_Remove+0x90>
400088a0: 03 10 00 6d sethi %hi(0x4001b400), %g1
400088a4: 80 a6 20 03 cmp %i0, 3
400088a8: 18 80 00 1a bgu 40008910 <_Watchdog_Remove+0x90> <== NEVER TAKEN
400088ac: 01 00 00 00 nop
400088b0: c2 04 00 00 ld [ %l0 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
400088b4: c0 24 20 08 clr [ %l0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
400088b8: c4 00 40 00 ld [ %g1 ], %g2
400088bc: 80 a0 a0 00 cmp %g2, 0
400088c0: 22 80 00 07 be,a 400088dc <_Watchdog_Remove+0x5c>
400088c4: 03 10 00 6d sethi %hi(0x4001b400), %g1
next_watchdog->delta_interval += the_watchdog->delta_interval;
400088c8: c6 00 60 10 ld [ %g1 + 0x10 ], %g3 ! 4001b410 <_TOD_Now>
400088cc: c4 04 20 10 ld [ %l0 + 0x10 ], %g2
400088d0: 84 00 c0 02 add %g3, %g2, %g2
400088d4: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
400088d8: 03 10 00 6d sethi %hi(0x4001b400), %g1
400088dc: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 ! 4001b4d0 <_Watchdog_Sync_count>
400088e0: 80 a0 60 00 cmp %g1, 0
400088e4: 22 80 00 07 be,a 40008900 <_Watchdog_Remove+0x80>
400088e8: c2 04 00 00 ld [ %l0 ], %g1
_Watchdog_Sync_level = _ISR_Nest_level;
400088ec: 03 10 00 6d sethi %hi(0x4001b400), %g1
400088f0: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 ! 4001b418 <_ISR_Nest_level>
400088f4: 03 10 00 6d sethi %hi(0x4001b400), %g1
400088f8: c4 20 60 38 st %g2, [ %g1 + 0x38 ] ! 4001b438 <_Watchdog_Sync_level>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
400088fc: c2 04 00 00 ld [ %l0 ], %g1
previous = the_node->previous;
40008900: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
40008904: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
40008908: c4 20 60 04 st %g2, [ %g1 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
4000890c: 03 10 00 6d sethi %hi(0x4001b400), %g1
40008910: c2 00 60 d4 ld [ %g1 + 0xd4 ], %g1 ! 4001b4d4 <_Watchdog_Ticks_since_boot>
40008914: c2 24 20 18 st %g1, [ %l0 + 0x18 ]
_ISR_Enable( level );
40008918: 7f ff e4 e4 call 40001ca8 <sparc_enable_interrupts>
4000891c: 01 00 00 00 nop
return( previous_state );
}
40008920: 81 c7 e0 08 ret
40008924: 81 e8 00 00 restore
4000a0b8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4000a0b8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4000a0bc: 7f ff e1 af call 40002778 <sparc_disable_interrupts>
4000a0c0: a0 10 00 18 mov %i0, %l0
4000a0c4: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
4000a0c8: 11 10 00 7c sethi %hi(0x4001f000), %o0
4000a0cc: 94 10 00 19 mov %i1, %o2
4000a0d0: 90 12 23 f8 or %o0, 0x3f8, %o0
4000a0d4: 7f ff e6 7c call 40003ac4 <printk>
4000a0d8: 92 10 00 10 mov %l0, %o1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4000a0dc: e2 06 40 00 ld [ %i1 ], %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4000a0e0: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
4000a0e4: 80 a4 40 19 cmp %l1, %i1
4000a0e8: 02 80 00 0e be 4000a120 <_Watchdog_Report_chain+0x68>
4000a0ec: 11 10 00 7d sethi %hi(0x4001f400), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4000a0f0: 92 10 00 11 mov %l1, %o1
4000a0f4: 40 00 00 10 call 4000a134 <_Watchdog_Report>
4000a0f8: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
4000a0fc: e2 04 40 00 ld [ %l1 ], %l1
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
4000a100: 80 a4 40 19 cmp %l1, %i1
4000a104: 12 bf ff fc bne 4000a0f4 <_Watchdog_Report_chain+0x3c> <== NEVER TAKEN
4000a108: 92 10 00 11 mov %l1, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4000a10c: 92 10 00 10 mov %l0, %o1
4000a110: 11 10 00 7d sethi %hi(0x4001f400), %o0
4000a114: 7f ff e6 6c call 40003ac4 <printk>
4000a118: 90 12 20 10 or %o0, 0x10, %o0 ! 4001f410 <C.32.3495+0x2c>
4000a11c: 30 80 00 03 b,a 4000a128 <_Watchdog_Report_chain+0x70>
} else {
printk( "Chain is empty\n" );
4000a120: 7f ff e6 69 call 40003ac4 <printk>
4000a124: 90 12 20 20 or %o0, 0x20, %o0
}
_ISR_Enable( level );
4000a128: 7f ff e1 98 call 40002788 <sparc_enable_interrupts>
4000a12c: 81 e8 00 00 restore
400083f4 <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)
{
400083f4: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
400083f8: 80 a6 20 00 cmp %i0, 0
400083fc: 02 80 00 1d be 40008470 <rtems_iterate_over_all_threads+0x7c><== NEVER TAKEN
40008400: 21 10 00 a6 sethi %hi(0x40029800), %l0
40008404: a0 14 20 34 or %l0, 0x34, %l0 ! 40029834 <_Objects_Information_table+0x4>
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
40008408: a6 04 20 10 add %l0, 0x10, %l3
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
4000840c: c2 04 00 00 ld [ %l0 ], %g1
40008410: 80 a0 60 00 cmp %g1, 0
40008414: 22 80 00 14 be,a 40008464 <rtems_iterate_over_all_threads+0x70>
40008418: a0 04 20 04 add %l0, 4, %l0
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
4000841c: e4 00 60 04 ld [ %g1 + 4 ], %l2
if ( !information )
40008420: 80 a4 a0 00 cmp %l2, 0
40008424: 12 80 00 0b bne 40008450 <rtems_iterate_over_all_threads+0x5c>
40008428: a2 10 20 01 mov 1, %l1
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4000842c: 10 80 00 0e b 40008464 <rtems_iterate_over_all_threads+0x70>
40008430: a0 04 20 04 add %l0, 4, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
40008434: c2 04 a0 1c ld [ %l2 + 0x1c ], %g1
40008438: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !the_thread )
4000843c: 80 a2 20 00 cmp %o0, 0
40008440: 02 80 00 04 be 40008450 <rtems_iterate_over_all_threads+0x5c><== NEVER TAKEN
40008444: a2 04 60 01 inc %l1
continue;
(*routine)(the_thread);
40008448: 9f c6 00 00 call %i0
4000844c: 01 00 00 00 nop
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
40008450: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1
40008454: 80 a4 40 01 cmp %l1, %g1
40008458: 08 bf ff f7 bleu 40008434 <rtems_iterate_over_all_threads+0x40>
4000845c: 85 2c 60 02 sll %l1, 2, %g2
40008460: a0 04 20 04 add %l0, 4, %l0
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
40008464: 80 a4 00 13 cmp %l0, %l3
40008468: 32 bf ff ea bne,a 40008410 <rtems_iterate_over_all_threads+0x1c>
4000846c: c2 04 00 00 ld [ %l0 ], %g1
40008470: 81 c7 e0 08 ret
40008474: 81 e8 00 00 restore
400128c0 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
400128c0: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
400128c4: a0 96 20 00 orcc %i0, 0, %l0
400128c8: 02 80 00 1c be 40012938 <rtems_partition_create+0x78>
400128cc: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
400128d0: 80 a6 60 00 cmp %i1, 0
400128d4: 02 80 00 34 be 400129a4 <rtems_partition_create+0xe4>
400128d8: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
400128dc: 02 80 00 32 be 400129a4 <rtems_partition_create+0xe4> <== NEVER TAKEN
400128e0: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
400128e4: 02 80 00 32 be 400129ac <rtems_partition_create+0xec>
400128e8: 80 a6 a0 00 cmp %i2, 0
400128ec: 02 80 00 30 be 400129ac <rtems_partition_create+0xec>
400128f0: 80 a6 80 1b cmp %i2, %i3
400128f4: 0a 80 00 2e bcs 400129ac <rtems_partition_create+0xec>
400128f8: 80 8e e0 07 btst 7, %i3
400128fc: 12 80 00 2c bne 400129ac <rtems_partition_create+0xec>
40012900: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
40012904: 12 80 00 28 bne 400129a4 <rtems_partition_create+0xe4>
40012908: 03 10 00 ef sethi %hi(0x4003bc00), %g1
4001290c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 4003bdf0 <_Thread_Dispatch_disable_level>
40012910: 84 00 a0 01 inc %g2
40012914: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
* 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 );
40012918: 25 10 00 ee sethi %hi(0x4003b800), %l2
4001291c: 40 00 11 bd call 40017010 <_Objects_Allocate>
40012920: 90 14 a3 f8 or %l2, 0x3f8, %o0 ! 4003bbf8 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
40012924: a2 92 20 00 orcc %o0, 0, %l1
40012928: 32 80 00 06 bne,a 40012940 <rtems_partition_create+0x80>
4001292c: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
_Thread_Enable_dispatch();
40012930: 40 00 15 71 call 40017ef4 <_Thread_Enable_dispatch>
40012934: b0 10 20 05 mov 5, %i0
return RTEMS_TOO_MANY;
40012938: 81 c7 e0 08 ret
4001293c: 81 e8 00 00 restore
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,
40012940: 90 10 00 1a mov %i2, %o0
40012944: 92 10 00 1b mov %i3, %o1
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
40012948: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
4001294c: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
the_partition->buffer_size = buffer_size;
40012950: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
40012954: 40 00 5f 00 call 4002a554 <.udiv>
40012958: c0 24 60 20 clr [ %l1 + 0x20 ]
4001295c: 92 10 00 19 mov %i1, %o1
40012960: 94 10 00 08 mov %o0, %o2
40012964: 96 10 00 1b mov %i3, %o3
40012968: b4 04 60 24 add %l1, 0x24, %i2
4001296c: 40 00 0c 56 call 40015ac4 <_Chain_Initialize>
40012970: 90 10 00 1a mov %i2, %o0
40012974: c2 14 60 0a lduh [ %l1 + 0xa ], %g1
40012978: c6 04 60 08 ld [ %l1 + 8 ], %g3
4001297c: a4 14 a3 f8 or %l2, 0x3f8, %l2
40012980: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
40012984: e0 24 60 0c st %l0, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
40012988: 83 28 60 02 sll %g1, 2, %g1
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
4001298c: c6 27 40 00 st %g3, [ %i5 ]
40012990: e2 20 80 01 st %l1, [ %g2 + %g1 ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
40012994: 40 00 15 58 call 40017ef4 <_Thread_Enable_dispatch>
40012998: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
4001299c: 81 c7 e0 08 ret
400129a0: 81 e8 00 00 restore
400129a4: 81 c7 e0 08 ret
400129a8: 91 e8 20 09 restore %g0, 9, %o0
400129ac: b0 10 20 08 mov 8, %i0
}
400129b0: 81 c7 e0 08 ret
400129b4: 81 e8 00 00 restore
40006760 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
40006760: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
40006764: 11 10 00 84 sethi %hi(0x40021000), %o0
40006768: 92 10 00 18 mov %i0, %o1
4000676c: 90 12 20 60 or %o0, 0x60, %o0
40006770: 40 00 08 9f call 400089ec <_Objects_Get>
40006774: 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 ) {
40006778: c2 07 bf fc ld [ %fp + -4 ], %g1
4000677c: 80 a0 60 00 cmp %g1, 0
40006780: 12 80 00 63 bne 4000690c <rtems_rate_monotonic_period+0x1ac>
40006784: a0 10 00 08 mov %o0, %l0
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
40006788: 25 10 00 84 sethi %hi(0x40021000), %l2
4000678c: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
40006790: c2 04 a2 8c ld [ %l2 + 0x28c ], %g1
40006794: 80 a0 80 01 cmp %g2, %g1
40006798: 02 80 00 06 be 400067b0 <rtems_rate_monotonic_period+0x50>
4000679c: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
400067a0: 40 00 0a d4 call 400092f0 <_Thread_Enable_dispatch>
400067a4: b0 10 20 17 mov 0x17, %i0
return RTEMS_NOT_OWNER_OF_RESOURCE;
400067a8: 81 c7 e0 08 ret
400067ac: 81 e8 00 00 restore
}
if ( length == RTEMS_PERIOD_STATUS ) {
400067b0: 12 80 00 0b bne 400067dc <rtems_rate_monotonic_period+0x7c>
400067b4: 01 00 00 00 nop
switch ( the_period->state ) {
400067b8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
400067bc: 80 a0 60 04 cmp %g1, 4
400067c0: 18 80 00 4f bgu 400068fc <rtems_rate_monotonic_period+0x19c><== NEVER TAKEN
400067c4: b0 10 20 00 clr %i0
400067c8: 83 28 60 02 sll %g1, 2, %g1
400067cc: 05 10 00 7c sethi %hi(0x4001f000), %g2
400067d0: 84 10 a0 58 or %g2, 0x58, %g2 ! 4001f058 <CSWTCH.47>
400067d4: 10 80 00 4a b 400068fc <rtems_rate_monotonic_period+0x19c>
400067d8: f0 00 80 01 ld [ %g2 + %g1 ], %i0
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
400067dc: 7f ff f0 d9 call 40002b40 <sparc_disable_interrupts>
400067e0: 01 00 00 00 nop
400067e4: a6 10 00 08 mov %o0, %l3
switch ( the_period->state ) {
400067e8: e2 04 20 38 ld [ %l0 + 0x38 ], %l1
400067ec: 80 a4 60 02 cmp %l1, 2
400067f0: 02 80 00 1a be 40006858 <rtems_rate_monotonic_period+0xf8>
400067f4: 80 a4 60 04 cmp %l1, 4
400067f8: 02 80 00 34 be 400068c8 <rtems_rate_monotonic_period+0x168>
400067fc: 80 a4 60 00 cmp %l1, 0
40006800: 12 80 00 43 bne 4000690c <rtems_rate_monotonic_period+0x1ac><== NEVER TAKEN
40006804: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
40006808: 7f ff f0 d2 call 40002b50 <sparc_enable_interrupts>
4000680c: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
40006810: 7f ff ff 50 call 40006550 <_Rate_monotonic_Initiate_statistics>
40006814: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
40006818: 82 10 20 02 mov 2, %g1
4000681c: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40006820: 03 10 00 1a sethi %hi(0x40006800), %g1
40006824: 82 10 63 d8 or %g1, 0x3d8, %g1 ! 40006bd8 <_Rate_monotonic_Timeout>
the_watchdog->id = id;
40006828: f0 24 20 30 st %i0, [ %l0 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4000682c: 92 04 20 10 add %l0, 0x10, %o1
40006830: 11 10 00 84 sethi %hi(0x40021000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
40006834: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
40006838: 90 12 22 ac or %o0, 0x2ac, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
4000683c: c0 24 20 18 clr [ %l0 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40006840: c0 24 20 34 clr [ %l0 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
40006844: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40006848: c2 24 20 2c st %g1, [ %l0 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4000684c: 40 00 0f c3 call 4000a758 <_Watchdog_Insert>
40006850: b0 10 20 00 clr %i0
40006854: 30 80 00 2a b,a 400068fc <rtems_rate_monotonic_period+0x19c>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
40006858: 7f ff ff 84 call 40006668 <_Rate_monotonic_Update_statistics>
4000685c: 90 10 00 10 mov %l0, %o0
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
40006860: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
40006864: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
40006868: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
4000686c: 7f ff f0 b9 call 40002b50 <sparc_enable_interrupts>
40006870: 90 10 00 13 mov %l3, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
40006874: c2 04 a2 8c ld [ %l2 + 0x28c ], %g1
40006878: c4 04 20 08 ld [ %l0 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4000687c: 90 10 00 01 mov %g1, %o0
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
40006880: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
40006884: 40 00 0c fa call 40009c6c <_Thread_Set_state>
40006888: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
4000688c: 7f ff f0 ad call 40002b40 <sparc_disable_interrupts>
40006890: 01 00 00 00 nop
local_state = the_period->state;
40006894: e6 04 20 38 ld [ %l0 + 0x38 ], %l3
the_period->state = RATE_MONOTONIC_ACTIVE;
40006898: e2 24 20 38 st %l1, [ %l0 + 0x38 ]
_ISR_Enable( level );
4000689c: 7f ff f0 ad call 40002b50 <sparc_enable_interrupts>
400068a0: 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 )
400068a4: 80 a4 e0 03 cmp %l3, 3
400068a8: 12 80 00 04 bne 400068b8 <rtems_rate_monotonic_period+0x158>
400068ac: d0 04 a2 8c ld [ %l2 + 0x28c ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
400068b0: 40 00 09 99 call 40008f14 <_Thread_Clear_state>
400068b4: 13 00 00 10 sethi %hi(0x4000), %o1
_Thread_Enable_dispatch();
400068b8: 40 00 0a 8e call 400092f0 <_Thread_Enable_dispatch>
400068bc: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
400068c0: 81 c7 e0 08 ret
400068c4: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
400068c8: 7f ff ff 68 call 40006668 <_Rate_monotonic_Update_statistics>
400068cc: 90 10 00 10 mov %l0, %o0
_ISR_Enable( level );
400068d0: 7f ff f0 a0 call 40002b50 <sparc_enable_interrupts>
400068d4: 90 10 00 13 mov %l3, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
400068d8: 82 10 20 02 mov 2, %g1
400068dc: 92 04 20 10 add %l0, 0x10, %o1
400068e0: 11 10 00 84 sethi %hi(0x40021000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
400068e4: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
400068e8: 90 12 22 ac or %o0, 0x2ac, %o0
the_period->next_length = length;
400068ec: f2 24 20 3c st %i1, [ %l0 + 0x3c ]
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
400068f0: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
400068f4: 40 00 0f 99 call 4000a758 <_Watchdog_Insert>
400068f8: b0 10 20 06 mov 6, %i0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
400068fc: 40 00 0a 7d call 400092f0 <_Thread_Enable_dispatch>
40006900: 01 00 00 00 nop
return RTEMS_TIMEOUT;
40006904: 81 c7 e0 08 ret
40006908: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4000690c: 81 c7 e0 08 ret
40006910: 91 e8 20 04 restore %g0, 4, %o0
40006914 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
40006914: 9d e3 bf 30 save %sp, -208, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
40006918: 80 a6 60 00 cmp %i1, 0
4000691c: 02 80 00 7a be 40006b04 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NEVER TAKEN
40006920: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
40006924: 13 10 00 7c sethi %hi(0x4001f000), %o1
40006928: 9f c6 40 00 call %i1
4000692c: 92 12 60 70 or %o1, 0x70, %o1 ! 4001f070 <CSWTCH.47+0x18>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
40006930: 90 10 00 18 mov %i0, %o0
40006934: 13 10 00 7c sethi %hi(0x4001f000), %o1
40006938: 9f c6 40 00 call %i1
4000693c: 92 12 60 90 or %o1, 0x90, %o1 ! 4001f090 <CSWTCH.47+0x38>
(*print)( context, "--- Wall times are in seconds ---\n" );
40006940: 90 10 00 18 mov %i0, %o0
40006944: 13 10 00 7c sethi %hi(0x4001f000), %o1
40006948: 9f c6 40 00 call %i1
4000694c: 92 12 60 b8 or %o1, 0xb8, %o1 ! 4001f0b8 <CSWTCH.47+0x60>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
40006950: 90 10 00 18 mov %i0, %o0
40006954: 13 10 00 7c sethi %hi(0x4001f000), %o1
40006958: 9f c6 40 00 call %i1
4000695c: 92 12 60 e0 or %o1, 0xe0, %o1 ! 4001f0e0 <CSWTCH.47+0x88>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
40006960: 90 10 00 18 mov %i0, %o0
40006964: 13 10 00 7c sethi %hi(0x4001f000), %o1
40006968: 9f c6 40 00 call %i1
4000696c: 92 12 61 30 or %o1, 0x130, %o1 ! 4001f130 <CSWTCH.47+0xd8>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006970: 03 10 00 84 sethi %hi(0x40021000), %g1
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40006974: 2d 10 00 7c sethi %hi(0x4001f000), %l6
/*
* 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 ;
40006978: 82 10 60 60 or %g1, 0x60, %g1
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,
4000697c: 2b 10 00 7c sethi %hi(0x4001f000), %l5
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,
40006980: 29 10 00 7c sethi %hi(0x4001f000), %l4
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
40006984: 27 10 00 7c sethi %hi(0x4001f000), %l3
* 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++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
40006988: ba 07 bf a0 add %fp, -96, %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 ;
4000698c: ae 10 00 01 mov %g1, %l7
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
40006990: ac 15 a1 80 or %l6, 0x180, %l6
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,
40006994: aa 15 61 a0 or %l5, 0x1a0, %l5
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,
40006998: a8 15 21 c0 or %l4, 0x1c0, %l4
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
4000699c: a6 14 e1 98 or %l3, 0x198, %l3
/*
* 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 ;
400069a0: e0 00 60 08 ld [ %g1 + 8 ], %l0
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
400069a4: b8 07 bf d8 add %fp, -40, %i4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
400069a8: a4 07 bf f8 add %fp, -8, %l2
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 );
400069ac: b4 07 bf b8 add %fp, -72, %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 ;
400069b0: 10 80 00 51 b 40006af4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
400069b4: a2 07 bf f0 add %fp, -16, %l1
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
400069b8: 40 00 17 d9 call 4000c91c <rtems_rate_monotonic_get_statistics>
400069bc: 92 10 00 1d mov %i5, %o1
if ( status != RTEMS_SUCCESSFUL )
400069c0: 80 a2 20 00 cmp %o0, 0
400069c4: 32 80 00 4c bne,a 40006af4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
400069c8: a0 04 20 01 inc %l0
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
400069cc: 92 10 00 1c mov %i4, %o1
400069d0: 40 00 18 00 call 4000c9d0 <rtems_rate_monotonic_get_status>
400069d4: 90 10 00 10 mov %l0, %o0
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
400069d8: d0 07 bf d8 ld [ %fp + -40 ], %o0
400069dc: 94 10 00 12 mov %l2, %o2
400069e0: 40 00 00 ae call 40006c98 <rtems_object_get_name>
400069e4: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
400069e8: d8 1f bf a0 ldd [ %fp + -96 ], %o4
400069ec: 92 10 00 16 mov %l6, %o1
400069f0: 94 10 00 10 mov %l0, %o2
400069f4: 90 10 00 18 mov %i0, %o0
400069f8: 9f c6 40 00 call %i1
400069fc: 96 10 00 12 mov %l2, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
40006a00: c2 07 bf a0 ld [ %fp + -96 ], %g1
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
40006a04: 94 10 00 11 mov %l1, %o2
40006a08: 90 10 00 1a mov %i2, %o0
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
40006a0c: 80 a0 60 00 cmp %g1, 0
40006a10: 12 80 00 06 bne 40006a28 <rtems_rate_monotonic_report_statistics_with_plugin+0x114>
40006a14: 92 10 00 13 mov %l3, %o1
(*print)( context, "\n" );
40006a18: 9f c6 40 00 call %i1
40006a1c: 90 10 00 18 mov %i0, %o0
continue;
40006a20: 10 80 00 35 b 40006af4 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
40006a24: a0 04 20 01 inc %l0
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 );
40006a28: 40 00 0e 22 call 4000a2b0 <_Timespec_Divide_by_integer>
40006a2c: 92 10 00 01 mov %g1, %o1
(*print)( context,
40006a30: d0 07 bf ac ld [ %fp + -84 ], %o0
40006a34: 40 00 52 d1 call 4001b578 <.div>
40006a38: 92 10 23 e8 mov 0x3e8, %o1
40006a3c: 96 10 00 08 mov %o0, %o3
40006a40: d0 07 bf b4 ld [ %fp + -76 ], %o0
40006a44: d6 27 bf 9c st %o3, [ %fp + -100 ]
40006a48: 40 00 52 cc call 4001b578 <.div>
40006a4c: 92 10 23 e8 mov 0x3e8, %o1
40006a50: c2 07 bf f0 ld [ %fp + -16 ], %g1
40006a54: b6 10 00 08 mov %o0, %i3
40006a58: d0 07 bf f4 ld [ %fp + -12 ], %o0
40006a5c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40006a60: 40 00 52 c6 call 4001b578 <.div>
40006a64: 92 10 23 e8 mov 0x3e8, %o1
40006a68: d8 07 bf b0 ld [ %fp + -80 ], %o4
40006a6c: d6 07 bf 9c ld [ %fp + -100 ], %o3
40006a70: d4 07 bf a8 ld [ %fp + -88 ], %o2
40006a74: 9a 10 00 1b mov %i3, %o5
40006a78: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40006a7c: 92 10 00 15 mov %l5, %o1
40006a80: 9f c6 40 00 call %i1
40006a84: 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);
40006a88: d2 07 bf a0 ld [ %fp + -96 ], %o1
40006a8c: 94 10 00 11 mov %l1, %o2
40006a90: 40 00 0e 08 call 4000a2b0 <_Timespec_Divide_by_integer>
40006a94: 90 07 bf d0 add %fp, -48, %o0
(*print)( context,
40006a98: d0 07 bf c4 ld [ %fp + -60 ], %o0
40006a9c: 40 00 52 b7 call 4001b578 <.div>
40006aa0: 92 10 23 e8 mov 0x3e8, %o1
40006aa4: 96 10 00 08 mov %o0, %o3
40006aa8: d0 07 bf cc ld [ %fp + -52 ], %o0
40006aac: d6 27 bf 9c st %o3, [ %fp + -100 ]
40006ab0: 40 00 52 b2 call 4001b578 <.div>
40006ab4: 92 10 23 e8 mov 0x3e8, %o1
40006ab8: c2 07 bf f0 ld [ %fp + -16 ], %g1
40006abc: b6 10 00 08 mov %o0, %i3
40006ac0: d0 07 bf f4 ld [ %fp + -12 ], %o0
40006ac4: 92 10 23 e8 mov 0x3e8, %o1
40006ac8: 40 00 52 ac call 4001b578 <.div>
40006acc: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
40006ad0: d4 07 bf c0 ld [ %fp + -64 ], %o2
40006ad4: d6 07 bf 9c ld [ %fp + -100 ], %o3
40006ad8: d8 07 bf c8 ld [ %fp + -56 ], %o4
40006adc: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
40006ae0: 9a 10 00 1b mov %i3, %o5
40006ae4: 90 10 00 18 mov %i0, %o0
40006ae8: 9f c6 40 00 call %i1
40006aec: 92 10 00 14 mov %l4, %o1
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
40006af0: a0 04 20 01 inc %l0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
40006af4: c2 05 e0 0c ld [ %l7 + 0xc ], %g1
40006af8: 80 a4 00 01 cmp %l0, %g1
40006afc: 08 bf ff af bleu 400069b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xa4>
40006b00: 90 10 00 10 mov %l0, %o0
40006b04: 81 c7 e0 08 ret
40006b08: 81 e8 00 00 restore
40013ea8 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
40013ea8: 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 )
40013eac: 82 10 20 0a mov 0xa, %g1
40013eb0: 80 a6 60 00 cmp %i1, 0
40013eb4: 02 80 00 2a be 40013f5c <rtems_signal_send+0xb4>
40013eb8: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
40013ebc: 40 00 10 31 call 40017f80 <_Thread_Get>
40013ec0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
40013ec4: c4 07 bf fc ld [ %fp + -4 ], %g2
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
40013ec8: a0 10 00 08 mov %o0, %l0
switch ( location ) {
40013ecc: 80 a0 a0 00 cmp %g2, 0
40013ed0: 12 80 00 23 bne 40013f5c <rtems_signal_send+0xb4>
40013ed4: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
40013ed8: d2 02 21 5c ld [ %o0 + 0x15c ], %o1
asr = &api->Signal;
40013edc: c2 02 60 0c ld [ %o1 + 0xc ], %g1
40013ee0: 80 a0 60 00 cmp %g1, 0
40013ee4: 02 80 00 1b be 40013f50 <rtems_signal_send+0xa8>
40013ee8: 01 00 00 00 nop
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
40013eec: c2 0a 60 08 ldub [ %o1 + 8 ], %g1
40013ef0: 80 a0 60 00 cmp %g1, 0
40013ef4: 02 80 00 11 be 40013f38 <rtems_signal_send+0x90>
40013ef8: 90 10 00 19 mov %i1, %o0
_ASR_Post_signals( signal_set, &asr->signals_posted );
40013efc: 7f ff ff e2 call 40013e84 <_ASR_Post_signals>
40013f00: 92 02 60 14 add %o1, 0x14, %o1
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
40013f04: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40013f08: c4 00 62 88 ld [ %g1 + 0x288 ], %g2 ! 4003be88 <_ISR_Nest_level>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
40013f0c: 82 10 20 01 mov 1, %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
40013f10: 80 a0 a0 00 cmp %g2, 0
40013f14: 02 80 00 0b be 40013f40 <rtems_signal_send+0x98>
40013f18: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ]
40013f1c: 05 10 00 ef sethi %hi(0x4003bc00), %g2
40013f20: c4 00 a2 ac ld [ %g2 + 0x2ac ], %g2 ! 4003beac <_Thread_Executing>
40013f24: 80 a4 00 02 cmp %l0, %g2
40013f28: 12 80 00 06 bne 40013f40 <rtems_signal_send+0x98> <== NEVER TAKEN
40013f2c: 05 10 00 ef sethi %hi(0x4003bc00), %g2
_ISR_Signals_to_thread_executing = true;
40013f30: 10 80 00 04 b 40013f40 <rtems_signal_send+0x98>
40013f34: c2 28 a3 48 stb %g1, [ %g2 + 0x348 ] ! 4003bf48 <_ISR_Signals_to_thread_executing>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
40013f38: 7f ff ff d3 call 40013e84 <_ASR_Post_signals>
40013f3c: 92 02 60 18 add %o1, 0x18, %o1
}
_Thread_Enable_dispatch();
40013f40: 40 00 0f ed call 40017ef4 <_Thread_Enable_dispatch>
40013f44: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
40013f48: 10 80 00 05 b 40013f5c <rtems_signal_send+0xb4>
40013f4c: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
_Thread_Enable_dispatch();
40013f50: 40 00 0f e9 call 40017ef4 <_Thread_Enable_dispatch>
40013f54: 01 00 00 00 nop
40013f58: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40013f5c: 81 c7 e0 08 ret
40013f60: 91 e8 00 01 restore %g0, %g1, %o0
4000c754 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4000c754: 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 )
4000c758: 80 a6 a0 00 cmp %i2, 0
4000c75c: 02 80 00 54 be 4000c8ac <rtems_task_mode+0x158>
4000c760: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4000c764: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000c768: e0 00 60 3c ld [ %g1 + 0x3c ], %l0 ! 4001b43c <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000c76c: c4 0c 20 75 ldub [ %l0 + 0x75 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000c770: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000c774: 80 a0 00 02 cmp %g0, %g2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4000c778: e2 04 21 5c ld [ %l0 + 0x15c ], %l1
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4000c77c: a4 60 3f ff subx %g0, -1, %l2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4000c780: 80 a0 60 00 cmp %g1, 0
4000c784: 02 80 00 03 be 4000c790 <rtems_task_mode+0x3c>
4000c788: a5 2c a0 08 sll %l2, 8, %l2
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4000c78c: a4 14 a2 00 or %l2, 0x200, %l2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000c790: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
4000c794: 80 a0 00 01 cmp %g0, %g1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
4000c798: 7f ff f1 cd call 40008ecc <_CPU_ISR_Get_level>
4000c79c: a6 60 3f ff subx %g0, -1, %l3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000c7a0: a7 2c e0 0a sll %l3, 0xa, %l3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4000c7a4: a6 14 c0 08 or %l3, %o0, %l3
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4000c7a8: a4 14 c0 12 or %l3, %l2, %l2
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4000c7ac: 80 8e 61 00 btst 0x100, %i1
4000c7b0: 02 80 00 06 be 4000c7c8 <rtems_task_mode+0x74>
4000c7b4: e4 26 80 00 st %l2, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4000c7b8: 83 36 20 08 srl %i0, 8, %g1
4000c7bc: 82 18 60 01 xor %g1, 1, %g1
4000c7c0: 82 08 60 01 and %g1, 1, %g1
4000c7c4: c2 2c 20 75 stb %g1, [ %l0 + 0x75 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
4000c7c8: 80 8e 62 00 btst 0x200, %i1
4000c7cc: 02 80 00 0b be 4000c7f8 <rtems_task_mode+0xa4>
4000c7d0: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
4000c7d4: 80 8e 22 00 btst 0x200, %i0
4000c7d8: 22 80 00 07 be,a 4000c7f4 <rtems_task_mode+0xa0>
4000c7dc: c0 24 20 7c clr [ %l0 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4000c7e0: 03 10 00 6c sethi %hi(0x4001b000), %g1
4000c7e4: c2 00 62 d8 ld [ %g1 + 0x2d8 ], %g1 ! 4001b2d8 <_Thread_Ticks_per_timeslice>
4000c7e8: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4000c7ec: 82 10 20 01 mov 1, %g1
4000c7f0: c2 24 20 7c st %g1, [ %l0 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4000c7f4: 80 8e 60 0f btst 0xf, %i1
4000c7f8: 02 80 00 06 be 4000c810 <rtems_task_mode+0xbc>
4000c7fc: 80 8e 64 00 btst 0x400, %i1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4000c800: 90 0e 20 0f and %i0, 0xf, %o0
4000c804: 7f ff d5 29 call 40001ca8 <sparc_enable_interrupts>
4000c808: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4000c80c: 80 8e 64 00 btst 0x400, %i1
4000c810: 22 80 00 18 be,a 4000c870 <rtems_task_mode+0x11c>
4000c814: a0 10 20 00 clr %l0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000c818: c2 0c 60 08 ldub [ %l1 + 8 ], %g1
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4000c81c: b1 36 20 0a srl %i0, 0xa, %i0
4000c820: b0 1e 20 01 xor %i0, 1, %i0
4000c824: b0 0e 20 01 and %i0, 1, %i0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4000c828: 80 a6 00 01 cmp %i0, %g1
4000c82c: 22 80 00 11 be,a 4000c870 <rtems_task_mode+0x11c>
4000c830: a0 10 20 00 clr %l0
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4000c834: 7f ff d5 19 call 40001c98 <sparc_disable_interrupts>
4000c838: f0 2c 60 08 stb %i0, [ %l1 + 8 ]
_signals = information->signals_pending;
4000c83c: c4 04 60 18 ld [ %l1 + 0x18 ], %g2
information->signals_pending = information->signals_posted;
4000c840: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
information->signals_posted = _signals;
4000c844: c4 24 60 14 st %g2, [ %l1 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
4000c848: c2 24 60 18 st %g1, [ %l1 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
4000c84c: 7f ff d5 17 call 40001ca8 <sparc_enable_interrupts>
4000c850: 01 00 00 00 nop
4000c854: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
4000c858: 80 a0 60 00 cmp %g1, 0
4000c85c: 22 80 00 05 be,a 4000c870 <rtems_task_mode+0x11c>
4000c860: a0 10 20 00 clr %l0
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
4000c864: 82 10 20 01 mov 1, %g1
4000c868: c2 2c 20 74 stb %g1, [ %l0 + 0x74 ]
4000c86c: a0 10 20 01 mov 1, %l0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4000c870: 03 10 00 6d sethi %hi(0x4001b400), %g1
4000c874: c2 00 61 20 ld [ %g1 + 0x120 ], %g1 ! 4001b520 <_System_state_Current>
4000c878: 80 a0 60 03 cmp %g1, 3
4000c87c: 12 80 00 0c bne 4000c8ac <rtems_task_mode+0x158> <== NEVER TAKEN
4000c880: 82 10 20 00 clr %g1
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4000c884: 40 00 00 b4 call 4000cb54 <_Thread_Evaluate_mode>
4000c888: 01 00 00 00 nop
4000c88c: 80 8a 20 ff btst 0xff, %o0
4000c890: 12 80 00 04 bne 4000c8a0 <rtems_task_mode+0x14c>
4000c894: 80 8c 20 ff btst 0xff, %l0
4000c898: 02 80 00 05 be 4000c8ac <rtems_task_mode+0x158>
4000c89c: 82 10 20 00 clr %g1
_Thread_Dispatch();
4000c8a0: 7f ff eb 0f call 400074dc <_Thread_Dispatch>
4000c8a4: 01 00 00 00 nop
4000c8a8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
return RTEMS_SUCCESSFUL;
}
4000c8ac: 81 c7 e0 08 ret
4000c8b0: 91 e8 00 01 restore %g0, %g1, %o0
4000aac0 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4000aac0: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4000aac4: 80 a6 60 00 cmp %i1, 0
4000aac8: 02 80 00 07 be 4000aae4 <rtems_task_set_priority+0x24>
4000aacc: 90 10 00 18 mov %i0, %o0
4000aad0: 03 10 00 85 sethi %hi(0x40021400), %g1
4000aad4: c2 08 60 c4 ldub [ %g1 + 0xc4 ], %g1 ! 400214c4 <rtems_maximum_priority>
4000aad8: 80 a6 40 01 cmp %i1, %g1
4000aadc: 18 80 00 1c bgu 4000ab4c <rtems_task_set_priority+0x8c>
4000aae0: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4000aae4: 80 a6 a0 00 cmp %i2, 0
4000aae8: 02 80 00 19 be 4000ab4c <rtems_task_set_priority+0x8c>
4000aaec: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4000aaf0: 40 00 08 14 call 4000cb40 <_Thread_Get>
4000aaf4: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
4000aaf8: c2 07 bf fc ld [ %fp + -4 ], %g1
4000aafc: 80 a0 60 00 cmp %g1, 0
4000ab00: 12 80 00 13 bne 4000ab4c <rtems_task_set_priority+0x8c>
4000ab04: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4000ab08: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4000ab0c: 80 a6 60 00 cmp %i1, 0
4000ab10: 02 80 00 0d be 4000ab44 <rtems_task_set_priority+0x84>
4000ab14: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
4000ab18: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
4000ab1c: 80 a0 60 00 cmp %g1, 0
4000ab20: 02 80 00 06 be 4000ab38 <rtems_task_set_priority+0x78>
4000ab24: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
the_thread->current_priority > new_priority )
4000ab28: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
4000ab2c: 80 a0 40 19 cmp %g1, %i1
4000ab30: 08 80 00 05 bleu 4000ab44 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
4000ab34: 01 00 00 00 nop
_Thread_Change_priority( the_thread, new_priority, false );
4000ab38: 92 10 00 19 mov %i1, %o1
4000ab3c: 40 00 06 6e call 4000c4f4 <_Thread_Change_priority>
4000ab40: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
4000ab44: 40 00 07 dc call 4000cab4 <_Thread_Enable_dispatch>
4000ab48: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4000ab4c: 81 c7 e0 08 ret
4000ab50: 81 e8 00 00 restore
40014860 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
40014860: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
40014864: 11 10 00 f0 sethi %hi(0x4003c000), %o0
40014868: 92 10 00 18 mov %i0, %o1
4001486c: 90 12 20 c4 or %o0, 0xc4, %o0
40014870: 40 00 0b 39 call 40017554 <_Objects_Get>
40014874: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
40014878: c2 07 bf fc ld [ %fp + -4 ], %g1
4001487c: 80 a0 60 00 cmp %g1, 0
40014880: 12 80 00 0a bne 400148a8 <rtems_timer_cancel+0x48>
40014884: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
40014888: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
4001488c: 80 a0 60 04 cmp %g1, 4
40014890: 02 80 00 04 be 400148a0 <rtems_timer_cancel+0x40> <== NEVER TAKEN
40014894: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
40014898: 40 00 13 8a call 400196c0 <_Watchdog_Remove>
4001489c: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
400148a0: 40 00 0d 95 call 40017ef4 <_Thread_Enable_dispatch>
400148a4: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
400148a8: 81 c7 e0 08 ret
400148ac: 81 e8 00 00 restore
40014d50 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
40014d50: 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;
40014d54: 03 10 00 f0 sethi %hi(0x4003c000), %g1
40014d58: e0 00 61 04 ld [ %g1 + 0x104 ], %l0 ! 4003c104 <_Timer_server>
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
40014d5c: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
40014d60: 80 a4 20 00 cmp %l0, 0
40014d64: 02 80 00 32 be 40014e2c <rtems_timer_server_fire_when+0xdc>
40014d68: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
40014d6c: 03 10 00 ef sethi %hi(0x4003bc00), %g1
40014d70: c2 08 62 04 ldub [ %g1 + 0x204 ], %g1 ! 4003be04 <_TOD_Is_set>
40014d74: 80 a0 60 00 cmp %g1, 0
40014d78: 02 80 00 2d be 40014e2c <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
40014d7c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
40014d80: 80 a6 a0 00 cmp %i2, 0
40014d84: 02 80 00 2a be 40014e2c <rtems_timer_server_fire_when+0xdc>
40014d88: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
40014d8c: 7f ff f4 0d call 40011dc0 <_TOD_Validate>
40014d90: 90 10 00 19 mov %i1, %o0
40014d94: 80 8a 20 ff btst 0xff, %o0
40014d98: 22 80 00 25 be,a 40014e2c <rtems_timer_server_fire_when+0xdc>
40014d9c: b0 10 20 14 mov 0x14, %i0
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
40014da0: 7f ff f3 d4 call 40011cf0 <_TOD_To_seconds>
40014da4: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch() )
40014da8: 27 10 00 ef sethi %hi(0x4003bc00), %l3
40014dac: c2 04 e2 80 ld [ %l3 + 0x280 ], %g1 ! 4003be80 <_TOD_Now>
40014db0: 80 a2 00 01 cmp %o0, %g1
40014db4: 08 80 00 20 bleu 40014e34 <rtems_timer_server_fire_when+0xe4>
40014db8: a4 10 00 08 mov %o0, %l2
40014dbc: 11 10 00 f0 sethi %hi(0x4003c000), %o0
40014dc0: 92 10 00 11 mov %l1, %o1
40014dc4: 90 12 20 c4 or %o0, 0xc4, %o0
40014dc8: 40 00 09 e3 call 40017554 <_Objects_Get>
40014dcc: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
40014dd0: c2 07 bf fc ld [ %fp + -4 ], %g1
40014dd4: b2 10 00 08 mov %o0, %i1
40014dd8: 80 a0 60 00 cmp %g1, 0
40014ddc: 12 80 00 14 bne 40014e2c <rtems_timer_server_fire_when+0xdc>
40014de0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
40014de4: 40 00 12 37 call 400196c0 <_Watchdog_Remove>
40014de8: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
40014dec: e2 26 60 30 st %l1, [ %i1 + 0x30 ]
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40014df0: c4 04 e2 80 ld [ %l3 + 0x280 ], %g2
(*timer_server->schedule_operation)( timer_server, the_timer );
40014df4: c2 04 20 04 ld [ %l0 + 4 ], %g1
40014df8: 90 10 00 10 mov %l0, %o0
40014dfc: 92 10 00 19 mov %i1, %o1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40014e00: a4 24 80 02 sub %l2, %g2, %l2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
40014e04: 84 10 20 03 mov 3, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
40014e08: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
40014e0c: c4 26 60 38 st %g2, [ %i1 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
40014e10: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
40014e14: e4 26 60 1c st %l2, [ %i1 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
40014e18: c0 26 60 18 clr [ %i1 + 0x18 ]
(*timer_server->schedule_operation)( timer_server, the_timer );
40014e1c: 9f c0 40 00 call %g1
40014e20: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
40014e24: 40 00 0c 34 call 40017ef4 <_Thread_Enable_dispatch>
40014e28: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
40014e2c: 81 c7 e0 08 ret
40014e30: 81 e8 00 00 restore
40014e34: b0 10 20 14 mov 0x14, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
40014e38: 81 c7 e0 08 ret
40014e3c: 81 e8 00 00 restore