RTEMS 4.9.6Annotated Report
Sun Jul 24 16:23:55 2011
02005d7c <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2005d7c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005d80: 03 00 80 5a sethi %hi(0x2016800), %g1
2005d84: e0 00 63 e4 ld [ %g1 + 0x3e4 ], %l0 ! 2016be4 <_API_extensions_List>
2005d88: 82 10 63 e4 or %g1, 0x3e4, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005d8c: 10 80 00 08 b 2005dac <_API_extensions_Run_postdriver+0x30>
2005d90: a2 00 60 04 add %g1, 4, %l1
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
2005d94: 80 a0 60 00 cmp %g1, 0
2005d98: 22 80 00 05 be,a 2005dac <_API_extensions_Run_postdriver+0x30><== NEVER TAKEN
2005d9c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postdriver_hook)();
2005da0: 9f c0 40 00 call %g1
2005da4: 01 00 00 00 nop
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2005da8: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005dac: 80 a4 00 11 cmp %l0, %l1
2005db0: 32 bf ff f9 bne,a 2005d94 <_API_extensions_Run_postdriver+0x18>
2005db4: c2 04 20 0c ld [ %l0 + 0xc ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
(*the_extension->postdriver_hook)();
}
}
2005db8: 81 c7 e0 08 ret
2005dbc: 81 e8 00 00 restore
02005dc0 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
2005dc0: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005dc4: 03 00 80 5a sethi %hi(0x2016800), %g1
2005dc8: e0 00 63 e4 ld [ %g1 + 0x3e4 ], %l0 ! 2016be4 <_API_extensions_List>
2005dcc: 82 10 63 e4 or %g1, 0x3e4, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005dd0: a4 00 60 04 add %g1, 4, %l2
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
2005dd4: 03 00 80 5a sethi %hi(0x2016800), %g1
2005dd8: 10 80 00 08 b 2005df8 <_API_extensions_Run_postswitch+0x38>
2005ddc: a2 10 62 64 or %g1, 0x264, %l1 ! 2016a64 <_Thread_Executing>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
2005de0: 80 a0 60 00 cmp %g1, 0
2005de4: 22 80 00 05 be,a 2005df8 <_API_extensions_Run_postswitch+0x38><== NEVER TAKEN
2005de8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postswitch_hook)( _Thread_Executing );
2005dec: 9f c0 40 00 call %g1
2005df0: d0 04 40 00 ld [ %l1 ], %o0
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2005df4: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005df8: 80 a4 00 12 cmp %l0, %l2
2005dfc: 32 bf ff f9 bne,a 2005de0 <_API_extensions_Run_postswitch+0x20>
2005e00: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
2005e04: 81 c7 e0 08 ret
2005e08: 81 e8 00 00 restore
02005d38 <_API_extensions_Run_predriver>:
*
* _API_extensions_Run_predriver
*/
void _API_extensions_Run_predriver( void )
{
2005d38: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
2005d3c: 03 00 80 5a sethi %hi(0x2016800), %g1
2005d40: e0 00 63 e4 ld [ %g1 + 0x3e4 ], %l0 ! 2016be4 <_API_extensions_List>
2005d44: 82 10 63 e4 or %g1, 0x3e4, %g1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005d48: 10 80 00 08 b 2005d68 <_API_extensions_Run_predriver+0x30>
2005d4c: a2 00 60 04 add %g1, 4, %l1
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
2005d50: 80 a0 60 00 cmp %g1, 0
2005d54: 22 80 00 05 be,a 2005d68 <_API_extensions_Run_predriver+0x30><== ALWAYS TAKEN
2005d58: e0 04 00 00 ld [ %l0 ], %l0
(*the_extension->predriver_hook)();
2005d5c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005d60: 01 00 00 00 nop <== NOT EXECUTED
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
2005d64: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
2005d68: 80 a4 00 11 cmp %l0, %l1
2005d6c: 32 bf ff f9 bne,a 2005d50 <_API_extensions_Run_predriver+0x18>
2005d70: c2 04 20 08 ld [ %l0 + 8 ], %g1
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
(*the_extension->predriver_hook)();
}
}
2005d74: 81 c7 e0 08 ret
2005d78: 81 e8 00 00 restore
02007110 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
2007110: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
2007114: 03 00 80 6a sethi %hi(0x201a800), %g1
2007118: e2 00 60 44 ld [ %g1 + 0x44 ], %l1 ! 201a844 <_Thread_Executing>
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
200711c: b4 10 00 1c mov %i4, %i2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
2007120: c0 24 60 34 clr [ %l1 + 0x34 ]
_ISR_Disable( level );
2007124: 7f ff ee 3b call 2002a10 <sparc_disable_interrupts>
2007128: a0 10 00 18 mov %i0, %l0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
200712c: a4 10 00 19 mov %i1, %l2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
2007130: 86 10 00 08 mov %o0, %g3
the_barrier->number_of_waiting_threads++;
2007134: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
if ( the_barrier->number_of_waiting_threads ==
2007138: c4 06 20 44 ld [ %i0 + 0x44 ], %g2
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
200713c: 82 00 60 01 inc %g1
if ( the_barrier->number_of_waiting_threads ==
2007140: 80 a0 40 02 cmp %g1, %g2
2007144: 12 80 00 0b bne 2007170 <_CORE_barrier_Wait+0x60>
2007148: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
200714c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
2007150: 80 a0 60 00 cmp %g1, 0
2007154: 12 80 00 08 bne 2007174 <_CORE_barrier_Wait+0x64> <== NEVER TAKEN
2007158: 82 10 20 01 mov 1, %g1
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
200715c: c2 24 60 34 st %g1, [ %l1 + 0x34 ]
_ISR_Enable( level );
2007160: 7f ff ee 30 call 2002a20 <sparc_enable_interrupts>
2007164: 01 00 00 00 nop
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
2007168: 7f ff ff df call 20070e4 <_CORE_barrier_Release>
200716c: 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;
2007170: 82 10 20 01 mov 1, %g1
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
2007174: e4 24 60 20 st %l2, [ %l1 + 0x20 ]
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
2007178: e0 24 60 44 st %l0, [ %l1 + 0x44 ]
200717c: c2 24 20 30 st %g1, [ %l0 + 0x30 ]
executing->Wait.id = id;
_ISR_Enable( level );
2007180: 90 10 00 03 mov %g3, %o0
2007184: 7f ff ee 27 call 2002a20 <sparc_enable_interrupts>
2007188: 35 00 80 24 sethi %hi(0x2009000), %i2
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
200718c: b0 10 00 10 mov %l0, %i0
2007190: b2 10 00 1b mov %i3, %i1
2007194: 40 00 07 25 call 2008e28 <_Thread_queue_Enqueue_with_handler>
2007198: 95 ee a1 f4 restore %i2, 0x1f4, %o2
02012564 <_CORE_message_queue_Broadcast>:
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
2012564: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
2012568: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
size_t size,
Objects_Id id,
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
uint32_t *count
)
{
201256c: a4 10 00 18 mov %i0, %l2
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
2012570: 80 a6 80 01 cmp %i2, %g1
2012574: 18 80 00 17 bgu 20125d0 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
2012578: 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 ) {
201257c: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1
2012580: 80 a0 60 00 cmp %g1, 0
2012584: 02 80 00 0a be 20125ac <_CORE_message_queue_Broadcast+0x48><== ALWAYS TAKEN
2012588: a2 10 20 00 clr %l1
*count = 0;
201258c: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
2012590: 81 c7 e0 08 ret <== NOT EXECUTED
2012594: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
2012598: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
201259c: 40 00 1f 57 call 201a2f8 <memcpy>
20125a0: a2 04 60 01 inc %l1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
20125a4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
20125a8: 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))) {
20125ac: 40 00 09 d2 call 2014cf4 <_Thread_queue_Dequeue>
20125b0: 90 10 00 12 mov %l2, %o0
20125b4: 92 10 00 19 mov %i1, %o1
20125b8: a0 10 00 08 mov %o0, %l0
20125bc: 80 a2 20 00 cmp %o0, 0
20125c0: 12 bf ff f6 bne 2012598 <_CORE_message_queue_Broadcast+0x34>
20125c4: 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;
20125c8: e2 27 40 00 st %l1, [ %i5 ]
20125cc: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
20125d0: 81 c7 e0 08 ret
20125d4: 81 e8 00 00 restore
02012694 <_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
)
{
2012694: 9d e3 bf 98 save %sp, -104, %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;
2012698: 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;
201269c: 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;
20126a0: f6 26 20 4c st %i3, [ %i0 + 0x4c ]
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
20126a4: c0 26 20 60 clr [ %i0 + 0x60 ]
the_message_queue->notify_argument = the_argument;
20126a8: c0 26 20 64 clr [ %i0 + 0x64 ]
* 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)) {
20126ac: 80 8e e0 03 btst 3, %i3
20126b0: 02 80 00 07 be 20126cc <_CORE_message_queue_Initialize+0x38>
20126b4: a0 10 00 1b mov %i3, %l0
allocated_message_size += sizeof(uint32_t);
20126b8: 82 06 e0 04 add %i3, 4, %g1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
20126bc: a0 08 7f fc and %g1, -4, %l0
}
if (allocated_message_size < maximum_message_size)
20126c0: 80 a4 00 1b cmp %l0, %i3
20126c4: 0a 80 00 23 bcs 2012750 <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN
20126c8: 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 *
20126cc: b6 04 20 14 add %l0, 0x14, %i3
20126d0: 92 10 00 1a mov %i2, %o1
20126d4: 40 00 3e 73 call 20220a0 <.umul>
20126d8: 90 10 00 1b mov %i3, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
20126dc: 80 a2 00 10 cmp %o0, %l0
20126e0: 0a 80 00 1c bcs 2012750 <_CORE_message_queue_Initialize+0xbc><== NEVER TAKEN
20126e4: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
20126e8: 40 00 0f 17 call 2016344 <_Workspace_Allocate>
20126ec: 01 00 00 00 nop
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
20126f0: 80 a2 20 00 cmp %o0, 0
20126f4: 02 80 00 17 be 2012750 <_CORE_message_queue_Initialize+0xbc>
20126f8: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
20126fc: 92 10 00 08 mov %o0, %o1
2012700: 94 10 00 1a mov %i2, %o2
2012704: 90 06 20 68 add %i0, 0x68, %o0
2012708: 7f ff ff 89 call 201252c <_Chain_Initialize>
201270c: 96 10 00 1b mov %i3, %o3
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2012710: 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;
2012714: c0 26 20 54 clr [ %i0 + 0x54 ]
2012718: 82 18 60 01 xor %g1, 1, %g1
201271c: 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);
2012720: 82 06 20 54 add %i0, 0x54, %g1
2012724: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2012728: 82 06 20 50 add %i0, 0x50, %g1
201272c: 90 10 00 18 mov %i0, %o0
2012730: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
2012734: 92 60 3f ff subx %g0, -1, %o1
2012738: 94 10 20 80 mov 0x80, %o2
201273c: 96 10 20 06 mov 6, %o3
2012740: 40 00 0a 8a call 2015168 <_Thread_queue_Initialize>
2012744: b0 10 20 01 mov 1, %i0
2012748: 81 c7 e0 08 ret
201274c: 81 e8 00 00 restore
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
2012750: 81 c7 e0 08 ret
2012754: 91 e8 20 00 restore %g0, 0, %o0
02018880 <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
2018880: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
bool notify = false;
the_message->priority = submit_type;
switch ( submit_type ) {
2018884: 03 20 00 00 sethi %hi(0x80000000), %g1
2018888: 80 a6 80 01 cmp %i2, %g1
201888c: 02 80 00 15 be 20188e0 <_CORE_message_queue_Insert_message+0x60>
2018890: f4 26 60 08 st %i2, [ %i1 + 8 ]
2018894: 82 00 7c 00 add %g1, -1024, %g1
2018898: 82 10 63 ff or %g1, 0x3ff, %g1
201889c: 80 a6 80 01 cmp %i2, %g1
20188a0: 12 80 00 1f bne 201891c <_CORE_message_queue_Insert_message+0x9c><== NEVER TAKEN
20188a4: a2 06 20 54 add %i0, 0x54, %l1
case CORE_MESSAGE_QUEUE_SEND_REQUEST:
_ISR_Disable( level );
20188a8: 7f ff cb 1f call 200b524 <sparc_disable_interrupts>
20188ac: 01 00 00 00 nop
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
20188b0: e2 26 40 00 st %l1, [ %i1 ]
if ( the_message_queue->number_of_pending_messages++ == 0 )
20188b4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
old_last_node = the_chain->last;
20188b8: c4 06 20 58 ld [ %i0 + 0x58 ], %g2
the_chain->last = the_node;
20188bc: f2 26 20 58 st %i1, [ %i0 + 0x58 ]
20188c0: 80 a0 00 01 cmp %g0, %g1
old_last_node->next = the_node;
the_node->previous = old_last_node;
20188c4: c4 26 60 04 st %g2, [ %i1 + 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;
20188c8: f2 20 80 00 st %i1, [ %g2 ]
20188cc: 82 00 60 01 inc %g1
20188d0: 84 60 3f ff subx %g0, -1, %g2
20188d4: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
20188d8: a0 10 00 02 mov %g2, %l0
notify = true;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
20188dc: 30 80 00 27 b,a 2018978 <_CORE_message_queue_Insert_message+0xf8>
break;
case CORE_MESSAGE_QUEUE_URGENT_REQUEST:
_ISR_Disable( level );
20188e0: 7f ff cb 11 call 200b524 <sparc_disable_interrupts>
20188e4: 01 00 00 00 nop
if ( the_message_queue->number_of_pending_messages++ == 0 )
20188e8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
20188ec: c6 06 20 50 ld [ %i0 + 0x50 ], %g3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
20188f0: 82 06 20 50 add %i0, 0x50, %g1
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
20188f4: f2 26 20 50 st %i1, [ %i0 + 0x50 ]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
20188f8: c2 26 60 04 st %g1, [ %i1 + 4 ]
20188fc: 80 a0 00 02 cmp %g0, %g2
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
2018900: f2 20 e0 04 st %i1, [ %g3 + 4 ]
2018904: 82 60 3f ff subx %g0, -1, %g1
2018908: 84 00 a0 01 inc %g2
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
201890c: c6 26 40 00 st %g3, [ %i1 ]
2018910: a0 10 00 01 mov %g1, %l0
2018914: c4 26 20 48 st %g2, [ %i0 + 0x48 ]
notify = true;
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
2018918: 30 80 00 18 b,a 2018978 <_CORE_message_queue_Insert_message+0xf8>
CORE_message_queue_Buffer_control *this_message;
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
201891c: 10 80 00 06 b 2018934 <_CORE_message_queue_Insert_message+0xb4><== NOT EXECUTED
2018920: e0 06 20 50 ld [ %i0 + 0x50 ], %l0 <== NOT EXECUTED
while ( !_Chain_Is_tail( the_header, the_node ) ) {
this_message = (CORE_message_queue_Buffer_control *) the_node;
if ( this_message->priority <= the_message->priority ) {
2018924: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED
2018928: 14 80 00 06 bg 2018940 <_CORE_message_queue_Insert_message+0xc0><== NOT EXECUTED
201892c: 01 00 00 00 nop <== NOT EXECUTED
the_node = the_node->next;
2018930: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
Chain_Node *the_node;
Chain_Control *the_header;
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
2018934: 80 a4 00 11 cmp %l0, %l1 <== NOT EXECUTED
2018938: 32 bf ff fb bne,a 2018924 <_CORE_message_queue_Insert_message+0xa4><== NOT EXECUTED
201893c: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
continue;
}
break;
}
_ISR_Disable( level );
2018940: 7f ff ca f9 call 200b524 <sparc_disable_interrupts> <== NOT EXECUTED
2018944: 01 00 00 00 nop <== NOT EXECUTED
if ( the_message_queue->number_of_pending_messages++ == 0 )
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
2018948: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
}
break;
}
_ISR_Disable( level );
if ( the_message_queue->number_of_pending_messages++ == 0 )
201894c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 <== NOT EXECUTED
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2018950: c6 00 40 00 ld [ %g1 ], %g3 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2018954: c2 26 60 04 st %g1, [ %i1 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
after_node->next = the_node;
2018958: f2 20 40 00 st %i1, [ %g1 ] <== NOT EXECUTED
201895c: 80 a0 00 02 cmp %g0, %g2 <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
2018960: f2 20 e0 04 st %i1, [ %g3 + 4 ] <== NOT EXECUTED
2018964: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
2018968: 84 00 a0 01 inc %g2 <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
201896c: c6 26 40 00 st %g3, [ %i1 ] <== NOT EXECUTED
2018970: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED
2018974: c4 26 20 48 st %g2, [ %i0 + 0x48 ] <== NOT EXECUTED
notify = true;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
2018978: 7f ff ca ef call 200b534 <sparc_enable_interrupts>
201897c: 01 00 00 00 nop
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
2018980: 80 8c 20 ff btst 0xff, %l0
2018984: 02 80 00 08 be 20189a4 <_CORE_message_queue_Insert_message+0x124>
2018988: 01 00 00 00 nop
201898c: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2018990: 80 a0 60 00 cmp %g1, 0
2018994: 02 80 00 04 be 20189a4 <_CORE_message_queue_Insert_message+0x124><== ALWAYS TAKEN
2018998: 01 00 00 00 nop
(*the_message_queue->notify_handler)( the_message_queue->notify_argument );
201899c: 9f c0 40 00 call %g1 <== NOT EXECUTED
20189a0: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED
20189a4: 81 c7 e0 08 ret
20189a8: 81 e8 00 00 restore
02012758 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
2012758: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
201275c: 27 00 80 c1 sethi %hi(0x2030400), %l3
2012760: e2 04 e2 04 ld [ %l3 + 0x204 ], %l1 ! 2030604 <_Thread_Executing>
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
2012764: a4 10 00 19 mov %i1, %l2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
Thread_Control *the_thread;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
2012768: c0 24 60 34 clr [ %l1 + 0x34 ]
_ISR_Disable( level );
201276c: 7f ff e3 6e call 200b524 <sparc_disable_interrupts>
2012770: a0 10 00 18 mov %i0, %l0
2012774: 86 10 00 08 mov %o0, %g3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2012778: f2 06 20 50 ld [ %i0 + 0x50 ], %i1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
201277c: 82 06 20 54 add %i0, 0x54, %g1
2012780: 80 a6 40 01 cmp %i1, %g1
2012784: 02 80 00 24 be 2012814 <_CORE_message_queue_Seize+0xbc>
2012788: 84 06 20 50 add %i0, 0x50, %g2
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
201278c: c2 06 40 00 ld [ %i1 ], %g1
the_chain->first = new_first;
2012790: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
2012794: 80 a6 60 00 cmp %i1, 0
2012798: 02 80 00 1f be 2012814 <_CORE_message_queue_Seize+0xbc> <== NEVER TAKEN
201279c: c4 20 60 04 st %g2, [ %g1 + 4 ]
the_message_queue->number_of_pending_messages -= 1;
20127a0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
20127a4: 82 00 7f ff add %g1, -1, %g1
20127a8: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
20127ac: 7f ff e3 62 call 200b534 <sparc_enable_interrupts>
20127b0: a2 06 60 10 add %i1, 0x10, %l1
*size_p = the_message->Contents.size;
20127b4: d4 06 60 0c ld [ %i1 + 0xc ], %o2
_Thread_Executing->Wait.count = the_message->priority;
20127b8: c4 04 e2 04 ld [ %l3 + 0x204 ], %g2
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;
20127bc: d4 26 c0 00 st %o2, [ %i3 ]
_Thread_Executing->Wait.count = the_message->priority;
20127c0: c2 06 60 08 ld [ %i1 + 8 ], %g1
20127c4: c2 20 a0 24 st %g1, [ %g2 + 0x24 ]
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
20127c8: 92 10 00 11 mov %l1, %o1
20127cc: 40 00 1e cb call 201a2f8 <memcpy>
20127d0: 90 10 00 1a mov %i2, %o0
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
20127d4: 40 00 09 48 call 2014cf4 <_Thread_queue_Dequeue>
20127d8: 90 10 00 18 mov %i0, %o0
if ( !the_thread ) {
20127dc: 80 a2 20 00 cmp %o0, 0
20127e0: 32 80 00 04 bne,a 20127f0 <_CORE_message_queue_Seize+0x98><== NEVER TAKEN
20127e4: d4 02 20 30 ld [ %o0 + 0x30 ], %o2 <== NOT EXECUTED
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 );
20127e8: 7f ff ff 35 call 20124bc <_Chain_Append>
20127ec: 91 ee 20 68 restore %i0, 0x68, %o0
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
20127f0: c2 02 20 24 ld [ %o0 + 0x24 ], %g1 <== NOT EXECUTED
the_message->Contents.size = (size_t) the_thread->Wait.option;
20127f4: d4 26 60 0c st %o2, [ %i1 + 0xc ] <== NOT EXECUTED
* There was a thread waiting to send a message. This code
* puts the messages in the message queue on behalf of the
* waiting task.
*/
the_message->priority = the_thread->Wait.count;
20127f8: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
20127fc: d2 02 20 2c ld [ %o0 + 0x2c ], %o1 <== NOT EXECUTED
2012800: 40 00 1e be call 201a2f8 <memcpy> <== NOT EXECUTED
2012804: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
2012808: f4 06 60 08 ld [ %i1 + 8 ], %i2 <== NOT EXECUTED
201280c: 40 00 18 1d call 2018880 <_CORE_message_queue_Insert_message><== NOT EXECUTED
2012810: 81 e8 00 00 restore <== NOT EXECUTED
the_message->priority
);
return;
}
if ( !wait ) {
2012814: 80 8f 20 ff btst 0xff, %i4
2012818: 12 80 00 08 bne 2012838 <_CORE_message_queue_Seize+0xe0>
201281c: 82 10 20 01 mov 1, %g1
_ISR_Enable( level );
2012820: 7f ff e3 45 call 200b534 <sparc_enable_interrupts>
2012824: 90 10 00 03 mov %g3, %o0
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
2012828: 82 10 20 04 mov 4, %g1
201282c: c2 24 60 34 st %g1, [ %l1 + 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 );
}
2012830: 81 c7 e0 08 ret
2012834: 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;
2012838: c2 24 20 30 st %g1, [ %l0 + 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;
201283c: f6 24 60 28 st %i3, [ %l1 + 0x28 ]
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
2012840: e4 24 60 20 st %l2, [ %l1 + 0x20 ]
executing->Wait.return_argument_second.mutable_object = buffer;
2012844: f4 24 60 2c st %i2, [ %l1 + 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;
2012848: e0 24 60 44 st %l0, [ %l1 + 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 );
201284c: 90 10 00 03 mov %g3, %o0
2012850: 7f ff e3 39 call 200b534 <sparc_enable_interrupts>
2012854: 35 00 80 54 sethi %hi(0x2015000), %i2
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
2012858: b0 10 00 10 mov %l0, %i0
201285c: b2 10 00 1d mov %i5, %i1
2012860: 40 00 09 8a call 2014e88 <_Thread_queue_Enqueue_with_handler>
2012864: 95 ee a2 54 restore %i2, 0x254, %o2
0201286c <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
201286c: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
2012870: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
2012874: a2 10 00 18 mov %i0, %l1
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
2012878: 80 a6 80 01 cmp %i2, %g1
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
201287c: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
2012880: 18 80 00 3f bgu 201297c <_CORE_message_queue_Submit+0x110>
2012884: b0 10 20 01 mov 1, %i0
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
2012888: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
201288c: 80 a0 60 00 cmp %g1, 0
2012890: 32 80 00 0f bne,a 20128cc <_CORE_message_queue_Submit+0x60>
2012894: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
2012898: 40 00 09 17 call 2014cf4 <_Thread_queue_Dequeue>
201289c: 90 10 00 11 mov %l1, %o0
if ( the_thread ) {
20128a0: a0 92 20 00 orcc %o0, 0, %l0
20128a4: 02 80 00 09 be 20128c8 <_CORE_message_queue_Submit+0x5c>
20128a8: 92 10 00 19 mov %i1, %o1
20128ac: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
20128b0: 40 00 1e 92 call 201a2f8 <memcpy>
20128b4: 94 10 00 1a mov %i2, %o2
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
20128b8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
the_thread->Wait.count = submit_type;
20128bc: fa 24 20 24 st %i5, [ %l0 + 0x24 ]
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
20128c0: 10 80 00 15 b 2012914 <_CORE_message_queue_Submit+0xa8>
20128c4: f4 20 40 00 st %i2, [ %g1 ]
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
20128c8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
20128cc: c2 04 60 44 ld [ %l1 + 0x44 ], %g1
20128d0: 80 a0 80 01 cmp %g2, %g1
20128d4: 1a 80 00 12 bcc 201291c <_CORE_message_queue_Submit+0xb0>
20128d8: 80 a4 a0 00 cmp %l2, 0
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
20128dc: 7f ff ff 04 call 20124ec <_Chain_Get>
20128e0: 90 04 60 68 add %l1, 0x68, %o0
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
20128e4: a0 92 20 00 orcc %o0, 0, %l0
20128e8: 02 80 00 27 be 2012984 <_CORE_message_queue_Submit+0x118> <== NEVER TAKEN
20128ec: 92 10 00 19 mov %i1, %o1
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
20128f0: 94 10 00 1a mov %i2, %o2
20128f4: 40 00 1e 81 call 201a2f8 <memcpy>
20128f8: 90 04 20 10 add %l0, 0x10, %o0
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
20128fc: 90 10 00 11 mov %l1, %o0
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
2012900: f4 24 20 0c st %i2, [ %l0 + 0xc ]
the_message->priority = submit_type;
2012904: fa 24 20 08 st %i5, [ %l0 + 8 ]
_CORE_message_queue_Insert_message(
2012908: 92 10 00 10 mov %l0, %o1
201290c: 40 00 17 dd call 2018880 <_CORE_message_queue_Insert_message>
2012910: 94 10 00 1d mov %i5, %o2
2012914: 81 c7 e0 08 ret
2012918: 91 e8 20 00 restore %g0, 0, %o0
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
201291c: 02 80 00 18 be 201297c <_CORE_message_queue_Submit+0x110> <== ALWAYS TAKEN
2012920: b0 10 20 02 mov 2, %i0
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
2012924: 03 00 80 c1 sethi %hi(0x2030400), %g1 <== NOT EXECUTED
2012928: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 20305e0 <_ISR_Nest_level><== NOT EXECUTED
201292c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2012930: 32 80 00 13 bne,a 201297c <_CORE_message_queue_Submit+0x110><== NOT EXECUTED
2012934: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
2012938: 03 00 80 c1 sethi %hi(0x2030400), %g1 <== NOT EXECUTED
_ISR_Disable( level );
201293c: 7f ff e2 fa call 200b524 <sparc_disable_interrupts> <== NOT EXECUTED
2012940: e0 00 62 04 ld [ %g1 + 0x204 ], %l0 ! 2030604 <_Thread_Executing><== NOT EXECUTED
2012944: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2012948: c2 24 60 30 st %g1, [ %l1 + 0x30 ] <== NOT EXECUTED
_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.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
201294c: fa 24 20 24 st %i5, [ %l0 + 0x24 ] <== NOT EXECUTED
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
2012950: f6 24 20 20 st %i3, [ %l0 + 0x20 ] <== NOT EXECUTED
executing->Wait.return_argument_second.immutable_object = buffer;
2012954: f2 24 20 2c st %i1, [ %l0 + 0x2c ] <== NOT EXECUTED
executing->Wait.option = (uint32_t) size;
2012958: f4 24 20 30 st %i2, [ %l0 + 0x30 ] <== NOT EXECUTED
{
Thread_Control *executing = _Thread_Executing;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
201295c: e2 24 20 44 st %l1, [ %l0 + 0x44 ] <== NOT EXECUTED
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
2012960: 7f ff e2 f5 call 200b534 <sparc_enable_interrupts> <== NOT EXECUTED
2012964: b0 10 20 07 mov 7, %i0 <== NOT EXECUTED
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
2012968: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 <== NOT EXECUTED
201296c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2012970: 15 00 80 54 sethi %hi(0x2015000), %o2 <== NOT EXECUTED
2012974: 40 00 09 45 call 2014e88 <_Thread_queue_Enqueue_with_handler><== NOT EXECUTED
2012978: 94 12 a2 54 or %o2, 0x254, %o2 ! 2015254 <_Thread_queue_Timeout><== NOT EXECUTED
201297c: 81 c7 e0 08 ret
2012980: 81 e8 00 00 restore
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
2012984: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
}
2012988: 81 c7 e0 08 ret <== NOT EXECUTED
201298c: 81 e8 00 00 restore <== NOT EXECUTED
02005f60 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
2005f60: 9d e3 bf 98 save %sp, -104, %sp
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
2005f64: 94 10 20 10 mov 0x10, %o2
2005f68: 90 06 20 40 add %i0, 0x40, %o0
2005f6c: 40 00 1b 36 call 200cc44 <memcpy>
2005f70: 92 10 00 19 mov %i1, %o1
the_mutex->lock = initial_lock;
2005f74: f4 26 20 50 st %i2, [ %i0 + 0x50 ]
the_mutex->blocked_count = 0;
2005f78: c0 26 20 58 clr [ %i0 + 0x58 ]
if ( initial_lock == CORE_MUTEX_LOCKED ) {
2005f7c: 80 a6 a0 00 cmp %i2, 0
2005f80: 12 80 00 18 bne 2005fe0 <_CORE_mutex_Initialize+0x80>
2005f84: a0 10 00 18 mov %i0, %l0
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
2005f88: 03 00 80 5a sethi %hi(0x2016800), %g1
2005f8c: c6 00 62 64 ld [ %g1 + 0x264 ], %g3 ! 2016a64 <_Thread_Executing>
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
2005f90: 82 10 20 01 mov 1, %g1
2005f94: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
2005f98: c2 00 e0 08 ld [ %g3 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
2005f9c: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
2005fa0: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
2005fa4: 80 a0 a0 02 cmp %g2, 2
2005fa8: 02 80 00 05 be 2005fbc <_CORE_mutex_Initialize+0x5c>
2005fac: c6 26 20 5c st %g3, [ %i0 + 0x5c ]
2005fb0: 80 a0 a0 03 cmp %g2, 3
2005fb4: 32 80 00 0f bne,a 2005ff0 <_CORE_mutex_Initialize+0x90> <== ALWAYS TAKEN
2005fb8: c2 06 60 08 ld [ %i1 + 8 ], %g1
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
2005fbc: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
2005fc0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
2005fc4: 80 a0 80 01 cmp %g2, %g1
2005fc8: 0a 80 00 11 bcs 200600c <_CORE_mutex_Initialize+0xac> <== NEVER TAKEN
2005fcc: b0 10 20 06 mov 6, %i0
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
2005fd0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2005fd4: 82 00 60 01 inc %g1
2005fd8: 10 80 00 05 b 2005fec <_CORE_mutex_Initialize+0x8c>
2005fdc: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
}
} else {
the_mutex->nest_count = 0;
2005fe0: c0 26 20 54 clr [ %i0 + 0x54 ]
the_mutex->holder = NULL;
2005fe4: c0 26 20 5c clr [ %i0 + 0x5c ]
the_mutex->holder_id = 0;
2005fe8: c0 26 20 60 clr [ %i0 + 0x60 ]
}
_Thread_queue_Initialize(
2005fec: c2 06 60 08 ld [ %i1 + 8 ], %g1
2005ff0: 90 10 00 10 mov %l0, %o0
2005ff4: 80 a0 00 01 cmp %g0, %g1
2005ff8: 94 10 24 00 mov 0x400, %o2
2005ffc: 92 40 20 00 addx %g0, 0, %o1
2006000: 96 10 20 05 mov 5, %o3
2006004: 40 00 07 ad call 2007eb8 <_Thread_queue_Initialize>
2006008: b0 10 20 00 clr %i0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
200600c: 81 c7 e0 08 ret
2006010: 81 e8 00 00 restore
02006078 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
2006078: 9d e3 bf 98 save %sp, -104, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
200607c: 03 00 80 5a sethi %hi(0x2016800), %g1
2006080: c2 00 61 a0 ld [ %g1 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
2006084: 80 a0 60 00 cmp %g1, 0
2006088: 02 80 00 0d be 20060bc <_CORE_mutex_Seize+0x44>
200608c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2006090: 80 8e a0 ff btst 0xff, %i2
2006094: 02 80 00 0b be 20060c0 <_CORE_mutex_Seize+0x48> <== NEVER TAKEN
2006098: 90 10 00 18 mov %i0, %o0
200609c: 03 00 80 5a sethi %hi(0x2016800), %g1
20060a0: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 2016b44 <_System_state_Current>
20060a4: 80 a0 60 01 cmp %g1, 1
20060a8: 08 80 00 05 bleu 20060bc <_CORE_mutex_Seize+0x44>
20060ac: 90 10 20 00 clr %o0
20060b0: 92 10 20 00 clr %o1
20060b4: 40 00 01 7b call 20066a0 <_Internal_error_Occurred>
20060b8: 94 10 20 13 mov 0x13, %o2
20060bc: 90 10 00 18 mov %i0, %o0
20060c0: 40 00 13 e2 call 200b048 <_CORE_mutex_Seize_interrupt_trylock>
20060c4: 92 07 a0 54 add %fp, 0x54, %o1
20060c8: 80 a2 20 00 cmp %o0, 0
20060cc: 02 80 00 09 be 20060f0 <_CORE_mutex_Seize+0x78>
20060d0: 80 8e a0 ff btst 0xff, %i2
20060d4: 12 80 00 09 bne 20060f8 <_CORE_mutex_Seize+0x80>
20060d8: 39 00 80 5a sethi %hi(0x2016800), %i4
20060dc: 7f ff ef 28 call 2001d7c <sparc_enable_interrupts>
20060e0: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
20060e4: c4 07 22 64 ld [ %i4 + 0x264 ], %g2
20060e8: 82 10 20 01 mov 1, %g1
20060ec: c2 20 a0 34 st %g1, [ %g2 + 0x34 ]
20060f0: 81 c7 e0 08 ret
20060f4: 81 e8 00 00 restore
20060f8: c6 07 22 64 ld [ %i4 + 0x264 ], %g3
20060fc: 05 00 80 5a sethi %hi(0x2016800), %g2
2006100: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
2006104: f2 20 e0 20 st %i1, [ %g3 + 0x20 ]
2006108: 82 00 60 01 inc %g1
200610c: f0 20 e0 44 st %i0, [ %g3 + 0x44 ]
2006110: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ]
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;
2006114: 82 10 20 01 mov 1, %g1
2006118: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
200611c: 7f ff ef 18 call 2001d7c <sparc_enable_interrupts>
2006120: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
2006124: 90 10 00 18 mov %i0, %o0
2006128: 7f ff ff bb call 2006014 <_CORE_mutex_Seize_interrupt_blocking>
200612c: 92 10 00 1b mov %i3, %o1
2006130: 81 c7 e0 08 ret
2006134: 81 e8 00 00 restore
0200b048 <_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
)
{
200b048: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
200b04c: 03 00 80 5a sethi %hi(0x2016800), %g1
200b050: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 ! 2016a64 <_Thread_Executing>
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
200b054: d0 06 40 00 ld [ %i1 ], %o0
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
200b058: c0 20 a0 34 clr [ %g2 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
200b05c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200b060: 80 a0 60 00 cmp %g1, 0
200b064: 22 80 00 32 be,a 200b12c <_CORE_mutex_Seize_interrupt_trylock+0xe4>
200b068: c6 06 20 5c ld [ %i0 + 0x5c ], %g3
the_mutex->lock = CORE_MUTEX_LOCKED;
200b06c: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200b070: c2 00 a0 08 ld [ %g2 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200b074: c6 06 20 48 ld [ %i0 + 0x48 ], %g3
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;
200b078: c2 26 20 60 st %g1, [ %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;
200b07c: c4 26 20 5c st %g2, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
200b080: 82 10 20 01 mov 1, %g1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200b084: 80 a0 e0 02 cmp %g3, 2
200b088: 02 80 00 05 be 200b09c <_CORE_mutex_Seize_interrupt_trylock+0x54><== ALWAYS TAKEN
200b08c: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
200b090: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED
200b094: 32 80 00 06 bne,a 200b0ac <_CORE_mutex_Seize_interrupt_trylock+0x64><== NOT EXECUTED
200b098: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200b09c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1
200b0a0: 82 00 60 01 inc %g1
200b0a4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200b0a8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200b0ac: 80 a0 60 03 cmp %g1, 3
200b0b0: 22 80 00 03 be,a 200b0bc <_CORE_mutex_Seize_interrupt_trylock+0x74><== NEVER TAKEN
200b0b4: c6 06 20 4c ld [ %i0 + 0x4c ], %g3 <== NOT EXECUTED
_ISR_Enable( level );
200b0b8: 30 80 00 2c b,a 200b168 <_CORE_mutex_Seize_interrupt_trylock+0x120>
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
200b0bc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED
if ( current == ceiling ) {
200b0c0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
200b0c4: 12 80 00 03 bne 200b0d0 <_CORE_mutex_Seize_interrupt_trylock+0x88><== NOT EXECUTED
200b0c8: 01 00 00 00 nop <== NOT EXECUTED
_ISR_Enable( level );
200b0cc: 30 80 00 27 b,a 200b168 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED
return 0;
}
if ( current > ceiling ) {
200b0d0: 08 80 00 0f bleu 200b10c <_CORE_mutex_Seize_interrupt_trylock+0xc4><== NOT EXECUTED
200b0d4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200b0d8: 05 00 80 5a sethi %hi(0x2016800), %g2 <== NOT EXECUTED
200b0dc: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level><== NOT EXECUTED
200b0e0: 82 00 60 01 inc %g1 <== NOT EXECUTED
200b0e4: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] <== NOT EXECUTED
_Thread_Disable_dispatch();
_ISR_Enable( level );
200b0e8: 7f ff db 25 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
200b0ec: 01 00 00 00 nop <== NOT EXECUTED
_Thread_Change_priority(
200b0f0: d2 06 20 4c ld [ %i0 + 0x4c ], %o1 <== NOT EXECUTED
200b0f4: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 <== NOT EXECUTED
200b0f8: 7f ff ef d3 call 2007044 <_Thread_Change_priority> <== NOT EXECUTED
200b0fc: 94 10 20 00 clr %o2 <== NOT EXECUTED
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
200b100: 7f ff f1 5f call 200767c <_Thread_Enable_dispatch> <== NOT EXECUTED
200b104: b0 10 20 00 clr %i0 <== NOT EXECUTED
200b108: 30 80 00 1a b,a 200b170 <_CORE_mutex_Seize_interrupt_trylock+0x128><== NOT EXECUTED
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
200b10c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b110: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
200b114: c0 26 20 54 clr [ %i0 + 0x54 ] <== NOT EXECUTED
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200b118: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
200b11c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
200b120: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200b124: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED
_ISR_Enable( level );
200b128: 30 80 00 10 b,a 200b168 <_CORE_mutex_Seize_interrupt_trylock+0x120><== NOT EXECUTED
/*
* 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 ) ) {
200b12c: 80 a0 c0 02 cmp %g3, %g2
200b130: 12 80 00 12 bne 200b178 <_CORE_mutex_Seize_interrupt_trylock+0x130>
200b134: 01 00 00 00 nop
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200b138: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200b13c: 80 a0 60 00 cmp %g1, 0
200b140: 22 80 00 07 be,a 200b15c <_CORE_mutex_Seize_interrupt_trylock+0x114>
200b144: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200b148: 80 a0 60 01 cmp %g1, 1
200b14c: 12 80 00 0b bne 200b178 <_CORE_mutex_Seize_interrupt_trylock+0x130>
200b150: 82 10 20 02 mov 2, %g1
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( level );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
200b154: 10 80 00 05 b 200b168 <_CORE_mutex_Seize_interrupt_trylock+0x120>
200b158: c2 20 e0 34 st %g1, [ %g3 + 0x34 ]
* 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++;
200b15c: 82 00 60 01 inc %g1
200b160: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( level );
200b164: 30 80 00 01 b,a 200b168 <_CORE_mutex_Seize_interrupt_trylock+0x120>
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( level );
200b168: 7f ff db 05 call 2001d7c <sparc_enable_interrupts>
200b16c: b0 10 20 00 clr %i0
200b170: 81 c7 e0 08 ret
200b174: 81 e8 00 00 restore
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
200b178: 81 c7 e0 08 ret
200b17c: 91 e8 20 01 restore %g0, 1, %o0
02006138 <_CORE_mutex_Surrender>:
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
2006138: 9d e3 bf 98 save %sp, -104, %sp
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
200613c: c2 0e 20 44 ldub [ %i0 + 0x44 ], %g1
CORE_mutex_Status _CORE_mutex_Surrender(
CORE_mutex_Control *the_mutex,
Objects_Id id,
CORE_mutex_API_mp_support_callout api_mutex_mp_support
)
{
2006140: a0 10 00 18 mov %i0, %l0
* allowed when the mutex in quetion is FIFO or simple Priority
* discipline. But Priority Ceiling or Priority Inheritance mutexes
* must be released by the thread which acquired them.
*/
if ( the_mutex->Attributes.only_owner_release ) {
2006144: 80 a0 60 00 cmp %g1, 0
2006148: 02 80 00 07 be 2006164 <_CORE_mutex_Surrender+0x2c>
200614c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
if ( !_Thread_Is_executing( holder ) )
2006150: 03 00 80 5a sethi %hi(0x2016800), %g1
2006154: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016a64 <_Thread_Executing>
2006158: 80 a2 00 01 cmp %o0, %g1
200615c: 12 80 00 52 bne 20062a4 <_CORE_mutex_Surrender+0x16c>
2006160: b0 10 20 03 mov 3, %i0
return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE;
}
/* XXX already unlocked -- not right status */
if ( !the_mutex->nest_count )
2006164: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
2006168: 80 a0 60 00 cmp %g1, 0
200616c: 02 80 00 4d be 20062a0 <_CORE_mutex_Surrender+0x168>
2006170: 82 00 7f ff add %g1, -1, %g1
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
2006174: 80 a0 60 00 cmp %g1, 0
2006178: 02 80 00 09 be 200619c <_CORE_mutex_Surrender+0x64>
200617c: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
2006180: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2006184: 80 a0 60 00 cmp %g1, 0
2006188: 02 80 00 47 be 20062a4 <_CORE_mutex_Surrender+0x16c> <== ALWAYS TAKEN
200618c: b0 10 20 00 clr %i0
2006190: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED
2006194: 02 80 00 44 be 20062a4 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED
2006198: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
200619c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
/*
* Formally release the mutex before possibly transferring it to a
* blocked thread.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
20061a0: 80 a0 60 02 cmp %g1, 2
20061a4: 02 80 00 04 be 20061b4 <_CORE_mutex_Surrender+0x7c>
20061a8: 80 a0 60 03 cmp %g1, 3
20061ac: 32 80 00 07 bne,a 20061c8 <_CORE_mutex_Surrender+0x90> <== ALWAYS TAKEN
20061b0: c0 24 20 5c clr [ %l0 + 0x5c ]
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
20061b4: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
20061b8: 82 00 7f ff add %g1, -1, %g1
20061bc: c2 22 20 1c st %g1, [ %o0 + 0x1c ]
20061c0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
}
the_mutex->holder = NULL;
20061c4: c0 24 20 5c clr [ %l0 + 0x5c ]
/*
* Whether or not someone is waiting for the mutex, an
* inherited priority must be lowered if this is the last
* mutex (i.e. resource) this task has.
*/
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
20061c8: 80 a0 60 02 cmp %g1, 2
20061cc: 02 80 00 05 be 20061e0 <_CORE_mutex_Surrender+0xa8>
20061d0: c0 24 20 60 clr [ %l0 + 0x60 ]
20061d4: 80 a0 60 03 cmp %g1, 3
20061d8: 12 80 00 0d bne 200620c <_CORE_mutex_Surrender+0xd4> <== ALWAYS TAKEN
20061dc: 01 00 00 00 nop
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
20061e0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
20061e4: 80 a0 60 00 cmp %g1, 0
20061e8: 12 80 00 09 bne 200620c <_CORE_mutex_Surrender+0xd4>
20061ec: 01 00 00 00 nop
20061f0: d2 02 20 18 ld [ %o0 + 0x18 ], %o1
20061f4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
20061f8: 80 a2 40 01 cmp %o1, %g1
20061fc: 02 80 00 04 be 200620c <_CORE_mutex_Surrender+0xd4>
2006200: 01 00 00 00 nop
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
2006204: 40 00 03 90 call 2007044 <_Thread_Change_priority>
2006208: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
/*
* Now we check if another thread was waiting for this mutex. If so,
* transfer the mutex to that thread.
*/
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
200620c: 40 00 06 0e call 2007a44 <_Thread_queue_Dequeue>
2006210: 90 10 00 10 mov %l0, %o0
2006214: 86 92 20 00 orcc %o0, 0, %g3
2006218: 02 80 00 1f be 2006294 <_CORE_mutex_Surrender+0x15c>
200621c: 82 10 20 01 mov 1, %g1
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
2006220: c2 00 e0 08 ld [ %g3 + 8 ], %g1
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
2006224: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
2006228: c2 24 20 60 st %g1, [ %l0 + 0x60 ]
} else
#endif
{
the_mutex->holder = the_thread;
200622c: c6 24 20 5c st %g3, [ %l0 + 0x5c ]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
2006230: 82 10 20 01 mov 1, %g1
switch ( the_mutex->Attributes.discipline ) {
2006234: 80 a0 a0 02 cmp %g2, 2
2006238: 02 80 00 07 be 2006254 <_CORE_mutex_Surrender+0x11c>
200623c: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
2006240: 80 a0 a0 03 cmp %g2, 3
2006244: 12 80 00 18 bne 20062a4 <_CORE_mutex_Surrender+0x16c> <== ALWAYS TAKEN
2006248: b0 10 20 00 clr %i0
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
200624c: 10 80 00 07 b 2006268 <_CORE_mutex_Surrender+0x130> <== NOT EXECUTED
2006250: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
2006254: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2006258: 82 00 60 01 inc %g1
200625c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
2006260: 81 c7 e0 08 ret
2006264: 91 e8 20 00 restore %g0, 0, %o0
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
2006268: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
200626c: 82 00 60 01 inc %g1 <== NOT EXECUTED
2006270: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED
if (the_mutex->Attributes.priority_ceiling <
2006274: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 <== NOT EXECUTED
2006278: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED
200627c: 3a 80 00 0a bcc,a 20062a4 <_CORE_mutex_Surrender+0x16c> <== NOT EXECUTED
2006280: b0 10 20 00 clr %i0 <== NOT EXECUTED
the_thread->current_priority){
_Thread_Change_priority(
2006284: 40 00 03 70 call 2007044 <_Thread_Change_priority> <== NOT EXECUTED
2006288: 94 10 20 00 clr %o2 <== NOT EXECUTED
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200628c: 81 c7 e0 08 ret <== NOT EXECUTED
2006290: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
2006294: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
2006298: 81 c7 e0 08 ret
200629c: 91 e8 20 00 restore %g0, 0, %o0
20062a0: b0 10 20 00 clr %i0
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
20062a4: 81 c7 e0 08 ret
20062a8: 81 e8 00 00 restore
020062f8 <_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
)
{
20062f8: 9d e3 bf 98 save %sp, -104, %sp
20062fc: 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)) ) {
2006300: b0 10 20 00 clr %i0
2006304: 40 00 05 d0 call 2007a44 <_Thread_queue_Dequeue>
2006308: 90 10 00 10 mov %l0, %o0
200630c: 80 a2 20 00 cmp %o0, 0
2006310: 12 80 00 0e bne 2006348 <_CORE_semaphore_Surrender+0x50>
2006314: 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 );
2006318: 7f ff ee 95 call 2001d6c <sparc_disable_interrupts>
200631c: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2006320: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
2006324: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
2006328: 80 a0 80 01 cmp %g2, %g1
200632c: 1a 80 00 05 bcc 2006340 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
2006330: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
2006334: 82 00 a0 01 add %g2, 1, %g1
2006338: b0 10 20 00 clr %i0
200633c: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2006340: 7f ff ee 8f call 2001d7c <sparc_enable_interrupts>
2006344: 01 00 00 00 nop
}
return status;
}
2006348: 81 c7 e0 08 ret
200634c: 81 e8 00 00 restore
0200af3c <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
200af3c: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED
200af40: c2 00 62 68 ld [ %g1 + 0x268 ], %g1 ! 2016a68 <_Debug_Level><== NOT EXECUTED
200af44: 90 0a 00 01 and %o0, %g1, %o0 <== NOT EXECUTED
200af48: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
200af4c: 81 c3 e0 08 retl <== NOT EXECUTED
200af50: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED
02004e70 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2004e70: 9d e3 bf 98 save %sp, -104, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
2004e74: 03 00 80 5a sethi %hi(0x2016800), %g1
2004e78: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2016a64 <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
2004e7c: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
2004e80: 7f ff f3 bb call 2001d6c <sparc_disable_interrupts>
2004e84: e4 04 21 68 ld [ %l0 + 0x168 ], %l2
pending_events = api->pending_events;
2004e88: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
2004e8c: a2 8e 00 01 andcc %i0, %g1, %l1
2004e90: 02 80 00 0e be 2004ec8 <_Event_Seize+0x58>
2004e94: 80 8e 60 01 btst 1, %i1
2004e98: 80 a4 40 18 cmp %l1, %i0
2004e9c: 02 80 00 04 be 2004eac <_Event_Seize+0x3c>
2004ea0: 80 8e 60 02 btst 2, %i1
2004ea4: 02 80 00 09 be 2004ec8 <_Event_Seize+0x58> <== NEVER TAKEN
2004ea8: 80 8e 60 01 btst 1, %i1
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
2004eac: 82 28 40 11 andn %g1, %l1, %g1
2004eb0: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
2004eb4: 7f ff f3 b2 call 2001d7c <sparc_enable_interrupts>
2004eb8: 01 00 00 00 nop
2004ebc: e2 26 c0 00 st %l1, [ %i3 ]
2004ec0: 81 c7 e0 08 ret
2004ec4: 81 e8 00 00 restore
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
2004ec8: 02 80 00 09 be 2004eec <_Event_Seize+0x7c>
2004ecc: 84 10 20 01 mov 1, %g2
_ISR_Enable( level );
2004ed0: 7f ff f3 ab call 2001d7c <sparc_enable_interrupts>
2004ed4: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
2004ed8: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
2004edc: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
2004ee0: e2 26 c0 00 st %l1, [ %i3 ]
2004ee4: 81 c7 e0 08 ret
2004ee8: 81 e8 00 00 restore
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2004eec: 03 00 80 5b sethi %hi(0x2016c00), %g1
executing->Wait.option = (uint32_t) option_set;
2004ef0: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
executing->Wait.count = (uint32_t) event_in;
2004ef4: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
2004ef8: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2004efc: c4 20 60 74 st %g2, [ %g1 + 0x74 ]
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
2004f00: 7f ff f3 9f call 2001d7c <sparc_enable_interrupts>
2004f04: 01 00 00 00 nop
if ( ticks ) {
2004f08: 80 a6 a0 00 cmp %i2, 0
2004f0c: 02 80 00 0f be 2004f48 <_Event_Seize+0xd8>
2004f10: 90 10 00 10 mov %l0, %o0
_Watchdog_Initialize(
2004f14: c2 04 20 08 ld [ %l0 + 8 ], %g1
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2004f18: 11 00 80 5a sethi %hi(0x2016800), %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2004f1c: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2004f20: 03 00 80 14 sethi %hi(0x2005000), %g1
2004f24: 82 10 61 18 or %g1, 0x118, %g1 ! 2005118 <_Event_Timeout>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2004f28: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2004f2c: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2004f30: c0 24 20 6c clr [ %l0 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2004f34: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2004f38: 90 12 22 84 or %o0, 0x284, %o0
2004f3c: 40 00 0e 46 call 2008854 <_Watchdog_Insert>
2004f40: 92 04 20 48 add %l0, 0x48, %o1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
2004f44: 90 10 00 10 mov %l0, %o0
2004f48: 40 00 0c 41 call 200804c <_Thread_Set_state>
2004f4c: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
2004f50: 7f ff f3 87 call 2001d6c <sparc_disable_interrupts>
2004f54: 01 00 00 00 nop
sync_state = _Event_Sync_state;
2004f58: 03 00 80 5b sethi %hi(0x2016c00), %g1
2004f5c: f0 00 60 74 ld [ %g1 + 0x74 ], %i0 ! 2016c74 <_Event_Sync_state>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
2004f60: c0 20 60 74 clr [ %g1 + 0x74 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
2004f64: 80 a6 20 01 cmp %i0, 1
2004f68: 12 80 00 04 bne 2004f78 <_Event_Seize+0x108>
2004f6c: b2 10 00 10 mov %l0, %i1
_ISR_Enable( level );
2004f70: 7f ff f3 83 call 2001d7c <sparc_enable_interrupts>
2004f74: 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 );
2004f78: 40 00 08 1e call 2006ff0 <_Thread_blocking_operation_Cancel>
2004f7c: 95 e8 00 08 restore %g0, %o0, %o2
02004fdc <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2004fdc: 9d e3 bf 98 save %sp, -104, %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 ];
2004fe0: e0 06 21 68 ld [ %i0 + 0x168 ], %l0
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2004fe4: 7f ff f3 62 call 2001d6c <sparc_disable_interrupts>
2004fe8: e2 06 20 30 ld [ %i0 + 0x30 ], %l1
2004fec: b2 10 00 08 mov %o0, %i1
pending_events = api->pending_events;
2004ff0: c8 04 00 00 ld [ %l0 ], %g4
event_condition = (rtems_event_set) the_thread->Wait.count;
2004ff4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
2004ff8: 86 88 80 04 andcc %g2, %g4, %g3
2004ffc: 12 80 00 03 bne 2005008 <_Event_Surrender+0x2c>
2005000: 03 00 80 5a sethi %hi(0x2016800), %g1
_ISR_Enable( level );
2005004: 30 80 00 42 b,a 200510c <_Event_Surrender+0x130>
/*
* 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() &&
2005008: c2 00 62 40 ld [ %g1 + 0x240 ], %g1 ! 2016a40 <_ISR_Nest_level>
200500c: 80 a0 60 00 cmp %g1, 0
2005010: 22 80 00 1e be,a 2005088 <_Event_Surrender+0xac>
2005014: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2005018: 03 00 80 5a sethi %hi(0x2016800), %g1
200501c: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016a64 <_Thread_Executing>
2005020: 80 a6 00 01 cmp %i0, %g1
2005024: 32 80 00 19 bne,a 2005088 <_Event_Surrender+0xac>
2005028: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200502c: 1b 00 80 5b sethi %hi(0x2016c00), %o5
2005030: c2 03 60 74 ld [ %o5 + 0x74 ], %g1 ! 2016c74 <_Event_Sync_state>
2005034: 80 a0 60 01 cmp %g1, 1
2005038: 02 80 00 07 be 2005054 <_Event_Surrender+0x78> <== ALWAYS TAKEN
200503c: 80 a0 c0 02 cmp %g3, %g2
2005040: c2 03 60 74 ld [ %o5 + 0x74 ], %g1 <== NOT EXECUTED
2005044: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2005048: 32 80 00 10 bne,a 2005088 <_Event_Surrender+0xac> <== NOT EXECUTED
200504c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
2005050: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2005054: 02 80 00 04 be 2005064 <_Event_Surrender+0x88> <== ALWAYS TAKEN
2005058: 80 8c 60 02 btst 2, %l1
200505c: 02 80 00 0a be 2005084 <_Event_Surrender+0xa8> <== NOT EXECUTED
2005060: 01 00 00 00 nop <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2005064: 82 29 00 03 andn %g4, %g3, %g1
2005068: c2 24 00 00 st %g1, [ %l0 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
200506c: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
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;
2005070: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2005074: c6 20 40 00 st %g3, [ %g1 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2005078: 84 10 20 03 mov 3, %g2
200507c: 03 00 80 5b sethi %hi(0x2016c00), %g1
2005080: c4 20 60 74 st %g2, [ %g1 + 0x74 ] ! 2016c74 <_Event_Sync_state>
}
_ISR_Enable( level );
2005084: 30 80 00 22 b,a 200510c <_Event_Surrender+0x130>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
2005088: 80 88 61 00 btst 0x100, %g1
200508c: 02 80 00 20 be 200510c <_Event_Surrender+0x130> <== NEVER TAKEN
2005090: 80 a0 c0 02 cmp %g3, %g2
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2005094: 02 80 00 04 be 20050a4 <_Event_Surrender+0xc8>
2005098: 80 8c 60 02 btst 2, %l1
200509c: 02 80 00 1c be 200510c <_Event_Surrender+0x130> <== NEVER TAKEN
20050a0: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
20050a4: 82 29 00 03 andn %g4, %g3, %g1
20050a8: c2 24 00 00 st %g1, [ %l0 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20050ac: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
20050b0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20050b4: c6 20 40 00 st %g3, [ %g1 ]
_ISR_Flash( level );
20050b8: 7f ff f3 31 call 2001d7c <sparc_enable_interrupts>
20050bc: 90 10 00 19 mov %i1, %o0
20050c0: 7f ff f3 2b call 2001d6c <sparc_disable_interrupts>
20050c4: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
20050c8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
20050cc: 80 a0 60 02 cmp %g1, 2
20050d0: 02 80 00 06 be 20050e8 <_Event_Surrender+0x10c>
20050d4: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
20050d8: 7f ff f3 29 call 2001d7c <sparc_enable_interrupts>
20050dc: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20050e0: 10 80 00 08 b 2005100 <_Event_Surrender+0x124>
20050e4: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
20050e8: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
20050ec: 7f ff f3 24 call 2001d7c <sparc_enable_interrupts>
20050f0: 90 10 00 19 mov %i1, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
20050f4: 40 00 0e 32 call 20089bc <_Watchdog_Remove>
20050f8: 90 06 20 48 add %i0, 0x48, %o0
20050fc: 33 04 00 ff sethi %hi(0x1003fc00), %i1
2005100: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2005104: 40 00 08 48 call 2007224 <_Thread_Clear_state>
2005108: 81 e8 00 00 restore
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
200510c: 7f ff f3 1c call 2001d7c <sparc_enable_interrupts>
2005110: 91 e8 00 19 restore %g0, %i1, %o0
02005118 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
2005118: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
200511c: 90 10 00 18 mov %i0, %o0
2005120: 40 00 09 64 call 20076b0 <_Thread_Get>
2005124: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2005128: c2 07 bf f4 ld [ %fp + -12 ], %g1
200512c: 80 a0 60 00 cmp %g1, 0
2005130: 12 80 00 0f bne 200516c <_Event_Timeout+0x54> <== NEVER TAKEN
2005134: b0 10 00 08 mov %o0, %i0
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
2005138: 7f ff f3 0d call 2001d6c <sparc_disable_interrupts>
200513c: 01 00 00 00 nop
2005140: 86 10 00 08 mov %o0, %g3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
2005144: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
2005148: 80 a0 60 00 cmp %g1, 0
200514c: 12 80 00 0a bne 2005174 <_Event_Timeout+0x5c> <== ALWAYS TAKEN
2005150: 03 00 80 5a sethi %hi(0x2016800), %g1
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2005154: 05 00 80 5a sethi %hi(0x2016800), %g2 <== NOT EXECUTED
2005158: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level><== NOT EXECUTED
200515c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2005160: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ] <== NOT EXECUTED
_Thread_Unnest_dispatch();
_ISR_Enable( level );
2005164: 7f ff f3 06 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2005168: 01 00 00 00 nop <== NOT EXECUTED
200516c: 81 c7 e0 08 ret <== NOT EXECUTED
2005170: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
2005174: c2 00 62 64 ld [ %g1 + 0x264 ], %g1
2005178: 80 a6 00 01 cmp %i0, %g1
200517c: 12 80 00 09 bne 20051a0 <_Event_Timeout+0x88>
2005180: c0 26 20 24 clr [ %i0 + 0x24 ]
Thread_blocking_operation_States sync = _Event_Sync_state;
2005184: 05 00 80 5b sethi %hi(0x2016c00), %g2
2005188: c2 00 a0 74 ld [ %g2 + 0x74 ], %g1 ! 2016c74 <_Event_Sync_state>
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
200518c: 80 a0 60 01 cmp %g1, 1
2005190: 18 80 00 05 bgu 20051a4 <_Event_Timeout+0x8c> <== NEVER TAKEN
2005194: 82 10 20 06 mov 6, %g1
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2005198: 82 10 20 02 mov 2, %g1
200519c: c2 20 a0 74 st %g1, [ %g2 + 0x74 ]
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20051a0: 82 10 20 06 mov 6, %g1
20051a4: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
_ISR_Enable( level );
20051a8: 7f ff f2 f5 call 2001d7c <sparc_enable_interrupts>
20051ac: 90 10 00 03 mov %g3, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20051b0: 90 10 00 18 mov %i0, %o0
20051b4: 13 04 00 ff sethi %hi(0x1003fc00), %o1
20051b8: 40 00 08 1b call 2007224 <_Thread_Clear_state>
20051bc: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20051c0: 05 00 80 5a sethi %hi(0x2016800), %g2
20051c4: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
20051c8: 82 00 7f ff add %g1, -1, %g1
20051cc: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ]
20051d0: 81 c7 e0 08 ret
20051d4: 81 e8 00 00 restore
0200b1e4 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
200b1e4: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
200b1e8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200b1ec: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
200b1f0: a0 10 00 18 mov %i0, %l0
Heap_Block *the_block;
void *ptr = NULL;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
the_size =
200b1f4: 90 10 00 19 mov %i1, %o0
200b1f8: 7f ff ec ec call 20065a8 <_Heap_Calc_block_size>
200b1fc: b0 10 20 00 clr %i0
_Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size);
if(the_size == 0)
200b200: 80 a2 20 00 cmp %o0, 0
200b204: 02 80 00 1d be 200b278 <_Heap_Allocate+0x94> <== NEVER TAKEN
200b208: b2 10 20 00 clr %i1
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200b20c: 10 80 00 13 b 200b258 <_Heap_Allocate+0x74>
200b210: f0 04 20 08 ld [ %l0 + 8 ], %i0
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
/* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the
result of the comparison. */
if(the_block->size >= the_size) {
200b214: 80 a0 40 08 cmp %g1, %o0
200b218: 2a 80 00 0f bcs,a 200b254 <_Heap_Allocate+0x70>
200b21c: f0 06 20 08 ld [ %i0 + 8 ], %i0
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
200b220: 94 10 00 08 mov %o0, %o2
200b224: 92 10 00 18 mov %i0, %o1
200b228: 7f ff ec f4 call 20065f8 <_Heap_Block_allocate>
200b22c: 90 10 00 10 mov %l0, %o0
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200b230: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
stats->searches += search_count + 1;
200b234: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
if(the_block->size >= the_size) {
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200b238: 82 00 60 01 inc %g1
stats->searches += search_count + 1;
200b23c: 84 00 a0 01 inc %g2
if(the_block->size >= the_size) {
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200b240: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
stats->searches += search_count + 1;
200b244: 84 00 80 19 add %g2, %i1, %g2
200b248: b0 06 20 08 add %i0, 8, %i0
200b24c: 10 80 00 07 b 200b268 <_Heap_Allocate+0x84>
200b250: c4 24 20 4c st %g2, [ %l0 + 0x4c ]
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
200b254: b2 06 60 01 inc %i1
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
200b258: 80 a6 00 10 cmp %i0, %l0
200b25c: 32 bf ff ee bne,a 200b214 <_Heap_Allocate+0x30>
200b260: c2 06 20 04 ld [ %i0 + 4 ], %g1
200b264: b0 10 20 00 clr %i0
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
200b268: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
200b26c: 80 a0 40 19 cmp %g1, %i1
200b270: 2a 80 00 02 bcs,a 200b278 <_Heap_Allocate+0x94>
200b274: f2 24 20 44 st %i1, [ %l0 + 0x44 ]
stats->max_search = search_count;
return ptr;
}
200b278: 81 c7 e0 08 ret
200b27c: 81 e8 00 00 restore
02008634 <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
2008634: 9d e3 bf 98 save %sp, -104, %sp
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
2008638: e8 06 20 10 ld [ %i0 + 0x10 ], %l4
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
200863c: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2008640: 90 10 00 19 mov %i1, %o0
2008644: 40 00 01 5d call 2008bb8 <_Heap_Calc_block_size>
2008648: 92 10 00 14 mov %l4, %o1
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
Heap_Statistics *const stats = &the_heap->stats;
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
200864c: b2 06 7f fc add %i1, -4, %i1
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
if(the_size == 0)
2008650: ba 92 20 00 orcc %o0, 0, %i5
2008654: 02 80 00 67 be 20087f0 <_Heap_Allocate_aligned+0x1bc> <== NEVER TAKEN
2008658: 90 10 20 00 clr %o0
return NULL;
if(alignment == 0)
200865c: 80 a6 a0 00 cmp %i2, 0
2008660: 22 80 00 02 be,a 2008668 <_Heap_Allocate_aligned+0x34>
2008664: b4 10 20 08 mov 8, %i2
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
2008668: e2 06 20 08 ld [ %i0 + 8 ], %l1
200866c: 10 80 00 59 b 20087d0 <_Heap_Allocate_aligned+0x19c>
2008670: aa 10 20 00 clr %l5
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2008674: a6 08 7f fe and %g1, -2, %l3
uint32_t const block_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
if(block_size >= the_size) { /* the_block is large enough. */
2008678: 80 a4 c0 1d cmp %l3, %i5
200867c: 2a 80 00 54 bcs,a 20087cc <_Heap_Allocate_aligned+0x198>
2008680: e2 04 60 08 ld [ %l1 + 8 ], %l1
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
2008684: 92 10 00 1a mov %i2, %o1
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
2008688: ae 04 40 13 add %l1, %l3, %l7
aligned_user_addr = block_end - end_to_user_offs;
200868c: a0 25 c0 19 sub %l7, %i1, %l0
2008690: 40 00 3c 1f call 201770c <.urem>
2008694: 90 10 00 10 mov %l0, %o0
if(block_size >= the_size) { /* the_block is large enough. */
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
2008698: 92 10 00 14 mov %l4, %o1
200869c: a4 24 00 08 sub %l0, %o0, %l2
20086a0: 40 00 3c 1b call 201770c <.urem>
20086a4: 90 10 00 12 mov %l2, %o0
20086a8: a0 04 60 08 add %l1, 8, %l0
20086ac: 84 24 80 08 sub %l2, %o0, %g2
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
20086b0: 80 a0 80 10 cmp %g2, %l0
20086b4: 2a 80 00 46 bcs,a 20087cc <_Heap_Allocate_aligned+0x198>
20086b8: e2 04 60 08 ld [ %l1 + 8 ], %l1
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
20086bc: ec 06 20 14 ld [ %i0 + 0x14 ], %l6
20086c0: 82 20 80 10 sub %g2, %l0, %g1
20086c4: 80 a0 40 16 cmp %g1, %l6
20086c8: 1a 80 00 15 bcc 200871c <_Heap_Allocate_aligned+0xe8>
20086cc: 80 a4 a0 00 cmp %l2, 0
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
20086d0: 82 24 80 10 sub %l2, %l0, %g1
20086d4: 80 a0 40 14 cmp %g1, %l4
20086d8: 0a 80 00 10 bcs 2008718 <_Heap_Allocate_aligned+0xe4> <== ALWAYS TAKEN
20086dc: 84 10 00 10 mov %l0, %g2
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
20086e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20086e4: 40 00 3c 0a call 201770c <.urem> <== NOT EXECUTED
20086e8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
*value = r ? v - r + a : v;
20086ec: 82 04 00 1a add %l0, %i2, %g1 <== NOT EXECUTED
20086f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20086f4: 12 80 00 03 bne 2008700 <_Heap_Allocate_aligned+0xcc> <== NOT EXECUTED
20086f8: 90 20 40 08 sub %g1, %o0, %o0 <== NOT EXECUTED
20086fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
2008700: 82 22 00 10 sub %o0, %l0, %g1 <== NOT EXECUTED
2008704: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED
2008708: 3a 80 00 31 bcc,a 20087cc <_Heap_Allocate_aligned+0x198> <== NOT EXECUTED
200870c: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED
2008710: 84 10 00 10 mov %l0, %g2 <== NOT EXECUTED
2008714: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
2008718: 80 a4 a0 00 cmp %l2, 0
200871c: 22 80 00 2c be,a 20087cc <_Heap_Allocate_aligned+0x198> <== NEVER TAKEN
2008720: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
2008724: 82 05 e0 08 add %l7, 8, %g1
2008728: a0 20 40 02 sub %g1, %g2, %l0
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
200872c: 84 24 c0 10 sub %l3, %l0, %g2
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
2008730: 80 a0 80 16 cmp %g2, %l6
2008734: 2a 80 00 08 bcs,a 2008754 <_Heap_Allocate_aligned+0x120>
2008738: c6 04 60 08 ld [ %l1 + 8 ], %g3
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
200873c: 82 10 a0 01 or %g2, 1, %g1
2008740: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
2008744: a2 04 40 02 add %l1, %g2, %l1
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
2008748: c4 24 40 00 st %g2, [ %l1 ]
the_block->size = alloc_size;
200874c: 10 80 00 09 b 2008770 <_Heap_Allocate_aligned+0x13c>
2008750: e0 24 60 04 st %l0, [ %l1 + 4 ]
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
2008754: c4 04 60 0c ld [ %l1 + 0xc ], %g2
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
2008758: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
prev->next = next;
next->prev = prev;
200875c: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
2008760: 82 00 7f ff add %g1, -1, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
2008764: c6 20 a0 08 st %g3, [ %g2 + 8 ]
2008768: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
200876c: a0 10 00 13 mov %l3, %l0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2008770: 84 04 40 10 add %l1, %l0, %g2
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
2008774: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2008778: 82 10 60 01 or %g1, 1, %g1
200877c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
/* Update statistics */
stats->free_size -= alloc_size;
2008780: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
if(stats->min_free_size > stats->free_size)
2008784: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
2008788: 82 20 40 10 sub %g1, %l0, %g1
if(stats->min_free_size > stats->free_size)
200878c: 80 a0 80 01 cmp %g2, %g1
2008790: 08 80 00 03 bleu 200879c <_Heap_Allocate_aligned+0x168>
2008794: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
stats->min_free_size = stats->free_size;
2008798: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
stats->used_blocks += 1;
200879c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
20087a0: c6 06 20 4c ld [ %i0 + 0x4c ], %g3
stats->allocs += 1;
20087a4: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
20087a8: 82 00 60 01 inc %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
20087ac: 86 00 e0 01 inc %g3
stats->allocs += 1;
20087b0: 84 00 a0 01 inc %g2
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
20087b4: 86 00 c0 15 add %g3, %l5, %g3
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
20087b8: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
20087bc: c4 26 20 48 st %g2, [ %i0 + 0x48 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
20087c0: c6 26 20 4c st %g3, [ %i0 + 0x4c ]
stats->allocs += 1;
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
20087c4: 10 80 00 07 b 20087e0 <_Heap_Allocate_aligned+0x1ac>
20087c8: 90 10 00 12 mov %l2, %o0
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
20087cc: aa 05 60 01 inc %l5
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
20087d0: 80 a4 40 18 cmp %l1, %i0
20087d4: 32 bf ff a8 bne,a 2008674 <_Heap_Allocate_aligned+0x40>
20087d8: c2 04 60 04 ld [ %l1 + 4 ], %g1
20087dc: 90 10 20 00 clr %o0
}
}
}
}
if(stats->max_search < search_count)
20087e0: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
20087e4: 80 a0 40 15 cmp %g1, %l5
20087e8: 2a 80 00 02 bcs,a 20087f0 <_Heap_Allocate_aligned+0x1bc>
20087ec: ea 26 20 44 st %l5, [ %i0 + 0x44 ]
stats->max_search = search_count;
return user_ptr;
}
20087f0: 81 c7 e0 08 ret
20087f4: 91 e8 00 08 restore %g0, %o0, %o0
0200daec <_Heap_Extend>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t *amount_extended
)
{
200daec: 9d e3 bf 98 save %sp, -104, %sp
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
200daf0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200daf4: 80 a6 40 01 cmp %i1, %g1
200daf8: 0a 80 00 06 bcs 200db10 <_Heap_Extend+0x24>
200dafc: a2 10 00 18 mov %i0, %l1
200db00: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200db04: 80 a6 40 01 cmp %i1, %g1
200db08: 0a 80 00 28 bcs 200dba8 <_Heap_Extend+0xbc>
200db0c: b0 10 20 01 mov 1, %i0
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
200db10: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
200db14: 80 a6 40 01 cmp %i1, %g1
200db18: 12 80 00 24 bne 200dba8 <_Heap_Extend+0xbc>
200db1c: b0 10 20 02 mov 2, %i0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
200db20: d2 04 60 10 ld [ %l1 + 0x10 ], %o1
* 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.
*/
old_final = the_heap->final;
200db24: e4 04 60 24 ld [ %l1 + 0x24 ], %l2
200db28: 82 06 40 1a add %i1, %i2, %g1
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200db2c: a0 20 40 12 sub %g1, %l2, %l0
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
200db30: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200db34: a0 04 3f f8 add %l0, -8, %l0
200db38: 40 00 26 f5 call 201770c <.urem>
200db3c: 90 10 00 10 mov %l0, %o0
_Heap_Align_down( &the_size, the_heap->page_size );
*amount_extended = size;
200db40: f4 26 c0 00 st %i2, [ %i3 ]
if( the_size < the_heap->min_block_size )
200db44: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
200db48: a0 24 00 08 sub %l0, %o0, %l0
200db4c: 80 a4 00 01 cmp %l0, %g1
200db50: 0a 80 00 16 bcs 200dba8 <_Heap_Extend+0xbc> <== NEVER TAKEN
200db54: b0 10 20 00 clr %i0
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
200db58: c2 04 a0 04 ld [ %l2 + 4 ], %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200db5c: 88 04 80 10 add %l2, %l0, %g4
200db60: 82 08 60 01 and %g1, 1, %g1
200db64: 82 14 00 01 or %l0, %g1, %g1
200db68: c2 24 a0 04 st %g1, [ %l2 + 4 ]
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
200db6c: 82 10 20 01 mov 1, %g1
200db70: c2 21 20 04 st %g1, [ %g4 + 4 ]
the_heap->final = new_final;
stats->size += size;
200db74: c2 04 60 2c ld [ %l1 + 0x2c ], %g1
stats->used_blocks += 1;
200db78: c4 04 60 40 ld [ %l1 + 0x40 ], %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200db7c: c6 04 60 50 ld [ %l1 + 0x50 ], %g3
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
stats->size += size;
200db80: 82 00 40 1a add %g1, %i2, %g1
stats->used_blocks += 1;
200db84: 84 00 a0 01 inc %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200db88: 86 00 ff ff add %g3, -1, %g3
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
200db8c: c8 24 60 24 st %g4, [ %l1 + 0x24 ]
stats->size += size;
200db90: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
stats->used_blocks += 1;
200db94: c4 24 60 40 st %g2, [ %l1 + 0x40 ]
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200db98: c6 24 60 50 st %g3, [ %l1 + 0x50 ]
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
200db9c: 90 10 00 11 mov %l1, %o0
200dba0: 7f ff eb 3d call 2008894 <_Heap_Free>
200dba4: 92 04 a0 08 add %l2, 8, %o1
return HEAP_EXTEND_SUCCESSFUL;
}
200dba8: 81 c7 e0 08 ret
200dbac: 81 e8 00 00 restore
0200b280 <_Heap_Free>:
bool _Heap_Free(
Heap_Control *the_heap,
void *starting_address
)
{
200b280: 9d e3 bf 98 save %sp, -104, %sp
uint32_t the_size;
uint32_t next_size;
Heap_Statistics *const stats = &the_heap->stats;
bool next_is_free;
if ( !_Addresses_Is_in_range(
200b284: e4 06 20 20 ld [ %i0 + 0x20 ], %l2
200b288: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
200b28c: 80 a6 40 12 cmp %i1, %l2
200b290: 84 60 3f ff subx %g0, -1, %g2
200b294: 80 a4 40 19 cmp %l1, %i1
200b298: 82 60 3f ff subx %g0, -1, %g1
200b29c: 80 88 80 01 btst %g2, %g1
200b2a0: 02 80 00 73 be 200b46c <_Heap_Free+0x1ec>
200b2a4: 01 00 00 00 nop
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
200b2a8: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200b2ac: 40 00 1f eb call 2013258 <.urem>
200b2b0: 90 10 00 19 mov %i1, %o0
200b2b4: a0 06 7f f8 add %i1, -8, %l0
200b2b8: 90 24 00 08 sub %l0, %o0, %o0
return( FALSE );
}
_Heap_Start_of_block( the_heap, starting_address, &the_block );
if ( !_Heap_Is_block_in( the_heap, the_block ) ) {
200b2bc: 80 a2 00 12 cmp %o0, %l2
200b2c0: 84 60 3f ff subx %g0, -1, %g2
200b2c4: 80 a4 40 08 cmp %l1, %o0
200b2c8: 82 60 3f ff subx %g0, -1, %g1
200b2cc: 80 88 80 01 btst %g2, %g1
200b2d0: 02 80 00 67 be 200b46c <_Heap_Free+0x1ec> <== NEVER TAKEN
200b2d4: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200b2d8: c6 02 20 04 ld [ %o0 + 4 ], %g3
200b2dc: 96 08 ff fe and %g3, -2, %o3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200b2e0: 88 02 00 0b add %o0, %o3, %g4
}
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
200b2e4: 80 a1 00 12 cmp %g4, %l2
200b2e8: 84 60 3f ff subx %g0, -1, %g2
200b2ec: 80 a4 40 04 cmp %l1, %g4
200b2f0: 82 60 3f ff subx %g0, -1, %g1
200b2f4: 80 88 80 01 btst %g2, %g1
200b2f8: 02 80 00 5d be 200b46c <_Heap_Free+0x1ec> <== NEVER TAKEN
200b2fc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200b300: c2 01 20 04 ld [ %g4 + 4 ], %g1
_HAssert( FALSE );
return( FALSE );
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200b304: 80 88 60 01 btst 1, %g1
200b308: 02 80 00 59 be 200b46c <_Heap_Free+0x1ec> <== NEVER TAKEN
200b30c: 94 08 7f fe and %g1, -2, %o2
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
200b310: 80 a1 00 11 cmp %g4, %l1
200b314: 1a 80 00 06 bcc 200b32c <_Heap_Free+0xac>
200b318: 82 10 20 00 clr %g1
200b31c: 82 01 00 0a add %g4, %o2, %g1
200b320: c2 00 60 04 ld [ %g1 + 4 ], %g1
200b324: 82 08 60 01 and %g1, 1, %g1
200b328: 82 18 60 01 xor %g1, 1, %g1
!_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size));
if ( !_Heap_Is_prev_used( the_block ) ) {
200b32c: 80 88 e0 01 btst 1, %g3
200b330: 12 80 00 25 bne 200b3c4 <_Heap_Free+0x144>
200b334: 86 10 00 01 mov %g1, %g3
uint32_t const prev_size = the_block->prev_size;
200b338: d8 02 00 00 ld [ %o0 ], %o4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200b33c: 9a 22 00 0c sub %o0, %o4, %o5
Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size );
if ( !_Heap_Is_block_in( the_heap, prev_block ) ) {
200b340: 80 a3 40 12 cmp %o5, %l2
200b344: 84 60 3f ff subx %g0, -1, %g2
200b348: 80 a4 40 0d cmp %l1, %o5
200b34c: 82 60 3f ff subx %g0, -1, %g1
200b350: 80 88 80 01 btst %g2, %g1
200b354: 02 80 00 46 be 200b46c <_Heap_Free+0x1ec> <== NEVER TAKEN
200b358: 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) ) {
200b35c: c2 03 60 04 ld [ %o5 + 4 ], %g1
200b360: 80 88 60 01 btst 1, %g1
200b364: 02 80 00 42 be 200b46c <_Heap_Free+0x1ec> <== NEVER TAKEN
200b368: 80 a0 e0 00 cmp %g3, 0
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
200b36c: 02 80 00 0f be 200b3a8 <_Heap_Free+0x128>
200b370: 84 02 c0 0c add %o3, %o4, %g2
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
200b374: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200b378: c6 01 20 0c ld [ %g4 + 0xc ], %g3
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
200b37c: c4 01 20 08 ld [ %g4 + 8 ], %g2
200b380: 82 00 7f ff add %g1, -1, %g1
200b384: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
200b388: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
200b38c: 82 02 c0 0a add %o3, %o2, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
200b390: c4 20 e0 08 st %g2, [ %g3 + 8 ]
200b394: 82 00 40 0c add %g1, %o4, %g1
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200b398: c2 23 40 01 st %g1, [ %o5 + %g1 ]
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
200b39c: 82 10 60 01 or %g1, 1, %g1
200b3a0: 10 80 00 28 b 200b440 <_Heap_Free+0x1c0>
200b3a4: c2 23 60 04 st %g1, [ %o5 + 4 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
200b3a8: 82 10 a0 01 or %g2, 1, %g1
200b3ac: c2 23 60 04 st %g1, [ %o5 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200b3b0: c2 01 20 04 ld [ %g4 + 4 ], %g1
next_block->prev_size = size;
200b3b4: c4 22 00 0b st %g2, [ %o0 + %o3 ]
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200b3b8: 82 08 7f fe and %g1, -2, %g1
200b3bc: 10 80 00 21 b 200b440 <_Heap_Free+0x1c0>
200b3c0: c2 21 20 04 st %g1, [ %g4 + 4 ]
next_block->prev_size = size;
}
}
else if ( next_is_free ) { /* coalesce next */
200b3c4: 80 a0 e0 00 cmp %g3, 0
200b3c8: 02 80 00 0d be 200b3fc <_Heap_Free+0x17c>
200b3cc: 82 12 e0 01 or %o3, 1, %g1
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200b3d0: c2 01 20 0c ld [ %g4 + 0xc ], %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
200b3d4: c4 01 20 08 ld [ %g4 + 8 ], %g2
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
block->prev = prev;
200b3d8: c2 22 20 0c st %g1, [ %o0 + 0xc ]
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
200b3dc: c4 22 20 08 st %g2, [ %o0 + 8 ]
block->prev = prev;
next->prev = prev->next = block;
200b3e0: d0 20 60 08 st %o0, [ %g1 + 8 ]
200b3e4: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
uint32_t const size = the_size + next_size;
200b3e8: 82 02 80 0b add %o2, %o3, %g1
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( the_block, size );
next_block->prev_size = size;
200b3ec: c2 22 00 01 st %g1, [ %o0 + %g1 ]
}
}
else if ( next_is_free ) { /* coalesce next */
uint32_t const size = the_size + next_size;
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
200b3f0: 82 10 60 01 or %g1, 1, %g1
200b3f4: 10 80 00 13 b 200b440 <_Heap_Free+0x1c0>
200b3f8: c2 22 20 04 st %g1, [ %o0 + 4 ]
}
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
200b3fc: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200b400: c2 01 20 04 ld [ %g4 + 4 ], %g1
)
{
Heap_Block *prev = prev_block;
Heap_Block *block = the_block;
Heap_Block *next = prev->next;
200b404: c6 06 20 08 ld [ %i0 + 8 ], %g3
200b408: 82 08 7f fe and %g1, -2, %g1
next_block->prev_size = the_size;
200b40c: d6 22 00 0b st %o3, [ %o0 + %o3 ]
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200b410: c2 21 20 04 st %g1, [ %g4 + 4 ]
next_block->prev_size = the_size;
stats->free_blocks += 1;
200b414: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
block->next = next;
200b418: c6 22 20 08 st %g3, [ %o0 + 8 ]
block->prev = prev;
200b41c: f0 22 20 0c st %i0, [ %o0 + 0xc ]
if ( stats->max_free_blocks < stats->free_blocks )
200b420: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = the_size;
stats->free_blocks += 1;
200b424: 82 00 60 01 inc %g1
next->prev = prev->next = block;
200b428: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
200b42c: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks )
200b430: 80 a0 80 01 cmp %g2, %g1
200b434: 1a 80 00 03 bcc 200b440 <_Heap_Free+0x1c0>
200b438: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200b43c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
stats->used_blocks -= 1;
200b440: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
stats->free_size += the_size;
200b444: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
stats->frees += 1;
200b448: c6 06 20 50 ld [ %i0 + 0x50 ], %g3
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
stats->free_size += the_size;
200b44c: 84 00 80 0b add %g2, %o3, %g2
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200b450: 82 00 7f ff add %g1, -1, %g1
stats->free_size += the_size;
200b454: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200b458: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
stats->free_size += the_size;
stats->frees += 1;
200b45c: 86 00 e0 01 inc %g3
200b460: c6 26 20 50 st %g3, [ %i0 + 0x50 ]
200b464: 81 c7 e0 08 ret
200b468: 91 e8 20 01 restore %g0, 1, %o0
return( TRUE );
}
200b46c: 81 c7 e0 08 ret
200b470: 91 e8 20 00 restore %g0, 0, %o0
0200dbb0 <_Heap_Get_free_information>:
)
{
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Tail(the_heap);
info->number = 0;
200dbb0: c0 22 40 00 clr [ %o1 ]
info->largest = 0;
200dbb4: c0 22 60 04 clr [ %o1 + 4 ]
info->total = 0;
200dbb8: c0 22 60 08 clr [ %o1 + 8 ]
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200dbbc: 10 80 00 0e b 200dbf4 <_Heap_Get_free_information+0x44>
200dbc0: da 02 20 08 ld [ %o0 + 8 ], %o5
uint32_t const the_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
200dbc4: c2 02 40 00 ld [ %o1 ], %g1
info->total += the_size;
200dbc8: c4 02 60 08 ld [ %o1 + 8 ], %g2
if ( info->largest < the_size )
200dbcc: c8 02 60 04 ld [ %o1 + 4 ], %g4
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200dbd0: 86 08 ff fe and %g3, -2, %g3
uint32_t const the_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
200dbd4: 82 00 60 01 inc %g1
info->total += the_size;
200dbd8: 84 00 80 03 add %g2, %g3, %g2
uint32_t const the_size = _Heap_Block_size(the_block);
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
200dbdc: c2 22 40 00 st %g1, [ %o1 ]
info->total += the_size;
if ( info->largest < the_size )
200dbe0: 80 a1 00 03 cmp %g4, %g3
200dbe4: 1a 80 00 03 bcc 200dbf0 <_Heap_Get_free_information+0x40> <== NEVER TAKEN
200dbe8: c4 22 60 08 st %g2, [ %o1 + 8 ]
info->largest = the_size;
200dbec: c6 22 60 04 st %g3, [ %o1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
the_block = the_block->next)
200dbf0: da 03 60 08 ld [ %o5 + 8 ], %o5
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
200dbf4: 80 a3 40 08 cmp %o5, %o0
200dbf8: 32 bf ff f3 bne,a 200dbc4 <_Heap_Get_free_information+0x14>
200dbfc: c6 03 60 04 ld [ %o5 + 4 ], %g3
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
200dc00: 81 c3 e0 08 retl
0200dc08 <_Heap_Get_information>:
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
200dc08: c0 22 40 00 clr [ %o1 ]
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
200dc0c: d8 02 20 24 ld [ %o0 + 0x24 ], %o4
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
the_info->Free.total = 0;
200dc10: c0 22 60 08 clr [ %o1 + 8 ]
the_info->Free.largest = 0;
200dc14: c0 22 60 04 clr [ %o1 + 4 ]
the_info->Used.number = 0;
200dc18: c0 22 60 0c clr [ %o1 + 0xc ]
the_info->Used.total = 0;
200dc1c: c0 22 60 14 clr [ %o1 + 0x14 ]
the_info->Used.largest = 0;
200dc20: c0 22 60 10 clr [ %o1 + 0x10 ]
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
200dc24: 10 80 00 23 b 200dcb0 <_Heap_Get_information+0xa8>
200dc28: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
200dc2c: 88 08 7f fe and %g1, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200dc30: 9a 00 80 04 add %g2, %g4, %o5
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
200dc34: c2 03 60 04 ld [ %o5 + 4 ], %g1
200dc38: 80 88 60 01 btst 1, %g1
200dc3c: 22 80 00 0d be,a 200dc70 <_Heap_Get_information+0x68>
200dc40: c2 02 40 00 ld [ %o1 ], %g1
the_info->Used.number++;
200dc44: c2 02 60 0c ld [ %o1 + 0xc ], %g1
the_info->Used.total += the_size;
200dc48: c4 02 60 14 ld [ %o1 + 0x14 ], %g2
if ( the_info->Used.largest < the_size )
200dc4c: c6 02 60 10 ld [ %o1 + 0x10 ], %g3
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200dc50: 82 00 60 01 inc %g1
the_info->Used.total += the_size;
200dc54: 84 00 80 04 add %g2, %g4, %g2
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200dc58: c2 22 60 0c st %g1, [ %o1 + 0xc ]
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
200dc5c: 80 a0 c0 04 cmp %g3, %g4
200dc60: 1a 80 00 13 bcc 200dcac <_Heap_Get_information+0xa4>
200dc64: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
the_info->Used.largest = the_size;
200dc68: 10 80 00 11 b 200dcac <_Heap_Get_information+0xa4>
200dc6c: c8 22 60 10 st %g4, [ %o1 + 0x10 ]
} else {
the_info->Free.number++;
the_info->Free.total += the_size;
200dc70: c4 02 60 08 ld [ %o1 + 8 ], %g2
if ( the_info->Free.largest < the_size )
200dc74: c6 02 60 04 ld [ %o1 + 4 ], %g3
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200dc78: 82 00 60 01 inc %g1
the_info->Free.total += the_size;
200dc7c: 84 00 80 04 add %g2, %g4, %g2
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200dc80: c2 22 40 00 st %g1, [ %o1 ]
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
200dc84: 80 a0 c0 04 cmp %g3, %g4
200dc88: 1a 80 00 03 bcc 200dc94 <_Heap_Get_information+0x8c> <== NEVER TAKEN
200dc8c: c4 22 60 08 st %g2, [ %o1 + 8 ]
the_info->Free.largest = the_size;
200dc90: c8 22 60 04 st %g4, [ %o1 + 4 ]
if ( the_size != next_block->prev_size )
200dc94: c2 03 40 00 ld [ %o5 ], %g1
200dc98: 80 a1 00 01 cmp %g4, %g1
200dc9c: 02 80 00 05 be 200dcb0 <_Heap_Get_information+0xa8> <== ALWAYS TAKEN
200dca0: 84 10 00 0d mov %o5, %g2
200dca4: 81 c3 e0 08 retl <== NOT EXECUTED
200dca8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200dcac: 84 10 00 0d mov %o5, %g2
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
200dcb0: 80 a0 80 0c cmp %g2, %o4
200dcb4: 32 bf ff de bne,a 200dc2c <_Heap_Get_information+0x24>
200dcb8: c2 00 a0 04 ld [ %g2 + 4 ], %g1
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
200dcbc: c2 02 60 14 ld [ %o1 + 0x14 ], %g1
200dcc0: 90 10 20 00 clr %o0
200dcc4: 82 00 60 08 add %g1, 8, %g1
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
200dcc8: 81 c3 e0 08 retl
200dccc: c2 22 60 14 st %g1, [ %o1 + 0x14 ]
02006478 <_Heap_Initialize>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
2006478: 9d e3 bf 98 save %sp, -104, %sp
_H_uptr_t start;
_H_uptr_t aligned_start;
uint32_t overhead;
Heap_Statistics *const stats = &the_heap->stats;
if (page_size == 0)
200647c: 80 a6 e0 00 cmp %i3, 0
2006480: 12 80 00 04 bne 2006490 <_Heap_Initialize+0x18>
2006484: 84 8e e0 07 andcc %i3, 7, %g2
2006488: 10 80 00 06 b 20064a0 <_Heap_Initialize+0x28>
200648c: b6 10 20 08 mov 8, %i3
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
*value = r ? v - r + a : v;
2006490: 02 80 00 05 be 20064a4 <_Heap_Initialize+0x2c>
2006494: a0 06 60 08 add %i1, 8, %l0
2006498: 82 06 e0 08 add %i3, 8, %g1
200649c: b6 20 40 02 sub %g1, %g2, %i3
/* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET
(value of user pointer) is aligned on 'page_size' boundary. Make sure
resulting 'aligned_start' is not below 'starting_address'. */
start = _H_p2u(starting_address);
aligned_start = start + HEAP_BLOCK_USER_OFFSET;
20064a0: a0 06 60 08 add %i1, 8, %l0
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
20064a4: 92 10 00 1b mov %i3, %o1
20064a8: 40 00 33 6c call 2013258 <.urem>
20064ac: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
20064b0: 80 a2 20 00 cmp %o0, 0
20064b4: 22 80 00 05 be,a 20064c8 <_Heap_Initialize+0x50>
20064b8: 90 10 20 10 mov 0x10, %o0
20064bc: 82 06 c0 10 add %i3, %l0, %g1
20064c0: a0 20 40 08 sub %g1, %o0, %l0
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
20064c4: 90 10 20 10 mov 0x10, %o0
20064c8: 40 00 33 64 call 2013258 <.urem>
20064cc: 92 10 00 1b mov %i3, %o1
*value = r ? v - r + a : v;
20064d0: 82 06 e0 10 add %i3, 0x10, %g1
20064d4: 80 a2 20 00 cmp %o0, 0
_Heap_Align_up_uptr ( &aligned_start, page_size );
aligned_start -= HEAP_BLOCK_USER_OFFSET;
20064d8: a2 04 3f f8 add %l0, -8, %l1
20064dc: 12 80 00 03 bne 20064e8 <_Heap_Initialize+0x70>
20064e0: 82 20 40 08 sub %g1, %o0, %g1
20064e4: 82 10 20 10 mov 0x10, %g1
20064e8: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
/* Calculate 'the_size' -- size of the first block so that there is enough
space at the end for the permanent last block. It is equal to 'size'
minus total overhead aligned down to the nearest multiple of
'page_size'. */
overhead = HEAP_OVERHEAD + (aligned_start - start);
20064ec: 82 24 40 19 sub %l1, %i1, %g1
20064f0: 82 00 60 08 add %g1, 8, %g1
if ( size < overhead )
20064f4: 80 a6 80 01 cmp %i2, %g1
20064f8: 0a 80 00 2a bcs 20065a0 <_Heap_Initialize+0x128> <== NEVER TAKEN
20064fc: a0 26 80 01 sub %i2, %g1, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
2006500: 92 10 00 1b mov %i3, %o1
2006504: 40 00 33 55 call 2013258 <.urem>
2006508: 90 10 00 10 mov %l0, %o0
return 0; /* Too small area for the heap */
the_size = size - overhead;
_Heap_Align_down ( &the_size, page_size );
if ( the_size == 0 )
200650c: a0 a4 00 08 subcc %l0, %o0, %l0
2006510: 02 80 00 24 be 20065a0 <_Heap_Initialize+0x128>
2006514: 07 00 80 59 sethi %hi(0x2016400), %g3
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
2006518: f6 26 20 10 st %i3, [ %i0 + 0x10 ]
the_heap->begin = starting_address;
the_heap->end = starting_address + size;
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
200651c: f6 24 40 00 st %i3, [ %l1 ]
the_block->size = the_size | HEAP_PREV_USED;
2006520: 82 14 20 01 or %l0, 1, %g1
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006524: c4 00 e2 74 ld [ %g3 + 0x274 ], %g2
the_heap->end = starting_address + size;
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
the_block->size = the_size | HEAP_PREV_USED;
2006528: c2 24 60 04 st %g1, [ %l1 + 4 ]
_HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size));
_HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size));
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
the_block->prev_size = the_size; /* Previous block is free */
200652c: e0 24 40 10 st %l0, [ %l1 + %l0 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
2006530: 88 04 40 10 add %l1, %l0, %g4
the_block->size = page_size;
2006534: f6 21 20 04 st %i3, [ %g4 + 4 ]
the_block = (Heap_Block *) aligned_start;
the_block->prev_size = page_size;
the_block->size = the_size | HEAP_PREV_USED;
the_block->next = _Heap_Tail( the_heap );
2006538: f0 24 60 08 st %i0, [ %l1 + 8 ]
the_block->prev = _Heap_Head( the_heap );
200653c: f0 24 60 0c st %i0, [ %l1 + 0xc ]
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006540: c4 26 20 28 st %g2, [ %i0 + 0x28 ]
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
2006544: 82 10 20 01 mov 1, %g1
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
the_block->prev_size = the_size; /* Previous block is free */
the_block->size = page_size;
stats->size = size;
2006548: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
stats->max_free_blocks = 1;
200654c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
stats->min_free_size = the_size;
stats->free_blocks = 1;
2006550: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
the_heap->final = the_block; /* Permanent final block of the heap */
the_block->prev_size = the_size; /* Previous block is free */
the_block->size = page_size;
stats->size = size;
stats->free_size = the_size;
2006554: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
stats->min_free_size = the_size;
2006558: e0 26 20 34 st %l0, [ %i0 + 0x34 ]
stats->free_blocks = 1;
stats->max_free_blocks = 1;
stats->used_blocks = 0;
200655c: c0 26 20 40 clr [ %i0 + 0x40 ]
stats->max_search = 0;
2006560: c0 26 20 44 clr [ %i0 + 0x44 ]
stats->allocs = 0;
2006564: c0 26 20 48 clr [ %i0 + 0x48 ]
stats->searches = 0;
2006568: c0 26 20 4c clr [ %i0 + 0x4c ]
stats->frees = 0;
200656c: c0 26 20 50 clr [ %i0 + 0x50 ]
stats->resizes = 0;
2006570: c0 26 20 54 clr [ %i0 + 0x54 ]
if ( the_size == 0 )
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
the_heap->begin = starting_address;
the_heap->end = starting_address + size;
2006574: 82 06 40 1a add %i1, %i2, %g1
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006578: 84 00 a0 01 inc %g2
if ( the_size == 0 )
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
the_heap->begin = starting_address;
the_heap->end = starting_address + size;
200657c: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
_Heap_Align_down ( &the_size, page_size );
if ( the_size == 0 )
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
the_heap->begin = starting_address;
2006580: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
the_block->prev_size = page_size;
the_block->size = the_size | HEAP_PREV_USED;
the_block->next = _Heap_Tail( the_heap );
the_block->prev = _Heap_Head( the_heap );
_Heap_Head(the_heap)->next = the_block;
2006584: e2 26 20 08 st %l1, [ %i0 + 8 ]
_Heap_Tail(the_heap)->prev = the_block;
2006588: e2 26 20 0c st %l1, [ %i0 + 0xc ]
the_heap->start = the_block;
200658c: e2 26 20 20 st %l1, [ %i0 + 0x20 ]
_HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT));
_HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size));
_HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size));
the_block = _Heap_Block_at( the_block, the_size );
the_heap->final = the_block; /* Permanent final block of the heap */
2006590: c8 26 20 24 st %g4, [ %i0 + 0x24 ]
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006594: c4 20 e2 74 st %g2, [ %g3 + 0x274 ]
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
2006598: 81 c7 e0 08 ret
200659c: 91 ec 3f fc restore %l0, -4, %o0
}
20065a0: 81 c7 e0 08 ret
20065a4: 91 e8 20 00 restore %g0, 0, %o0
0201438c <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
201438c: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *next_next_block;
uint32_t old_block_size;
uint32_t old_user_size;
uint32_t prev_used_flag;
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const min_block_size = the_heap->min_block_size;
2014390: e8 06 20 14 ld [ %i0 + 0x14 ], %l4
uint32_t const page_size = the_heap->page_size;
2014394: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
*old_mem_size = 0;
2014398: c0 26 c0 00 clr [ %i3 ]
*avail_mem_size = 0;
201439c: c0 27 00 00 clr [ %i4 ]
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
20143a0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
20143a4: 7f ff fb ad call 2013258 <.urem>
20143a8: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in (
Heap_Control *the_heap,
Heap_Block *the_block
)
{
return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final );
20143ac: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
20143b0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
20143b4: 82 06 7f f8 add %i1, -8, %g1
20143b8: a4 20 40 08 sub %g1, %o0, %l2
_Heap_Start_of_block(the_heap, starting_address, &the_block);
_HAssert(_Heap_Is_block_in(the_heap, the_block));
if (!_Heap_Is_block_in(the_heap, the_block))
20143bc: 80 a4 80 04 cmp %l2, %g4
20143c0: 84 60 3f ff subx %g0, -1, %g2
20143c4: 80 a0 c0 12 cmp %g3, %l2
20143c8: 82 60 3f ff subx %g0, -1, %g1
20143cc: 80 88 80 01 btst %g2, %g1
20143d0: 02 80 00 75 be 20145a4 <_Heap_Resize_block+0x218>
20143d4: a6 10 00 18 mov %i0, %l3
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
20143d8: da 04 a0 04 ld [ %l2 + 4 ], %o5
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
20143dc: aa 0b 7f fe and %o5, -2, %l5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
20143e0: a2 04 80 15 add %l2, %l5, %l1
old_block_size = _Heap_Block_size(the_block);
next_block = _Heap_Block_at(the_block, old_block_size);
_HAssert(_Heap_Is_block_in(the_heap, next_block));
_HAssert(_Heap_Is_prev_used(next_block));
if ( !_Heap_Is_block_in(the_heap, next_block) ||
20143e4: 80 a4 40 04 cmp %l1, %g4
20143e8: 84 60 3f ff subx %g0, -1, %g2
20143ec: 80 a0 c0 11 cmp %g3, %l1
20143f0: 82 60 3f ff subx %g0, -1, %g1
20143f4: 80 88 80 01 btst %g2, %g1
20143f8: 02 80 00 6b be 20145a4 <_Heap_Resize_block+0x218> <== NEVER TAKEN
20143fc: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
2014400: c2 04 60 04 ld [ %l1 + 4 ], %g1
2014404: 80 88 60 01 btst 1, %g1
2014408: 02 80 00 67 be 20145a4 <_Heap_Resize_block+0x218> <== NEVER TAKEN
201440c: 80 a4 40 03 cmp %l1, %g3
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2014410: b0 08 7f fe and %g1, -2, %i0
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
2014414: 84 10 20 01 mov 1, %g2
2014418: 02 80 00 04 be 2014428 <_Heap_Resize_block+0x9c> <== NEVER TAKEN
201441c: 82 04 40 18 add %l1, %i0, %g1
2014420: c2 00 60 04 ld [ %g1 + 4 ], %g1
2014424: 84 08 60 01 and %g1, 1, %g2
_Heap_Is_prev_used(next_next_block);
/* See _Heap_Size_of_user_area() source for explanations */
old_user_size = _Addresses_Subtract(next_block, starting_address)
2014428: 82 24 40 19 sub %l1, %i1, %g1
201442c: 82 00 60 04 add %g1, 4, %g1
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
2014430: c2 26 c0 00 st %g1, [ %i3 ]
!_Heap_Is_prev_used(next_block))
return HEAP_RESIZE_FATAL_ERROR;
next_block_size = _Heap_Block_size(next_block);
next_next_block = _Heap_Block_at(next_block, next_block_size);
next_is_used = (next_block == the_heap->final) ||
2014434: b2 10 00 02 mov %g2, %i1
old_user_size = _Addresses_Subtract(next_block, starting_address)
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
if (size > old_user_size) {
2014438: 80 a6 80 01 cmp %i2, %g1
201443c: 08 80 00 1e bleu 20144b4 <_Heap_Resize_block+0x128>
2014440: b6 0b 60 01 and %o5, 1, %i3
/* Need to extend the block: allocate part of the next block and then
merge 'the_block' and allocated block together. */
if (next_is_used) /* Next block is in use, -- no way to extend */
2014444: 80 a6 60 00 cmp %i1, 0
2014448: 12 80 00 59 bne 20145ac <_Heap_Resize_block+0x220>
201444c: a0 26 80 01 sub %i2, %g1, %l0
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
2014450: 92 10 00 16 mov %l6, %o1
2014454: 7f ff fb 81 call 2013258 <.urem>
2014458: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
201445c: 80 a2 20 00 cmp %o0, 0
2014460: 02 80 00 05 be 2014474 <_Heap_Resize_block+0xe8> <== NEVER TAKEN
2014464: 80 a4 00 14 cmp %l0, %l4
2014468: 82 04 00 16 add %l0, %l6, %g1
201446c: a0 20 40 08 sub %g1, %o0, %l0
2014470: 80 a4 00 14 cmp %l0, %l4
2014474: 1a 80 00 03 bcc 2014480 <_Heap_Resize_block+0xf4> <== NEVER TAKEN
2014478: 90 10 00 10 mov %l0, %o0
201447c: 90 10 00 14 mov %l4, %o0
else {
uint32_t add_block_size = size - old_user_size;
_Heap_Align_up(&add_block_size, page_size);
if (add_block_size < min_block_size)
add_block_size = min_block_size;
if (add_block_size > next_block_size)
2014480: 80 a2 00 18 cmp %o0, %i0
2014484: 18 80 00 4a bgu 20145ac <_Heap_Resize_block+0x220> <== NEVER TAKEN
2014488: 94 10 00 08 mov %o0, %o2
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
201448c: 92 10 00 11 mov %l1, %o1
2014490: 7f ff c8 5a call 20065f8 <_Heap_Block_allocate>
2014494: 90 10 00 13 mov %l3, %o0
_Heap_Block_allocate(the_heap, next_block, add_block_size);
/* Merge two subsequent blocks */
the_block->size = (old_block_size + add_block_size) | prev_used_flag;
2014498: 90 02 00 15 add %o0, %l5, %o0
201449c: 90 12 00 1b or %o0, %i3, %o0
20144a0: d0 24 a0 04 st %o0, [ %l2 + 4 ]
--stats->used_blocks;
20144a4: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1
20144a8: 82 00 7f ff add %g1, -1, %g1
20144ac: 10 80 00 39 b 2014590 <_Heap_Resize_block+0x204>
20144b0: c2 24 e0 40 st %g1, [ %l3 + 0x40 ]
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
20144b4: a0 20 40 1a sub %g1, %i2, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
20144b8: 92 10 00 16 mov %l6, %o1
20144bc: 7f ff fb 67 call 2013258 <.urem>
20144c0: 90 10 00 10 mov %l0, %o0
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
20144c4: a0 a4 00 08 subcc %l0, %o0, %l0
20144c8: 22 80 00 33 be,a 2014594 <_Heap_Resize_block+0x208>
20144cc: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
/* To free some memory the block should be shortened so that it can
can hold 'size' user bytes and still remain not shorter than
'min_block_size'. */
uint32_t new_block_size = old_block_size - free_block_size;
20144d0: 84 25 40 10 sub %l5, %l0, %g2
if (new_block_size < min_block_size) {
20144d4: 80 a0 80 14 cmp %g2, %l4
20144d8: 1a 80 00 07 bcc 20144f4 <_Heap_Resize_block+0x168>
20144dc: 80 a6 60 00 cmp %i1, 0
uint32_t delta = min_block_size - new_block_size;
20144e0: 82 25 00 02 sub %l4, %g2, %g1
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
20144e4: a0 a4 00 01 subcc %l0, %g1, %l0
20144e8: 02 80 00 2a be 2014590 <_Heap_Resize_block+0x204> <== ALWAYS TAKEN
20144ec: 84 00 80 01 add %g2, %g1, %g2
_HAssert(new_block_size >= min_block_size);
_HAssert(new_block_size + free_block_size == old_block_size);
_HAssert(_Heap_Is_aligned(new_block_size, page_size));
_HAssert(_Heap_Is_aligned(free_block_size, page_size));
if (!next_is_used) {
20144f0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20144f4: 12 80 00 15 bne 2014548 <_Heap_Resize_block+0x1bc> <== NEVER TAKEN
20144f8: 80 a4 00 14 cmp %l0, %l4
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
20144fc: 82 10 80 1b or %g2, %i3, %g1
if (!next_is_used) {
/* Extend the next block to the low addresses by 'free_block_size' */
Heap_Block *const new_next_block =
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
2014500: 86 04 00 18 add %l0, %i0, %g3
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
2014504: c2 24 a0 04 st %g1, [ %l2 + 4 ]
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
2014508: 82 10 e0 01 or %g3, 1, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
201450c: 84 04 80 02 add %l2, %g2, %g2
next_next_block->prev_size = new_next_block_size;
2014510: c6 24 40 18 st %g3, [ %l1 + %i0 ]
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
2014514: da 04 60 0c ld [ %l1 + 0xc ], %o5
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
2014518: c8 04 60 08 ld [ %l1 + 8 ], %g4
_Heap_Block_at(the_block, new_block_size);
uint32_t const new_next_block_size =
next_block_size + free_block_size;
_HAssert(_Heap_Is_block_in(the_heap, next_next_block));
the_block->size = new_block_size | prev_used_flag;
new_next_block->size = new_next_block_size | HEAP_PREV_USED;
201451c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
next_next_block->prev_size = new_next_block_size;
_Heap_Block_replace(next_block, new_next_block);
the_heap->stats.free_size += free_block_size;
2014520: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
2014524: c8 20 a0 08 st %g4, [ %g2 + 8 ]
2014528: 82 00 40 10 add %g1, %l0, %g1
block->prev = prev;
201452c: da 20 a0 0c st %o5, [ %g2 + 0xc ]
2014530: c2 24 e0 30 st %g1, [ %l3 + 0x30 ]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
2014534: 86 00 ff fc add %g3, -4, %g3
next->prev = prev->next = block;
2014538: c4 21 20 0c st %g2, [ %g4 + 0xc ]
201453c: c4 23 60 08 st %g2, [ %o5 + 8 ]
2014540: 10 80 00 14 b 2014590 <_Heap_Resize_block+0x204>
2014544: c6 27 00 00 st %g3, [ %i4 ]
} else if (free_block_size >= min_block_size) {
2014548: 2a 80 00 13 bcs,a 2014594 <_Heap_Resize_block+0x208> <== NOT EXECUTED
201454c: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1 <== NOT EXECUTED
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
2014550: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED
2014554: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
2014558: 82 14 20 01 or %l0, 1, %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
201455c: 92 04 80 02 add %l2, %g2, %o1 <== NOT EXECUTED
2014560: c2 22 60 04 st %g1, [ %o1 + 4 ] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
2014564: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2014568: c4 04 e0 50 ld [ %l3 + 0x50 ], %g2 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
201456c: 82 00 60 01 inc %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2014570: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED
} else if (free_block_size >= min_block_size) {
/* Split the block into 2 used parts, then free the second one. */
the_block->size = new_block_size | prev_used_flag;
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
++stats->used_blocks; /* We have created used block */
2014574: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2014578: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
201457c: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED
2014580: 7f ff db 40 call 200b280 <_Heap_Free> <== NOT EXECUTED
2014584: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
2014588: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED
201458c: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
}
}
}
++stats->resizes;
2014590: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
2014594: 82 00 60 01 inc %g1
2014598: c2 24 e0 54 st %g1, [ %l3 + 0x54 ]
201459c: 81 c7 e0 08 ret
20145a0: 91 e8 20 00 restore %g0, 0, %o0
return HEAP_RESIZE_SUCCESSFUL;
20145a4: 81 c7 e0 08 ret
20145a8: 91 e8 20 02 restore %g0, 2, %o0
}
20145ac: 81 c7 e0 08 ret
20145b0: 91 e8 20 01 restore %g0, 1, %o0
020145b4 <_Heap_Size_of_user_area>:
bool _Heap_Size_of_user_area(
Heap_Control *the_heap,
void *starting_address,
size_t *size
)
{
20145b4: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *the_block;
Heap_Block *next_block;
uint32_t the_size;
if ( !_Addresses_Is_in_range(
20145b8: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
20145bc: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
20145c0: 80 a6 40 10 cmp %i1, %l0
20145c4: 84 60 3f ff subx %g0, -1, %g2
20145c8: 80 a4 40 19 cmp %l1, %i1
20145cc: 82 60 3f ff subx %g0, -1, %g1
20145d0: 80 88 80 01 btst %g2, %g1
20145d4: 02 80 00 20 be 2014654 <_Heap_Size_of_user_area+0xa0>
20145d8: 01 00 00 00 nop
/* The address passed could be greater than the block address plus
* HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user
* pointers. To get rid of this offset we need to align the address down
* to the nearest 'page_size' boundary. */
_Heap_Align_down_uptr ( &addr, the_heap->page_size );
*the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET);
20145dc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
20145e0: 7f ff fb 1e call 2013258 <.urem>
20145e4: 90 10 00 19 mov %i1, %o0
20145e8: 82 06 7f f8 add %i1, -8, %g1
20145ec: 86 20 40 08 sub %g1, %o0, %g3
return( FALSE );
_Heap_Start_of_block( the_heap, starting_address, &the_block );
_HAssert(_Heap_Is_block_in( the_heap, the_block ));
if ( !_Heap_Is_block_in( the_heap, the_block ) )
20145f0: 80 a0 c0 10 cmp %g3, %l0
20145f4: 84 60 3f ff subx %g0, -1, %g2
20145f8: 80 a4 40 03 cmp %l1, %g3
20145fc: 82 60 3f ff subx %g0, -1, %g1
2014600: 80 88 80 01 btst %g2, %g1
2014604: 02 80 00 14 be 2014654 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2014608: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
201460c: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2014610: 82 08 7f fe and %g1, -2, %g1
2014614: 90 00 c0 01 add %g3, %g1, %o0
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
_HAssert(_Heap_Is_block_in( the_heap, next_block ));
_HAssert(_Heap_Is_prev_used( next_block ));
if (
2014618: 80 a2 00 10 cmp %o0, %l0
201461c: 84 60 3f ff subx %g0, -1, %g2
2014620: 80 a4 40 08 cmp %l1, %o0
2014624: 82 60 3f ff subx %g0, -1, %g1
2014628: 80 88 80 01 btst %g2, %g1
201462c: 02 80 00 0a be 2014654 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2014630: 01 00 00 00 nop
2014634: c2 02 20 04 ld [ %o0 + 4 ], %g1
2014638: 80 88 60 01 btst 1, %g1
201463c: 02 80 00 06 be 2014654 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2014640: 82 22 00 19 sub %o0, %i1, %g1
and then add correction equal to the offset of the 'size' field of the
'Heap_Block' structure. The correction is due to the fact that
'prev_size' field of the next block is actually used as user accessible
area of 'the_block'. */
*size = _Addresses_Subtract ( next_block, starting_address )
2014644: 82 00 60 04 add %g1, 4, %g1
2014648: c2 26 80 00 st %g1, [ %i2 ]
201464c: 81 c7 e0 08 ret
2014650: 91 e8 20 01 restore %g0, 1, %o0
+ HEAP_BLOCK_HEADER_OFFSET;
return( TRUE );
}
2014654: 81 c7 e0 08 ret
2014658: 91 e8 20 00 restore %g0, 0, %o0
0200dd78 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
200dd78: 9d e3 bf 98 save %sp, -104, %sp
200dd7c: a6 10 00 18 mov %i0, %l3
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200dd80: 80 a6 60 00 cmp %i1, 0
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
200dd84: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200dd88: 16 80 00 03 bge 200dd94 <_Heap_Walk+0x1c> <== ALWAYS TAKEN
200dd8c: ec 06 20 24 ld [ %i0 + 0x24 ], %l6
source = the_heap->stats.instance;
200dd90: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
200dd94: c2 04 20 04 ld [ %l0 + 4 ], %g1
200dd98: 80 88 60 01 btst 1, %g1
200dd9c: 12 80 00 07 bne 200ddb8 <_Heap_Walk+0x40> <== ALWAYS TAKEN
200dda0: b0 10 20 00 clr %i0
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
200dda4: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200dda8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200ddac: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED
200ddb0: 7f ff db 14 call 2004a00 <printk> <== NOT EXECUTED
200ddb4: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
200ddb8: c4 04 00 00 ld [ %l0 ], %g2
200ddbc: c2 04 e0 10 ld [ %l3 + 0x10 ], %g1
200ddc0: 80 a0 80 01 cmp %g2, %g1
200ddc4: 22 80 00 5e be,a 200df3c <_Heap_Walk+0x1c4> <== ALWAYS TAKEN
200ddc8: 03 00 80 64 sethi %hi(0x2019000), %g1
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
200ddcc: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200ddd0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200ddd4: 90 12 22 b8 or %o0, 0x2b8, %o0 <== NOT EXECUTED
200ddd8: 7f ff db 0a call 2004a00 <printk> <== NOT EXECUTED
200dddc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200dde0: 10 80 00 57 b 200df3c <_Heap_Walk+0x1c4> <== NOT EXECUTED
200dde4: 03 00 80 64 sethi %hi(0x2019000), %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200dde8: e8 04 20 04 ld [ %l0 + 4 ], %l4
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
200ddec: c6 04 e0 24 ld [ %l3 + 0x24 ], %g3
200ddf0: a4 0d 3f fe and %l4, -2, %l2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200ddf4: a2 04 00 12 add %l0, %l2, %l1
200ddf8: 80 a4 40 01 cmp %l1, %g1
200ddfc: 84 60 3f ff subx %g0, -1, %g2
200de00: 80 a0 c0 11 cmp %g3, %l1
200de04: 82 60 3f ff subx %g0, -1, %g1
200de08: 80 88 80 01 btst %g2, %g1
200de0c: 32 80 00 09 bne,a 200de30 <_Heap_Walk+0xb8> <== ALWAYS TAKEN
200de10: c2 04 60 04 ld [ %l1 + 4 ], %g1
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
200de14: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
200de18: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200de1c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200de20: 7f ff da f8 call 2004a00 <printk> <== NOT EXECUTED
200de24: 90 12 22 f0 or %o0, 0x2f0, %o0 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200de28: 10 80 00 51 b 200df6c <_Heap_Walk+0x1f4> <== NOT EXECUTED
200de2c: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
200de30: 80 88 60 01 btst 1, %g1
200de34: 12 80 00 27 bne 200ded0 <_Heap_Walk+0x158>
200de38: 80 a6 20 00 cmp %i0, 0
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
200de3c: c2 04 40 00 ld [ %l1 ], %g1
200de40: 80 a4 80 01 cmp %l2, %g1
200de44: 02 80 00 07 be 200de60 <_Heap_Walk+0xe8> <== ALWAYS TAKEN
200de48: 80 8d 20 01 btst 1, %l4
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200de4c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
200de50: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200de54: 7f ff da eb call 2004a00 <printk> <== NOT EXECUTED
200de58: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
200de5c: 80 8d 20 01 btst 1, %l4 <== NOT EXECUTED
200de60: 32 80 00 0c bne,a 200de90 <_Heap_Walk+0x118> <== ALWAYS TAKEN
200de64: c2 04 e0 08 ld [ %l3 + 8 ], %g1
if (do_dump || error) printk("\n");
200de68: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200de6c: 02 80 00 05 be 200de80 <_Heap_Walk+0x108> <== NOT EXECUTED
200de70: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200de74: 7f ff da e3 call 2004a00 <printk> <== NOT EXECUTED
200de78: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
200de7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
200de80: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200de84: 7f ff da df call 2004a00 <printk> <== NOT EXECUTED
200de88: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200de8c: c2 04 e0 08 ld [ %l3 + 8 ], %g1 <== NOT EXECUTED
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
200de90: 80 a0 40 10 cmp %g1, %l0
200de94: 02 80 00 0e be 200decc <_Heap_Walk+0x154>
200de98: 80 a0 40 13 cmp %g1, %l3
200de9c: 32 bf ff fd bne,a 200de90 <_Heap_Walk+0x118> <== ALWAYS TAKEN
200dea0: c2 00 60 08 ld [ %g1 + 8 ], %g1
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
200dea4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
200dea8: 22 80 00 05 be,a 200debc <_Heap_Walk+0x144> <== NOT EXECUTED
200deac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200deb0: 7f ff da d4 call 2004a00 <printk> <== NOT EXECUTED
200deb4: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
200deb8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200debc: 7f ff da d1 call 2004a00 <printk> <== NOT EXECUTED
200dec0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200dec4: 10 80 00 06 b 200dedc <_Heap_Walk+0x164> <== NOT EXECUTED
200dec8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
200decc: 80 a6 20 00 cmp %i0, 0
200ded0: 22 80 00 06 be,a 200dee8 <_Heap_Walk+0x170> <== ALWAYS TAKEN
200ded4: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1
200ded8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
200dedc: 7f ff da c9 call 2004a00 <printk> <== NOT EXECUTED
200dee0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
200dee4: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1 <== NOT EXECUTED
200dee8: 80 a4 80 01 cmp %l2, %g1
200deec: 3a 80 00 05 bcc,a 200df00 <_Heap_Walk+0x188> <== ALWAYS TAKEN
200def0: d2 04 e0 10 ld [ %l3 + 0x10 ], %o1
printk("PASS: %d !block size is too small\n", source);
200def4: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200def8: 10 80 00 09 b 200df1c <_Heap_Walk+0x1a4> <== NOT EXECUTED
200defc: 90 12 23 a8 or %o0, 0x3a8, %o0 ! 2019fa8 <status_flags_assoc+0x158><== NOT EXECUTED
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
200df00: 40 00 26 03 call 201770c <.urem>
200df04: 90 10 00 12 mov %l2, %o0
200df08: 80 a2 20 00 cmp %o0, 0
200df0c: 02 80 00 08 be 200df2c <_Heap_Walk+0x1b4> <== ALWAYS TAKEN
200df10: 80 a6 20 00 cmp %i0, 0
printk("PASS: %d !block size is misaligned\n", source);
200df14: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200df18: 90 12 23 d0 or %o0, 0x3d0, %o0 ! 2019fd0 <status_flags_assoc+0x180><== NOT EXECUTED
200df1c: 7f ff da b9 call 2004a00 <printk> <== NOT EXECUTED
200df20: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200df24: 10 80 00 12 b 200df6c <_Heap_Walk+0x1f4> <== NOT EXECUTED
200df28: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
200df2c: 12 80 00 10 bne 200df6c <_Heap_Walk+0x1f4> <== NEVER TAKEN
200df30: 96 10 00 16 mov %l6, %o3
break;
200df34: 10 80 00 09 b 200df58 <_Heap_Walk+0x1e0>
200df38: a0 10 00 11 mov %l1, %l0
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200df3c: aa 10 62 60 or %g1, 0x260, %l5
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
printk("PASS: %d !the_block not in the free list", source);
200df40: 03 00 80 67 sethi %hi(0x2019c00), %g1
200df44: b8 10 63 78 or %g1, 0x378, %i4 ! 2019f78 <status_flags_assoc+0x128>
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
printk("PASS: %d !two consecutive blocks are free", source);
200df48: 03 00 80 67 sethi %hi(0x2019c00), %g1
200df4c: ba 10 63 48 or %g1, 0x348, %i5 ! 2019f48 <status_flags_assoc+0xf8>
if (!_Heap_Is_prev_used(next_block)) {
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200df50: 03 00 80 67 sethi %hi(0x2019c00), %g1
200df54: ae 10 63 18 or %g1, 0x318, %l7 ! 2019f18 <status_flags_assoc+0xc8>
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
200df58: 80 a4 00 16 cmp %l0, %l6
200df5c: 32 bf ff a3 bne,a 200dde8 <_Heap_Walk+0x70>
200df60: c2 04 e0 20 ld [ %l3 + 0x20 ], %g1
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200df64: 10 80 00 09 b 200df88 <_Heap_Walk+0x210>
200df68: c2 04 20 04 ld [ %l0 + 4 ], %g1
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200df6c: 11 00 80 67 sethi %hi(0x2019c00), %o0 <== NOT EXECUTED
200df70: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200df74: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED
200df78: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200df7c: 7f ff da a1 call 2004a00 <printk> <== NOT EXECUTED
200df80: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200df84: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
200df88: d6 04 e0 10 ld [ %l3 + 0x10 ], %o3
200df8c: 94 08 7f fe and %g1, -2, %o2
200df90: 80 a2 80 0b cmp %o2, %o3
200df94: 02 80 00 06 be 200dfac <_Heap_Walk+0x234> <== ALWAYS TAKEN
200df98: 92 10 00 19 mov %i1, %o1
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
200df9c: 11 00 80 68 sethi %hi(0x201a000), %o0 <== NOT EXECUTED
200dfa0: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200dfa4: 7f ff da 97 call 2004a00 <printk> <== NOT EXECUTED
200dfa8: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
200dfac: 81 c7 e0 08 ret
200dfb0: 81 e8 00 00 restore
0200b474 <_Objects_API_maximum_class>:
#include <rtems/score/object.h>
int _Objects_API_maximum_class(
uint32_t api
)
{
200b474: 82 10 00 08 mov %o0, %g1
switch (api) {
200b478: 80 a2 20 02 cmp %o0, 2
200b47c: 02 80 00 08 be 200b49c <_Objects_API_maximum_class+0x28>
200b480: 90 10 20 0a mov 0xa, %o0
200b484: 80 a0 60 02 cmp %g1, 2
200b488: 18 80 00 07 bgu 200b4a4 <_Objects_API_maximum_class+0x30>
200b48c: 80 a0 60 03 cmp %g1, 3
200b490: 80 a0 60 01 cmp %g1, 1
200b494: 12 80 00 09 bne 200b4b8 <_Objects_API_maximum_class+0x44>
200b498: 90 10 20 02 mov 2, %o0
200b49c: 81 c3 e0 08 retl
200b4a0: 01 00 00 00 nop
200b4a4: 02 bf ff fe be 200b49c <_Objects_API_maximum_class+0x28> <== NEVER TAKEN
200b4a8: 90 10 20 0c mov 0xc, %o0 ! c <PROM_START+0xc>
200b4ac: 80 a0 60 04 cmp %g1, 4
200b4b0: 02 bf ff fb be 200b49c <_Objects_API_maximum_class+0x28>
200b4b4: 90 10 20 08 mov 8, %o0
case OBJECTS_CLASSIC_API:
return OBJECTS_RTEMS_CLASSES_LAST;
case OBJECTS_POSIX_API:
return OBJECTS_POSIX_CLASSES_LAST;
case OBJECTS_ITRON_API:
return OBJECTS_ITRON_CLASSES_LAST;
200b4b8: 90 10 3f ff mov -1, %o0
case OBJECTS_NO_API:
default:
break;
}
return -1;
}
200b4bc: 81 c3 e0 08 retl
0200675c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
200675c: 9d e3 bf 98 save %sp, -104, %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 )
2006760: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2006764: 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 )
2006768: 80 a0 60 00 cmp %g1, 0
200676c: 02 80 00 24 be 20067fc <_Objects_Allocate+0xa0> <== NEVER TAKEN
2006770: 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 );
2006774: a2 04 20 20 add %l0, 0x20, %l1
2006778: 40 00 12 16 call 200afd0 <_Chain_Get>
200677c: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
2006780: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
2006784: 80 a0 60 00 cmp %g1, 0
2006788: 02 80 00 1d be 20067fc <_Objects_Allocate+0xa0>
200678c: 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 ) {
2006790: 80 a2 20 00 cmp %o0, 0
2006794: 32 80 00 0a bne,a 20067bc <_Objects_Allocate+0x60>
2006798: c4 06 20 08 ld [ %i0 + 8 ], %g2
_Objects_Extend_information( information );
200679c: 40 00 00 25 call 2006830 <_Objects_Extend_information>
20067a0: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
20067a4: 40 00 12 0b call 200afd0 <_Chain_Get>
20067a8: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
20067ac: b0 92 20 00 orcc %o0, 0, %i0
20067b0: 02 80 00 13 be 20067fc <_Objects_Allocate+0xa0> <== NEVER TAKEN
20067b4: 01 00 00 00 nop
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
20067b8: c4 06 20 08 ld [ %i0 + 8 ], %g2
20067bc: d0 04 20 08 ld [ %l0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20067c0: d2 04 20 14 ld [ %l0 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
20067c4: 03 00 00 3f sethi %hi(0xfc00), %g1
20067c8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20067cc: 84 08 80 01 and %g2, %g1, %g2
20067d0: 90 0a 00 01 and %o0, %g1, %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20067d4: 40 00 31 f5 call 2012fa8 <.udiv>
20067d8: 90 20 80 08 sub %g2, %o0, %o0
20067dc: c6 04 20 30 ld [ %l0 + 0x30 ], %g3
20067e0: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
20067e4: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20067e8: c4 00 c0 08 ld [ %g3 + %o0 ], %g2
information->inactive--;
20067ec: 82 00 7f ff add %g1, -1, %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20067f0: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
20067f4: c2 34 20 2c sth %g1, [ %l0 + 0x2c ]
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
20067f8: c4 20 c0 08 st %g2, [ %g3 + %o0 ]
information->inactive--;
}
}
return the_object;
}
20067fc: 81 c7 e0 08 ret
2006800: 81 e8 00 00 restore
02006830 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2006830: 9d e3 bf 88 save %sp, -120, %sp
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
2006834: c4 06 20 08 ld [ %i0 + 8 ], %g2
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
if ( information->maximum < minimum_index )
2006838: e0 16 20 10 lduh [ %i0 + 0x10 ], %l0
200683c: 03 00 00 3f sethi %hi(0xfc00), %g1
2006840: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006844: a2 08 80 01 and %g2, %g1, %l1
2006848: 80 a4 00 11 cmp %l0, %l1
200684c: 3a 80 00 06 bcc,a 2006864 <_Objects_Extend_information+0x34>
2006850: e4 06 20 14 ld [ %i0 + 0x14 ], %l2
2006854: aa 10 00 11 mov %l1, %l5
2006858: ae 10 20 00 clr %l7
200685c: 10 80 00 13 b 20068a8 <_Objects_Extend_information+0x78>
2006860: ac 10 20 00 clr %l6
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2006864: 90 10 00 10 mov %l0, %o0
2006868: 92 10 00 12 mov %l2, %o1
200686c: 40 00 31 cf call 2012fa8 <.udiv>
2006870: aa 10 00 11 mov %l1, %l5
2006874: ac 10 20 00 clr %l6
2006878: 10 80 00 09 b 200689c <_Objects_Extend_information+0x6c>
200687c: ae 10 00 08 mov %o0, %l7
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
2006880: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006884: c2 00 40 02 ld [ %g1 + %g2 ], %g1
2006888: 80 a0 60 00 cmp %g1, 0
200688c: 02 80 00 08 be 20068ac <_Objects_Extend_information+0x7c>
2006890: 80 a5 40 10 cmp %l5, %l0
break;
else
index_base += information->allocation_size;
2006894: aa 05 40 12 add %l5, %l2, %l5
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2006898: ac 05 a0 01 inc %l6
200689c: 80 a5 80 17 cmp %l6, %l7
20068a0: 0a bf ff f8 bcs 2006880 <_Objects_Extend_information+0x50>
20068a4: 85 2d a0 02 sll %l6, 2, %g2
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
20068a8: 80 a5 40 10 cmp %l5, %l0
20068ac: 2a 80 00 5d bcs,a 2006a20 <_Objects_Extend_information+0x1f0>
20068b0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
20068b4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
20068b8: c4 0e 20 12 ldub [ %i0 + 0x12 ], %g2
* Up the block count and maximum
*/
block_count++;
maximum = information->maximum + information->allocation_size;
20068bc: ba 04 00 01 add %l0, %g1, %i5
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
20068c0: 80 a0 a0 00 cmp %g2, 0
/*
* Up the block count and maximum
*/
block_count++;
20068c4: a0 05 e0 01 add %l7, 1, %l0
20068c8: 82 07 40 11 add %i5, %l1, %g1
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
20068cc: 02 80 00 0b be 20068f8 <_Objects_Extend_information+0xc8>
20068d0: 91 2c 20 01 sll %l0, 1, %o0
object_blocks = (void**)
20068d4: 90 02 00 10 add %o0, %l0, %o0
20068d8: 90 00 40 08 add %g1, %o0, %o0
20068dc: 40 00 08 93 call 2008b28 <_Workspace_Allocate>
20068e0: 91 2a 20 02 sll %o0, 2, %o0
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
20068e4: a4 92 20 00 orcc %o0, 0, %l2
20068e8: 32 80 00 0a bne,a 2006910 <_Objects_Extend_information+0xe0><== ALWAYS TAKEN
20068ec: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
20068f0: 81 c7 e0 08 ret <== NOT EXECUTED
20068f4: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
else {
object_blocks = (void**)
20068f8: 90 02 00 10 add %o0, %l0, %o0
20068fc: 90 00 40 08 add %g1, %o0, %o0
2006900: 40 00 08 91 call 2008b44 <_Workspace_Allocate_or_fatal_error>
2006904: 91 2a 20 02 sll %o0, 2, %o0
2006908: a4 10 00 08 mov %o0, %l2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
200690c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
2006910: 85 2c 20 02 sll %l0, 2, %g2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2006914: 80 a0 40 11 cmp %g1, %l1
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
2006918: a8 04 80 02 add %l2, %g2, %l4
200691c: a6 05 00 02 add %l4, %g2, %l3
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2006920: 08 80 00 15 bleu 2006974 <_Objects_Extend_information+0x144>
2006924: 84 10 20 00 clr %g2
/*
* 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,
2006928: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
200692c: a1 2d e0 02 sll %l7, 2, %l0
2006930: 90 10 00 12 mov %l2, %o0
2006934: 40 00 18 c4 call 200cc44 <memcpy>
2006938: 94 10 00 10 mov %l0, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
200693c: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
2006940: 94 10 00 10 mov %l0, %o2
2006944: 40 00 18 c0 call 200cc44 <memcpy>
2006948: 90 10 00 14 mov %l4, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
200694c: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2
2006950: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
2006954: 94 04 40 0a add %l1, %o2, %o2
2006958: 90 10 00 13 mov %l3, %o0
200695c: 40 00 18 ba call 200cc44 <memcpy>
2006960: 95 2a a0 02 sll %o2, 2, %o2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2006964: 10 80 00 08 b 2006984 <_Objects_Extend_information+0x154>
2006968: 83 2d e0 02 sll %l7, 2, %g1
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
200696c: 84 00 a0 01 inc %g2
local_table[ index ] = NULL;
2006970: c0 24 c0 01 clr [ %l3 + %g1 ]
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2006974: 80 a0 80 11 cmp %g2, %l1
2006978: 2a bf ff fd bcs,a 200696c <_Objects_Extend_information+0x13c>
200697c: 83 28 a0 02 sll %g2, 2, %g1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
2006980: 83 2d e0 02 sll %l7, 2, %g1
inactive_per_block[block_count] = 0;
2006984: c0 25 00 01 clr [ %l4 + %g1 ]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006988: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
200698c: c0 24 80 01 clr [ %l2 + %g1 ]
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006990: 83 2d 60 02 sll %l5, 2, %g1
2006994: 86 05 40 02 add %l5, %g2, %g3
2006998: 84 04 c0 01 add %l3, %g1, %g2
200699c: 10 80 00 04 b 20069ac <_Objects_Extend_information+0x17c>
20069a0: 82 10 00 15 mov %l5, %g1
index++ ) {
20069a4: 82 00 60 01 inc %g1
20069a8: 84 00 a0 04 add %g2, 4, %g2
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
20069ac: 80 a0 40 03 cmp %g1, %g3
20069b0: 2a bf ff fd bcs,a 20069a4 <_Objects_Extend_information+0x174>
20069b4: c0 20 80 00 clr [ %g2 ]
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
20069b8: 7f ff ec ed call 2001d6c <sparc_disable_interrupts>
20069bc: 01 00 00 00 nop
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
20069c0: c2 06 00 00 ld [ %i0 ], %g1
20069c4: c8 16 20 04 lduh [ %i0 + 4 ], %g4
20069c8: 87 2f 60 10 sll %i5, 0x10, %g3
20069cc: 89 29 20 1b sll %g4, 0x1b, %g4
20069d0: 87 30 e0 10 srl %g3, 0x10, %g3
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
20069d4: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
20069d8: 05 00 00 40 sethi %hi(0x10000), %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
20069dc: e8 26 20 30 st %l4, [ %i0 + 0x30 ]
information->local_table = local_table;
20069e0: e6 26 20 1c st %l3, [ %i0 + 0x1c ]
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
20069e4: 83 28 60 18 sll %g1, 0x18, %g1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
20069e8: fa 36 20 10 sth %i5, [ %i0 + 0x10 ]
information->maximum_id = _Objects_Build_id(
20069ec: 82 10 40 02 or %g1, %g2, %g1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
20069f0: e4 26 20 34 st %l2, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
20069f4: 82 10 40 04 or %g1, %g4, %g1
20069f8: 82 10 40 03 or %g1, %g3, %g1
20069fc: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
2006a00: 7f ff ec df call 2001d7c <sparc_enable_interrupts>
2006a04: 01 00 00 00 nop
if ( old_tables )
2006a08: 80 a4 20 00 cmp %l0, 0
2006a0c: 22 80 00 05 be,a 2006a20 <_Objects_Extend_information+0x1f0>
2006a10: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
_Workspace_Free( old_tables );
2006a14: 40 00 08 3e call 2008b0c <_Workspace_Free>
2006a18: 90 10 00 10 mov %l0, %o0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
2006a1c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2006a20: e2 06 20 34 ld [ %i0 + 0x34 ], %l1
2006a24: 80 a0 60 00 cmp %g1, 0
2006a28: 02 80 00 0f be 2006a64 <_Objects_Extend_information+0x234>
2006a2c: a1 2d a0 02 sll %l6, 2, %l0
information->object_blocks[ block ] =
2006a30: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
2006a34: 40 00 31 23 call 2012ec0 <.umul>
2006a38: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
2006a3c: 40 00 08 3b call 2008b28 <_Workspace_Allocate>
2006a40: 01 00 00 00 nop
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006a44: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
2006a48: d0 24 40 10 st %o0, [ %l1 + %l0 ]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006a4c: c2 00 40 10 ld [ %g1 + %l0 ], %g1
2006a50: 80 a0 60 00 cmp %g1, 0
2006a54: 32 80 00 0b bne,a 2006a80 <_Objects_Extend_information+0x250><== ALWAYS TAKEN
2006a58: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006a5c: 81 c7 e0 08 ret <== NOT EXECUTED
2006a60: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
else {
information->object_blocks[ block ] =
2006a64: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
2006a68: 40 00 31 16 call 2012ec0 <.umul>
2006a6c: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
2006a70: 40 00 08 35 call 2008b44 <_Workspace_Allocate_or_fatal_error>
2006a74: 01 00 00 00 nop
2006a78: d0 24 40 10 st %o0, [ %l1 + %l0 ]
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006a7c: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006a80: a5 2d a0 02 sll %l6, 2, %l2
2006a84: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2006a88: d2 00 40 12 ld [ %g1 + %l2 ], %o1
2006a8c: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
2006a90: 90 07 bf ec add %fp, -20, %o0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006a94: a0 10 00 15 mov %l5, %l0
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
2006a98: a8 10 00 08 mov %o0, %l4
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006a9c: 40 00 11 5d call 200b010 <_Chain_Initialize>
2006aa0: a2 06 20 20 add %i0, 0x20, %l1
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006aa4: 10 80 00 0d b 2006ad8 <_Objects_Extend_information+0x2a8>
2006aa8: 27 00 00 40 sethi %hi(0x10000), %l3
2006aac: c4 16 20 04 lduh [ %i0 + 4 ], %g2
2006ab0: 83 28 60 18 sll %g1, 0x18, %g1
2006ab4: 85 28 a0 1b sll %g2, 0x1b, %g2
2006ab8: 82 10 40 13 or %g1, %l3, %g1
2006abc: 82 10 40 02 or %g1, %g2, %g1
2006ac0: 82 10 40 10 or %g1, %l0, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006ac4: 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(
2006ac8: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
2006acc: a0 04 20 01 inc %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006ad0: 7f ff fd 14 call 2005f20 <_Chain_Append>
2006ad4: 90 10 00 11 mov %l1, %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 ) {
2006ad8: 40 00 11 3e call 200afd0 <_Chain_Get>
2006adc: 90 10 00 14 mov %l4, %o0
2006ae0: 80 a2 20 00 cmp %o0, 0
2006ae4: 32 bf ff f2 bne,a 2006aac <_Objects_Extend_information+0x27c>
2006ae8: c2 06 00 00 ld [ %i0 ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006aec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006af0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive += information->allocation_size;
2006af4: c6 16 20 2c lduh [ %i0 + 0x2c ], %g3
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006af8: c2 20 80 12 st %g1, [ %g2 + %l2 ]
information->inactive += information->allocation_size;
2006afc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006b00: 82 00 40 03 add %g1, %g3, %g1
2006b04: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2006b08: 81 c7 e0 08 ret
2006b0c: 81 e8 00 00 restore
02006bbc <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
2006bbc: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2006bc0: 82 06 3f ff add %i0, -1, %g1
2006bc4: 80 a0 60 03 cmp %g1, 3
2006bc8: 38 80 00 1c bgu,a 2006c38 <_Objects_Get_information+0x7c>
2006bcc: b0 10 20 00 clr %i0
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
2006bd0: 10 80 00 1c b 2006c40 <_Objects_Get_information+0x84>
2006bd4: 80 a6 60 00 cmp %i1, 0
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
2006bd8: 40 00 12 27 call 200b474 <_Objects_API_maximum_class>
2006bdc: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum < 0 ||
2006be0: 80 a2 20 00 cmp %o0, 0
2006be4: 06 80 00 14 bl 2006c34 <_Objects_Get_information+0x78> <== NEVER TAKEN
2006be8: 80 a6 40 08 cmp %i1, %o0
2006bec: 38 80 00 13 bgu,a 2006c38 <_Objects_Get_information+0x7c><== NEVER TAKEN
2006bf0: b0 10 20 00 clr %i0 <== NOT EXECUTED
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2006bf4: 85 2e 20 02 sll %i0, 2, %g2
2006bf8: 03 00 80 5a sethi %hi(0x2016800), %g1
2006bfc: 82 10 61 00 or %g1, 0x100, %g1 ! 2016900 <_Objects_Information_table>
2006c00: c4 00 40 02 ld [ %g1 + %g2 ], %g2
2006c04: 80 a0 a0 00 cmp %g2, 0
2006c08: 02 80 00 0c be 2006c38 <_Objects_Get_information+0x7c> <== NEVER TAKEN
2006c0c: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2006c10: 83 2e 60 02 sll %i1, 2, %g1
2006c14: f0 00 80 01 ld [ %g2 + %g1 ], %i0
if ( !info )
2006c18: 80 a6 20 00 cmp %i0, 0
2006c1c: 02 80 00 07 be 2006c38 <_Objects_Get_information+0x7c> <== NEVER TAKEN
2006c20: 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 )
2006c24: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2006c28: 80 a0 60 00 cmp %g1, 0
2006c2c: 12 80 00 03 bne 2006c38 <_Objects_Get_information+0x7c>
2006c30: 01 00 00 00 nop
2006c34: b0 10 20 00 clr %i0 ! 0 <PROM_START>
return NULL;
#endif
return info;
}
2006c38: 81 c7 e0 08 ret
2006c3c: 81 e8 00 00 restore
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
2006c40: 22 bf ff fe be,a 2006c38 <_Objects_Get_information+0x7c>
2006c44: b0 10 20 00 clr %i0
2006c48: 30 bf ff e4 b,a 2006bd8 <_Objects_Get_information+0x1c>
02006c4c <_Objects_Get_isr_disable>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location,
ISR_Level *level_p
)
{
2006c4c: 9d e3 bf 98 save %sp, -104, %sp
#if defined(RTEMS_MULTIPROCESSING)
index = id - information->minimum_id + 1;
#else
/* index = _Objects_Get_index( id ); */
index = id & 0x0000ffff;
2006c50: 03 00 00 3f sethi %hi(0xfc00), %g1
2006c54: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
/* This should work but doesn't always :( */
/* index = (uint16_t ) id; */
#endif
_ISR_Disable( level );
2006c58: 7f ff ec 45 call 2001d6c <sparc_disable_interrupts>
2006c5c: b2 0e 40 01 and %i1, %g1, %i1
if ( information->maximum >= index ) {
2006c60: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2006c64: 80 a0 40 19 cmp %g1, %i1
2006c68: 0a 80 00 11 bcs 2006cac <_Objects_Get_isr_disable+0x60>
2006c6c: 83 2e 60 02 sll %i1, 2, %g1
if ( (the_object = information->local_table[ index ]) != NULL ) {
2006c70: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
2006c74: f0 00 80 01 ld [ %g2 + %g1 ], %i0
2006c78: 80 a6 20 00 cmp %i0, 0
2006c7c: 02 80 00 06 be 2006c94 <_Objects_Get_isr_disable+0x48> <== NEVER TAKEN
2006c80: 01 00 00 00 nop
*location = OBJECTS_LOCAL;
*level_p = level;
2006c84: d0 26 c0 00 st %o0, [ %i3 ]
#endif
_ISR_Disable( level );
if ( information->maximum >= index ) {
if ( (the_object = information->local_table[ index ]) != NULL ) {
*location = OBJECTS_LOCAL;
2006c88: c0 26 80 00 clr [ %i2 ]
2006c8c: 81 c7 e0 08 ret
2006c90: 81 e8 00 00 restore
*level_p = level;
return the_object;
}
_ISR_Enable( level );
2006c94: 7f ff ec 3a call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2006c98: 01 00 00 00 nop <== NOT EXECUTED
*location = OBJECTS_ERROR;
2006c9c: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1> <== NOT EXECUTED
2006ca0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED
2006ca4: 81 c7 e0 08 ret <== NOT EXECUTED
2006ca8: 81 e8 00 00 restore <== NOT EXECUTED
return NULL;
}
_ISR_Enable( level );
2006cac: 7f ff ec 34 call 2001d7c <sparc_enable_interrupts>
2006cb0: b0 10 20 00 clr %i0
*location = OBJECTS_ERROR;
2006cb4: 82 10 20 01 mov 1, %g1
2006cb8: c2 26 80 00 st %g1, [ %i2 ]
_Objects_MP_Is_remote( information, id, location, &the_object );
return the_object;
#else
return NULL;
#endif
}
2006cbc: 81 c7 e0 08 ret
2006cc0: 81 e8 00 00 restore
020085b8 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
20085b8: 9d e3 bf 88 save %sp, -120, %sp
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
20085bc: 80 a6 60 00 cmp %i1, 0
20085c0: 22 80 00 41 be,a 20086c4 <_Objects_Get_name_as_string+0x10c>
20085c4: b4 10 20 00 clr %i2
return NULL;
if ( name == NULL )
20085c8: 80 a6 a0 00 cmp %i2, 0
20085cc: 22 80 00 3f be,a 20086c8 <_Objects_Get_name_as_string+0x110>
20085d0: b0 10 00 1a mov %i2, %i0
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
20085d4: b0 96 20 00 orcc %i0, 0, %i0
20085d8: 12 80 00 04 bne 20085e8 <_Objects_Get_name_as_string+0x30>
20085dc: 03 00 80 8b sethi %hi(0x2022c00), %g1
20085e0: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 2022f44 <_Thread_Executing>
20085e4: f0 00 60 08 ld [ %g1 + 8 ], %i0
information = _Objects_Get_information_id( tmpId );
20085e8: 7f ff ff ab call 2008494 <_Objects_Get_information_id>
20085ec: 90 10 00 18 mov %i0, %o0
if ( !information )
20085f0: a0 92 20 00 orcc %o0, 0, %l0
20085f4: 22 80 00 34 be,a 20086c4 <_Objects_Get_name_as_string+0x10c>
20085f8: b4 10 20 00 clr %i2
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
20085fc: 92 10 00 18 mov %i0, %o1
2008600: 40 00 00 34 call 20086d0 <_Objects_Get>
2008604: 94 07 bf f4 add %fp, -12, %o2
switch ( location ) {
2008608: c2 07 bf f4 ld [ %fp + -12 ], %g1
200860c: 80 a0 60 00 cmp %g1, 0
2008610: 32 80 00 2d bne,a 20086c4 <_Objects_Get_name_as_string+0x10c>
2008614: b4 10 20 00 clr %i2
case OBJECTS_ERROR:
return NULL;
case OBJECTS_LOCAL:
if ( information->is_string ) {
2008618: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1
200861c: 80 a0 60 00 cmp %g1, 0
2008620: 22 80 00 07 be,a 200863c <_Objects_Get_name_as_string+0x84>
2008624: c2 02 20 0c ld [ %o0 + 0xc ], %g1
s = the_object->name.name_p;
2008628: d0 02 20 0c ld [ %o0 + 0xc ], %o0
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
200862c: 80 a2 20 00 cmp %o0, 0
2008630: 12 80 00 0c bne 2008660 <_Objects_Get_name_as_string+0xa8><== ALWAYS TAKEN
2008634: 86 10 00 1a mov %i2, %g3
2008638: 30 80 00 1f b,a 20086b4 <_Objects_Get_name_as_string+0xfc><== NOT EXECUTED
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
200863c: c0 2f bf ec clrb [ %fp + -20 ]
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2008640: 85 30 60 18 srl %g1, 0x18, %g2
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
2008644: c2 2f bf eb stb %g1, [ %fp + -21 ]
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2008648: c4 2f bf e8 stb %g2, [ %fp + -24 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
200864c: 90 07 bf e8 add %fp, -24, %o0
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
2008650: 85 30 60 10 srl %g1, 0x10, %g2
lname[ 2 ] = (u32_name >> 8) & 0xff;
2008654: 83 30 60 08 srl %g1, 8, %g1
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
2008658: c4 2f bf e9 stb %g2, [ %fp + -23 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
200865c: c2 2f bf ea stb %g1, [ %fp + -22 ]
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint(*s)) ? *s : '*';
2008660: 03 00 80 6a sethi %hi(0x201a800), %g1
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2008664: b2 06 7f ff add %i1, -1, %i1
*d = (isprint(*s)) ? *s : '*';
2008668: 98 10 60 38 or %g1, 0x38, %o4
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
200866c: 86 10 00 1a mov %i2, %g3
2008670: 10 80 00 0a b 2008698 <_Objects_Get_name_as_string+0xe0>
2008674: 84 10 20 00 clr %g2
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint(*s)) ? *s : '*';
2008678: c2 03 00 00 ld [ %o4 ], %g1
200867c: c2 48 40 04 ldsb [ %g1 + %g4 ], %g1
2008680: 80 88 60 97 btst 0x97, %g1
2008684: 12 80 00 03 bne 2008690 <_Objects_Get_name_as_string+0xd8>
2008688: 84 00 a0 01 inc %g2
200868c: 9a 10 20 2a mov 0x2a, %o5
2008690: da 28 c0 00 stb %o5, [ %g3 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2008694: 86 00 e0 01 inc %g3
2008698: 80 a0 80 19 cmp %g2, %i1
200869c: 1a 80 00 06 bcc 20086b4 <_Objects_Get_name_as_string+0xfc>
20086a0: 01 00 00 00 nop
20086a4: c8 4a 00 02 ldsb [ %o0 + %g2 ], %g4
20086a8: 80 a1 20 00 cmp %g4, 0
20086ac: 12 bf ff f3 bne 2008678 <_Objects_Get_name_as_string+0xc0>
20086b0: da 0a 00 02 ldub [ %o0 + %g2 ], %o5
*d = (isprint(*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
20086b4: 40 00 02 48 call 2008fd4 <_Thread_Enable_dispatch>
20086b8: c0 28 c0 00 clrb [ %g3 ]
return name;
}
return NULL; /* unreachable path */
}
20086bc: 81 c7 e0 08 ret
20086c0: 91 e8 00 1a restore %g0, %i2, %o0
20086c4: b0 10 00 1a mov %i2, %i0
20086c8: 81 c7 e0 08 ret
20086cc: 81 e8 00 00 restore
02013f2c <_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;
2013f2c: c2 02 20 08 ld [ %o0 + 8 ], %g1
if ( information->maximum >= index ) {
2013f30: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2
/*
* 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;
2013f34: 92 22 40 01 sub %o1, %g1, %o1
2013f38: 82 02 60 01 add %o1, 1, %g1
if ( information->maximum >= index ) {
2013f3c: 80 a0 80 01 cmp %g2, %g1
2013f40: 0a 80 00 09 bcs 2013f64 <_Objects_Get_no_protection+0x38>
2013f44: 83 28 60 02 sll %g1, 2, %g1
if ( (the_object = information->local_table[ index ]) != NULL ) {
2013f48: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
2013f4c: d0 00 80 01 ld [ %g2 + %g1 ], %o0
2013f50: 80 a2 20 00 cmp %o0, 0
2013f54: 02 80 00 05 be 2013f68 <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
2013f58: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
2013f5c: 81 c3 e0 08 retl
2013f60: 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;
2013f64: 82 10 20 01 mov 1, %g1
2013f68: 90 10 20 00 clr %o0
return NULL;
}
2013f6c: 81 c3 e0 08 retl
2013f70: c2 22 80 00 st %g1, [ %o2 ]
0200811c <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200811c: 9d e3 bf 90 save %sp, -112, %sp
2008120: 92 10 00 18 mov %i0, %o1
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
2008124: 80 a6 60 00 cmp %i1, 0
2008128: 02 80 00 22 be 20081b0 <_Objects_Id_to_name+0x94> <== NEVER TAKEN
200812c: b0 10 20 01 mov 1, %i0
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2008130: 80 a2 60 00 cmp %o1, 0
2008134: 12 80 00 06 bne 200814c <_Objects_Id_to_name+0x30>
2008138: 83 32 60 18 srl %o1, 0x18, %g1
200813c: 03 00 80 6a sethi %hi(0x201a800), %g1
2008140: c2 00 63 f4 ld [ %g1 + 0x3f4 ], %g1 ! 201abf4 <_Thread_Executing>
2008144: 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);
2008148: 83 32 60 18 srl %o1, 0x18, %g1
200814c: 84 08 60 07 and %g1, 7, %g2
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2008150: 82 00 bf ff add %g2, -1, %g1
2008154: 80 a0 60 03 cmp %g1, 3
2008158: 38 80 00 16 bgu,a 20081b0 <_Objects_Id_to_name+0x94>
200815c: b0 10 20 03 mov 3, %i0
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
2008160: 10 80 00 18 b 20081c0 <_Objects_Id_to_name+0xa4>
2008164: 85 28 a0 02 sll %g2, 2, %g2
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
2008168: 83 28 60 02 sll %g1, 2, %g1
200816c: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !information )
2008170: 80 a2 20 00 cmp %o0, 0
2008174: 02 80 00 0f be 20081b0 <_Objects_Id_to_name+0x94> <== NEVER TAKEN
2008178: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
if ( information->is_string )
200817c: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
2008180: 80 a0 60 00 cmp %g1, 0
2008184: 12 80 00 0d bne 20081b8 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
2008188: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
200818c: 7f ff ff c7 call 20080a8 <_Objects_Get>
2008190: 94 07 bf f4 add %fp, -12, %o2
if ( !the_object )
2008194: 80 a2 20 00 cmp %o0, 0
2008198: 22 80 00 06 be,a 20081b0 <_Objects_Id_to_name+0x94>
200819c: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
*name = the_object->name;
20081a0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
20081a4: b0 10 20 00 clr %i0
20081a8: 40 00 02 5f call 2008b24 <_Thread_Enable_dispatch>
20081ac: c2 26 40 00 st %g1, [ %i1 ]
20081b0: 81 c7 e0 08 ret
20081b4: 81 e8 00 00 restore
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
20081b8: 81 c7 e0 08 ret <== NOT EXECUTED
20081bc: 81 e8 00 00 restore <== NOT EXECUTED
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
20081c0: 03 00 80 6a sethi %hi(0x201a800), %g1
20081c4: 82 10 62 90 or %g1, 0x290, %g1 ! 201aa90 <_Objects_Information_table>
20081c8: c4 00 40 02 ld [ %g1 + %g2 ], %g2
20081cc: 80 a0 a0 00 cmp %g2, 0
20081d0: 12 bf ff e6 bne 2008168 <_Objects_Id_to_name+0x4c> <== ALWAYS TAKEN
20081d4: 83 32 60 1b srl %o1, 0x1b, %g1
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
20081d8: 81 c7 e0 08 ret <== NOT EXECUTED
20081dc: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED
02006d38 <_Objects_Initialize_information>:
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
2006d38: 9d e3 bf 98 save %sp, -104, %sp
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
2006d3c: 03 00 80 5a sethi %hi(0x2016800), %g1
2006d40: 85 2e 60 02 sll %i1, 2, %g2
2006d44: 82 10 61 00 or %g1, 0x100, %g1
2006d48: c2 00 40 02 ld [ %g1 + %g2 ], %g1
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006d4c: 89 2e a0 1b sll %i2, 0x1b, %g4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
2006d50: f4 36 20 04 sth %i2, [ %i0 + 4 ]
/*
* Set the entry in the object information table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
2006d54: b5 2e a0 02 sll %i2, 2, %i2
2006d58: f0 20 40 1a st %i0, [ %g1 + %i2 ]
/*
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
2006d5c: 83 36 e0 1f srl %i3, 0x1f, %g1
2006d60: c2 2e 20 12 stb %g1, [ %i0 + 0x12 ]
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
2006d64: 03 20 00 00 sethi %hi(0x80000000), %g1
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
2006d68: de 07 a0 5c ld [ %fp + 0x5c ], %o7
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->is_string = is_string;
2006d6c: fa 2e 20 38 stb %i5, [ %i0 + 0x38 ]
* Are we operating in unlimited, or auto-extend mode
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? TRUE : FALSE;
maximum &= ~OBJECTS_UNLIMITED_OBJECTS;
2006d70: ba 2e c0 01 andn %i3, %g1, %i5
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
2006d74: 03 00 80 59 sethi %hi(0x2016400), %g1
2006d78: 82 10 62 78 or %g1, 0x278, %g1 ! 2016678 <null_local_table.3627>
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006d7c: 80 a0 00 1d cmp %g0, %i5
/*
* Set the size of the object
*/
information->size = size;
2006d80: b9 2f 20 10 sll %i4, 0x10, %i4
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006d84: 86 40 20 00 addx %g0, 0, %g3
2006d88: 85 2e 60 18 sll %i1, 0x18, %g2
/*
* Set the size of the object
*/
information->size = size;
2006d8c: b9 37 20 10 srl %i4, 0x10, %i4
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
2006d90: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
/*
* Set the size of the object
*/
information->size = size;
2006d94: f8 26 20 18 st %i4, [ %i0 + 0x18 ]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006d98: 03 00 00 40 sethi %hi(0x10000), %g1
uint32_t name_length;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
2006d9c: f2 26 00 00 st %i1, [ %i0 ]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006da0: 84 10 80 01 or %g2, %g1, %g2
information->the_api = the_api;
information->the_class = the_class;
information->is_string = is_string;
information->local_table = 0;
information->inactive_per_block = 0;
2006da4: c0 26 20 30 clr [ %i0 + 0x30 ]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006da8: 84 10 80 04 or %g2, %g4, %g2
information->the_class = the_class;
information->is_string = is_string;
information->local_table = 0;
information->inactive_per_block = 0;
information->object_blocks = 0;
2006dac: c0 26 20 34 clr [ %i0 + 0x34 ]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006db0: 84 10 80 03 or %g2, %g3, %g2
information->local_table = 0;
information->inactive_per_block = 0;
information->object_blocks = 0;
information->inactive = 0;
2006db4: c0 36 20 2c clrh [ %i0 + 0x2c ]
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum;
2006db8: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
*/
if ( maximum == 0 ) minimum_index = 0;
else minimum_index = 1;
information->minimum_id =
2006dbc: c4 26 20 08 st %g2, [ %i0 + 8 ]
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
2006dc0: 82 03 e0 04 add %o7, 4, %g1
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
2006dc4: 80 8b e0 03 btst 3, %o7
2006dc8: 12 80 00 03 bne 2006dd4 <_Objects_Initialize_information+0x9c><== NEVER TAKEN
2006dcc: 82 08 7f fc and %g1, -4, %g1
2006dd0: 82 10 00 0f mov %o7, %g1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
2006dd4: c2 36 20 3a sth %g1, [ %i0 + 0x3a ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2006dd8: 82 06 20 24 add %i0, 0x24, %g1
the_chain->permanent_null = NULL;
2006ddc: c0 26 20 24 clr [ %i0 + 0x24 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2006de0: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2006de4: 82 06 20 20 add %i0, 0x20, %g1
/*
* Initialize objects .. if there are any
*/
if ( maximum ) {
2006de8: 80 a7 60 00 cmp %i5, 0
2006dec: 02 80 00 05 be 2006e00 <_Objects_Initialize_information+0xc8>
2006df0: c2 26 20 28 st %g1, [ %i0 + 0x28 ]
/*
* Reset the maximum value. It will be updated when the information is
* extended.
*/
information->maximum = 0;
2006df4: c0 36 20 10 clrh [ %i0 + 0x10 ]
* 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 );
2006df8: 7f ff fe 8e call 2006830 <_Objects_Extend_information>
2006dfc: 81 e8 00 00 restore
2006e00: 81 c7 e0 08 ret
2006e04: 81 e8 00 00 restore
02006e40 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
2006e40: 9a 10 00 08 mov %o0, %o5
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
2006e44: 80 a2 e0 00 cmp %o3, 0
2006e48: 02 80 00 29 be 2006eec <_Objects_Name_to_id_u32+0xac>
2006e4c: 90 10 20 02 mov 2, %o0
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
2006e50: 80 a2 60 00 cmp %o1, 0
2006e54: 22 80 00 26 be,a 2006eec <_Objects_Name_to_id_u32+0xac>
2006e58: 90 10 20 01 mov 1, %o0
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
2006e5c: c2 13 60 10 lduh [ %o5 + 0x10 ], %g1
2006e60: 84 90 60 00 orcc %g1, 0, %g2
2006e64: 22 80 00 22 be,a 2006eec <_Objects_Name_to_id_u32+0xac> <== NEVER TAKEN
2006e68: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
2006e6c: 80 a2 a0 00 cmp %o2, 0
2006e70: 02 80 00 19 be 2006ed4 <_Objects_Name_to_id_u32+0x94>
2006e74: 83 28 a0 10 sll %g2, 0x10, %g1
2006e78: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
2006e7c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
2006e80: 80 a2 80 01 cmp %o2, %g1
2006e84: 02 80 00 13 be 2006ed0 <_Objects_Name_to_id_u32+0x90>
2006e88: 80 a2 a0 01 cmp %o2, 1
2006e8c: 32 80 00 18 bne,a 2006eec <_Objects_Name_to_id_u32+0xac>
2006e90: 90 10 20 01 mov 1, %o0
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2006e94: 10 80 00 10 b 2006ed4 <_Objects_Name_to_id_u32+0x94>
2006e98: 83 28 a0 10 sll %g2, 0x10, %g1
the_object = information->local_table[ index ];
2006e9c: c2 03 60 1c ld [ %o5 + 0x1c ], %g1
2006ea0: c4 00 40 02 ld [ %g1 + %g2 ], %g2
if ( !the_object )
2006ea4: 80 a0 a0 00 cmp %g2, 0
2006ea8: 02 80 00 0d be 2006edc <_Objects_Name_to_id_u32+0x9c>
2006eac: 86 00 e0 01 inc %g3
continue;
if ( name == the_object->name.name_u32 ) {
2006eb0: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
2006eb4: 80 a2 40 01 cmp %o1, %g1
2006eb8: 32 80 00 0a bne,a 2006ee0 <_Objects_Name_to_id_u32+0xa0>
2006ebc: 80 a0 c0 04 cmp %g3, %g4
*id = the_object->id;
2006ec0: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2006ec4: 90 10 20 00 clr %o0
2006ec8: 81 c3 e0 08 retl
2006ecc: c2 22 c0 00 st %g1, [ %o3 ]
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2006ed0: 83 28 a0 10 sll %g2, 0x10, %g1
2006ed4: 86 10 20 01 mov 1, %g3
2006ed8: 89 30 60 10 srl %g1, 0x10, %g4
2006edc: 80 a0 c0 04 cmp %g3, %g4
2006ee0: 08 bf ff ef bleu 2006e9c <_Objects_Name_to_id_u32+0x5c>
2006ee4: 85 28 e0 02 sll %g3, 2, %g2
2006ee8: 90 10 20 01 mov 1, %o0
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
2006eec: 81 c3 e0 08 retl
02006e08 <_Objects_Namespace_remove>:
void _Objects_Namespace_remove(
Objects_Information *information,
Objects_Control *the_object
)
{
2006e08: 9d e3 bf 98 save %sp, -104, %sp
/*
* If this is a string format name, then free the memory.
*/
if ( information->is_string && the_object->name.name_p )
2006e0c: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1
2006e10: 80 a0 60 00 cmp %g1, 0
2006e14: 22 80 00 09 be,a 2006e38 <_Objects_Namespace_remove+0x30><== ALWAYS TAKEN
2006e18: c0 26 60 0c clr [ %i1 + 0xc ]
2006e1c: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED
2006e20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2006e24: 22 80 00 05 be,a 2006e38 <_Objects_Namespace_remove+0x30><== NOT EXECUTED
2006e28: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
2006e2c: 40 00 07 38 call 2008b0c <_Workspace_Free> <== NOT EXECUTED
2006e30: 01 00 00 00 nop <== NOT EXECUTED
/*
* Clear out either format.
*/
the_object->name.name_p = NULL;
the_object->name.name_u32 = 0;
2006e34: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
}
2006e38: 81 c7 e0 08 ret
2006e3c: 81 e8 00 00 restore
02008ba0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
2008ba0: 9d e3 bf 98 save %sp, -104, %sp
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
2008ba4: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1
2008ba8: 40 00 1d 2b call 2010054 <strnlen>
2008bac: 90 10 00 1a mov %i2, %o0
if ( information->is_string ) {
2008bb0: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1
2008bb4: 80 a0 60 00 cmp %g1, 0
2008bb8: 02 80 00 17 be 2008c14 <_Objects_Set_name+0x74> <== ALWAYS TAKEN
2008bbc: a0 02 20 01 add %o0, 1, %l0
char *d;
d = _Workspace_Allocate( length );
2008bc0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2008bc4: 40 00 07 3c call 200a8b4 <_Workspace_Allocate> <== NOT EXECUTED
2008bc8: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( !d )
2008bcc: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED
2008bd0: 02 80 00 27 be 2008c6c <_Objects_Set_name+0xcc> <== NOT EXECUTED
2008bd4: 01 00 00 00 nop <== NOT EXECUTED
return FALSE;
if ( the_object->name.name_p ) {
2008bd8: d0 06 60 0c ld [ %i1 + 0xc ], %o0 <== NOT EXECUTED
2008bdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2008be0: 02 80 00 06 be 2008bf8 <_Objects_Set_name+0x58> <== NOT EXECUTED
2008be4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
_Workspace_Free( (void *)the_object->name.name_p );
2008be8: 40 00 07 2c call 200a898 <_Workspace_Free> <== NOT EXECUTED
2008bec: 01 00 00 00 nop <== NOT EXECUTED
the_object->name.name_p = NULL;
2008bf0: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED
}
strncpy( d, name, length );
2008bf4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
2008bf8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2008bfc: 40 00 1c dc call 200ff6c <strncpy> <== NOT EXECUTED
2008c00: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
d[ length ] = '\0';
2008c04: c0 2c 40 10 clrb [ %l1 + %l0 ] <== NOT EXECUTED
the_object->name.name_p = d;
2008c08: e2 26 60 0c st %l1, [ %i1 + 0xc ] <== NOT EXECUTED
2008c0c: 81 c7 e0 08 ret <== NOT EXECUTED
2008c10: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
} else {
the_object->name.name_u32 = _Objects_Build_name(
2008c14: 80 a4 20 00 cmp %l0, 0
2008c18: 02 80 00 1a be 2008c80 <_Objects_Set_name+0xe0> <== NEVER TAKEN
2008c1c: 1b 08 00 00 sethi %hi(0x20000000), %o5
2008c20: c2 4e 80 00 ldsb [ %i2 ], %g1
2008c24: 80 a4 20 01 cmp %l0, 1
2008c28: 02 80 00 16 be 2008c80 <_Objects_Set_name+0xe0>
2008c2c: 9b 28 60 18 sll %g1, 0x18, %o5
2008c30: c2 4e a0 01 ldsb [ %i2 + 1 ], %g1
2008c34: 80 a4 20 02 cmp %l0, 2
2008c38: 08 80 00 0f bleu 2008c74 <_Objects_Set_name+0xd4>
2008c3c: 89 28 60 10 sll %g1, 0x10, %g4
2008c40: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1
2008c44: 80 a4 20 03 cmp %l0, 3
2008c48: 87 28 60 08 sll %g1, 8, %g3
2008c4c: 08 80 00 03 bleu 2008c58 <_Objects_Set_name+0xb8>
2008c50: 84 10 20 20 mov 0x20, %g2
2008c54: c4 4e a0 03 ldsb [ %i2 + 3 ], %g2
2008c58: 82 13 40 04 or %o5, %g4, %g1
2008c5c: b0 10 20 01 mov 1, %i0
2008c60: 82 10 40 03 or %g1, %g3, %g1
2008c64: 82 10 40 02 or %g1, %g2, %g1
2008c68: c2 26 60 0c st %g1, [ %i1 + 0xc ]
);
}
return TRUE;
}
2008c6c: 81 c7 e0 08 ret
2008c70: 81 e8 00 00 restore
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
2008c74: 84 10 20 20 mov 0x20, %g2
2008c78: 10 bf ff f8 b 2008c58 <_Objects_Set_name+0xb8>
2008c7c: 07 00 00 08 sethi %hi(0x2000), %g3
2008c80: 10 bf ff fd b 2008c74 <_Objects_Set_name+0xd4>
2008c84: 09 00 08 00 sethi %hi(0x200000), %g4
02006efc <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2006efc: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
2006f00: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* Search the list to find block or chunnk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
2006f04: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
2006f08: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2006f0c: 03 00 00 3f sethi %hi(0xfc00), %g1
2006f10: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006f14: 92 10 00 10 mov %l0, %o1
2006f18: a2 08 80 01 and %g2, %g1, %l1
2006f1c: 40 00 30 23 call 2012fa8 <.udiv>
2006f20: 90 22 00 11 sub %o0, %l1, %o0
2006f24: 10 80 00 2e b 2006fdc <_Objects_Shrink_information+0xe0>
2006f28: 84 10 20 00 clr %g2
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] == information->allocation_size ) {
2006f2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2006f30: c2 00 40 12 ld [ %g1 + %l2 ], %g1
2006f34: 80 a0 40 10 cmp %g1, %l0
2006f38: 12 80 00 28 bne 2006fd8 <_Objects_Shrink_information+0xdc>
2006f3c: 84 00 a0 01 inc %g2
/*
* XXX - Not to sure how to use a chain where you need to iterate and
* and remove elements.
*/
the_object = (Objects_Control *) information->Inactive.first;
2006f40: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
2006f44: 03 00 00 3f sethi %hi(0xfc00), %g1
2006f48: a6 10 63 ff or %g1, 0x3ff, %l3 ! ffff <PROM_START+0xffff>
2006f4c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2006f50: 84 08 40 13 and %g1, %l3, %g2
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
2006f54: 80 a0 80 11 cmp %g2, %l1
2006f58: 2a 80 00 0c bcs,a 2006f88 <_Objects_Shrink_information+0x8c>
2006f5c: e0 04 00 00 ld [ %l0 ], %l0
2006f60: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006f64: 82 04 40 01 add %l1, %g1, %g1
2006f68: 80 a0 80 01 cmp %g2, %g1
2006f6c: 1a 80 00 06 bcc 2006f84 <_Objects_Shrink_information+0x88>
2006f70: 90 10 00 10 mov %l0, %o0
if ( !_Chain_Is_last( &the_object->Node ) )
the_object = (Objects_Control *) the_object->Node.next;
else
the_object = NULL;
_Chain_Extract( &extract_me->Node );
2006f74: 40 00 10 0d call 200afa8 <_Chain_Extract>
2006f78: e0 04 00 00 ld [ %l0 ], %l0
}
else {
the_object = (Objects_Control *) the_object->Node.next;
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
2006f7c: 10 80 00 04 b 2006f8c <_Objects_Shrink_information+0x90>
2006f80: 80 a4 20 00 cmp %l0, 0
the_object = NULL;
_Chain_Extract( &extract_me->Node );
}
else {
the_object = (Objects_Control *) the_object->Node.next;
2006f84: e0 04 00 00 ld [ %l0 ], %l0
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
2006f88: 80 a4 20 00 cmp %l0, 0
2006f8c: 22 80 00 07 be,a 2006fa8 <_Objects_Shrink_information+0xac><== NEVER TAKEN
2006f90: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
2006f94: c2 04 00 00 ld [ %l0 ], %g1
2006f98: 80 a0 60 00 cmp %g1, 0
2006f9c: 32 bf ff ed bne,a 2006f50 <_Objects_Shrink_information+0x54>
2006fa0: c2 04 20 08 ld [ %l0 + 8 ], %g1
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2006fa4: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006fa8: 40 00 06 d9 call 2008b0c <_Workspace_Free>
2006fac: d0 00 40 12 ld [ %g1 + %l2 ], %o0
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2006fb0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive -= information->allocation_size;
2006fb4: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2006fb8: c0 20 80 12 clr [ %g2 + %l2 ]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2006fbc: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2006fc0: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2006fc4: c0 20 80 12 clr [ %g2 + %l2 ]
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2006fc8: 82 20 40 03 sub %g1, %g3, %g1
2006fcc: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2006fd0: 81 c7 e0 08 ret
2006fd4: 81 e8 00 00 restore
return;
}
index_base += information->allocation_size;
2006fd8: a2 04 40 10 add %l1, %l0, %l1
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = ( information->maximum - index_base ) / information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
2006fdc: 80 a0 80 08 cmp %g2, %o0
2006fe0: 0a bf ff d3 bcs 2006f2c <_Objects_Shrink_information+0x30>
2006fe4: a5 28 a0 02 sll %g2, 2, %l2
2006fe8: 81 c7 e0 08 ret
2006fec: 81 e8 00 00 restore
02009960 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
2009960: 9d e3 bf 98 save %sp, -104, %sp
Heap_Get_information_status status;
if ( !the_heap )
2009964: 80 a6 20 00 cmp %i0, 0
2009968: 02 80 00 10 be 20099a8 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
200996c: 80 a6 60 00 cmp %i1, 0
return false;
if ( !the_info )
2009970: 02 80 00 0e be 20099a8 <_Protected_heap_Get_information+0x48><== NEVER TAKEN
2009974: 23 00 80 71 sethi %hi(0x201c400), %l1
return false;
_RTEMS_Lock_allocator();
2009978: 7f ff f9 87 call 2007f94 <_API_Mutex_Lock>
200997c: d0 04 61 2c ld [ %l1 + 0x12c ], %o0 ! 201c52c <_RTEMS_Allocator_Mutex>
status = _Heap_Get_information( the_heap, the_info );
2009980: 90 10 00 18 mov %i0, %o0
2009984: 40 00 10 a1 call 200dc08 <_Heap_Get_information>
2009988: 92 10 00 19 mov %i1, %o1
200998c: a0 10 00 08 mov %o0, %l0
_RTEMS_Unlock_allocator();
2009990: 7f ff f9 97 call 2007fec <_API_Mutex_Unlock>
2009994: d0 04 61 2c ld [ %l1 + 0x12c ], %o0
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
2009998: 80 a0 00 10 cmp %g0, %l0
200999c: 82 60 3f ff subx %g0, -1, %g1
20099a0: 81 c7 e0 08 ret
20099a4: 91 e8 00 01 restore %g0, %g1, %o0
return true;
return false;
}
20099a8: 81 c7 e0 08 ret <== NOT EXECUTED
20099ac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200ae24 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
200ae24: 9d e3 bf 98 save %sp, -104, %sp
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200ae28: 21 00 80 5a sethi %hi(0x2016800), %l0
200ae2c: c2 04 22 3c ld [ %l0 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
200ae30: b0 10 20 00 clr %i0
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200ae34: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
200ae38: c2 08 60 04 ldub [ %g1 + 4 ], %g1
200ae3c: 80 a0 00 01 cmp %g0, %g1
200ae40: 90 60 20 00 subx %g0, 0, %o0
200ae44: 90 0a 20 40 and %o0, 0x40, %o0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
200ae48: 7f ff f7 38 call 2008b28 <_Workspace_Allocate>
200ae4c: 90 02 20 20 add %o0, 0x20, %o0
if ( !api )
200ae50: 80 a2 20 00 cmp %o0, 0
200ae54: 02 80 00 17 be 200aeb0 <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN
200ae58: c2 04 22 3c ld [ %l0 + 0x23c ], %g1
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
200ae5c: c0 26 61 78 clr [ %i1 + 0x178 ]
if ( rtems_configuration_get_notepads_enabled() ) {
200ae60: c4 00 60 40 ld [ %g1 + 0x40 ], %g2
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = true;
200ae64: 82 10 20 01 mov 1, %g1
200ae68: c2 2a 20 08 stb %g1, [ %o0 + 8 ]
200ae6c: c2 08 a0 04 ldub [ %g2 + 4 ], %g1
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
200ae70: d0 26 61 68 st %o0, [ %i1 + 0x168 ]
api->pending_events = EVENT_SETS_NONE_PENDING;
200ae74: c0 22 00 00 clr [ %o0 ]
information->handler = NULL;
200ae78: c0 22 20 0c clr [ %o0 + 0xc ]
information->mode_set = RTEMS_DEFAULT_MODES;
200ae7c: c0 22 20 10 clr [ %o0 + 0x10 ]
information->signals_posted = 0;
200ae80: c0 22 20 14 clr [ %o0 + 0x14 ]
information->signals_pending = 0;
200ae84: c0 22 20 18 clr [ %o0 + 0x18 ]
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
200ae88: 80 a0 60 00 cmp %g1, 0
200ae8c: 02 80 00 08 be 200aeac <_RTEMS_tasks_Create_extension+0x88>
200ae90: c0 22 20 1c clr [ %o0 + 0x1c ]
200ae94: 84 10 20 00 clr %g2
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
200ae98: 82 02 00 02 add %o0, %g2, %g1
200ae9c: 84 00 a0 04 add %g2, 4, %g2
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
200aea0: 80 a0 a0 40 cmp %g2, 0x40
200aea4: 12 bf ff fd bne 200ae98 <_RTEMS_tasks_Create_extension+0x74>
200aea8: c0 20 60 20 clr [ %g1 + 0x20 ]
200aeac: b0 10 20 01 mov 1, %i0
api->Notepads[i] = 0;
}
return true;
}
200aeb0: 81 c7 e0 08 ret
200aeb4: 81 e8 00 00 restore
02005898 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2005898: 9d e3 bf 90 save %sp, -112, %sp
rtems_status_code return_value;
rtems_initialization_tasks_table *user_tasks;
rtems_api_configuration_table *api_configuration;
api_configuration = _Configuration_Table->RTEMS_api_configuration;
200589c: 03 00 80 5a sethi %hi(0x2016800), %g1
20058a0: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
20058a4: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
20058a8: d0 00 60 2c ld [ %g1 + 0x2c ], %o0
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
20058ac: 80 a2 20 00 cmp %o0, 0
20058b0: 02 80 00 20 be 2005930 <_RTEMS_tasks_Initialize_user_tasks_body+0x98><== NEVER TAKEN
20058b4: e4 00 60 28 ld [ %g1 + 0x28 ], %l2
20058b8: 80 a4 a0 00 cmp %l2, 0
20058bc: 02 80 00 1d be 2005930 <_RTEMS_tasks_Initialize_user_tasks_body+0x98><== NEVER TAKEN
20058c0: a0 10 00 08 mov %o0, %l0
return;
20058c4: a2 10 20 00 clr %l1
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
20058c8: 10 80 00 17 b 2005924 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
20058cc: a6 07 bf f4 add %fp, -12, %l3
20058d0: d2 04 20 08 ld [ %l0 + 8 ], %o1
20058d4: d4 04 20 04 ld [ %l0 + 4 ], %o2
20058d8: d6 04 20 14 ld [ %l0 + 0x14 ], %o3
20058dc: d8 04 20 0c ld [ %l0 + 0xc ], %o4
20058e0: 7f ff ff 6a call 2005688 <rtems_task_create>
20058e4: 9a 10 00 13 mov %l3, %o5
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
20058e8: 80 a2 20 00 cmp %o0, 0
20058ec: 12 80 00 0b bne 2005918 <_RTEMS_tasks_Initialize_user_tasks_body+0x80>
20058f0: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
20058f4: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
20058f8: d4 04 20 18 ld [ %l0 + 0x18 ], %o2
20058fc: d0 07 bf f4 ld [ %fp + -12 ], %o0
2005900: 40 00 00 0e call 2005938 <rtems_task_start>
2005904: a0 04 20 1c add %l0, 0x1c, %l0
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2005908: 80 a2 20 00 cmp %o0, 0
200590c: 22 80 00 06 be,a 2005924 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
2005910: a2 04 60 01 inc %l1
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
2005914: 94 10 00 08 mov %o0, %o2
2005918: 92 10 20 01 mov 1, %o1
200591c: 40 00 03 61 call 20066a0 <_Internal_error_Occurred>
2005920: 90 10 20 01 mov 1, %o0
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
2005924: 80 a4 40 12 cmp %l1, %l2
2005928: 2a bf ff ea bcs,a 20058d0 <_RTEMS_tasks_Initialize_user_tasks_body+0x38>
200592c: d0 04 00 00 ld [ %l0 ], %o0
2005930: 81 c7 e0 08 ret
2005934: 81 e8 00 00 restore
0200ad60 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200ad60: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200ad64: f0 06 21 68 ld [ %i0 + 0x168 ], %i0
if ( !api )
200ad68: 80 a6 20 00 cmp %i0, 0
200ad6c: 02 80 00 1d be 200ade0 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
200ad70: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200ad74: 7f ff db fe call 2001d6c <sparc_disable_interrupts>
200ad78: 01 00 00 00 nop
signal_set = asr->signals_posted;
200ad7c: e4 06 20 14 ld [ %i0 + 0x14 ], %l2
asr->signals_posted = 0;
200ad80: c0 26 20 14 clr [ %i0 + 0x14 ]
_ISR_Enable( level );
200ad84: 7f ff db fe call 2001d7c <sparc_enable_interrupts>
200ad88: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200ad8c: 80 a4 a0 00 cmp %l2, 0
200ad90: 02 80 00 14 be 200ade0 <_RTEMS_tasks_Post_switch_extension+0x80><== NEVER TAKEN
200ad94: a2 07 bf f4 add %fp, -12, %l1
return;
asr->nest_level += 1;
200ad98: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200ad9c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200ada0: 82 00 60 01 inc %g1
200ada4: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200ada8: 94 10 00 11 mov %l1, %o2
200adac: 21 00 00 3f sethi %hi(0xfc00), %l0
200adb0: 40 00 04 4c call 200bee0 <rtems_task_mode>
200adb4: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
200adb8: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200adbc: 9f c0 40 00 call %g1
200adc0: 90 10 00 12 mov %l2, %o0
asr->nest_level -= 1;
200adc4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200adc8: d0 07 bf f4 ld [ %fp + -12 ], %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;
200adcc: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200add0: 92 14 23 ff or %l0, 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;
200add4: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200add8: 40 00 04 42 call 200bee0 <rtems_task_mode>
200addc: 94 10 00 11 mov %l1, %o2
200ade0: 81 c7 e0 08 ret
200ade4: 81 e8 00 00 restore
02006b38 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2006b38: 9d e3 bf 90 save %sp, -112, %sp
2006b3c: 11 00 80 6c sethi %hi(0x201b000), %o0
2006b40: 92 10 00 18 mov %i0, %o1
2006b44: 90 12 23 14 or %o0, 0x314, %o0
2006b48: 40 00 07 9c call 20089b8 <_Objects_Get>
2006b4c: 94 07 bf f4 add %fp, -12, %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 ) {
2006b50: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006b54: 80 a0 60 00 cmp %g1, 0
2006b58: 12 80 00 26 bne 2006bf0 <_Rate_monotonic_Timeout+0xb8> <== NEVER TAKEN
2006b5c: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2006b60: d0 02 20 50 ld [ %o0 + 0x50 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2006b64: 03 00 00 10 sethi %hi(0x4000), %g1
2006b68: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2006b6c: 80 88 80 01 btst %g2, %g1
2006b70: 22 80 00 0c be,a 2006ba0 <_Rate_monotonic_Timeout+0x68>
2006b74: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
2006b78: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
2006b7c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2006b80: 80 a0 80 01 cmp %g2, %g1
2006b84: 32 80 00 07 bne,a 2006ba0 <_Rate_monotonic_Timeout+0x68> <== NEVER TAKEN
2006b88: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2006b8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2006b90: 40 00 08 e2 call 2008f18 <_Thread_Clear_state>
2006b94: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
2006b98: 10 80 00 08 b 2006bb8 <_Rate_monotonic_Timeout+0x80>
2006b9c: 90 10 00 18 mov %i0, %o0
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
2006ba0: 80 a0 60 01 cmp %g1, 1
2006ba4: 12 80 00 0e bne 2006bdc <_Rate_monotonic_Timeout+0xa4> <== ALWAYS TAKEN
2006ba8: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2006bac: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006bb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
_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;
2006bb4: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006bb8: 7f ff fe 4a call 20064e0 <_Rate_monotonic_Initiate_statistics>
2006bbc: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006bc0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006bc4: 92 06 20 10 add %i0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006bc8: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006bcc: 11 00 80 6d sethi %hi(0x201b400), %o0
2006bd0: 40 00 0f 41 call 200a8d4 <_Watchdog_Insert>
2006bd4: 90 12 21 74 or %o0, 0x174, %o0 ! 201b574 <_Watchdog_Ticks_chain>
2006bd8: 30 80 00 02 b,a 2006be0 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2006bdc: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2006be0: 05 00 80 6d sethi %hi(0x201b400), %g2
2006be4: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1 ! 201b490 <_Thread_Dispatch_disable_level>
2006be8: 82 00 7f ff add %g1, -1, %g1
2006bec: c2 20 a0 90 st %g1, [ %g2 + 0x90 ]
2006bf0: 81 c7 e0 08 ret
2006bf4: 81 e8 00 00 restore
02006224 <_TOD_Validate>:
*/
bool _TOD_Validate(
rtems_time_of_day *the_tod
)
{
2006224: 9d e3 bf 98 save %sp, -104, %sp
uint32_t days_in_month;
if ((!the_tod) ||
2006228: 80 a6 20 00 cmp %i0, 0
200622c: 02 80 00 30 be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
2006230: 03 00 80 8c sethi %hi(0x2023000), %g1
2006234: d2 00 60 20 ld [ %g1 + 0x20 ], %o1 ! 2023020 <_TOD_Microseconds_per_tick>
2006238: 11 00 03 d0 sethi %hi(0xf4000), %o0
200623c: 40 00 41 5d call 20167b0 <.udiv>
2006240: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2006244: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2006248: 80 a0 40 08 cmp %g1, %o0
200624c: 1a 80 00 28 bcc 20062ec <_TOD_Validate+0xc8>
2006250: 01 00 00 00 nop
2006254: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006258: 80 a0 60 3b cmp %g1, 0x3b
200625c: 18 80 00 24 bgu 20062ec <_TOD_Validate+0xc8>
2006260: 01 00 00 00 nop
2006264: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2006268: 80 a0 60 3b cmp %g1, 0x3b
200626c: 18 80 00 20 bgu 20062ec <_TOD_Validate+0xc8>
2006270: 01 00 00 00 nop
2006274: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2006278: 80 a0 60 17 cmp %g1, 0x17
200627c: 18 80 00 1c bgu 20062ec <_TOD_Validate+0xc8>
2006280: 01 00 00 00 nop
2006284: c4 06 20 04 ld [ %i0 + 4 ], %g2
2006288: 80 a0 a0 00 cmp %g2, 0
200628c: 02 80 00 18 be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
2006290: 80 a0 a0 0c cmp %g2, 0xc
2006294: 18 80 00 16 bgu 20062ec <_TOD_Validate+0xc8>
2006298: 01 00 00 00 nop
200629c: c2 06 00 00 ld [ %i0 ], %g1
20062a0: 80 a0 67 c3 cmp %g1, 0x7c3
20062a4: 08 80 00 12 bleu 20062ec <_TOD_Validate+0xc8>
20062a8: 01 00 00 00 nop
20062ac: f0 06 20 08 ld [ %i0 + 8 ], %i0
20062b0: 80 a6 20 00 cmp %i0, 0
20062b4: 02 80 00 0e be 20062ec <_TOD_Validate+0xc8> <== NEVER TAKEN
20062b8: 80 88 60 03 btst 3, %g1
20062bc: 03 00 80 63 sethi %hi(0x2018c00), %g1
(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 )
20062c0: 12 80 00 05 bne 20062d4 <_TOD_Validate+0xb0>
20062c4: 86 10 60 e8 or %g1, 0xe8, %g3 ! 2018ce8 <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
20062c8: 82 00 a0 0d add %g2, 0xd, %g1
20062cc: 10 80 00 03 b 20062d8 <_TOD_Validate+0xb4>
20062d0: 83 28 60 02 sll %g1, 2, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
20062d4: 83 28 a0 02 sll %g2, 2, %g1
20062d8: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
20062dc: 80 a0 40 18 cmp %g1, %i0
20062e0: 82 60 3f ff subx %g0, -1, %g1
20062e4: 81 c7 e0 08 ret
20062e8: 91 e8 00 01 restore %g0, %g1, %o0
if ( the_tod->day > days_in_month )
return false;
return true;
}
20062ec: 81 c7 e0 08 ret
20062f0: 91 e8 20 00 restore %g0, 0, %o0
02007044 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2007044: 9d e3 bf 98 save %sp, -104, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
2007048: 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 );
200704c: 40 00 04 62 call 20081d4 <_Thread_Set_transient>
2007050: 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 )
2007054: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2007058: 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 )
200705c: 80 a0 40 19 cmp %g1, %i1
2007060: 02 80 00 04 be 2007070 <_Thread_Change_priority+0x2c>
2007064: 92 10 00 19 mov %i1, %o1
_Thread_Set_priority( the_thread, new_priority );
2007068: 40 00 03 df call 2007fe4 <_Thread_Set_priority>
200706c: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
2007070: 7f ff eb 3f call 2001d6c <sparc_disable_interrupts>
2007074: 01 00 00 00 nop
2007078: 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;
200707c: f2 04 20 10 ld [ %l0 + 0x10 ], %i1
if ( state != STATES_TRANSIENT ) {
2007080: 80 a6 60 04 cmp %i1, 4
2007084: 02 80 00 10 be 20070c4 <_Thread_Change_priority+0x80>
2007088: 82 0c 60 04 and %l1, 4, %g1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
200708c: 80 a0 60 00 cmp %g1, 0
2007090: 12 80 00 03 bne 200709c <_Thread_Change_priority+0x58> <== NEVER TAKEN
2007094: 82 0e 7f fb and %i1, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2007098: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
200709c: 7f ff eb 38 call 2001d7c <sparc_enable_interrupts>
20070a0: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
20070a4: 03 00 00 ef sethi %hi(0x3bc00), %g1
20070a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
20070ac: 80 8e 40 01 btst %i1, %g1
20070b0: 02 80 00 5b be 200721c <_Thread_Change_priority+0x1d8>
20070b4: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
20070b8: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
20070bc: 40 00 03 9d call 2007f30 <_Thread_queue_Requeue>
20070c0: 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 ) ) {
20070c4: 80 a0 60 00 cmp %g1, 0
20070c8: 12 80 00 1b bne 2007134 <_Thread_Change_priority+0xf0> <== NEVER TAKEN
20070cc: 09 00 80 5a sethi %hi(0x2016800), %g4
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
20070d0: c6 04 20 90 ld [ %l0 + 0x90 ], %g3
20070d4: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2
20070d8: c2 10 c0 00 lduh [ %g3 ], %g1
20070dc: 82 10 40 02 or %g1, %g2, %g1
20070e0: c2 30 c0 00 sth %g1, [ %g3 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
20070e4: c4 11 22 58 lduh [ %g4 + 0x258 ], %g2
20070e8: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
20070ec: c0 24 20 10 clr [ %l0 + 0x10 ]
20070f0: 82 10 40 02 or %g1, %g2, %g1
20070f4: c2 31 22 58 sth %g1, [ %g4 + 0x258 ]
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
20070f8: 80 8e a0 ff btst 0xff, %i2
20070fc: 02 80 00 08 be 200711c <_Thread_Change_priority+0xd8>
2007100: c4 04 20 8c ld [ %l0 + 0x8c ], %g2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2007104: c2 00 80 00 ld [ %g2 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2007108: c4 24 20 04 st %g2, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
200710c: e0 20 80 00 st %l0, [ %g2 ]
the_node->next = before_node;
before_node->previous = the_node;
2007110: e0 20 60 04 st %l0, [ %g1 + 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;
2007114: 10 80 00 08 b 2007134 <_Thread_Change_priority+0xf0>
2007118: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200711c: 82 00 a0 04 add %g2, 4, %g1
2007120: c2 24 00 00 st %g1, [ %l0 ]
old_last_node = the_chain->last;
2007124: c2 00 a0 08 ld [ %g2 + 8 ], %g1
the_chain->last = the_node;
2007128: e0 20 a0 08 st %l0, [ %g2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200712c: 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;
2007130: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
2007134: 7f ff eb 12 call 2001d7c <sparc_enable_interrupts>
2007138: 90 10 00 18 mov %i0, %o0
200713c: 7f ff eb 0c call 2001d6c <sparc_disable_interrupts>
2007140: 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 );
2007144: 03 00 80 5a sethi %hi(0x2016800), %g1
2007148: c2 10 62 58 lduh [ %g1 + 0x258 ], %g1 ! 2016a58 <_Priority_Major_bit_map>
200714c: 05 00 80 53 sethi %hi(0x2014c00), %g2
2007150: 89 28 60 10 sll %g1, 0x10, %g4
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
2007154: 03 00 80 5a sethi %hi(0x2016800), %g1
2007158: da 00 60 f4 ld [ %g1 + 0xf4 ], %o5 ! 20168f4 <_Thread_Ready_chain>
200715c: 83 31 20 10 srl %g4, 0x10, %g1
2007160: 80 a0 60 ff cmp %g1, 0xff
2007164: 18 80 00 05 bgu 2007178 <_Thread_Change_priority+0x134>
2007168: 86 10 a2 90 or %g2, 0x290, %g3
200716c: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
2007170: 10 80 00 04 b 2007180 <_Thread_Change_priority+0x13c>
2007174: 88 00 60 08 add %g1, 8, %g4
2007178: 83 31 20 18 srl %g4, 0x18, %g1
200717c: c8 08 c0 01 ldub [ %g3 + %g1 ], %g4
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007180: 83 29 20 10 sll %g4, 0x10, %g1
2007184: 05 00 80 5a sethi %hi(0x2016800), %g2
2007188: 83 30 60 0f srl %g1, 0xf, %g1
200718c: 84 10 a2 d0 or %g2, 0x2d0, %g2
2007190: c2 10 80 01 lduh [ %g2 + %g1 ], %g1
2007194: 05 00 80 53 sethi %hi(0x2014c00), %g2
2007198: 83 28 60 10 sll %g1, 0x10, %g1
200719c: 86 10 a2 90 or %g2, 0x290, %g3
20071a0: 85 30 60 10 srl %g1, 0x10, %g2
20071a4: 80 a0 a0 ff cmp %g2, 0xff
20071a8: 38 80 00 05 bgu,a 20071bc <_Thread_Change_priority+0x178>
20071ac: 83 30 60 18 srl %g1, 0x18, %g1
20071b0: c2 08 c0 02 ldub [ %g3 + %g2 ], %g1
20071b4: 10 80 00 03 b 20071c0 <_Thread_Change_priority+0x17c>
20071b8: 82 00 60 08 add %g1, 8, %g1
20071bc: c2 08 c0 01 ldub [ %g3 + %g1 ], %g1
20071c0: 85 29 20 10 sll %g4, 0x10, %g2
20071c4: 85 30 a0 0c srl %g2, 0xc, %g2
20071c8: 83 28 60 10 sll %g1, 0x10, %g1
20071cc: 83 30 60 10 srl %g1, 0x10, %g1
20071d0: 82 00 40 02 add %g1, %g2, %g1
20071d4: 85 28 60 04 sll %g1, 4, %g2
20071d8: 83 28 60 02 sll %g1, 2, %g1
20071dc: 84 20 80 01 sub %g2, %g1, %g2
20071e0: 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 );
20071e4: 03 00 80 5a sethi %hi(0x2016800), %g1
20071e8: c6 00 62 64 ld [ %g1 + 0x264 ], %g3 ! 2016a64 <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
20071ec: 03 00 80 5a sethi %hi(0x2016800), %g1
* 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() &&
20071f0: 80 a0 c0 02 cmp %g3, %g2
20071f4: 02 80 00 08 be 2007214 <_Thread_Change_priority+0x1d0>
20071f8: c4 20 62 30 st %g2, [ %g1 + 0x230 ]
20071fc: c2 08 e0 76 ldub [ %g3 + 0x76 ], %g1
2007200: 80 a0 60 00 cmp %g1, 0
2007204: 02 80 00 04 be 2007214 <_Thread_Change_priority+0x1d0>
2007208: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
200720c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007210: c4 28 62 74 stb %g2, [ %g1 + 0x274 ] ! 2016a74 <_Context_Switch_necessary>
_ISR_Enable( level );
2007214: 7f ff ea da call 2001d7c <sparc_enable_interrupts>
2007218: 81 e8 00 00 restore
200721c: 81 c7 e0 08 ret
2007220: 81 e8 00 00 restore
02007224 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
2007224: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
2007228: 7f ff ea d1 call 2001d6c <sparc_disable_interrupts>
200722c: a0 10 00 19 mov %i1, %l0
2007230: a2 10 00 08 mov %o0, %l1
current_state = the_thread->current_state;
2007234: f2 06 20 10 ld [ %i0 + 0x10 ], %i1
if ( current_state & state ) {
2007238: 80 8c 00 19 btst %l0, %i1
200723c: 02 80 00 2c be 20072ec <_Thread_Clear_state+0xc8>
2007240: 82 2e 40 10 andn %i1, %l0, %g1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
2007244: 80 a0 60 00 cmp %g1, 0
2007248: 12 80 00 29 bne 20072ec <_Thread_Clear_state+0xc8>
200724c: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2007250: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
2007254: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
2007258: c2 11 00 00 lduh [ %g4 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
200725c: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
2007260: 82 10 40 02 or %g1, %g2, %g1
2007264: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2007268: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
200726c: 1b 00 80 5a sethi %hi(0x2016800), %o5
2007270: c2 26 00 00 st %g1, [ %i0 ]
2007274: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2
old_last_node = the_chain->last;
2007278: c2 00 e0 08 ld [ %g3 + 8 ], %g1
200727c: c8 13 62 58 lduh [ %o5 + 0x258 ], %g4
the_chain->last = the_node;
2007280: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2007284: 84 10 80 04 or %g2, %g4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
2007288: c2 26 20 04 st %g1, [ %i0 + 4 ]
200728c: c4 33 62 58 sth %g2, [ %o5 + 0x258 ]
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;
2007290: f0 20 40 00 st %i0, [ %g1 ]
_ISR_Flash( level );
2007294: 7f ff ea ba call 2001d7c <sparc_enable_interrupts>
2007298: 01 00 00 00 nop
200729c: 7f ff ea b4 call 2001d6c <sparc_disable_interrupts>
20072a0: 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 ) {
20072a4: 07 00 80 5a sethi %hi(0x2016800), %g3
20072a8: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 ! 2016a30 <_Thread_Heir>
20072ac: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
20072b0: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
20072b4: 80 a0 80 01 cmp %g2, %g1
20072b8: 1a 80 00 0d bcc 20072ec <_Thread_Clear_state+0xc8>
20072bc: 03 00 80 5a sethi %hi(0x2016800), %g1
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
20072c0: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016a64 <_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;
20072c4: f0 20 e2 30 st %i0, [ %g3 + 0x230 ]
if ( _Thread_Executing->is_preemptible ||
20072c8: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1
20072cc: 80 a0 60 00 cmp %g1, 0
20072d0: 32 80 00 05 bne,a 20072e4 <_Thread_Clear_state+0xc0>
20072d4: 84 10 20 01 mov 1, %g2
20072d8: 80 a0 a0 00 cmp %g2, 0
20072dc: 12 80 00 04 bne 20072ec <_Thread_Clear_state+0xc8> <== ALWAYS TAKEN
20072e0: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
20072e4: 03 00 80 5a sethi %hi(0x2016800), %g1
20072e8: c4 28 62 74 stb %g2, [ %g1 + 0x274 ] ! 2016a74 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
20072ec: 7f ff ea a4 call 2001d7c <sparc_enable_interrupts>
20072f0: 91 e8 00 11 restore %g0, %l1, %o0
020073dc <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
20073dc: 9d e3 bf 78 save %sp, -136, %sp
* This routine allocates an internal thread.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
20073e0: 11 00 80 5a sethi %hi(0x2016800), %o0
20073e4: 7f ff fc de call 200675c <_Objects_Allocate>
20073e8: 90 12 23 00 or %o0, 0x300, %o0 ! 2016b00 <_Thread_Internal_information>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20073ec: 05 00 80 5a sethi %hi(0x2016800), %g2
20073f0: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
/*
* The entire workspace is zeroed during its initialization. Thus, all
* fields not explicitly assigned were explicitly zeroed by
* _Workspace_Initialization.
*/
_Thread_Idle = _Thread_Internal_allocate();
20073f4: 07 00 80 5a sethi %hi(0x2016800), %g3
20073f8: 82 00 60 01 inc %g1
20073fc: d0 20 e3 4c st %o0, [ %g3 + 0x34c ]
2007400: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ]
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
2007404: 03 00 80 5a sethi %hi(0x2016800), %g1
2007408: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
200740c: d2 00 e3 4c ld [ %g3 + 0x34c ], %o1
2007410: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2007414: 03 00 80 56 sethi %hi(0x2015800), %g1
2007418: d6 00 63 f0 ld [ %g1 + 0x3f0 ], %o3 ! 2015bf0 <rtems_minimum_stack_size>
200741c: 03 00 80 54 sethi %hi(0x2015000), %g1
2007420: 82 10 60 08 or %g1, 8, %g1 ! 2015008 <C.27.3579+0x14>
2007424: 80 a2 c0 02 cmp %o3, %g2
2007428: 1a 80 00 03 bcc 2007434 <_Thread_Create_idle+0x58> <== ALWAYS TAKEN
200742c: c2 27 bf f4 st %g1, [ %fp + -12 ]
2007430: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED
2007434: 03 00 80 56 sethi %hi(0x2015800), %g1
2007438: da 08 63 f4 ldub [ %g1 + 0x3f4 ], %o5 ! 2015bf4 <rtems_maximum_priority>
200743c: 82 10 20 01 mov 1, %g1
2007440: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007444: 82 07 bf f4 add %fp, -12, %g1
2007448: c0 23 a0 60 clr [ %sp + 0x60 ]
200744c: c0 23 a0 64 clr [ %sp + 0x64 ]
2007450: c0 23 a0 68 clr [ %sp + 0x68 ]
2007454: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2007458: 94 10 20 00 clr %o2
200745c: 98 10 20 00 clr %o4
2007460: 11 00 80 5a sethi %hi(0x2016800), %o0
2007464: 40 00 00 bf call 2007760 <_Thread_Initialize>
2007468: 90 12 23 00 or %o0, 0x300, %o0 ! 2016b00 <_Thread_Internal_information>
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
_Thread_Executing = _Thread_Idle;
_Thread_Start(
200746c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007470: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2007474: 07 00 80 5a sethi %hi(0x2016800), %g3
2007478: f4 00 60 14 ld [ %g1 + 0x14 ], %i2
200747c: c2 00 e1 a0 ld [ %g3 + 0x1a0 ], %g1
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
2007480: 05 00 80 5a sethi %hi(0x2016800), %g2
2007484: 82 00 7f ff add %g1, -1, %g1
2007488: c4 00 a3 4c ld [ %g2 + 0x34c ], %g2
200748c: c2 20 e1 a0 st %g1, [ %g3 + 0x1a0 ]
2007490: 03 00 80 5a sethi %hi(0x2016800), %g1
2007494: c4 20 62 64 st %g2, [ %g1 + 0x264 ] ! 2016a64 <_Thread_Executing>
2007498: 03 00 80 5a sethi %hi(0x2016800), %g1
_Thread_Executing = _Thread_Idle;
_Thread_Start(
200749c: b0 10 00 02 mov %g2, %i0
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
20074a0: c4 20 62 30 st %g2, [ %g1 + 0x230 ]
_Thread_Executing = _Thread_Idle;
_Thread_Start(
20074a4: b2 10 20 00 clr %i1
20074a8: b6 10 20 00 clr %i3
20074ac: 40 00 03 ae call 2008364 <_Thread_Start>
20074b0: 99 e8 20 00 restore %g0, 0, %o4
020074b8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
20074b8: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
20074bc: 90 10 00 18 mov %i0, %o0
20074c0: 40 00 00 7c call 20076b0 <_Thread_Get>
20074c4: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
20074c8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20074cc: 80 a0 60 00 cmp %g1, 0
20074d0: 12 80 00 08 bne 20074f0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
20074d4: 13 04 00 ff sethi %hi(0x1003fc00), %o1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
20074d8: 7f ff ff 53 call 2007224 <_Thread_Clear_state>
20074dc: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20074e0: 05 00 80 5a sethi %hi(0x2016800), %g2
20074e4: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
20074e8: 82 00 7f ff add %g1, -1, %g1
20074ec: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ]
20074f0: 81 c7 e0 08 ret
20074f4: 81 e8 00 00 restore
020074f8 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
20074f8: 9d e3 bf 88 save %sp, -120, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
20074fc: 21 00 80 5a sethi %hi(0x2016800), %l0
2007500: e2 04 22 64 ld [ %l0 + 0x264 ], %l1 ! 2016a64 <_Thread_Executing>
_ISR_Disable( level );
2007504: 7f ff ea 1a call 2001d6c <sparc_disable_interrupts>
2007508: a0 14 22 64 or %l0, 0x264, %l0
while ( _Context_Switch_necessary == TRUE ) {
200750c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007510: ac 10 62 74 or %g1, 0x274, %l6 ! 2016a74 <_Context_Switch_necessary>
heir = _Thread_Heir;
2007514: 03 00 80 5a sethi %hi(0x2016800), %g1
2007518: b0 10 62 30 or %g1, 0x230, %i0 ! 2016a30 <_Thread_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 )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200751c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007520: b2 10 60 f8 or %g1, 0xf8, %i1 ! 20168f8 <_Thread_Ticks_per_timeslice>
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007524: 03 00 80 5a sethi %hi(0x2016800), %g1
2007528: a4 10 62 6c or %g1, 0x26c, %l2 ! 2016a6c <_Thread_Time_of_last_context_switch>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
200752c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007530: 2f 00 80 5a sethi %hi(0x2016800), %l7
2007534: b4 10 62 2c or %g1, 0x22c, %i2
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
_Thread_Executing = heir;
2007538: ba 10 00 10 mov %l0, %i5
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200753c: 03 00 80 5a sethi %hi(0x2016800), %g1
2007540: b6 15 e1 a0 or %l7, 0x1a0, %i3
2007544: aa 10 62 28 or %g1, 0x228, %l5
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
2007548: b8 10 20 01 mov 1, %i4
_ISR_Enable( level );
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
200754c: a8 07 bf f0 add %fp, -16, %l4
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007550: 10 80 00 37 b 200762c <_Thread_Dispatch+0x134>
2007554: a6 07 bf e8 add %fp, -24, %l3
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
2007558: f8 26 c0 00 st %i4, [ %i3 ]
_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 )
200755c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
2007560: c0 2d 80 00 clrb [ %l6 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2007564: 80 a0 60 01 cmp %g1, 1
2007568: 12 80 00 04 bne 2007578 <_Thread_Dispatch+0x80>
200756c: e0 27 40 00 st %l0, [ %i5 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007570: c2 06 40 00 ld [ %i1 ], %g1
2007574: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
_ISR_Enable( level );
2007578: 7f ff ea 01 call 2001d7c <sparc_enable_interrupts>
200757c: 01 00 00 00 nop
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
2007580: 40 00 0f 00 call 200b180 <_TOD_Get_uptime>
2007584: 90 10 00 14 mov %l4, %o0
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007588: 90 10 00 12 mov %l2, %o0
200758c: 92 10 00 14 mov %l4, %o1
2007590: 40 00 03 f3 call 200855c <_Timespec_Subtract>
2007594: 94 10 00 13 mov %l3, %o2
_Timespec_Add_to( &executing->cpu_time_used, &ran );
2007598: 90 04 60 84 add %l1, 0x84, %o0
200759c: 40 00 03 d8 call 20084fc <_Timespec_Add_to>
20075a0: 92 10 00 13 mov %l3, %o1
_Thread_Time_of_last_context_switch = uptime;
20075a4: c2 07 bf f0 ld [ %fp + -16 ], %g1
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
20075a8: c4 06 80 00 ld [ %i2 ], %g2
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
_Timespec_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
20075ac: c2 24 80 00 st %g1, [ %l2 ]
20075b0: c2 07 bf f4 ld [ %fp + -12 ], %g1
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
20075b4: 80 a0 a0 00 cmp %g2, 0
20075b8: 02 80 00 06 be 20075d0 <_Thread_Dispatch+0xd8> <== NEVER TAKEN
20075bc: c2 24 a0 04 st %g1, [ %l2 + 4 ]
executing->libc_reent = *_Thread_libc_reent;
20075c0: c2 00 80 00 ld [ %g2 ], %g1
20075c4: c2 24 61 64 st %g1, [ %l1 + 0x164 ]
*_Thread_libc_reent = heir->libc_reent;
20075c8: c2 04 21 64 ld [ %l0 + 0x164 ], %g1
20075cc: c2 20 80 00 st %g1, [ %g2 ]
}
_User_extensions_Thread_switch( executing, heir );
20075d0: 90 10 00 11 mov %l1, %o0
20075d4: 40 00 04 90 call 2008814 <_User_extensions_Thread_switch>
20075d8: 92 10 00 10 mov %l0, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
20075dc: 92 04 20 d8 add %l0, 0xd8, %o1
20075e0: 40 00 05 c0 call 2008ce0 <_CPU_Context_switch>
20075e4: 90 04 60 d8 add %l1, 0xd8, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
20075e8: c2 04 61 60 ld [ %l1 + 0x160 ], %g1
20075ec: 80 a0 60 00 cmp %g1, 0
20075f0: 02 80 00 0d be 2007624 <_Thread_Dispatch+0x12c>
20075f4: 01 00 00 00 nop
20075f8: d0 05 40 00 ld [ %l5 ], %o0
20075fc: 80 a4 40 08 cmp %l1, %o0
2007600: 02 80 00 09 be 2007624 <_Thread_Dispatch+0x12c>
2007604: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2007608: 02 80 00 04 be 2007618 <_Thread_Dispatch+0x120>
200760c: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
2007610: 40 00 05 7a call 2008bf8 <_CPU_Context_save_fp>
2007614: 90 02 21 60 add %o0, 0x160, %o0
_Context_Restore_fp( &executing->fp_context );
2007618: 40 00 05 95 call 2008c6c <_CPU_Context_restore_fp>
200761c: 90 04 61 60 add %l1, 0x160, %o0
_Thread_Allocated_fp = executing;
2007620: e2 25 40 00 st %l1, [ %l5 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
2007624: 7f ff e9 d2 call 2001d6c <sparc_disable_interrupts>
2007628: e2 07 40 00 ld [ %i5 ], %l1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
200762c: c2 0d 80 00 ldub [ %l6 ], %g1
2007630: 80 a0 60 00 cmp %g1, 0
2007634: 32 bf ff c9 bne,a 2007558 <_Thread_Dispatch+0x60>
2007638: e0 06 00 00 ld [ %i0 ], %l0
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
200763c: c0 25 e1 a0 clr [ %l7 + 0x1a0 ]
_ISR_Enable( level );
2007640: 7f ff e9 cf call 2001d7c <sparc_enable_interrupts>
2007644: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
2007648: 03 00 80 5a sethi %hi(0x2016800), %g1
200764c: c2 00 62 48 ld [ %g1 + 0x248 ], %g1 ! 2016a48 <_Thread_Do_post_task_switch_extension>
2007650: 80 a0 60 00 cmp %g1, 0
2007654: 12 80 00 06 bne 200766c <_Thread_Dispatch+0x174> <== NEVER TAKEN
2007658: 01 00 00 00 nop
200765c: c2 0c 60 75 ldub [ %l1 + 0x75 ], %g1
2007660: 80 a0 60 00 cmp %g1, 0
2007664: 02 80 00 04 be 2007674 <_Thread_Dispatch+0x17c>
2007668: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
200766c: 7f ff f9 d5 call 2005dc0 <_API_extensions_Run_postswitch>
2007670: c0 2c 60 75 clrb [ %l1 + 0x75 ]
2007674: 81 c7 e0 08 ret
2007678: 81 e8 00 00 restore
0200c200 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
200c200: 03 00 80 5a sethi %hi(0x2016800), %g1
200c204: c4 00 62 64 ld [ %g1 + 0x264 ], %g2 ! 2016a64 <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
200c208: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200c20c: 80 a0 60 00 cmp %g1, 0
200c210: 32 80 00 0b bne,a 200c23c <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
200c214: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
200c218: 03 00 80 5a sethi %hi(0x2016800), %g1
200c21c: c2 00 62 30 ld [ %g1 + 0x230 ], %g1 ! 2016a30 <_Thread_Heir>
200c220: 80 a0 80 01 cmp %g2, %g1
200c224: 02 80 00 0b be 200c250 <_Thread_Evaluate_mode+0x50>
200c228: 01 00 00 00 nop
200c22c: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1
200c230: 80 a0 60 00 cmp %g1, 0
200c234: 02 80 00 07 be 200c250 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
200c238: 84 10 20 01 mov 1, %g2
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
200c23c: 03 00 80 5a sethi %hi(0x2016800), %g1
200c240: 90 10 20 01 mov 1, %o0
200c244: c4 28 62 74 stb %g2, [ %g1 + 0x274 ]
200c248: 81 c3 e0 08 retl
200c24c: 01 00 00 00 nop
return TRUE;
}
return FALSE;
}
200c250: 81 c3 e0 08 retl
200c254: 90 10 20 00 clr %o0 ! 0 <PROM_START>
020076b0 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
20076b0: 88 10 00 08 mov %o0, %g4
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
20076b4: 80 a2 20 00 cmp %o0, 0
20076b8: 12 80 00 0a bne 20076e0 <_Thread_Get+0x30>
20076bc: 94 10 00 09 mov %o1, %o2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20076c0: 03 00 80 5a sethi %hi(0x2016800), %g1
20076c4: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 20169a0 <_Thread_Dispatch_disable_level>
20076c8: 84 00 a0 01 inc %g2
20076cc: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ]
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
20076d0: 03 00 80 5a sethi %hi(0x2016800), %g1
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
20076d4: c0 22 40 00 clr [ %o1 ]
tp = _Thread_Executing;
20076d8: 81 c3 e0 08 retl
20076dc: d0 00 62 64 ld [ %g1 + 0x264 ], %o0
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
20076e0: 83 32 20 18 srl %o0, 0x18, %g1
20076e4: 84 08 60 07 and %g1, 7, %g2
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
20076e8: 82 00 bf ff add %g2, -1, %g1
20076ec: 80 a0 60 03 cmp %g1, 3
20076f0: 08 80 00 16 bleu 2007748 <_Thread_Get+0x98>
20076f4: 87 32 20 1b srl %o0, 0x1b, %g3
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
20076f8: 82 10 20 01 mov 1, %g1
20076fc: 10 80 00 09 b 2007720 <_Thread_Get+0x70>
2007700: c2 22 80 00 st %g1, [ %o2 ]
goto done;
}
api_information = _Objects_Information_table[ the_api ];
2007704: 03 00 80 5a sethi %hi(0x2016800), %g1
2007708: 82 10 61 00 or %g1, 0x100, %g1 ! 2016900 <_Objects_Information_table>
200770c: c2 00 40 02 ld [ %g1 + %g2 ], %g1
if ( !api_information ) {
2007710: 80 a0 60 00 cmp %g1, 0
2007714: 32 80 00 05 bne,a 2007728 <_Thread_Get+0x78>
2007718: d0 00 60 04 ld [ %g1 + 4 ], %o0
*location = OBJECTS_ERROR;
200771c: c6 22 80 00 st %g3, [ %o2 ]
2007720: 81 c3 e0 08 retl
2007724: 90 10 20 00 clr %o0
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
2007728: 80 a2 20 00 cmp %o0, 0
200772c: 12 80 00 04 bne 200773c <_Thread_Get+0x8c> <== ALWAYS TAKEN
2007730: 92 10 00 04 mov %g4, %o1
*location = OBJECTS_ERROR;
2007734: 81 c3 e0 08 retl <== NOT EXECUTED
2007738: c6 22 80 00 st %g3, [ %o2 ] <== NOT EXECUTED
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
200773c: 82 13 c0 00 mov %o7, %g1
2007740: 7f ff fd 61 call 2006cc4 <_Objects_Get>
2007744: 9e 10 40 00 mov %g1, %o7
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
2007748: 80 a0 e0 01 cmp %g3, 1
200774c: 22 bf ff ee be,a 2007704 <_Thread_Get+0x54>
2007750: 85 28 a0 02 sll %g2, 2, %g2
*location = OBJECTS_ERROR;
2007754: 10 bf ff ea b 20076fc <_Thread_Get+0x4c>
2007758: 82 10 20 01 mov 1, %g1
0200c258 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200c258: 9d e3 bf 98 save %sp, -104, %sp
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
200c25c: 03 00 80 5a sethi %hi(0x2016800), %g1
200c260: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2016a64 <_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();
200c264: 3f 00 80 30 sethi %hi(0x200c000), %i7
200c268: be 17 e2 58 or %i7, 0x258, %i7 ! 200c258 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200c26c: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
200c270: 7f ff d6 c3 call 2001d7c <sparc_enable_interrupts>
200c274: 91 2a 20 08 sll %o0, 8, %o0
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
doneConstructors = 1;
200c278: 82 10 20 01 mov 1, %g1
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
200c27c: 05 00 80 59 sethi %hi(0x2016400), %g2
200c280: e2 08 a2 b8 ldub [ %g2 + 0x2b8 ], %l1 ! 20166b8 <doneConstructors.4134>
doneConstructors = 1;
200c284: c2 28 a2 b8 stb %g1, [ %g2 + 0x2b8 ]
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
200c288: c2 04 21 60 ld [ %l0 + 0x160 ], %g1
200c28c: 80 a0 60 00 cmp %g1, 0
200c290: 02 80 00 0c be 200c2c0 <_Thread_Handler+0x68>
200c294: 03 00 80 5a sethi %hi(0x2016800), %g1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200c298: d0 00 62 28 ld [ %g1 + 0x228 ], %o0 ! 2016a28 <_Thread_Allocated_fp>
200c29c: 80 a4 00 08 cmp %l0, %o0
200c2a0: 02 80 00 08 be 200c2c0 <_Thread_Handler+0x68>
200c2a4: 80 a2 20 00 cmp %o0, 0
if ( _Thread_Allocated_fp != NULL )
200c2a8: 22 80 00 06 be,a 200c2c0 <_Thread_Handler+0x68>
200c2ac: e0 20 62 28 st %l0, [ %g1 + 0x228 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200c2b0: 7f ff f2 52 call 2008bf8 <_CPU_Context_save_fp>
200c2b4: 90 02 21 60 add %o0, 0x160, %o0
_Thread_Allocated_fp = executing;
200c2b8: 03 00 80 5a sethi %hi(0x2016800), %g1
200c2bc: e0 20 62 28 st %l0, [ %g1 + 0x228 ] ! 2016a28 <_Thread_Allocated_fp>
* 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 );
200c2c0: 7f ff f0 e2 call 2008648 <_User_extensions_Thread_begin>
200c2c4: 90 10 00 10 mov %l0, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200c2c8: 7f ff ec ed call 200767c <_Thread_Enable_dispatch>
200c2cc: 01 00 00 00 nop
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */
200c2d0: 83 2c 60 18 sll %l1, 0x18, %g1
200c2d4: 80 a0 60 00 cmp %g1, 0
200c2d8: 32 80 00 05 bne,a 200c2ec <_Thread_Handler+0x94>
200c2dc: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
{
_init ();
200c2e0: 40 00 26 0a call 2015b08 <_init>
200c2e4: 01 00 00 00 nop
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
200c2e8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200c2ec: 80 a0 60 01 cmp %g1, 1
200c2f0: 22 80 00 0d be,a 200c324 <_Thread_Handler+0xcc> <== NEVER TAKEN
200c2f4: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
200c2f8: 2a 80 00 09 bcs,a 200c31c <_Thread_Handler+0xc4> <== ALWAYS TAKEN
200c2fc: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200c300: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200c304: 02 80 00 0d be 200c338 <_Thread_Handler+0xe0> <== NOT EXECUTED
200c308: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
200c30c: 12 80 00 14 bne 200c35c <_Thread_Handler+0x104> <== NOT EXECUTED
200c310: 01 00 00 00 nop <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200c314: 10 80 00 0d b 200c348 <_Thread_Handler+0xf0> <== NOT EXECUTED
200c318: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
__main ();
#endif
switch ( executing->Start.prototype ) {
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
200c31c: 10 80 00 03 b 200c328 <_Thread_Handler+0xd0>
200c320: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
break;
case THREAD_START_POINTER:
executing->Wait.return_argument =
200c324: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED
200c328: 9f c0 40 00 call %g1
200c32c: 01 00 00 00 nop
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200c330: 10 80 00 0b b 200c35c <_Thread_Handler+0x104>
200c334: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
200c338: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
200c33c: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED
200c340: 10 80 00 04 b 200c350 <_Thread_Handler+0xf8> <== NOT EXECUTED
200c344: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200c348: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED
200c34c: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED
200c350: 9f c0 40 00 call %g1 <== NOT EXECUTED
200c354: 01 00 00 00 nop <== NOT EXECUTED
200c358: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED
* 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 );
200c35c: 7f ff f0 cc call 200868c <_User_extensions_Thread_exitted>
200c360: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
200c364: 90 10 20 00 clr %o0
200c368: 92 10 20 01 mov 1, %o1
200c36c: 7f ff e8 cd call 20066a0 <_Internal_error_Occurred>
200c370: 94 10 20 06 mov 6, %o2
02007760 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007760: 9d e3 bf 98 save %sp, -104, %sp
2007764: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007768: 80 a6 a0 00 cmp %i2, 0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200776c: e2 00 40 00 ld [ %g1 ], %l1
2007770: e4 07 a0 60 ld [ %fp + 0x60 ], %l2
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007774: 12 80 00 0e bne 20077ac <_Thread_Initialize+0x4c> <== NEVER TAKEN
2007778: e0 0f a0 5f ldub [ %fp + 0x5f ], %l0
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200777c: 90 10 00 19 mov %i1, %o0
2007780: 40 00 02 ba call 2008268 <_Thread_Stack_Allocate>
2007784: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
2007788: 80 a2 20 00 cmp %o0, 0
200778c: 02 80 00 2d be 2007840 <_Thread_Initialize+0xe0>
2007790: 80 a2 00 1b cmp %o0, %i3
2007794: 0a 80 00 2b bcs 2007840 <_Thread_Initialize+0xe0> <== NEVER TAKEN
2007798: 01 00 00 00 nop
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = TRUE;
200779c: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
20077a0: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2
the_thread->Start.core_allocated_stack = TRUE;
20077a4: 10 80 00 04 b 20077b4 <_Thread_Initialize+0x54>
20077a8: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ]
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = FALSE;
20077ac: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED
20077b0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
20077b4: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ]
the_stack->size = size;
20077b8: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
20077bc: 80 8f 20 ff btst 0xff, %i4
20077c0: 02 80 00 07 be 20077dc <_Thread_Initialize+0x7c>
20077c4: b8 10 20 00 clr %i4
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
20077c8: 40 00 04 d8 call 2008b28 <_Workspace_Allocate>
20077cc: 90 10 20 88 mov 0x88, %o0
if ( !fp_area ) {
20077d0: b8 92 20 00 orcc %o0, 0, %i4
20077d4: 02 80 00 19 be 2007838 <_Thread_Initialize+0xd8> <== NEVER TAKEN
20077d8: 01 00 00 00 nop
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
20077dc: 03 00 80 5a sethi %hi(0x2016800), %g1
20077e0: d0 00 62 44 ld [ %g1 + 0x244 ], %o0 ! 2016a44 <_Thread_Maximum_extensions>
fp_area = _Context_Fp_start( fp_area, 0 );
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
20077e4: f8 26 61 60 st %i4, [ %i1 + 0x160 ]
the_thread->Start.fp_context = fp_area;
20077e8: f8 26 60 cc st %i4, [ %i1 + 0xcc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20077ec: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
20077f0: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
20077f4: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
20077f8: c0 26 60 6c clr [ %i1 + 0x6c ]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
20077fc: c0 26 61 64 clr [ %i1 + 0x164 ]
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007800: 80 a2 20 00 cmp %o0, 0
2007804: 02 80 00 11 be 2007848 <_Thread_Initialize+0xe8>
2007808: b6 10 20 00 clr %i3
extensions_area = _Workspace_Allocate(
200780c: 90 02 20 01 inc %o0
2007810: 40 00 04 c6 call 2008b28 <_Workspace_Allocate>
2007814: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
2007818: b6 92 20 00 orcc %o0, 0, %i3
200781c: 12 80 00 0c bne 200784c <_Thread_Initialize+0xec> <== ALWAYS TAKEN
2007820: 80 a6 e0 00 cmp %i3, 0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
2007824: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
2007828: 02 80 00 04 be 2007838 <_Thread_Initialize+0xd8> <== NOT EXECUTED
200782c: 01 00 00 00 nop <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
2007830: 40 00 04 b7 call 2008b0c <_Workspace_Free> <== NOT EXECUTED
2007834: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
2007838: 40 00 02 a4 call 20082c8 <_Thread_Stack_Free> <== NOT EXECUTED
200783c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2007840: 81 c7 e0 08 ret
2007844: 91 e8 20 00 restore %g0, 0, %o0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
2007848: 80 a6 e0 00 cmp %i3, 0
200784c: 02 80 00 0e be 2007884 <_Thread_Initialize+0x124>
2007850: f6 26 61 74 st %i3, [ %i1 + 0x174 ]
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007854: 03 00 80 5a sethi %hi(0x2016800), %g1
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
2007858: 84 10 20 00 clr %g2
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
200785c: 10 80 00 05 b 2007870 <_Thread_Initialize+0x110>
2007860: 88 10 62 44 or %g1, 0x244, %g4
the_thread->extensions[i] = NULL;
2007864: c2 06 61 74 ld [ %i1 + 0x174 ], %g1
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007868: 84 00 a0 01 inc %g2
the_thread->extensions[i] = NULL;
200786c: c0 20 40 03 clr [ %g1 + %g3 ]
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007870: c2 01 00 00 ld [ %g4 ], %g1
2007874: 82 00 60 01 inc %g1
2007878: 80 a0 80 01 cmp %g2, %g1
200787c: 0a bf ff fa bcs 2007864 <_Thread_Initialize+0x104>
2007880: 87 28 a0 02 sll %g2, 2, %g3
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007884: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2007888: e0 2e 60 ac stb %l0, [ %i1 + 0xac ]
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
200788c: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
switch ( budget_algorithm ) {
2007890: 80 a4 a0 02 cmp %l2, 2
2007894: 12 80 00 05 bne 20078a8 <_Thread_Initialize+0x148> <== ALWAYS TAKEN
2007898: e4 26 60 b0 st %l2, [ %i1 + 0xb0 ]
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200789c: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED
20078a0: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 20168f8 <_Thread_Ticks_per_timeslice><== NOT EXECUTED
20078a4: c2 26 60 78 st %g1, [ %i1 + 0x78 ] <== NOT EXECUTED
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
20078a8: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
20078ac: 92 10 00 1d mov %i5, %o1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
20078b0: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
20078b4: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
20078b8: 90 10 00 19 mov %i1, %o0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
20078bc: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
20078c0: c0 26 60 44 clr [ %i1 + 0x44 ]
the_thread->resource_count = 0;
20078c4: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->suspend_count = 0;
20078c8: c0 26 60 70 clr [ %i1 + 0x70 ]
the_thread->real_priority = priority;
20078cc: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
20078d0: 40 00 01 c5 call 2007fe4 <_Thread_Set_priority>
20078d4: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20078d8: c4 06 60 08 ld [ %i1 + 8 ], %g2
20078dc: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
20078e0: 03 00 00 3f sethi %hi(0xfc00), %g1
20078e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20078e8: 84 08 80 01 and %g2, %g1, %g2
20078ec: 85 28 a0 02 sll %g2, 2, %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20078f0: e2 26 60 0c st %l1, [ %i1 + 0xc ]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
20078f4: c0 26 60 84 clr [ %i1 + 0x84 ]
the_thread->cpu_time_used.tv_nsec = 0;
20078f8: c0 26 60 88 clr [ %i1 + 0x88 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20078fc: f2 20 c0 02 st %i1, [ %g3 + %g2 ]
* 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 );
2007900: 90 10 00 19 mov %i1, %o0
2007904: 40 00 03 86 call 200871c <_User_extensions_Thread_create>
2007908: b0 10 20 01 mov 1, %i0
if ( !extension_status ) {
200790c: 80 8a 20 ff btst 0xff, %o0
2007910: 12 80 00 0e bne 2007948 <_Thread_Initialize+0x1e8> <== ALWAYS TAKEN
2007914: 80 a6 e0 00 cmp %i3, 0
if ( extensions_area )
2007918: 02 80 00 05 be 200792c <_Thread_Initialize+0x1cc> <== NOT EXECUTED
200791c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
2007920: 40 00 04 7b call 2008b0c <_Workspace_Free> <== NOT EXECUTED
2007924: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
2007928: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
200792c: 02 80 00 05 be 2007940 <_Thread_Initialize+0x1e0> <== NOT EXECUTED
2007930: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
2007934: 40 00 04 76 call 2008b0c <_Workspace_Free> <== NOT EXECUTED
2007938: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
200793c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2007940: 40 00 02 62 call 20082c8 <_Thread_Stack_Free> <== NOT EXECUTED
2007944: b0 10 20 00 clr %i0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
2007948: 81 c7 e0 08 ret
200794c: 81 e8 00 00 restore
0200c660 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
200c660: 9d e3 bf 98 save %sp, -104, %sp
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200c664: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200c668: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200c66c: c4 26 20 7c st %g2, [ %i0 + 0x7c ]
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200c670: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200c674: c6 26 20 80 st %g3, [ %i0 + 0x80 ]
the_thread->Start.pointer_argument = pointer_argument;
200c678: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ]
the_thread->Start.numeric_argument = numeric_argument;
200c67c: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ]
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
200c680: c0 26 20 1c clr [ %i0 + 0x1c ]
the_thread->suspend_count = 0;
200c684: c0 26 20 70 clr [ %i0 + 0x70 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
200c688: 7f ff f0 eb call 2008a34 <_Thread_queue_Extract_with_proxy>
200c68c: 90 10 00 18 mov %i0, %o0
200c690: 80 8a 20 ff btst 0xff, %o0
200c694: 32 80 00 09 bne,a 200c6b8 <_Thread_Reset+0x58>
200c698: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
if ( _Watchdog_Is_active( &the_thread->Timer ) )
200c69c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200c6a0: 80 a0 60 02 cmp %g1, 2
200c6a4: 32 80 00 05 bne,a 200c6b8 <_Thread_Reset+0x58> <== ALWAYS TAKEN
200c6a8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
(void) _Watchdog_Remove( &the_thread->Timer );
200c6ac: 7f ff f3 ef call 2009668 <_Watchdog_Remove> <== NOT EXECUTED
200c6b0: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
200c6b4: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED
200c6b8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200c6bc: 80 a0 40 19 cmp %g1, %i1
200c6c0: 02 80 00 05 be 200c6d4 <_Thread_Reset+0x74>
200c6c4: 01 00 00 00 nop
the_thread->real_priority = the_thread->Start.initial_priority;
200c6c8: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
200c6cc: 7f ff f1 5e call 2008c44 <_Thread_Set_priority>
200c6d0: 81 e8 00 00 restore
200c6d4: 81 c7 e0 08 ret
200c6d8: 81 e8 00 00 restore
0200b920 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
200b920: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
200b924: 03 00 80 5a sethi %hi(0x2016800), %g1
200b928: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2016a64 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
200b92c: 7f ff d9 10 call 2001d6c <sparc_disable_interrupts>
200b930: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
200b934: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
200b938: c4 04 40 00 ld [ %l1 ], %g2
200b93c: c2 04 60 08 ld [ %l1 + 8 ], %g1
200b940: 80 a0 80 01 cmp %g2, %g1
200b944: 32 80 00 03 bne,a 200b950 <_Thread_Reset_timeslice+0x30>
200b948: c6 04 00 00 ld [ %l0 ], %g3
_ISR_Enable( level );
200b94c: 30 80 00 18 b,a 200b9ac <_Thread_Reset_timeslice+0x8c>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200b950: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200b954: 82 04 60 04 add %l1, 4, %g1
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
200b958: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200b95c: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200b960: c4 20 e0 04 st %g2, [ %g3 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
200b964: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200b968: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200b96c: 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;
200b970: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
200b974: 7f ff d9 02 call 2001d7c <sparc_enable_interrupts>
200b978: 01 00 00 00 nop
200b97c: 7f ff d8 fc call 2001d6c <sparc_disable_interrupts>
200b980: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
200b984: 05 00 80 5a sethi %hi(0x2016800), %g2
200b988: c2 00 a2 30 ld [ %g2 + 0x230 ], %g1 ! 2016a30 <_Thread_Heir>
200b98c: 80 a4 00 01 cmp %l0, %g1
200b990: 32 80 00 05 bne,a 200b9a4 <_Thread_Reset_timeslice+0x84> <== NEVER TAKEN
200b994: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED
_Thread_Heir = (Thread_Control *) ready->first;
200b998: c2 04 40 00 ld [ %l1 ], %g1
200b99c: c2 20 a2 30 st %g1, [ %g2 + 0x230 ]
_Context_Switch_necessary = TRUE;
200b9a0: 84 10 20 01 mov 1, %g2
200b9a4: 03 00 80 5a sethi %hi(0x2016800), %g1
200b9a8: c4 28 62 74 stb %g2, [ %g1 + 0x274 ] ! 2016a74 <_Context_Switch_necessary>
_ISR_Enable( level );
200b9ac: 7f ff d8 f4 call 2001d7c <sparc_enable_interrupts>
200b9b0: 81 e8 00 00 restore
02009994 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
2009994: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
2009998: 7f ff e4 68 call 2002b38 <sparc_disable_interrupts>
200999c: 01 00 00 00 nop
20099a0: a0 10 00 08 mov %o0, %l0
if ( force == TRUE )
20099a4: 80 8e 60 ff btst 0xff, %i1
20099a8: 22 80 00 04 be,a 20099b8 <_Thread_Resume+0x24> <== NEVER TAKEN
20099ac: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED
the_thread->suspend_count = 0;
20099b0: 10 80 00 04 b 20099c0 <_Thread_Resume+0x2c>
20099b4: c0 26 20 70 clr [ %i0 + 0x70 ]
else
the_thread->suspend_count--;
20099b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
20099bc: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
20099c0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1
20099c4: 80 a0 60 00 cmp %g1, 0
20099c8: 22 80 00 03 be,a 20099d4 <_Thread_Resume+0x40> <== ALWAYS TAKEN
20099cc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
_ISR_Enable( level );
20099d0: 30 80 00 2e b,a 2009a88 <_Thread_Resume+0xf4> <== NOT EXECUTED
return;
}
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
20099d4: 80 88 60 02 btst 2, %g1
20099d8: 02 80 00 2c be 2009a88 <_Thread_Resume+0xf4> <== NEVER TAKEN
20099dc: 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 ) ) {
20099e0: 80 a0 60 00 cmp %g1, 0
20099e4: 12 80 00 29 bne 2009a88 <_Thread_Resume+0xf4>
20099e8: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
20099ec: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
20099f0: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
20099f4: c2 11 00 00 lduh [ %g4 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
20099f8: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
20099fc: 82 10 40 02 or %g1, %g2, %g1
2009a00: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2009a04: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2009a08: 1b 00 80 8b sethi %hi(0x2022c00), %o5
2009a0c: c2 26 00 00 st %g1, [ %i0 ]
2009a10: c4 16 20 94 lduh [ %i0 + 0x94 ], %g2
old_last_node = the_chain->last;
2009a14: c2 00 e0 08 ld [ %g3 + 8 ], %g1
2009a18: c8 13 63 38 lduh [ %o5 + 0x338 ], %g4
the_chain->last = the_node;
2009a1c: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2009a20: 84 10 80 04 or %g2, %g4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
2009a24: c2 26 20 04 st %g1, [ %i0 + 4 ]
2009a28: c4 33 63 38 sth %g2, [ %o5 + 0x338 ]
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;
2009a2c: f0 20 40 00 st %i0, [ %g1 ]
_ISR_Flash( level );
2009a30: 7f ff e4 46 call 2002b48 <sparc_enable_interrupts>
2009a34: 90 10 00 10 mov %l0, %o0
2009a38: 7f ff e4 40 call 2002b38 <sparc_disable_interrupts>
2009a3c: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
2009a40: 07 00 80 8b sethi %hi(0x2022c00), %g3
2009a44: c2 00 e3 10 ld [ %g3 + 0x310 ], %g1 ! 2022f10 <_Thread_Heir>
2009a48: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
2009a4c: c2 00 60 14 ld [ %g1 + 0x14 ], %g1
2009a50: 80 a0 80 01 cmp %g2, %g1
2009a54: 1a 80 00 0d bcc 2009a88 <_Thread_Resume+0xf4>
2009a58: 03 00 80 8b sethi %hi(0x2022c00), %g1
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2009a5c: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 2022f44 <_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;
2009a60: f0 20 e3 10 st %i0, [ %g3 + 0x310 ]
if ( _Thread_Executing->is_preemptible ||
2009a64: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1
2009a68: 80 a0 60 00 cmp %g1, 0
2009a6c: 32 80 00 05 bne,a 2009a80 <_Thread_Resume+0xec>
2009a70: 84 10 20 01 mov 1, %g2
2009a74: 80 a0 a0 00 cmp %g2, 0
2009a78: 12 80 00 04 bne 2009a88 <_Thread_Resume+0xf4> <== ALWAYS TAKEN
2009a7c: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
2009a80: 03 00 80 8b sethi %hi(0x2022c00), %g1
2009a84: c4 28 63 54 stb %g2, [ %g1 + 0x354 ] ! 2022f54 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
2009a88: 7f ff e4 30 call 2002b48 <sparc_enable_interrupts>
2009a8c: 91 e8 00 10 restore %g0, %l0, %o0
02008268 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
2008268: 9d e3 bf 98 save %sp, -104, %sp
200826c: 03 00 80 56 sethi %hi(0x2015800), %g1
2008270: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 2015bf0 <rtems_minimum_stack_size>
2008274: 80 a6 40 01 cmp %i1, %g1
2008278: 2a 80 00 02 bcs,a 2008280 <_Thread_Stack_Allocate+0x18>
200827c: b2 10 00 01 mov %g1, %i1
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
2008280: 03 00 80 5a sethi %hi(0x2016800), %g1
2008284: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
2008288: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
200828c: 80 a0 60 00 cmp %g1, 0
2008290: 22 80 00 06 be,a 20082a8 <_Thread_Stack_Allocate+0x40> <== ALWAYS TAKEN
2008294: b2 06 60 10 add %i1, 0x10, %i1
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
2008298: 9f c0 40 00 call %g1 <== NOT EXECUTED
200829c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
20082a0: 10 80 00 05 b 20082b4 <_Thread_Stack_Allocate+0x4c> <== NOT EXECUTED
20082a4: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
20082a8: 40 00 02 20 call 2008b28 <_Workspace_Allocate>
20082ac: 90 10 00 19 mov %i1, %o0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
20082b0: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ]
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
20082b4: 80 a0 00 08 cmp %g0, %o0
20082b8: b0 60 20 00 subx %g0, 0, %i0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
20082bc: b0 0e 40 18 and %i1, %i0, %i0
20082c0: 81 c7 e0 08 ret
20082c4: 81 e8 00 00 restore
020082c8 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
20082c8: 9d e3 bf 98 save %sp, -104, %sp
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
20082cc: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1
20082d0: 80 a0 60 00 cmp %g1, 0
20082d4: 02 80 00 09 be 20082f8 <_Thread_Stack_Free+0x30> <== NEVER TAKEN
20082d8: 03 00 80 5a sethi %hi(0x2016800), %g1
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( _Configuration_Table->stack_free_hook )
20082dc: c2 00 62 3c ld [ %g1 + 0x23c ], %g1 ! 2016a3c <_Configuration_Table>
20082e0: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
20082e4: 80 a0 60 00 cmp %g1, 0
20082e8: 02 80 00 06 be 2008300 <_Thread_Stack_Free+0x38> <== ALWAYS TAKEN
20082ec: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0
(*_Configuration_Table->stack_free_hook)(
20082f0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20082f4: 01 00 00 00 nop <== NOT EXECUTED
20082f8: 81 c7 e0 08 ret <== NOT EXECUTED
20082fc: 81 e8 00 00 restore <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
2008300: 40 00 02 03 call 2008b0c <_Workspace_Free>
2008304: 91 e8 00 08 restore %g0, %o0, %o0
020083b0 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
20083b0: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
executing = _Thread_Executing;
20083b4: 03 00 80 5a sethi %hi(0x2016800), %g1
20083b8: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2016a64 <_Thread_Executing>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
20083bc: c2 0c 20 76 ldub [ %l0 + 0x76 ], %g1
20083c0: 80 a0 60 00 cmp %g1, 0
20083c4: 02 80 00 23 be 2008450 <_Thread_Tickle_timeslice+0xa0>
20083c8: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
20083cc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20083d0: 80 a0 60 00 cmp %g1, 0
20083d4: 12 80 00 1f bne 2008450 <_Thread_Tickle_timeslice+0xa0>
20083d8: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
20083dc: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
20083e0: 80 a0 60 01 cmp %g1, 1
20083e4: 0a 80 00 12 bcs 200842c <_Thread_Tickle_timeslice+0x7c>
20083e8: 80 a0 60 02 cmp %g1, 2
20083ec: 28 80 00 07 bleu,a 2008408 <_Thread_Tickle_timeslice+0x58><== ALWAYS TAKEN
20083f0: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
20083f4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
20083f8: 12 80 00 16 bne 2008450 <_Thread_Tickle_timeslice+0xa0> <== NOT EXECUTED
20083fc: 01 00 00 00 nop <== NOT EXECUTED
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2008400: 10 80 00 0d b 2008434 <_Thread_Tickle_timeslice+0x84> <== NOT EXECUTED
2008404: c2 04 20 78 ld [ %l0 + 0x78 ], %g1 <== NOT EXECUTED
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
2008408: 82 00 7f ff add %g1, -1, %g1
200840c: 80 a0 60 00 cmp %g1, 0
2008410: 14 80 00 07 bg 200842c <_Thread_Tickle_timeslice+0x7c>
2008414: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
_Thread_Reset_timeslice();
2008418: 40 00 0d 42 call 200b920 <_Thread_Reset_timeslice>
200841c: 01 00 00 00 nop
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
2008420: 03 00 80 5a sethi %hi(0x2016800), %g1
2008424: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 20168f8 <_Thread_Ticks_per_timeslice>
2008428: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
200842c: 81 c7 e0 08 ret
2008430: 81 e8 00 00 restore
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2008434: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2008438: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200843c: 12 bf ff fc bne 200842c <_Thread_Tickle_timeslice+0x7c> <== NOT EXECUTED
2008440: c2 24 20 78 st %g1, [ %l0 + 0x78 ] <== NOT EXECUTED
(*executing->budget_callout)( executing );
2008444: c2 04 20 80 ld [ %l0 + 0x80 ], %g1 <== NOT EXECUTED
2008448: 9f c0 40 00 call %g1 <== NOT EXECUTED
200844c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2008450: 81 c7 e0 08 ret
2008454: 81 e8 00 00 restore
02008458 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
2008458: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
200845c: 03 00 80 5a sethi %hi(0x2016800), %g1
2008460: e0 00 62 64 ld [ %g1 + 0x264 ], %l0 ! 2016a64 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
2008464: 7f ff e6 42 call 2001d6c <sparc_disable_interrupts>
2008468: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
200846c: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
2008470: c4 04 40 00 ld [ %l1 ], %g2
2008474: c2 04 60 08 ld [ %l1 + 8 ], %g1
2008478: 80 a0 80 01 cmp %g2, %g1
200847c: 02 80 00 17 be 20084d8 <_Thread_Yield_processor+0x80>
2008480: 25 00 80 5a sethi %hi(0x2016800), %l2
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008484: c6 04 00 00 ld [ %l0 ], %g3
previous = the_node->previous;
2008488: c4 04 20 04 ld [ %l0 + 4 ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200848c: 82 04 60 04 add %l1, 4, %g1
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
2008490: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2008494: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2008498: c4 20 e0 04 st %g2, [ %g3 + 4 ]
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
200849c: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
20084a0: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
20084a4: 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;
20084a8: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
20084ac: 7f ff e6 34 call 2001d7c <sparc_enable_interrupts>
20084b0: 01 00 00 00 nop
20084b4: 7f ff e6 2e call 2001d6c <sparc_disable_interrupts>
20084b8: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
20084bc: c2 04 a2 30 ld [ %l2 + 0x230 ], %g1
20084c0: 80 a4 00 01 cmp %l0, %g1
20084c4: 12 80 00 09 bne 20084e8 <_Thread_Yield_processor+0x90> <== NEVER TAKEN
20084c8: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
20084cc: c2 04 40 00 ld [ %l1 ], %g1
20084d0: 10 80 00 06 b 20084e8 <_Thread_Yield_processor+0x90>
20084d4: c2 24 a2 30 st %g1, [ %l2 + 0x230 ]
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
20084d8: c2 04 a2 30 ld [ %l2 + 0x230 ], %g1
20084dc: 80 a4 00 01 cmp %l0, %g1
20084e0: 02 80 00 04 be 20084f0 <_Thread_Yield_processor+0x98> <== ALWAYS TAKEN
20084e4: 84 10 20 01 mov 1, %g2
_Context_Switch_necessary = TRUE;
20084e8: 03 00 80 5a sethi %hi(0x2016800), %g1
20084ec: c4 28 62 74 stb %g2, [ %g1 + 0x274 ] ! 2016a74 <_Context_Switch_necessary>
_ISR_Enable( level );
20084f0: 7f ff e6 23 call 2001d7c <sparc_enable_interrupts>
20084f4: 81 e8 00 00 restore
02007c6c <_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
)
{
2007c6c: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
2007c70: e4 06 60 14 ld [ %i1 + 0x14 ], %l2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2007c74: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
2007c78: 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);
2007c7c: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2007c80: 82 06 60 38 add %i1, 0x38, %g1
2007c84: c2 26 60 40 st %g1, [ %i1 + 0x40 ]
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2007c88: 80 8c a0 20 btst 0x20, %l2
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
2007c8c: 83 34 a0 06 srl %l2, 6, %g1
_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 ];
block_state = the_thread_queue->state;
2007c90: ec 06 20 38 ld [ %i0 + 0x38 ], %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 ];
2007c94: 85 28 60 04 sll %g1, 4, %g2
2007c98: 83 28 60 02 sll %g1, 2, %g1
2007c9c: 84 20 80 01 sub %g2, %g1, %g2
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
2007ca0: 12 80 00 31 bne 2007d64 <_Thread_queue_Enqueue_priority+0xf8>
2007ca4: a6 06 00 02 add %i0, %g2, %l3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2007ca8: a8 04 e0 04 add %l3, 4, %l4
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
2007cac: aa 10 00 02 mov %g2, %l5
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
2007cb0: 7f ff e8 2f call 2001d6c <sparc_disable_interrupts>
2007cb4: 01 00 00 00 nop
2007cb8: a6 10 00 08 mov %o0, %l3
search_thread = (Thread_Control *) header->first;
2007cbc: a2 10 3f ff mov -1, %l1
2007cc0: 10 80 00 18 b 2007d20 <_Thread_queue_Enqueue_priority+0xb4>
2007cc4: e0 06 00 15 ld [ %i0 + %l5 ], %l0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
2007cc8: 80 a4 80 11 cmp %l2, %l1
2007ccc: 28 80 00 19 bleu,a 2007d30 <_Thread_queue_Enqueue_priority+0xc4>
2007cd0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
2007cd4: e0 04 00 00 ld [ %l0 ], %l0
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
2007cd8: 80 a4 00 14 cmp %l0, %l4
2007cdc: 22 80 00 15 be,a 2007d30 <_Thread_queue_Enqueue_priority+0xc4>
2007ce0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
2007ce4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority <= search_priority )
2007ce8: 80 a4 80 11 cmp %l2, %l1
2007cec: 28 80 00 11 bleu,a 2007d30 <_Thread_queue_Enqueue_priority+0xc4>
2007cf0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#endif
_ISR_Flash( level );
2007cf4: 7f ff e8 22 call 2001d7c <sparc_enable_interrupts>
2007cf8: 90 10 00 13 mov %l3, %o0
2007cfc: 7f ff e8 1c call 2001d6c <sparc_disable_interrupts>
2007d00: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
2007d04: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2007d08: 80 8d 80 01 btst %l6, %g1
2007d0c: 32 80 00 05 bne,a 2007d20 <_Thread_queue_Enqueue_priority+0xb4><== ALWAYS TAKEN
2007d10: e0 04 00 00 ld [ %l0 ], %l0
_ISR_Enable( level );
2007d14: 7f ff e8 1a call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2007d18: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2007d1c: 30 bf ff e5 b,a 2007cb0 <_Thread_queue_Enqueue_priority+0x44><== 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 ) ) {
2007d20: 80 a4 00 14 cmp %l0, %l4
2007d24: 32 bf ff e9 bne,a 2007cc8 <_Thread_queue_Enqueue_priority+0x5c>
2007d28: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
2007d2c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2007d30: 80 a0 60 01 cmp %g1, 1
2007d34: 12 80 00 48 bne 2007e54 <_Thread_queue_Enqueue_priority+0x1e8><== NEVER TAKEN
2007d38: 90 10 00 13 mov %l3, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2007d3c: 80 a4 80 11 cmp %l2, %l1
2007d40: 02 80 00 3a be 2007e28 <_Thread_queue_Enqueue_priority+0x1bc>
2007d44: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
2007d48: c2 04 20 04 ld [ %l0 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2007d4c: e0 26 40 00 st %l0, [ %i1 ]
the_node->previous = previous_node;
2007d50: 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;
2007d54: 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;
2007d58: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
2007d5c: f2 24 20 04 st %i1, [ %l0 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007d60: 30 80 00 39 b,a 2007e44 <_Thread_queue_Enqueue_priority+0x1d8>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007d64: 03 00 80 56 sethi %hi(0x2015800), %g1
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
2007d68: aa 10 00 13 mov %l3, %l5
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007d6c: ae 10 63 f4 or %g1, 0x3f4, %l7
2007d70: c2 0d c0 00 ldub [ %l7 ], %g1
_ISR_Disable( level );
2007d74: 7f ff e7 fe call 2001d6c <sparc_disable_interrupts>
2007d78: a2 00 60 01 add %g1, 1, %l1
2007d7c: a8 10 00 08 mov %o0, %l4
search_thread = (Thread_Control *) header->last;
2007d80: 10 80 00 19 b 2007de4 <_Thread_queue_Enqueue_priority+0x178>
2007d84: e0 05 60 08 ld [ %l5 + 8 ], %l0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
2007d88: 80 a4 80 11 cmp %l2, %l1
2007d8c: 3a 80 00 1a bcc,a 2007df4 <_Thread_queue_Enqueue_priority+0x188>
2007d90: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
2007d94: e0 04 20 04 ld [ %l0 + 4 ], %l0
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
2007d98: 80 a4 00 13 cmp %l0, %l3
2007d9c: 22 80 00 16 be,a 2007df4 <_Thread_queue_Enqueue_priority+0x188>
2007da0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
search_priority = search_thread->current_priority;
2007da4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority >= search_priority )
2007da8: 80 a4 80 11 cmp %l2, %l1
2007dac: 3a 80 00 12 bcc,a 2007df4 <_Thread_queue_Enqueue_priority+0x188>
2007db0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
break;
#endif
_ISR_Flash( level );
2007db4: 7f ff e7 f2 call 2001d7c <sparc_enable_interrupts>
2007db8: 90 10 00 14 mov %l4, %o0
2007dbc: 7f ff e7 ec call 2001d6c <sparc_disable_interrupts>
2007dc0: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
2007dc4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2007dc8: 80 8d 80 01 btst %l6, %g1
2007dcc: 32 80 00 06 bne,a 2007de4 <_Thread_queue_Enqueue_priority+0x178><== ALWAYS TAKEN
2007dd0: e0 04 20 04 ld [ %l0 + 4 ], %l0
_ISR_Enable( level );
2007dd4: 7f ff e7 ea call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
2007dd8: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2007ddc: 10 bf ff e6 b 2007d74 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
2007de0: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
2007de4: 80 a4 00 13 cmp %l0, %l3
2007de8: 32 bf ff e8 bne,a 2007d88 <_Thread_queue_Enqueue_priority+0x11c>
2007dec: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
2007df0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2007df4: 80 a0 60 01 cmp %g1, 1
2007df8: 12 80 00 17 bne 2007e54 <_Thread_queue_Enqueue_priority+0x1e8><== NEVER TAKEN
2007dfc: 90 10 00 14 mov %l4, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2007e00: 80 a4 80 11 cmp %l2, %l1
2007e04: 02 80 00 09 be 2007e28 <_Thread_queue_Enqueue_priority+0x1bc>
2007e08: c0 26 20 30 clr [ %i0 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
2007e0c: c2 04 00 00 ld [ %l0 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
2007e10: e0 26 60 04 st %l0, [ %i1 + 4 ]
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
2007e14: 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;
2007e18: f0 26 60 44 st %i0, [ %i1 + 0x44 ]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
2007e1c: f2 20 60 04 st %i1, [ %g1 + 4 ]
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;
2007e20: f2 24 00 00 st %i1, [ %l0 ]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007e24: 30 80 00 08 b,a 2007e44 <_Thread_queue_Enqueue_priority+0x1d8>
2007e28: 82 04 20 3c add %l0, 0x3c, %g1
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;
2007e2c: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2007e30: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = previous_node;
2007e34: c4 26 60 04 st %g2, [ %i1 + 4 ]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
2007e38: 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;
2007e3c: f2 20 80 00 st %i1, [ %g2 ]
search_node->previous = the_node;
2007e40: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2007e44: 7f ff e7 ce call 2001d7c <sparc_enable_interrupts>
2007e48: b0 10 20 01 mov 1, %i0
2007e4c: 81 c7 e0 08 ret
2007e50: 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;
2007e54: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 <== NOT EXECUTED
* 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;
2007e58: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
2007e5c: 81 c7 e0 08 ret <== NOT EXECUTED
2007e60: 81 e8 00 00 restore <== NOT EXECUTED
0200c378 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200c378: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200c37c: 7f ff d6 7c call 2001d6c <sparc_disable_interrupts>
200c380: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200c384: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200c388: 03 00 00 ef sethi %hi(0x3bc00), %g1
200c38c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200c390: 80 88 80 01 btst %g2, %g1
200c394: 32 80 00 04 bne,a 200c3a4 <_Thread_queue_Extract_fifo+0x2c><== ALWAYS TAKEN
200c398: c2 06 40 00 ld [ %i1 ], %g1
_ISR_Enable( level );
200c39c: 7f ff d6 78 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
200c3a0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200c3a4: c4 06 60 04 ld [ %i1 + 4 ], %g2
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200c3a8: c6 06 60 50 ld [ %i1 + 0x50 ], %g3
next->previous = previous;
previous->next = next;
200c3ac: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200c3b0: c4 20 60 04 st %g2, [ %g1 + 4 ]
200c3b4: 80 a0 e0 02 cmp %g3, 2
200c3b8: 02 80 00 06 be 200c3d0 <_Thread_queue_Extract_fifo+0x58>
200c3bc: c0 26 60 44 clr [ %i1 + 0x44 ]
_ISR_Enable( level );
200c3c0: 7f ff d6 6f call 2001d7c <sparc_enable_interrupts>
200c3c4: 33 04 00 ff sethi %hi(0x1003fc00), %i1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
200c3c8: 10 80 00 0a b 200c3f0 <_Thread_queue_Extract_fifo+0x78>
200c3cc: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200c3d0: 82 10 20 03 mov 3, %g1
200c3d4: c2 26 60 50 st %g1, [ %i1 + 0x50 ]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
200c3d8: 7f ff d6 69 call 2001d7c <sparc_enable_interrupts>
200c3dc: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_thread->Timer );
200c3e0: 7f ff f1 77 call 20089bc <_Watchdog_Remove>
200c3e4: 90 06 60 48 add %i1, 0x48, %o0
200c3e8: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200c3ec: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200c3f0: 7f ff eb 8d call 2007224 <_Thread_Clear_state>
200c3f4: 81 e8 00 00 restore
0200b69c <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
200b69c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
200b6a0: 7f ff d9 b3 call 2001d6c <sparc_disable_interrupts>
200b6a4: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200b6a8: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200b6ac: 03 00 00 ef sethi %hi(0x3bc00), %g1
200b6b0: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200b6b4: 80 88 80 01 btst %g2, %g1
200b6b8: 32 80 00 03 bne,a 200b6c4 <_Thread_queue_Extract_priority_helper+0x28><== ALWAYS TAKEN
200b6bc: c6 06 60 38 ld [ %i1 + 0x38 ], %g3
_ISR_Enable( level );
200b6c0: 30 80 00 1c b,a 200b730 <_Thread_queue_Extract_priority_helper+0x94><== NOT EXECUTED
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
200b6c4: 82 06 60 3c add %i1, 0x3c, %g1
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
200b6c8: c4 06 40 00 ld [ %i1 ], %g2
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
200b6cc: 80 a0 c0 01 cmp %g3, %g1
200b6d0: 02 80 00 13 be 200b71c <_Thread_queue_Extract_priority_helper+0x80>
200b6d4: c2 06 60 04 ld [ %i1 + 4 ], %g1
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
200b6d8: da 06 60 40 ld [ %i1 + 0x40 ], %o5
new_second_node = new_first_node->next;
200b6dc: c8 00 c0 00 ld [ %g3 ], %g4
previous_node->next = new_first_node;
next_node->previous = new_first_node;
200b6e0: c6 20 a0 04 st %g3, [ %g2 + 4 ]
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
200b6e4: c6 20 40 00 st %g3, [ %g1 ]
next_node->previous = new_first_node;
new_first_node->next = next_node;
200b6e8: c4 20 c0 00 st %g2, [ %g3 ]
new_first_node->previous = previous_node;
200b6ec: c2 20 e0 04 st %g1, [ %g3 + 4 ]
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
200b6f0: c4 06 60 38 ld [ %i1 + 0x38 ], %g2
200b6f4: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
200b6f8: 80 a0 80 01 cmp %g2, %g1
200b6fc: 02 80 00 0a be 200b724 <_Thread_queue_Extract_priority_helper+0x88>
200b700: 82 00 e0 38 add %g3, 0x38, %g1
/* > two threads on 2-n */
new_second_node->previous =
200b704: c2 21 20 04 st %g1, [ %g4 + 4 ]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
200b708: c8 20 e0 38 st %g4, [ %g3 + 0x38 ]
new_first_thread->Wait.Block2n.last = last_node;
200b70c: da 20 e0 40 st %o5, [ %g3 + 0x40 ]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
200b710: 82 00 e0 3c add %g3, 0x3c, %g1
200b714: 10 80 00 04 b 200b724 <_Thread_queue_Extract_priority_helper+0x88>
200b718: c2 23 40 00 st %g1, [ %o5 ]
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
200b71c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
200b720: c4 20 40 00 st %g2, [ %g1 ]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
200b724: 80 8e a0 ff btst 0xff, %i2
200b728: 22 80 00 04 be,a 200b738 <_Thread_queue_Extract_priority_helper+0x9c>
200b72c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
_ISR_Enable( level );
200b730: 7f ff d9 93 call 2001d7c <sparc_enable_interrupts>
200b734: 91 e8 00 08 restore %g0, %o0, %o0
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200b738: 80 a0 60 02 cmp %g1, 2
200b73c: 02 80 00 06 be 200b754 <_Thread_queue_Extract_priority_helper+0xb8><== NEVER TAKEN
200b740: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
200b744: 7f ff d9 8e call 2001d7c <sparc_enable_interrupts>
200b748: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200b74c: 10 80 00 08 b 200b76c <_Thread_queue_Extract_priority_helper+0xd0>
200b750: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200b754: c2 26 20 50 st %g1, [ %i0 + 0x50 ] <== NOT EXECUTED
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
200b758: 7f ff d9 89 call 2001d7c <sparc_enable_interrupts> <== NOT EXECUTED
200b75c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
200b760: 7f ff f4 97 call 20089bc <_Watchdog_Remove> <== NOT EXECUTED
200b764: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED
200b768: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED
200b76c: 7f ff ee ae call 2007224 <_Thread_Clear_state>
200b770: 81 e8 00 00 restore
0200b778 <_Thread_queue_Process_timeout>:
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
200b778: c4 02 20 44 ld [ %o0 + 0x44 ], %g2
* 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.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
200b77c: c6 00 a0 30 ld [ %g2 + 0x30 ], %g3
200b780: 80 a0 e0 00 cmp %g3, 0
200b784: 02 80 00 0f be 200b7c0 <_Thread_queue_Process_timeout+0x48>
200b788: 92 10 00 08 mov %o0, %o1
200b78c: 03 00 80 5a sethi %hi(0x2016800), %g1
200b790: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016a64 <_Thread_Executing>
200b794: 80 a2 00 01 cmp %o0, %g1
200b798: 32 80 00 0b bne,a 200b7c4 <_Thread_queue_Process_timeout+0x4c><== NEVER TAKEN
200b79c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
200b7a0: 80 a0 e0 03 cmp %g3, 3
200b7a4: 02 80 00 0d be 200b7d8 <_Thread_queue_Process_timeout+0x60><== NEVER TAKEN
200b7a8: 01 00 00 00 nop
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200b7ac: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
200b7b0: c2 22 20 34 st %g1, [ %o0 + 0x34 ]
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
200b7b4: 82 10 20 02 mov 2, %g1
200b7b8: 81 c3 e0 08 retl
200b7bc: c2 20 a0 30 st %g1, [ %g2 + 0x30 ]
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200b7c0: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
200b7c4: d0 02 60 44 ld [ %o1 + 0x44 ], %o0
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200b7c8: c2 22 60 34 st %g1, [ %o1 + 0x34 ]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
200b7cc: 82 13 c0 00 mov %o7, %g1
200b7d0: 7f ff ff a8 call 200b670 <_Thread_queue_Extract>
200b7d4: 9e 10 40 00 mov %g1, %o7
200b7d8: 81 c3 e0 08 retl <== NOT EXECUTED
02007f30 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
2007f30: 9d e3 bf 90 save %sp, -112, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
2007f34: 80 a6 20 00 cmp %i0, 0
2007f38: 02 80 00 19 be 2007f9c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
2007f3c: 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 ) {
2007f40: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
2007f44: 80 a4 20 01 cmp %l0, 1
2007f48: 12 80 00 15 bne 2007f9c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
2007f4c: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
2007f50: 7f ff e7 87 call 2001d6c <sparc_disable_interrupts>
2007f54: 01 00 00 00 nop
2007f58: a2 10 00 08 mov %o0, %l1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
2007f5c: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2007f60: 03 00 00 ef sethi %hi(0x3bc00), %g1
2007f64: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2007f68: 80 88 80 01 btst %g2, %g1
2007f6c: 02 80 00 0a be 2007f94 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
2007f70: 94 10 20 01 mov 1, %o2
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
2007f74: 90 10 00 18 mov %i0, %o0
2007f78: 92 10 00 19 mov %i1, %o1
2007f7c: 40 00 0d c8 call 200b69c <_Thread_queue_Extract_priority_helper>
2007f80: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
2007f84: 90 10 00 18 mov %i0, %o0
2007f88: 92 10 00 19 mov %i1, %o1
2007f8c: 7f ff ff 38 call 2007c6c <_Thread_queue_Enqueue_priority>
2007f90: 94 07 bf f4 add %fp, -12, %o2
}
_ISR_Enable( level );
2007f94: 7f ff e7 7a call 2001d7c <sparc_enable_interrupts>
2007f98: 90 10 00 11 mov %l1, %o0
2007f9c: 81 c7 e0 08 ret
2007fa0: 81 e8 00 00 restore
02007fa4 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored
)
{
2007fa4: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2007fa8: 90 10 00 18 mov %i0, %o0
2007fac: 7f ff fd c1 call 20076b0 <_Thread_Get>
2007fb0: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007fb4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007fb8: 80 a0 60 00 cmp %g1, 0
2007fbc: 12 80 00 08 bne 2007fdc <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
2007fc0: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2007fc4: 40 00 0d ed call 200b778 <_Thread_queue_Process_timeout>
2007fc8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2007fcc: 05 00 80 5a sethi %hi(0x2016800), %g2
2007fd0: c2 00 a1 a0 ld [ %g2 + 0x1a0 ], %g1 ! 20169a0 <_Thread_Dispatch_disable_level>
2007fd4: 82 00 7f ff add %g1, -1, %g1
2007fd8: c2 20 a1 a0 st %g1, [ %g2 + 0x1a0 ]
2007fdc: 81 c7 e0 08 ret
2007fe0: 81 e8 00 00 restore
02011b2c <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
2011b2c: 9d e3 bf 88 save %sp, -120, %sp
2011b30: 07 00 80 c1 sethi %hi(0x2030400), %g3
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b34: 09 00 80 c1 sethi %hi(0x2030400), %g4
2011b38: c4 01 22 94 ld [ %g4 + 0x294 ], %g2 ! 2030694 <_Watchdog_Ticks_since_boot>
2011b3c: c2 00 e1 40 ld [ %g3 + 0x140 ], %g1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b40: 1b 00 80 c1 sethi %hi(0x2030400), %o5
2011b44: d8 03 61 d4 ld [ %o5 + 0x1d4 ], %o4 ! 20305d4 <_TOD_Now>
2011b48: 82 00 60 01 inc %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2011b4c: ac 07 bf ec add %fp, -20, %l6
2011b50: c2 20 e1 40 st %g1, [ %g3 + 0x140 ]
2011b54: b6 07 bf f0 add %fp, -16, %i3
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b58: 03 00 80 c1 sethi %hi(0x2030400), %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011b5c: c0 27 bf f0 clr [ %fp + -16 ]
2011b60: c4 20 60 44 st %g2, [ %g1 + 0x44 ]
the_chain->last = _Chain_Head(the_chain);
2011b64: ec 27 bf f4 st %l6, [ %fp + -12 ]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b68: 05 00 80 c1 sethi %hi(0x2030400), %g2
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011b6c: f6 27 bf ec st %i3, [ %fp + -20 ]
2011b70: d8 20 a0 40 st %o4, [ %g2 + 0x40 ]
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011b74: 82 10 60 44 or %g1, 0x44, %g1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011b78: 84 10 a0 40 or %g2, 0x40, %g2
2011b7c: 86 10 e1 40 or %g3, 0x140, %g3
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011b80: b8 10 00 01 mov %g1, %i4
2011b84: a4 10 00 03 mov %g3, %l2
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
2011b88: 7f ff ff cc call 2011ab8 <_Timer_Server_process_insertions>
2011b8c: ba 10 00 02 mov %g2, %i5
_Thread_Enable_dispatch();
2011b90: 40 00 0b 67 call 201492c <_Thread_Enable_dispatch>
2011b94: ae 10 00 16 mov %l6, %l7
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
2011b98: 03 00 80 c2 sethi %hi(0x2030800), %g1
2011b9c: aa 10 60 a4 or %g1, 0xa4, %l5 ! 20308a4 <_Timer_Server>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2011ba0: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011ba4: a8 10 60 34 or %g1, 0x34, %l4 ! 2030434 <_Timer_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011ba8: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011bac: a2 10 60 48 or %g1, 0x48, %l1 ! 2030448 <_Timer_Seconds_chain>
2011bb0: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011bb4: a6 10 60 60 or %g1, 0x60, %l3 ! 2030460 <_Timer_Seconds_timer>
_Timer_Server_reset_ticks_timer();
2011bb8: b2 05 20 04 add %l4, 4, %i1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011bbc: 03 00 80 c1 sethi %hi(0x2030400), %g1
_Timer_Server_reset_seconds_timer();
2011bc0: b4 04 60 04 add %l1, 4, %i2
2011bc4: b0 10 62 18 or %g1, 0x218, %i0
2011bc8: c2 04 80 00 ld [ %l2 ], %g1
2011bcc: 82 00 60 01 inc %g1
2011bd0: c2 24 80 00 st %g1, [ %l2 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
2011bd4: d0 05 40 00 ld [ %l5 ], %o0
2011bd8: 40 00 0e 2d call 201548c <_Thread_Set_state>
2011bdc: 92 10 20 08 mov 8, %o1
2011be0: c2 05 00 00 ld [ %l4 ], %g1
_Timer_Server_reset_ticks_timer();
2011be4: 80 a0 40 19 cmp %g1, %i1
2011be8: 02 80 00 08 be 2011c08 <_Timer_Server_body+0xdc>
2011bec: 11 00 80 c1 sethi %hi(0x2030400), %o0
2011bf0: d2 05 40 00 ld [ %l5 ], %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011bf4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2011bf8: c2 22 60 54 st %g1, [ %o1 + 0x54 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2011bfc: 90 12 22 24 or %o0, 0x224, %o0
2011c00: 40 00 11 1c call 2016070 <_Watchdog_Insert>
2011c04: 92 02 60 48 add %o1, 0x48, %o1
2011c08: c2 04 40 00 ld [ %l1 ], %g1
_Timer_Server_reset_seconds_timer();
2011c0c: 80 a0 40 1a cmp %g1, %i2
2011c10: 02 80 00 07 be 2011c2c <_Timer_Server_body+0x100>
2011c14: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011c18: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011c1c: 90 10 00 18 mov %i0, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011c20: c2 24 e0 0c st %g1, [ %l3 + 0xc ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011c24: 40 00 11 13 call 2016070 <_Watchdog_Insert>
2011c28: 92 10 00 13 mov %l3, %o1
_Thread_Enable_dispatch();
2011c2c: 40 00 0b 40 call 201492c <_Thread_Enable_dispatch>
2011c30: 01 00 00 00 nop
2011c34: c2 04 80 00 ld [ %l2 ], %g1
2011c38: 82 00 60 01 inc %g1
2011c3c: c2 24 80 00 st %g1, [ %l2 ]
/*
* At this point, at least one of the timers this task relies
* upon has fired. Stop them both while we process any outstanding
* timers. Before we block, we will restart them.
*/
_Timer_Server_stop_ticks_timer();
2011c40: d0 05 40 00 ld [ %l5 ], %o0
2011c44: 40 00 11 65 call 20161d8 <_Watchdog_Remove>
2011c48: 90 02 20 48 add %o0, 0x48, %o0
_Timer_Server_stop_seconds_timer();
2011c4c: 40 00 11 63 call 20161d8 <_Watchdog_Remove>
2011c50: 90 10 00 13 mov %l3, %o0
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011c54: c4 07 00 00 ld [ %i4 ], %g2
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
2011c58: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011c5c: 82 10 62 94 or %g1, 0x294, %g1 ! 2030694 <_Watchdog_Ticks_since_boot>
2011c60: c6 00 40 00 ld [ %g1 ], %g3
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
2011c64: 82 38 00 02 xnor %g0, %g2, %g1
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011c68: 80 a0 c0 02 cmp %g3, %g2
2011c6c: 0a 80 00 03 bcs 2011c78 <_Timer_Server_body+0x14c> <== NEVER TAKEN
2011c70: 92 00 40 03 add %g1, %g3, %o1
ticks = snapshot - _Timer_Server_ticks_last_time;
2011c74: 92 20 c0 02 sub %g3, %g2, %o1
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011c78: 94 10 00 17 mov %l7, %o2
if ( snapshot >= _Timer_Server_ticks_last_time )
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
2011c7c: c6 27 00 00 st %g3, [ %i4 ]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011c80: 40 00 10 c7 call 2015f9c <_Watchdog_Adjust_to_chain>
2011c84: 90 10 00 14 mov %l4, %o0
/*
* 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 _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
2011c88: 03 00 80 c1 sethi %hi(0x2030400), %g1
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011c8c: d4 07 40 00 ld [ %i5 ], %o2
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
2011c90: 82 10 61 d4 or %g1, 0x1d4, %g1
2011c94: e0 00 40 00 ld [ %g1 ], %l0
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011c98: 80 a4 00 0a cmp %l0, %o2
2011c9c: 08 80 00 06 bleu 2011cb4 <_Timer_Server_body+0x188>
2011ca0: 92 24 00 0a sub %l0, %o2, %o1
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
2011ca4: 90 10 00 11 mov %l1, %o0
2011ca8: 40 00 10 bd call 2015f9c <_Watchdog_Adjust_to_chain>
2011cac: 94 10 00 17 mov %l7, %o2
2011cb0: 30 80 00 06 b,a 2011cc8 <_Timer_Server_body+0x19c>
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
2011cb4: 1a 80 00 05 bcc 2011cc8 <_Timer_Server_body+0x19c>
2011cb8: 94 22 80 10 sub %o2, %l0, %o2
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
2011cbc: 90 10 00 11 mov %l1, %o0
2011cc0: 40 00 10 90 call 2015f00 <_Watchdog_Adjust>
2011cc4: 92 10 20 01 mov 1, %o1
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011cc8: 7f ff ff 7c call 2011ab8 <_Timer_Server_process_insertions>
2011ccc: e0 27 40 00 st %l0, [ %i5 ]
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
2011cd0: 40 00 0b 17 call 201492c <_Thread_Enable_dispatch>
2011cd4: 01 00 00 00 nop
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
2011cd8: 7f ff e6 13 call 200b524 <sparc_disable_interrupts>
2011cdc: 01 00 00 00 nop
2011ce0: 84 10 00 08 mov %o0, %g2
2011ce4: e0 07 bf ec ld [ %fp + -20 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2011ce8: 80 a4 00 1b cmp %l0, %i3
2011cec: 02 80 00 06 be 2011d04 <_Timer_Server_body+0x1d8>
2011cf0: 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;
2011cf4: c2 04 00 00 ld [ %l0 ], %g1
the_chain->first = new_first;
2011cf8: c2 27 bf ec st %g1, [ %fp + -20 ]
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
if ( watch == NULL ) {
2011cfc: 12 80 00 05 bne 2011d10 <_Timer_Server_body+0x1e4> <== ALWAYS TAKEN
2011d00: ec 20 60 04 st %l6, [ %g1 + 4 ]
_ISR_Enable( level );
2011d04: 7f ff e6 0c call 200b534 <sparc_enable_interrupts>
2011d08: 90 10 00 02 mov %g2, %o0
2011d0c: 30 bf ff af b,a 2011bc8 <_Timer_Server_body+0x9c>
break;
}
watch->state = WATCHDOG_INACTIVE;
2011d10: c0 24 20 08 clr [ %l0 + 8 ]
_ISR_Enable( level );
2011d14: 7f ff e6 08 call 200b534 <sparc_enable_interrupts>
2011d18: 01 00 00 00 nop
(*watch->routine)( watch->id, watch->user_data );
2011d1c: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
2011d20: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2011d24: 9f c0 40 00 call %g1
2011d28: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
2011d2c: 30 bf ff eb b,a 2011cd8 <_Timer_Server_body+0x1ac>
02011ab8 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
2011ab8: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011abc: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011ac0: a4 10 60 54 or %g1, 0x54, %l2 ! 2030454 <_Timer_To_be_inserted>
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011ac4: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011ac8: a2 10 60 48 or %g1, 0x48, %l1 ! 2030448 <_Timer_Seconds_chain>
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011acc: 03 00 80 c1 sethi %hi(0x2030400), %g1
2011ad0: a0 10 60 34 or %g1, 0x34, %l0 ! 2030434 <_Timer_Ticks_chain>
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011ad4: 40 00 02 86 call 20124ec <_Chain_Get>
2011ad8: 90 10 00 12 mov %l2, %o0
if ( the_timer == NULL )
2011adc: 80 a2 20 00 cmp %o0, 0
2011ae0: 02 80 00 11 be 2011b24 <_Timer_Server_process_insertions+0x6c>
2011ae4: 01 00 00 00 nop
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2011ae8: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011aec: 80 a0 60 01 cmp %g1, 1
2011af0: 12 80 00 05 bne 2011b04 <_Timer_Server_process_insertions+0x4c>
2011af4: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011af8: 92 02 20 10 add %o0, 0x10, %o1
2011afc: 10 80 00 05 b 2011b10 <_Timer_Server_process_insertions+0x58>
2011b00: 90 10 00 10 mov %l0, %o0
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2011b04: 12 80 00 05 bne 2011b18 <_Timer_Server_process_insertions+0x60><== NEVER TAKEN
2011b08: 92 02 20 10 add %o0, 0x10, %o1
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011b0c: 90 10 00 11 mov %l1, %o0
2011b10: 40 00 11 58 call 2016070 <_Watchdog_Insert>
2011b14: 01 00 00 00 nop
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011b18: 7f ff ff e8 call 2011ab8 <_Timer_Server_process_insertions>
2011b1c: 01 00 00 00 nop
2011b20: 30 bf ff ed b,a 2011ad4 <_Timer_Server_process_insertions+0x1c>
2011b24: 81 c7 e0 08 ret
2011b28: 81 e8 00 00 restore
0200a1a4 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a1a4: 9d e3 bf 98 save %sp, -104, %sp
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a1a8: c2 06 40 00 ld [ %i1 ], %g1
right += rhs->tv_nsec;
200a1ac: de 06 60 04 ld [ %i1 + 4 ], %o7
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a1b0: 91 38 60 1f sra %g1, 0x1f, %o0
200a1b4: 92 10 00 01 mov %g1, %o1
200a1b8: 83 30 60 1d srl %g1, 0x1d, %g1
200a1bc: 87 2a 60 03 sll %o1, 3, %g3
200a1c0: 85 2a 20 03 sll %o0, 3, %g2
200a1c4: 84 10 40 02 or %g1, %g2, %g2
200a1c8: 83 30 e0 1b srl %g3, 0x1b, %g1
200a1cc: 99 28 a0 05 sll %g2, 5, %o4
200a1d0: 9b 28 e0 05 sll %g3, 5, %o5
200a1d4: 98 10 40 0c or %g1, %o4, %o4
200a1d8: 9a a3 40 03 subcc %o5, %g3, %o5
200a1dc: 83 33 60 1a srl %o5, 0x1a, %g1
200a1e0: 98 63 00 02 subx %o4, %g2, %o4
200a1e4: 97 2b 60 06 sll %o5, 6, %o3
200a1e8: 95 2b 20 06 sll %o4, 6, %o2
200a1ec: 96 a2 c0 0d subcc %o3, %o5, %o3
200a1f0: 94 10 40 0a or %g1, %o2, %o2
200a1f4: 94 62 80 0c subx %o2, %o4, %o2
200a1f8: 96 82 c0 09 addcc %o3, %o1, %o3
200a1fc: 94 42 80 08 addx %o2, %o0, %o2
200a200: 83 32 e0 1e srl %o3, 0x1e, %g1
200a204: 85 2a a0 02 sll %o2, 2, %g2
200a208: 84 10 40 02 or %g1, %g2, %g2
200a20c: 87 2a e0 02 sll %o3, 2, %g3
200a210: 96 82 c0 03 addcc %o3, %g3, %o3
200a214: 94 42 80 02 addx %o2, %g2, %o2
200a218: 83 32 e0 1e srl %o3, 0x1e, %g1
200a21c: 85 2a a0 02 sll %o2, 2, %g2
200a220: 84 10 40 02 or %g1, %g2, %g2
200a224: 87 2a e0 02 sll %o3, 2, %g3
200a228: 96 82 c0 03 addcc %o3, %g3, %o3
200a22c: 94 42 80 02 addx %o2, %g2, %o2
200a230: 83 32 e0 1e srl %o3, 0x1e, %g1
200a234: 85 2a a0 02 sll %o2, 2, %g2
200a238: 84 10 40 02 or %g1, %g2, %g2
200a23c: 87 2a e0 02 sll %o3, 2, %g3
200a240: 96 82 c0 03 addcc %o3, %g3, %o3
200a244: 94 42 80 02 addx %o2, %g2, %o2
200a248: 85 32 e0 17 srl %o3, 0x17, %g2
200a24c: 83 2a a0 09 sll %o2, 9, %g1
200a250: 9b 2a e0 09 sll %o3, 9, %o5
200a254: 98 10 80 01 or %g2, %g1, %o4
right += rhs->tv_nsec;
200a258: 96 83 40 0f addcc %o5, %o7, %o3
200a25c: 85 3b e0 1f sra %o7, 0x1f, %g2
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
200a260: e4 06 20 04 ld [ %i0 + 4 ], %l2
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200a264: 94 43 00 02 addx %o4, %g2, %o2
if ( right == 0 ) {
200a268: 80 92 80 0b orcc %o2, %o3, %g0
200a26c: 12 80 00 06 bne 200a284 <_Timespec_Divide+0xe0> <== ALWAYS TAKEN
200a270: d0 06 00 00 ld [ %i0 ], %o0
*ival_percentage = 0;
200a274: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*fval_percentage = 0;
200a278: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
200a27c: 81 c7 e0 08 ret <== NOT EXECUTED
200a280: 81 e8 00 00 restore <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a284: 92 10 00 08 mov %o0, %o1
200a288: 83 32 60 1d srl %o1, 0x1d, %g1
200a28c: 9b 2a 60 03 sll %o1, 3, %o5
200a290: 91 3a 20 1f sra %o0, 0x1f, %o0
200a294: 99 2a 20 03 sll %o0, 3, %o4
200a298: 98 10 40 0c or %g1, %o4, %o4
200a29c: 83 33 60 1b srl %o5, 0x1b, %g1
200a2a0: 85 2b 20 05 sll %o4, 5, %g2
200a2a4: 87 2b 60 05 sll %o5, 5, %g3
200a2a8: 84 10 40 02 or %g1, %g2, %g2
200a2ac: 86 a0 c0 0d subcc %g3, %o5, %g3
200a2b0: 83 30 e0 1a srl %g3, 0x1a, %g1
200a2b4: 84 60 80 0c subx %g2, %o4, %g2
200a2b8: 9b 28 e0 06 sll %g3, 6, %o5
200a2bc: 99 28 a0 06 sll %g2, 6, %o4
200a2c0: 9a a3 40 03 subcc %o5, %g3, %o5
200a2c4: 98 10 40 0c or %g1, %o4, %o4
200a2c8: 98 63 00 02 subx %o4, %g2, %o4
200a2cc: 9a 83 40 09 addcc %o5, %o1, %o5
200a2d0: 83 33 60 1e srl %o5, 0x1e, %g1
200a2d4: 98 43 00 08 addx %o4, %o0, %o4
200a2d8: 87 2b 60 02 sll %o5, 2, %g3
200a2dc: 85 2b 20 02 sll %o4, 2, %g2
200a2e0: 9a 83 40 03 addcc %o5, %g3, %o5
200a2e4: 84 10 40 02 or %g1, %g2, %g2
200a2e8: 83 33 60 1e srl %o5, 0x1e, %g1
200a2ec: 98 43 00 02 addx %o4, %g2, %o4
200a2f0: 87 2b 60 02 sll %o5, 2, %g3
200a2f4: 85 2b 20 02 sll %o4, 2, %g2
200a2f8: 9a 83 40 03 addcc %o5, %g3, %o5
200a2fc: 84 10 40 02 or %g1, %g2, %g2
200a300: 83 33 60 1e srl %o5, 0x1e, %g1
200a304: 98 43 00 02 addx %o4, %g2, %o4
200a308: 87 2b 60 02 sll %o5, 2, %g3
200a30c: 85 2b 20 02 sll %o4, 2, %g2
200a310: 9a 83 40 03 addcc %o5, %g3, %o5
200a314: 84 10 40 02 or %g1, %g2, %g2
200a318: 98 43 00 02 addx %o4, %g2, %o4
200a31c: 83 2b 20 09 sll %o4, 9, %g1
200a320: 85 33 60 17 srl %o5, 0x17, %g2
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a324: a6 10 00 12 mov %l2, %l3
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a328: a0 10 80 01 or %g2, %g1, %l0
200a32c: a3 2b 60 09 sll %o5, 9, %l1
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a330: a2 84 40 13 addcc %l1, %l3, %l1
200a334: 83 34 60 1e srl %l1, 0x1e, %g1
200a338: 87 2c 60 02 sll %l1, 2, %g3
200a33c: a5 3c a0 1f sra %l2, 0x1f, %l2
200a340: a0 44 00 12 addx %l0, %l2, %l0
200a344: 85 2c 20 02 sll %l0, 2, %g2
200a348: 84 10 40 02 or %g1, %g2, %g2
200a34c: 83 30 e0 1b srl %g3, 0x1b, %g1
200a350: 99 28 a0 05 sll %g2, 5, %o4
200a354: 9b 28 e0 05 sll %g3, 5, %o5
200a358: 98 10 40 0c or %g1, %o4, %o4
200a35c: 9a a3 40 03 subcc %o5, %g3, %o5
200a360: 98 63 00 02 subx %o4, %g2, %o4
200a364: 9a 83 40 11 addcc %o5, %l1, %o5
200a368: 83 33 60 1e srl %o5, 0x1e, %g1
200a36c: 98 43 00 10 addx %o4, %l0, %o4
200a370: 87 2b 60 02 sll %o5, 2, %g3
200a374: 85 2b 20 02 sll %o4, 2, %g2
200a378: 9a 83 40 03 addcc %o5, %g3, %o5
200a37c: 84 10 40 02 or %g1, %g2, %g2
200a380: 83 33 60 1e srl %o5, 0x1e, %g1
200a384: 87 2b 60 02 sll %o5, 2, %g3
200a388: 98 43 00 02 addx %o4, %g2, %o4
200a38c: 9a 83 40 03 addcc %o5, %g3, %o5
200a390: 85 2b 20 02 sll %o4, 2, %g2
200a394: 84 10 40 02 or %g1, %g2, %g2
200a398: 83 33 60 1b srl %o5, 0x1b, %g1
200a39c: 98 43 00 02 addx %o4, %g2, %o4
200a3a0: 99 2b 20 05 sll %o4, 5, %o4
200a3a4: 98 10 40 0c or %g1, %o4, %o4
200a3a8: 93 2b 60 05 sll %o5, 5, %o1
200a3ac: 40 00 32 59 call 2016d10 <__udivdi3>
200a3b0: 90 10 00 0c mov %o4, %o0
*ival_percentage = answer / 1000;
200a3b4: 94 10 20 00 clr %o2
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a3b8: a0 10 00 08 mov %o0, %l0
200a3bc: a2 10 00 09 mov %o1, %l1
*ival_percentage = answer / 1000;
200a3c0: 96 10 23 e8 mov 0x3e8, %o3
200a3c4: 40 00 32 53 call 2016d10 <__udivdi3>
200a3c8: 90 10 00 10 mov %l0, %o0
*fval_percentage = answer % 1000;
200a3cc: 90 10 00 10 mov %l0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200a3d0: d2 26 80 00 st %o1, [ %i2 ]
*fval_percentage = answer % 1000;
200a3d4: 94 10 20 00 clr %o2
200a3d8: 92 10 00 11 mov %l1, %o1
200a3dc: 40 00 33 29 call 2017080 <__umoddi3>
200a3e0: 96 10 23 e8 mov 0x3e8, %o3
200a3e4: d2 26 c0 00 st %o1, [ %i3 ]
200a3e8: 81 c7 e0 08 ret
200a3ec: 81 e8 00 00 restore
0200a554 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
200a554: c4 02 00 00 ld [ %o0 ], %g2
200a558: c2 02 40 00 ld [ %o1 ], %g1
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
200a55c: 86 10 00 08 mov %o0, %g3
if ( lhs->tv_sec > rhs->tv_sec )
200a560: 80 a0 80 01 cmp %g2, %g1
200a564: 14 80 00 0b bg 200a590 <_Timespec_Greater_than+0x3c> <== NEVER TAKEN
200a568: 90 10 20 01 mov 1, %o0
return TRUE;
if ( lhs->tv_sec < rhs->tv_sec )
200a56c: 80 a0 80 01 cmp %g2, %g1
200a570: 06 80 00 08 bl 200a590 <_Timespec_Greater_than+0x3c> <== NEVER TAKEN
200a574: 90 10 20 00 clr %o0
return FALSE;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
200a578: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200a57c: c2 02 60 04 ld [ %o1 + 4 ], %g1
200a580: 80 a0 80 01 cmp %g2, %g1
200a584: 14 80 00 03 bg 200a590 <_Timespec_Greater_than+0x3c>
200a588: 90 10 20 01 mov 1, %o0
200a58c: 90 10 20 00 clr %o0
return TRUE;
return FALSE;
}
200a590: 81 c3 e0 08 retl
0200a598 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
200a598: c4 02 00 00 ld [ %o0 ], %g2
200a59c: c2 02 40 00 ld [ %o1 ], %g1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
200a5a0: 86 10 00 08 mov %o0, %g3
if ( lhs->tv_sec < rhs->tv_sec )
200a5a4: 80 a0 80 01 cmp %g2, %g1
200a5a8: 06 80 00 0b bl 200a5d4 <_Timespec_Less_than+0x3c>
200a5ac: 90 10 20 01 mov 1, %o0
return TRUE;
if ( lhs->tv_sec > rhs->tv_sec )
200a5b0: 80 a0 80 01 cmp %g2, %g1
200a5b4: 14 80 00 08 bg 200a5d4 <_Timespec_Less_than+0x3c> <== NEVER TAKEN
200a5b8: 90 10 20 00 clr %o0
return FALSE;
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
200a5bc: c4 00 e0 04 ld [ %g3 + 4 ], %g2
200a5c0: c2 02 60 04 ld [ %o1 + 4 ], %g1
200a5c4: 80 a0 80 01 cmp %g2, %g1
200a5c8: 06 80 00 03 bl 200a5d4 <_Timespec_Less_than+0x3c>
200a5cc: 90 10 20 01 mov 1, %o0
200a5d0: 90 10 20 00 clr %o0
return TRUE;
return FALSE;
}
200a5d4: 81 c3 e0 08 retl
0200b9b8 <_User_extensions_Add_API_set>:
*/
void _User_extensions_Add_API_set (
User_extensions_Control *the_extension
)
{
200b9b8: 9d e3 bf 98 save %sp, -104, %sp
_Chain_Append( &_User_extensions_List, &the_extension->Node );
200b9bc: 11 00 80 5a sethi %hi(0x2016800), %o0
200b9c0: 92 10 00 18 mov %i0, %o1
200b9c4: 7f ff e9 57 call 2005f20 <_Chain_Append>
200b9c8: 90 12 23 d8 or %o0, 0x3d8, %o0
/*
* If a switch handler is present, append it to the switch chain.
*/
if ( the_extension->Callouts.thread_switch != NULL ) {
200b9cc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200b9d0: 80 a0 60 00 cmp %g1, 0
200b9d4: 02 80 00 06 be 200b9ec <_User_extensions_Add_API_set+0x34><== NEVER TAKEN
200b9d8: b2 06 20 08 add %i0, 8, %i1
the_extension->Switch.thread_switch = the_extension->Callouts.thread_switch;
200b9dc: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
_Chain_Append(
200b9e0: 31 00 80 5a sethi %hi(0x2016800), %i0
200b9e4: 7f ff e9 4f call 2005f20 <_Chain_Append>
200b9e8: 91 ee 21 a4 restore %i0, 0x1a4, %o0
200b9ec: 81 c7 e0 08 ret <== NOT EXECUTED
200b9f0: 81 e8 00 00 restore <== NOT EXECUTED
0200a920 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
200a920: 9d e3 bf 98 save %sp, -104, %sp
_Chain_Extract( &the_extension->Node );
200a924: 40 00 0a 9a call 200d38c <_Chain_Extract>
200a928: 90 10 00 18 mov %i0, %o0
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
200a92c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200a930: 80 a0 60 00 cmp %g1, 0
200a934: 02 80 00 04 be 200a944 <_User_extensions_Remove_set+0x24> <== ALWAYS TAKEN
200a938: 01 00 00 00 nop
_Chain_Extract( &the_extension->Switch.Node );
200a93c: 40 00 0a 94 call 200d38c <_Chain_Extract> <== NOT EXECUTED
200a940: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED
200a944: 81 c7 e0 08 ret
200a948: 81 e8 00 00 restore
0200871c <_User_extensions_Thread_create>:
*/
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
200871c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
2008720: 03 00 80 5a sethi %hi(0x2016800), %g1
2008724: e0 00 63 d8 ld [ %g1 + 0x3d8 ], %l0 ! 2016bd8 <_User_extensions_List>
2008728: 82 10 63 d8 or %g1, 0x3d8, %g1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
200872c: a4 00 60 04 add %g1, 4, %l2
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
2008730: 03 00 80 5a sethi %hi(0x2016800), %g1
2008734: 10 80 00 0d b 2008768 <_User_extensions_Thread_create+0x4c>
2008738: a2 10 62 64 or %g1, 0x264, %l1 ! 2016a64 <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
200873c: 80 a0 60 00 cmp %g1, 0
2008740: 02 80 00 09 be 2008764 <_User_extensions_Thread_create+0x48>
2008744: 92 10 00 18 mov %i0, %o1
status = (*the_extension->Callouts.thread_create)(
2008748: 9f c0 40 00 call %g1
200874c: d0 04 40 00 ld [ %l1 ], %o0
_Thread_Executing,
the_thread
);
if ( !status )
2008750: 80 8a 20 ff btst 0xff, %o0
2008754: 32 80 00 05 bne,a 2008768 <_User_extensions_Thread_create+0x4c><== ALWAYS TAKEN
2008758: e0 04 00 00 ld [ %l0 ], %l0
200875c: 81 c7 e0 08 ret <== NOT EXECUTED
2008760: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008764: e0 04 00 00 ld [ %l0 ], %l0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008768: 80 a4 00 12 cmp %l0, %l2
200876c: 32 bf ff f4 bne,a 200873c <_User_extensions_Thread_create+0x20>
2008770: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
return FALSE;
}
}
return TRUE;
}
2008774: 81 c7 e0 08 ret
2008778: 91 e8 20 01 restore %g0, 1, %o0
0200a734 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200a734: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200a738: 7f ff e1 00 call 2002b38 <sparc_disable_interrupts>
200a73c: a0 10 00 1a mov %i2, %l0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200a740: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200a744: 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 ) ) {
200a748: 80 a0 80 11 cmp %g2, %l1
200a74c: 02 80 00 1e be 200a7c4 <_Watchdog_Adjust+0x90>
200a750: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200a754: 02 80 00 19 be 200a7b8 <_Watchdog_Adjust+0x84>
200a758: a4 10 20 01 mov 1, %l2
200a75c: 80 a6 60 01 cmp %i1, 1
200a760: 12 80 00 19 bne 200a7c4 <_Watchdog_Adjust+0x90> <== NEVER TAKEN
200a764: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200a768: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200a76c: 10 80 00 07 b 200a788 <_Watchdog_Adjust+0x54>
200a770: 82 00 40 1a add %g1, %i2, %g1
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
200a774: f4 00 a0 10 ld [ %g2 + 0x10 ], %i2
200a778: 80 a4 00 1a cmp %l0, %i2
200a77c: 3a 80 00 05 bcc,a 200a790 <_Watchdog_Adjust+0x5c>
200a780: e4 20 a0 10 st %l2, [ %g2 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
200a784: 82 26 80 10 sub %i2, %l0, %g1
200a788: 10 80 00 0f b 200a7c4 <_Watchdog_Adjust+0x90>
200a78c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
200a790: 7f ff e0 ee call 2002b48 <sparc_enable_interrupts>
200a794: 01 00 00 00 nop
_Watchdog_Tickle( header );
200a798: 40 00 00 92 call 200a9e0 <_Watchdog_Tickle>
200a79c: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200a7a0: 7f ff e0 e6 call 2002b38 <sparc_disable_interrupts>
200a7a4: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
200a7a8: c2 06 00 00 ld [ %i0 ], %g1
200a7ac: 80 a0 40 11 cmp %g1, %l1
200a7b0: 02 80 00 05 be 200a7c4 <_Watchdog_Adjust+0x90>
200a7b4: a0 24 00 1a sub %l0, %i2, %l0
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200a7b8: 80 a4 20 00 cmp %l0, 0
200a7bc: 32 bf ff ee bne,a 200a774 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
200a7c0: c4 06 00 00 ld [ %i0 ], %g2
}
break;
}
}
_ISR_Enable( level );
200a7c4: 7f ff e0 e1 call 2002b48 <sparc_enable_interrupts>
200a7c8: 91 e8 00 08 restore %g0, %o0, %o0
02015f9c <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
2015f9c: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval units = units_arg;
ISR_Level level;
Chain_Node *node;
if ( !units ) {
2015fa0: 80 a6 60 00 cmp %i1, 0
2015fa4: 02 80 00 31 be 2016068 <_Watchdog_Adjust_to_chain+0xcc>
2015fa8: 01 00 00 00 nop
return;
}
_ISR_Disable( level );
2015fac: 7f ff d5 5e call 200b524 <sparc_disable_interrupts>
2015fb0: 01 00 00 00 nop
2015fb4: a4 10 00 08 mov %o0, %l2
if ( !_Chain_Is_empty( header ) ) {
2015fb8: c2 06 00 00 ld [ %i0 ], %g1
2015fbc: a2 06 20 04 add %i0, 4, %l1
2015fc0: 80 a0 40 11 cmp %g1, %l1
2015fc4: 02 80 00 27 be 2016060 <_Watchdog_Adjust_to_chain+0xc4>
2015fc8: 01 00 00 00 nop
2015fcc: a6 06 a0 04 add %i2, 4, %l3
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
2015fd0: c4 06 00 00 ld [ %i0 ], %g2
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
2015fd4: e0 00 a0 10 ld [ %g2 + 0x10 ], %l0
2015fd8: 80 a6 40 10 cmp %i1, %l0
2015fdc: 3a 80 00 05 bcc,a 2015ff0 <_Watchdog_Adjust_to_chain+0x54>
2015fe0: c0 20 a0 10 clr [ %g2 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
2015fe4: 82 24 00 19 sub %l0, %i1, %g1
2015fe8: 10 80 00 1e b 2016060 <_Watchdog_Adjust_to_chain+0xc4>
2015fec: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2015ff0: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2015ff4: 80 a0 80 11 cmp %g2, %l1
2015ff8: 32 80 00 04 bne,a 2016008 <_Watchdog_Adjust_to_chain+0x6c><== ALWAYS TAKEN
2015ffc: c2 00 80 00 ld [ %g2 ], %g1
2016000: 10 80 00 04 b 2016010 <_Watchdog_Adjust_to_chain+0x74> <== NOT EXECUTED
2016004: 84 10 20 00 clr %g2 <== NOT EXECUTED
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
2016008: c2 26 00 00 st %g1, [ %i0 ]
new_first->previous = _Chain_Head(the_chain);
201600c: f0 20 60 04 st %i0, [ %g1 + 4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2016010: e6 20 80 00 st %l3, [ %g2 ]
old_last_node = the_chain->last;
2016014: c2 06 a0 08 ld [ %i2 + 8 ], %g1
the_chain->last = the_node;
2016018: c4 26 a0 08 st %g2, [ %i2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
201601c: c2 20 a0 04 st %g1, [ %g2 + 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;
2016020: c4 20 40 00 st %g2, [ %g1 ]
do {
node = _Chain_Get_unprotected( header );
_Chain_Append_unprotected( to_fire, node );
_ISR_Flash( level );
2016024: 7f ff d5 44 call 200b534 <sparc_enable_interrupts>
2016028: 90 10 00 12 mov %l2, %o0
201602c: 7f ff d5 3e call 200b524 <sparc_disable_interrupts>
2016030: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2016034: c2 06 00 00 ld [ %i0 ], %g1
} while ( !_Chain_Is_empty( header ) &&
_Watchdog_First( header )->delta_interval == 0 );
2016038: 80 a0 40 11 cmp %g1, %l1
201603c: 02 80 00 09 be 2016060 <_Watchdog_Adjust_to_chain+0xc4>
2016040: 01 00 00 00 nop
2016044: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2016048: 80 a0 60 00 cmp %g1, 0
201604c: 22 bf ff ea be,a 2015ff4 <_Watchdog_Adjust_to_chain+0x58>
2016050: c4 06 00 00 ld [ %i0 ], %g2
return;
}
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
2016054: b2 a6 40 10 subcc %i1, %l0, %i1
2016058: 32 bf ff df bne,a 2015fd4 <_Watchdog_Adjust_to_chain+0x38><== NEVER TAKEN
201605c: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED
break;
}
}
}
_ISR_Enable( level );
2016060: 7f ff d5 35 call 200b534 <sparc_enable_interrupts>
2016064: 91 e8 00 12 restore %g0, %l2, %o0
2016068: 81 c7 e0 08 ret
201606c: 81 e8 00 00 restore
02008854 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
2008854: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
2008858: 03 00 80 5a sethi %hi(0x2016800), %g1
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
200885c: aa 10 00 18 mov %i0, %l5
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
2008860: e6 00 62 40 ld [ %g1 + 0x240 ], %l3
_ISR_Disable( level );
2008864: 7f ff e5 42 call 2001d6c <sparc_disable_interrupts>
2008868: 01 00 00 00 nop
200886c: b0 10 00 08 mov %o0, %i0
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
2008870: c2 06 60 08 ld [ %i1 + 8 ], %g1
2008874: 80 a0 60 00 cmp %g1, 0
2008878: 02 80 00 03 be 2008884 <_Watchdog_Insert+0x30> <== ALWAYS TAKEN
200887c: 07 00 80 5a sethi %hi(0x2016800), %g3
_ISR_Enable( level );
2008880: 30 80 00 39 b,a 2008964 <_Watchdog_Insert+0x110> <== NOT EXECUTED
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
2008884: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 2016af0 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
2008888: 84 10 20 01 mov 1, %g2
_Watchdog_Sync_count++;
200888c: 82 00 60 01 inc %g1
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
2008890: c4 26 60 08 st %g2, [ %i1 + 8 ]
_Watchdog_Sync_count++;
2008894: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
2008898: 03 00 80 5a sethi %hi(0x2016800), %g1
200889c: a8 10 62 60 or %g1, 0x260, %l4 ! 2016a60 <_Watchdog_Sync_level>
20088a0: ac 10 00 14 mov %l4, %l6
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
20088a4: e4 06 60 0c ld [ %i1 + 0xc ], %l2
* cache *header!!
*
* Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc)
*
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
20088a8: e2 05 40 00 ld [ %l5 ], %l1
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
20088ac: 80 a4 a0 00 cmp %l2, 0
20088b0: 22 80 00 1c be,a 2008920 <_Watchdog_Insert+0xcc>
20088b4: c4 04 60 04 ld [ %l1 + 4 ], %g2
20088b8: c2 04 40 00 ld [ %l1 ], %g1
20088bc: 80 a0 60 00 cmp %g1, 0
20088c0: 22 80 00 18 be,a 2008920 <_Watchdog_Insert+0xcc>
20088c4: c4 04 60 04 ld [ %l1 + 4 ], %g2
break;
if ( delta_interval < after->delta_interval ) {
20088c8: e0 04 60 10 ld [ %l1 + 0x10 ], %l0
20088cc: 80 a4 80 10 cmp %l2, %l0
20088d0: 1a 80 00 04 bcc 20088e0 <_Watchdog_Insert+0x8c>
20088d4: 82 24 00 12 sub %l0, %l2, %g1
after->delta_interval -= delta_interval;
20088d8: 10 80 00 11 b 200891c <_Watchdog_Insert+0xc8>
20088dc: c2 24 60 10 st %g1, [ %l1 + 0x10 ]
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
20088e0: 7f ff e5 27 call 2001d7c <sparc_enable_interrupts>
20088e4: 90 10 00 18 mov %i0, %o0
20088e8: 7f ff e5 21 call 2001d6c <sparc_disable_interrupts>
20088ec: 01 00 00 00 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
20088f0: c2 06 60 08 ld [ %i1 + 8 ], %g1
20088f4: 80 a0 60 01 cmp %g1, 1
20088f8: 12 80 00 15 bne 200894c <_Watchdog_Insert+0xf8> <== NEVER TAKEN
20088fc: a4 24 80 10 sub %l2, %l0, %l2
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
2008900: c2 05 00 00 ld [ %l4 ], %g1
2008904: 80 a0 40 13 cmp %g1, %l3
2008908: 28 bf ff e9 bleu,a 20088ac <_Watchdog_Insert+0x58>
200890c: e2 04 40 00 ld [ %l1 ], %l1
_Watchdog_Sync_level = insert_isr_nest_level;
2008910: e6 25 80 00 st %l3, [ %l6 ]
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
2008914: 10 bf ff e5 b 20088a8 <_Watchdog_Insert+0x54>
2008918: e4 06 60 0c ld [ %i1 + 0xc ], %l2
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
200891c: c4 04 60 04 ld [ %l1 + 4 ], %g2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
2008920: 03 00 80 5a sethi %hi(0x2016800), %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2008924: c6 00 80 00 ld [ %g2 ], %g3
2008928: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1
after_node->next = the_node;
200892c: f2 20 80 00 st %i1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2008930: c4 26 60 04 st %g2, [ %i1 + 4 ]
2008934: c2 26 60 14 st %g1, [ %i1 + 0x14 ]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
2008938: e4 26 60 10 st %l2, [ %i1 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
200893c: 82 10 20 02 mov 2, %g1
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
before_node->previous = the_node;
2008940: f2 20 e0 04 st %i1, [ %g3 + 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;
2008944: c6 26 40 00 st %g3, [ %i1 ]
2008948: c2 26 60 08 st %g1, [ %i1 + 8 ]
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
200894c: 03 00 80 5a sethi %hi(0x2016800), %g1
_Watchdog_Sync_count--;
2008950: 05 00 80 5a sethi %hi(0x2016800), %g2
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
2008954: e6 20 62 60 st %l3, [ %g1 + 0x260 ]
_Watchdog_Sync_count--;
2008958: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1
200895c: 82 00 7f ff add %g1, -1, %g1
2008960: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ]
_ISR_Enable( level );
2008964: 7f ff e5 06 call 2001d7c <sparc_enable_interrupts>
2008968: 81 e8 00 00 restore
020089bc <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
20089bc: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
20089c0: 7f ff e4 eb call 2001d6c <sparc_disable_interrupts>
20089c4: 01 00 00 00 nop
previous_state = the_watchdog->state;
20089c8: e0 06 20 08 ld [ %i0 + 8 ], %l0
switch ( previous_state ) {
20089cc: 80 a4 20 01 cmp %l0, 1
20089d0: 22 80 00 1e be,a 2008a48 <_Watchdog_Remove+0x8c> <== NEVER TAKEN
20089d4: c0 26 20 08 clr [ %i0 + 8 ] <== NOT EXECUTED
20089d8: 0a 80 00 1d bcs 2008a4c <_Watchdog_Remove+0x90>
20089dc: 03 00 80 5a sethi %hi(0x2016800), %g1
20089e0: 80 a4 20 03 cmp %l0, 3
20089e4: 18 80 00 1a bgu 2008a4c <_Watchdog_Remove+0x90> <== NEVER TAKEN
20089e8: 01 00 00 00 nop
20089ec: c6 06 00 00 ld [ %i0 ], %g3
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
20089f0: c0 26 20 08 clr [ %i0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
20089f4: c2 00 c0 00 ld [ %g3 ], %g1
20089f8: 80 a0 60 00 cmp %g1, 0
20089fc: 02 80 00 07 be 2008a18 <_Watchdog_Remove+0x5c>
2008a00: 03 00 80 5a sethi %hi(0x2016800), %g1
next_watchdog->delta_interval += the_watchdog->delta_interval;
2008a04: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
2008a08: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
2008a0c: 82 00 40 02 add %g1, %g2, %g1
2008a10: c2 20 e0 10 st %g1, [ %g3 + 0x10 ]
if ( _Watchdog_Sync_count )
2008a14: 03 00 80 5a sethi %hi(0x2016800), %g1
2008a18: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1 ! 2016af0 <_Watchdog_Sync_count>
2008a1c: 80 a0 60 00 cmp %g1, 0
2008a20: 22 80 00 07 be,a 2008a3c <_Watchdog_Remove+0x80> <== ALWAYS TAKEN
2008a24: c4 06 00 00 ld [ %i0 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
2008a28: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED
2008a2c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 2016a40 <_ISR_Nest_level><== NOT EXECUTED
2008a30: 03 00 80 5a sethi %hi(0x2016800), %g1 <== NOT EXECUTED
2008a34: c4 20 62 60 st %g2, [ %g1 + 0x260 ] ! 2016a60 <_Watchdog_Sync_level><== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008a38: c4 06 00 00 ld [ %i0 ], %g2 <== NOT EXECUTED
previous = the_node->previous;
2008a3c: c2 06 20 04 ld [ %i0 + 4 ], %g1
next->previous = previous;
previous->next = next;
2008a40: c4 20 40 00 st %g2, [ %g1 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2008a44: c2 20 a0 04 st %g1, [ %g2 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
2008a48: 03 00 80 5a sethi %hi(0x2016800), %g1
2008a4c: c2 00 62 f4 ld [ %g1 + 0x2f4 ], %g1 ! 2016af4 <_Watchdog_Ticks_since_boot>
2008a50: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( level );
2008a54: 7f ff e4 ca call 2001d7c <sparc_enable_interrupts>
2008a58: b0 10 00 10 mov %l0, %i0
return( previous_state );
}
2008a5c: 81 c7 e0 08 ret
2008a60: 81 e8 00 00 restore
02008a64 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
2008a64: 9d e3 bf 98 save %sp, -104, %sp
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
2008a68: 7f ff e4 c1 call 2001d6c <sparc_disable_interrupts>
2008a6c: a4 10 00 18 mov %i0, %l2
2008a70: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2008a74: c4 04 80 00 ld [ %l2 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2008a78: a6 04 a0 04 add %l2, 4, %l3
if ( _Chain_Is_empty( header ) )
2008a7c: 80 a0 80 13 cmp %g2, %l3
2008a80: 02 80 00 20 be 2008b00 <_Watchdog_Tickle+0x9c>
2008a84: 01 00 00 00 nop
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
2008a88: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2008a8c: 80 a0 60 00 cmp %g1, 0
2008a90: 02 80 00 07 be 2008aac <_Watchdog_Tickle+0x48> <== NEVER TAKEN
2008a94: a2 10 00 02 mov %g2, %l1
the_watchdog->delta_interval--;
2008a98: 82 00 7f ff add %g1, -1, %g1
2008a9c: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
if ( the_watchdog->delta_interval != 0 )
2008aa0: 80 a0 60 00 cmp %g1, 0
2008aa4: 12 80 00 17 bne 2008b00 <_Watchdog_Tickle+0x9c>
2008aa8: 01 00 00 00 nop
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
2008aac: 7f ff ff c4 call 20089bc <_Watchdog_Remove>
2008ab0: 90 10 00 11 mov %l1, %o0
2008ab4: a0 10 00 08 mov %o0, %l0
_ISR_Enable( level );
2008ab8: 7f ff e4 b1 call 2001d7c <sparc_enable_interrupts>
2008abc: 90 10 00 18 mov %i0, %o0
switch( watchdog_state ) {
2008ac0: 80 a4 20 02 cmp %l0, 2
2008ac4: 12 80 00 06 bne 2008adc <_Watchdog_Tickle+0x78> <== NEVER TAKEN
2008ac8: 01 00 00 00 nop
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
2008acc: d2 04 60 24 ld [ %l1 + 0x24 ], %o1
2008ad0: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2008ad4: 9f c0 40 00 call %g1
2008ad8: d0 04 60 20 ld [ %l1 + 0x20 ], %o0
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
2008adc: 7f ff e4 a4 call 2001d6c <sparc_disable_interrupts>
2008ae0: 01 00 00 00 nop
2008ae4: b0 10 00 08 mov %o0, %i0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
2008ae8: c2 04 80 00 ld [ %l2 ], %g1
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
2008aec: 80 a0 40 13 cmp %g1, %l3
2008af0: 02 80 00 04 be 2008b00 <_Watchdog_Tickle+0x9c>
2008af4: a2 10 00 01 mov %g1, %l1
2008af8: 10 bf ff ea b 2008aa0 <_Watchdog_Tickle+0x3c>
2008afc: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
leave:
_ISR_Enable(level);
2008b00: 7f ff e4 9f call 2001d7c <sparc_enable_interrupts>
2008b04: 81 e8 00 00 restore
02008b74 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
2008b74: 9d e3 bf 98 save %sp, -104, %sp
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
2008b78: 80 a6 20 00 cmp %i0, 0
2008b7c: 02 80 00 04 be 2008b8c <_Workspace_Handler_initialization+0x18>
2008b80: 80 8e 20 07 btst 7, %i0
2008b84: 02 80 00 06 be 2008b9c <_Workspace_Handler_initialization+0x28><== ALWAYS TAKEN
2008b88: 03 00 80 5a sethi %hi(0x2016800), %g1
_Internal_error_Occurred(
2008b8c: 90 10 20 00 clr %o0
2008b90: 92 10 20 01 mov 1, %o1
2008b94: 10 80 00 15 b 2008be8 <_Workspace_Handler_initialization+0x74>
2008b98: 94 10 20 02 mov 2, %o2
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
2008b9c: c2 00 62 3c ld [ %g1 + 0x23c ], %g1
2008ba0: c2 08 60 28 ldub [ %g1 + 0x28 ], %g1
2008ba4: 80 a0 60 00 cmp %g1, 0
2008ba8: 02 80 00 07 be 2008bc4 <_Workspace_Handler_initialization+0x50><== ALWAYS TAKEN
2008bac: 92 10 00 18 mov %i0, %o1
memset( starting_address, 0, size );
2008bb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2008bb4: 92 10 20 00 clr %o1 <== NOT EXECUTED
2008bb8: 40 00 10 5c call 200cd28 <memset> <== NOT EXECUTED
2008bbc: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
memory_available = _Heap_Initialize(
2008bc0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2008bc4: 94 10 00 19 mov %i1, %o2
2008bc8: 11 00 80 5a sethi %hi(0x2016800), %o0
2008bcc: 96 10 20 08 mov 8, %o3
2008bd0: 7f ff f6 2a call 2006478 <_Heap_Initialize>
2008bd4: 90 12 21 c4 or %o0, 0x1c4, %o0
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
2008bd8: 80 a2 20 00 cmp %o0, 0
2008bdc: 12 80 00 05 bne 2008bf0 <_Workspace_Handler_initialization+0x7c><== ALWAYS TAKEN
2008be0: 92 10 20 01 mov 1, %o1
_Internal_error_Occurred(
2008be4: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED
2008be8: 7f ff f6 ae call 20066a0 <_Internal_error_Occurred>
2008bec: 01 00 00 00 nop
2008bf0: 81 c7 e0 08 ret
2008bf4: 81 e8 00 00 restore
02005ae0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
2005ae0: 9d e3 bf 90 save %sp, -112, %sp
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
2005ae4: a2 96 20 00 orcc %i0, 0, %l1
2005ae8: 02 80 00 1b be 2005b54 <rtems_barrier_create+0x74> <== NEVER TAKEN
2005aec: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2005af0: 80 a6 e0 00 cmp %i3, 0
2005af4: 02 80 00 18 be 2005b54 <rtems_barrier_create+0x74> <== NEVER TAKEN
2005af8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
2005afc: 80 8e 60 10 btst 0x10, %i1
2005b00: 02 80 00 06 be 2005b18 <rtems_barrier_create+0x38>
2005b04: 80 a6 a0 00 cmp %i2, 0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
2005b08: 02 80 00 13 be 2005b54 <rtems_barrier_create+0x74>
2005b0c: b0 10 20 0a mov 0xa, %i0
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
2005b10: 10 80 00 04 b 2005b20 <rtems_barrier_create+0x40>
2005b14: c0 27 bf f0 clr [ %fp + -16 ]
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
2005b18: 82 10 20 01 mov 1, %g1
2005b1c: c2 27 bf f0 st %g1, [ %fp + -16 ]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005b20: 05 00 80 69 sethi %hi(0x201a400), %g2
2005b24: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 201a780 <_Thread_Dispatch_disable_level>
the_attributes.maximum_count = maximum_waiters;
2005b28: f4 27 bf f4 st %i2, [ %fp + -12 ]
2005b2c: 82 00 60 01 inc %g1
2005b30: c2 20 a3 80 st %g1, [ %g2 + 0x380 ]
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
2005b34: 21 00 80 69 sethi %hi(0x201a400), %l0
2005b38: 40 00 07 9d call 20079ac <_Objects_Allocate>
2005b3c: 90 14 22 0c or %l0, 0x20c, %o0 ! 201a60c <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
2005b40: b4 92 20 00 orcc %o0, 0, %i2
2005b44: 12 80 00 06 bne 2005b5c <rtems_barrier_create+0x7c>
2005b48: 90 06 a0 14 add %i2, 0x14, %o0
_Thread_Enable_dispatch();
2005b4c: 40 00 0b 60 call 20088cc <_Thread_Enable_dispatch>
2005b50: b0 10 20 05 mov 5, %i0
2005b54: 81 c7 e0 08 ret
2005b58: 81 e8 00 00 restore
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
2005b5c: 92 07 bf f0 add %fp, -16, %o1
2005b60: 40 00 05 55 call 20070b4 <_CORE_barrier_Initialize>
2005b64: f2 26 a0 10 st %i1, [ %i2 + 0x10 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005b68: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2005b6c: 82 14 22 0c or %l0, 0x20c, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2005b70: e2 26 a0 0c st %l1, [ %i2 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005b74: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
2005b78: c4 26 c0 00 st %g2, [ %i3 ]
2005b7c: 03 00 00 3f sethi %hi(0xfc00), %g1
2005b80: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005b84: 84 08 80 01 and %g2, %g1, %g2
2005b88: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
2005b8c: b0 10 20 00 clr %i0
2005b90: 40 00 0b 4f call 20088cc <_Thread_Enable_dispatch>
2005b94: f4 20 c0 02 st %i2, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
2005b98: 81 c7 e0 08 ret
2005b9c: 81 e8 00 00 restore
02005c40 <rtems_barrier_release>:
rtems_status_code rtems_barrier_release(
rtems_id id,
uint32_t *released
)
{
2005c40: 9d e3 bf 90 save %sp, -112, %sp
2005c44: a0 10 00 18 mov %i0, %l0
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
2005c48: 80 a6 60 00 cmp %i1, 0
2005c4c: 02 80 00 12 be 2005c94 <rtems_barrier_release+0x54> <== NEVER TAKEN
2005c50: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
2005c54: 11 00 80 69 sethi %hi(0x201a400), %o0
2005c58: 92 10 00 10 mov %l0, %o1
2005c5c: 90 12 22 0c or %o0, 0x20c, %o0
2005c60: 40 00 08 ad call 2007f14 <_Objects_Get>
2005c64: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
2005c68: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005c6c: 80 a0 60 00 cmp %g1, 0
2005c70: 12 80 00 09 bne 2005c94 <rtems_barrier_release+0x54>
2005c74: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
2005c78: 92 10 00 10 mov %l0, %o1
2005c7c: 94 10 20 00 clr %o2
2005c80: 40 00 05 19 call 20070e4 <_CORE_barrier_Release>
2005c84: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
2005c88: b0 10 20 00 clr %i0
2005c8c: 40 00 0b 10 call 20088cc <_Thread_Enable_dispatch>
2005c90: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005c94: 81 c7 e0 08 ret
2005c98: 81 e8 00 00 restore
02004b84 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
2004b84: 9d e3 bf 98 save %sp, -104, %sp
2004b88: 82 10 00 18 mov %i0, %g1
if ( !time_buffer )
2004b8c: 80 a6 60 00 cmp %i1, 0
2004b90: 02 80 00 1a be 2004bf8 <rtems_clock_get+0x74> <== NEVER TAKEN
2004b94: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
2004b98: 80 a0 60 04 cmp %g1, 4
2004b9c: 18 80 00 17 bgu 2004bf8 <rtems_clock_get+0x74>
2004ba0: b0 10 20 0a mov 0xa, %i0
2004ba4: 83 28 60 02 sll %g1, 2, %g1
2004ba8: 05 00 80 12 sethi %hi(0x2004800), %g2
2004bac: 84 10 a3 70 or %g2, 0x370, %g2 ! 2004b70 <rtems_termios_rxdaemon+0x70>
2004bb0: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2004bb4: 81 c0 40 00 jmp %g1
2004bb8: 01 00 00 00 nop
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
2004bbc: 40 00 00 2b call 2004c68 <rtems_clock_get_tod>
2004bc0: 91 e8 00 19 restore %g0, %i1, %o0
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
2004bc4: 40 00 00 0f call 2004c00 <rtems_clock_get_seconds_since_epoch>
2004bc8: 91 e8 00 19 restore %g0, %i1, %o0
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
2004bcc: 40 00 00 23 call 2004c58 <rtems_clock_get_ticks_since_boot>
2004bd0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
2004bd4: 10 80 00 05 b 2004be8 <rtems_clock_get+0x64>
2004bd8: d0 26 40 00 st %o0, [ %i1 ]
2004bdc: 40 00 00 17 call 2004c38 <rtems_clock_get_ticks_per_second>
2004be0: 01 00 00 00 nop
2004be4: d0 26 40 00 st %o0, [ %i1 ]
2004be8: 81 c7 e0 08 ret
2004bec: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
2004bf0: 40 00 00 4d call 2004d24 <rtems_clock_get_tod_timeval>
2004bf4: 91 e8 00 19 restore %g0, %i1, %o0
break;
}
return RTEMS_INVALID_NUMBER;
}
2004bf8: 81 c7 e0 08 ret
2004bfc: 81 e8 00 00 restore
02004c00 <rtems_clock_get_seconds_since_epoch>:
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
2004c00: 84 92 20 00 orcc %o0, 0, %g2
2004c04: 02 80 00 0b be 2004c30 <rtems_clock_get_seconds_since_epoch+0x30><== NEVER TAKEN
2004c08: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004c0c: 03 00 80 5a sethi %hi(0x2016800), %g1
2004c10: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 20169b4 <_TOD_Is_set>
2004c14: 80 a0 60 00 cmp %g1, 0
2004c18: 02 80 00 06 be 2004c30 <rtems_clock_get_seconds_since_epoch+0x30>
2004c1c: 90 10 20 0b mov 0xb, %o0
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
2004c20: 03 00 80 5a sethi %hi(0x2016800), %g1
2004c24: c2 00 62 34 ld [ %g1 + 0x234 ], %g1 ! 2016a34 <_TOD_Now>
2004c28: 90 10 20 00 clr %o0
2004c2c: c2 20 80 00 st %g1, [ %g2 ]
return RTEMS_SUCCESSFUL;
}
2004c30: 81 c3 e0 08 retl
02004c68 <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
2004c68: 9d e3 bf 60 save %sp, -160, %sp
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
2004c6c: a2 96 20 00 orcc %i0, 0, %l1
2004c70: 02 80 00 2b be 2004d1c <rtems_clock_get_tod+0xb4> <== NEVER TAKEN
2004c74: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004c78: 03 00 80 5a sethi %hi(0x2016800), %g1
2004c7c: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 20169b4 <_TOD_Is_set>
2004c80: 80 a0 60 00 cmp %g1, 0
2004c84: 02 80 00 26 be 2004d1c <rtems_clock_get_tod+0xb4>
2004c88: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
2004c8c: 7f ff f4 38 call 2001d6c <sparc_disable_interrupts>
2004c90: 01 00 00 00 nop
2004c94: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
2004c98: 40 00 05 ae call 2006350 <_TOD_Get>
2004c9c: 90 07 bf e8 add %fp, -24, %o0
_ISR_Enable(level);
2004ca0: 7f ff f4 37 call 2001d7c <sparc_enable_interrupts>
2004ca4: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
2004ca8: c2 07 bf e8 ld [ %fp + -24 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004cac: d0 07 bf ec ld [ %fp + -20 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004cb0: c2 27 bf f0 st %g1, [ %fp + -16 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004cb4: 40 00 38 bd call 2012fa8 <.udiv>
2004cb8: 92 10 23 e8 mov 0x3e8, %o1
/* Obtain the current time */
_TOD_Get_timeval( &now );
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
2004cbc: 92 07 bf c4 add %fp, -60, %o1
2004cc0: d0 27 bf f4 st %o0, [ %fp + -12 ]
2004cc4: 40 00 1f db call 200cc30 <gmtime_r>
2004cc8: 90 07 bf f0 add %fp, -16, %o0
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004ccc: 03 00 80 5a sethi %hi(0x2016800), %g1
2004cd0: d2 00 63 40 ld [ %g1 + 0x340 ], %o1 ! 2016b40 <_TOD_Microseconds_per_tick>
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
2004cd4: c2 07 bf d0 ld [ %fp + -48 ], %g1
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004cd8: d0 07 bf f4 ld [ %fp + -12 ], %o0
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
2004cdc: c2 24 60 08 st %g1, [ %l1 + 8 ]
tmbuf->hour = time.tm_hour;
2004ce0: c2 07 bf cc ld [ %fp + -52 ], %g1
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004ce4: b0 10 20 00 clr %i0
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
tmbuf->month = time.tm_mon + 1;
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
2004ce8: c2 24 60 0c st %g1, [ %l1 + 0xc ]
tmbuf->minute = time.tm_min;
2004cec: c2 07 bf c8 ld [ %fp + -56 ], %g1
2004cf0: c2 24 60 10 st %g1, [ %l1 + 0x10 ]
tmbuf->second = time.tm_sec;
2004cf4: c2 07 bf c4 ld [ %fp + -60 ], %g1
2004cf8: c2 24 60 14 st %g1, [ %l1 + 0x14 ]
/* Split it into a closer format */
gmtime_r( &now.tv_sec, &time );
/* Now adjust it to the RTEMS format */
tmbuf->year = time.tm_year + 1900;
2004cfc: c2 07 bf d8 ld [ %fp + -40 ], %g1
2004d00: 82 00 67 6c add %g1, 0x76c, %g1
2004d04: c2 24 40 00 st %g1, [ %l1 ]
tmbuf->month = time.tm_mon + 1;
2004d08: c2 07 bf d4 ld [ %fp + -44 ], %g1
2004d0c: 82 00 60 01 inc %g1
tmbuf->day = time.tm_mday;
tmbuf->hour = time.tm_hour;
tmbuf->minute = time.tm_min;
tmbuf->second = time.tm_sec;
tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick;
2004d10: 40 00 38 a6 call 2012fa8 <.udiv>
2004d14: c2 24 60 04 st %g1, [ %l1 + 4 ]
2004d18: d0 24 60 18 st %o0, [ %l1 + 0x18 ]
return RTEMS_SUCCESSFUL;
}
2004d1c: 81 c7 e0 08 ret
2004d20: 81 e8 00 00 restore
02004d24 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
2004d24: 9d e3 bf 90 save %sp, -112, %sp
if ( !time )
2004d28: a2 96 20 00 orcc %i0, 0, %l1
2004d2c: 02 80 00 15 be 2004d80 <rtems_clock_get_tod_timeval+0x5c> <== NEVER TAKEN
2004d30: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004d34: 03 00 80 5a sethi %hi(0x2016800), %g1
2004d38: c2 08 61 b4 ldub [ %g1 + 0x1b4 ], %g1 ! 20169b4 <_TOD_Is_set>
2004d3c: 80 a0 60 00 cmp %g1, 0
2004d40: 02 80 00 10 be 2004d80 <rtems_clock_get_tod_timeval+0x5c>
2004d44: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
2004d48: 7f ff f4 09 call 2001d6c <sparc_disable_interrupts>
2004d4c: 01 00 00 00 nop
2004d50: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
2004d54: 40 00 05 7f call 2006350 <_TOD_Get>
2004d58: 90 07 bf f0 add %fp, -16, %o0
_ISR_Enable(level);
2004d5c: 7f ff f4 08 call 2001d7c <sparc_enable_interrupts>
2004d60: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d64: d0 07 bf f4 ld [ %fp + -12 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004d68: c2 07 bf f0 ld [ %fp + -16 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d6c: 92 10 23 e8 mov 0x3e8, %o1
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2004d70: c2 24 40 00 st %g1, [ %l1 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2004d74: 40 00 38 8d call 2012fa8 <.udiv>
2004d78: b0 10 20 00 clr %i0
2004d7c: d0 24 60 04 st %o0, [ %l1 + 4 ]
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
2004d80: 81 c7 e0 08 ret
2004d84: 81 e8 00 00 restore
02004fb8 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
2004fb8: 9d e3 bf 98 save %sp, -104, %sp
if ( !uptime )
2004fbc: 90 96 20 00 orcc %i0, 0, %o0
2004fc0: 02 80 00 04 be 2004fd0 <rtems_clock_get_uptime+0x18> <== NEVER TAKEN
2004fc4: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
2004fc8: 40 00 06 00 call 20067c8 <_TOD_Get_uptime>
2004fcc: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2004fd0: 81 c7 e0 08 ret
2004fd4: 81 e8 00 00 restore
0200607c <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
200607c: 9d e3 bf 90 save %sp, -112, %sp
struct timespec newtime;
if ( !time_buffer )
2006080: a0 96 20 00 orcc %i0, 0, %l0
2006084: 02 80 00 1e be 20060fc <rtems_clock_set+0x80> <== NEVER TAKEN
2006088: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
200608c: 90 10 00 10 mov %l0, %o0
2006090: 40 00 00 65 call 2006224 <_TOD_Validate>
2006094: b0 10 20 14 mov 0x14, %i0
2006098: 80 8a 20 ff btst 0xff, %o0
200609c: 02 80 00 18 be 20060fc <rtems_clock_set+0x80>
20060a0: 01 00 00 00 nop
newtime.tv_sec = _TOD_To_seconds( time_buffer );
20060a4: 40 00 00 2d call 2006158 <_TOD_To_seconds>
20060a8: 90 10 00 10 mov %l0, %o0
newtime.tv_nsec = time_buffer->ticks *
20060ac: 03 00 80 8c sethi %hi(0x2023000), %g1
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
20060b0: d0 27 bf f0 st %o0, [ %fp + -16 ]
newtime.tv_nsec = time_buffer->ticks *
20060b4: d2 00 60 20 ld [ %g1 + 0x20 ], %o1
20060b8: 40 00 41 84 call 20166c8 <.umul>
20060bc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20060c0: 05 00 80 8b sethi %hi(0x2022c00), %g2
20060c4: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 2022e80 <_Thread_Dispatch_disable_level>
20060c8: 87 2a 20 02 sll %o0, 2, %g3
20060cc: 82 00 60 01 inc %g1
20060d0: c2 20 a2 80 st %g1, [ %g2 + 0x280 ]
20060d4: 83 2a 20 07 sll %o0, 7, %g1
20060d8: 82 20 40 03 sub %g1, %g3, %g1
20060dc: 82 00 40 08 add %g1, %o0, %g1
20060e0: 83 28 60 03 sll %g1, 3, %g1
20060e4: c2 27 bf f4 st %g1, [ %fp + -12 ]
(_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
20060e8: 90 07 bf f0 add %fp, -16, %o0
20060ec: 40 00 06 bd call 2007be0 <_TOD_Set>
20060f0: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20060f4: 40 00 0b b8 call 2008fd4 <_Thread_Enable_dispatch>
20060f8: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
20060fc: 81 c7 e0 08 ret
2006100: 81 e8 00 00 restore
02004d88 <rtems_clock_set_nanoseconds_extension>:
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
2004d88: 84 92 20 00 orcc %o0, 0, %g2
2004d8c: 02 80 00 05 be 2004da0 <rtems_clock_set_nanoseconds_extension+0x18><== NEVER TAKEN
2004d90: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
2004d94: 03 00 80 5a sethi %hi(0x2016800), %g1
2004d98: 90 10 20 00 clr %o0
2004d9c: c4 20 63 48 st %g2, [ %g1 + 0x348 ]
return RTEMS_SUCCESSFUL;
}
2004da0: 81 c3 e0 08 retl
02004dfc <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2004dfc: 9d e3 bf 98 save %sp, -104, %sp
2004e00: 90 10 00 18 mov %i0, %o0
2004e04: 96 10 00 1b mov %i3, %o3
2004e08: 92 10 00 19 mov %i1, %o1
2004e0c: 94 10 00 1a mov %i2, %o2
RTEMS_API_Control *api;
if ( !event_out )
2004e10: 80 a6 e0 00 cmp %i3, 0
2004e14: 02 80 00 15 be 2004e68 <rtems_event_receive+0x6c> <== NEVER TAKEN
2004e18: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
2004e1c: 37 00 80 5a sethi %hi(0x2016800), %i3
2004e20: c2 06 e2 64 ld [ %i3 + 0x264 ], %g1 ! 2016a64 <_Thread_Executing>
if ( _Event_sets_Is_empty( event_in ) ) {
2004e24: 80 a2 20 00 cmp %o0, 0
2004e28: 12 80 00 06 bne 2004e40 <rtems_event_receive+0x44>
2004e2c: c2 00 61 68 ld [ %g1 + 0x168 ], %g1
*event_out = api->pending_events;
2004e30: c2 00 40 00 ld [ %g1 ], %g1
2004e34: c2 22 c0 00 st %g1, [ %o3 ]
2004e38: 81 c7 e0 08 ret
2004e3c: 91 e8 20 00 restore %g0, 0, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2004e40: 03 00 80 5a sethi %hi(0x2016800), %g1
2004e44: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 20169a0 <_Thread_Dispatch_disable_level>
2004e48: 84 00 a0 01 inc %g2
2004e4c: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ]
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
2004e50: 40 00 00 08 call 2004e70 <_Event_Seize>
2004e54: 01 00 00 00 nop
_Thread_Enable_dispatch();
2004e58: 40 00 0a 09 call 200767c <_Thread_Enable_dispatch>
2004e5c: 01 00 00 00 nop
return( _Thread_Executing->Wait.return_code );
2004e60: c2 06 e2 64 ld [ %i3 + 0x264 ], %g1
2004e64: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
}
2004e68: 81 c7 e0 08 ret
2004e6c: 81 e8 00 00 restore
02006c1c <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
2006c1c: 9d e3 bf 98 save %sp, -104, %sp
2006c20: 92 10 00 19 mov %i1, %o1
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
2006c24: 80 a6 60 00 cmp %i1, 0
2006c28: 02 80 00 3f be 2006d24 <rtems_io_register_driver+0x108>
2006c2c: a0 10 00 18 mov %i0, %l0
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
2006c30: 80 a6 a0 00 cmp %i2, 0
2006c34: 02 80 00 3c be 2006d24 <rtems_io_register_driver+0x108>
2006c38: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
2006c3c: c2 06 40 00 ld [ %i1 ], %g1
2006c40: 80 a0 60 00 cmp %g1, 0
2006c44: 32 80 00 07 bne,a 2006c60 <rtems_io_register_driver+0x44>
2006c48: c0 26 80 00 clr [ %i2 ]
2006c4c: c2 06 60 04 ld [ %i1 + 4 ], %g1
2006c50: 80 a0 60 00 cmp %g1, 0
2006c54: 02 80 00 34 be 2006d24 <rtems_io_register_driver+0x108> <== ALWAYS TAKEN
2006c58: 01 00 00 00 nop
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
2006c5c: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
2006c60: 03 00 80 6a sethi %hi(0x201a800), %g1
2006c64: c8 00 60 60 ld [ %g1 + 0x60 ], %g4 ! 201a860 <_IO_Number_of_drivers>
2006c68: 80 a4 00 04 cmp %l0, %g4
2006c6c: 1a 80 00 31 bcc 2006d30 <rtems_io_register_driver+0x114>
2006c70: b0 10 20 0a mov 0xa, %i0
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
2006c74: 80 a4 20 00 cmp %l0, 0
2006c78: 12 80 00 18 bne 2006cd8 <rtems_io_register_driver+0xbc>
2006c7c: 03 00 80 6a sethi %hi(0x201a800), %g1
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
2006c80: c6 00 60 64 ld [ %g1 + 0x64 ], %g3 ! 201a864 <_IO_Driver_address_table>
2006c84: 85 29 20 03 sll %g4, 3, %g2
2006c88: 83 29 20 05 sll %g4, 5, %g1
2006c8c: a0 01 3f ff add %g4, -1, %l0
2006c90: 82 20 40 02 sub %g1, %g2, %g1
2006c94: 82 00 7f e8 add %g1, -24, %g1
2006c98: 10 80 00 0b b 2006cc4 <rtems_io_register_driver+0xa8>
2006c9c: 86 00 c0 01 add %g3, %g1, %g3
if ( !_IO_Driver_address_table[major].initialization_entry &&
2006ca0: 80 a0 60 00 cmp %g1, 0
2006ca4: 32 80 00 07 bne,a 2006cc0 <rtems_io_register_driver+0xa4>
2006ca8: a0 04 3f ff add %l0, -1, %l0
2006cac: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2006cb0: 80 a0 60 00 cmp %g1, 0
2006cb4: 02 80 00 09 be 2006cd8 <rtems_io_register_driver+0xbc> <== ALWAYS TAKEN
2006cb8: 03 00 80 6a sethi %hi(0x201a800), %g1
* in use.
*/
if ( major == 0 ) {
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
2006cbc: a0 04 3f ff add %l0, -1, %l0 <== NOT EXECUTED
2006cc0: 86 00 ff e8 add %g3, -24, %g3
2006cc4: 80 a4 20 00 cmp %l0, 0
2006cc8: 32 bf ff f6 bne,a 2006ca0 <rtems_io_register_driver+0x84>
2006ccc: c2 00 c0 00 ld [ %g3 ], %g1
2006cd0: 81 c7 e0 08 ret
2006cd4: 91 e8 20 05 restore %g0, 5, %o0
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
2006cd8: c6 00 60 64 ld [ %g1 + 0x64 ], %g3
2006cdc: 85 2c 20 03 sll %l0, 3, %g2
2006ce0: 83 2c 20 05 sll %l0, 5, %g1
2006ce4: 82 20 40 02 sub %g1, %g2, %g1
2006ce8: c4 00 c0 01 ld [ %g3 + %g1 ], %g2
2006cec: 80 a0 a0 00 cmp %g2, 0
2006cf0: 12 80 00 0f bne 2006d2c <rtems_io_register_driver+0x110>
2006cf4: 90 00 c0 01 add %g3, %g1, %o0
2006cf8: c2 02 20 04 ld [ %o0 + 4 ], %g1
2006cfc: 80 a0 60 00 cmp %g1, 0
2006d00: 32 80 00 0c bne,a 2006d30 <rtems_io_register_driver+0x114><== NEVER TAKEN
2006d04: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
2006d08: 40 00 1b b8 call 200dbe8 <memcpy>
2006d0c: 94 10 20 18 mov 0x18, %o2
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
2006d10: b0 10 00 10 mov %l0, %i0
_IO_Driver_address_table[major].open_entry )
return RTEMS_RESOURCE_IN_USE;
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
2006d14: e0 26 80 00 st %l0, [ %i2 ]
return rtems_io_initialize( major, 0, NULL );
2006d18: b2 10 20 00 clr %i1
2006d1c: 7f ff ff 4f call 2006a58 <rtems_io_initialize>
2006d20: 95 e8 20 00 restore %g0, 0, %o2
2006d24: 81 c7 e0 08 ret
2006d28: 91 e8 20 09 restore %g0, 9, %o0
2006d2c: b0 10 20 0c mov 0xc, %i0
}
2006d30: 81 c7 e0 08 ret
2006d34: 81 e8 00 00 restore
02006d38 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
2006d38: 9d e3 bf 98 save %sp, -104, %sp
if ( major < _IO_Number_of_drivers ) {
2006d3c: 03 00 80 6a sethi %hi(0x201a800), %g1
2006d40: c2 00 60 60 ld [ %g1 + 0x60 ], %g1 ! 201a860 <_IO_Number_of_drivers>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
2006d44: 86 10 00 18 mov %i0, %g3
if ( major < _IO_Number_of_drivers ) {
2006d48: 80 a6 00 01 cmp %i0, %g1
2006d4c: 1a 80 00 0c bcc 2006d7c <rtems_io_unregister_driver+0x44> <== NEVER TAKEN
2006d50: b0 10 20 0d mov 0xd, %i0
memset(
2006d54: 03 00 80 6a sethi %hi(0x201a800), %g1
2006d58: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 201a864 <_IO_Driver_address_table>
2006d5c: 83 28 e0 03 sll %g3, 3, %g1
2006d60: 91 28 e0 05 sll %g3, 5, %o0
2006d64: 92 10 20 00 clr %o1
2006d68: 90 22 00 01 sub %o0, %g1, %o0
2006d6c: 94 10 20 18 mov 0x18, %o2
2006d70: 90 00 80 08 add %g2, %o0, %o0
2006d74: 40 00 1b d6 call 200dccc <memset>
2006d78: b0 10 20 00 clr %i0
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
2006d7c: 81 c7 e0 08 ret
2006d80: 81 e8 00 00 restore
02007fcc <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)
{
2007fcc: 9d e3 bf 98 save %sp, -104, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
2007fd0: 80 a6 20 00 cmp %i0, 0
2007fd4: 02 80 00 1d be 2008048 <rtems_iterate_over_all_threads+0x7c><== NEVER TAKEN
2007fd8: 03 00 80 8b sethi %hi(0x2022c00), %g1
return;
2007fdc: a4 10 61 e4 or %g1, 0x1e4, %l2 ! 2022de4 <_Objects_Information_table+0x4>
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
2007fe0: a6 04 a0 10 add %l2, 0x10, %l3
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2007fe4: c2 04 80 00 ld [ %l2 ], %g1
2007fe8: 80 a0 60 00 cmp %g1, 0
2007fec: 22 80 00 14 be,a 200803c <rtems_iterate_over_all_threads+0x70>
2007ff0: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2007ff4: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( information ) {
2007ff8: 80 a4 60 00 cmp %l1, 0
2007ffc: 12 80 00 0b bne 2008028 <rtems_iterate_over_all_threads+0x5c><== ALWAYS TAKEN
2008000: a0 10 20 01 mov 1, %l0
for ( i=1 ; i <= information->maximum ; i++ ) {
2008004: 10 80 00 0e b 200803c <rtems_iterate_over_all_threads+0x70><== NOT EXECUTED
2008008: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
the_thread = (Thread_Control *)information->local_table[ i ];
200800c: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2008010: d0 00 40 08 ld [ %g1 + %o0 ], %o0
if ( !the_thread )
2008014: 80 a2 20 00 cmp %o0, 0
2008018: 02 80 00 04 be 2008028 <rtems_iterate_over_all_threads+0x5c><== NEVER TAKEN
200801c: a0 04 20 01 inc %l0
continue;
(*routine)(the_thread);
2008020: 9f c6 00 00 call %i0
2008024: 01 00 00 00 nop
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
2008028: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
200802c: 80 a4 00 01 cmp %l0, %g1
2008030: 08 bf ff f7 bleu 200800c <rtems_iterate_over_all_threads+0x40>
2008034: 91 2c 20 02 sll %l0, 2, %o0
2008038: a4 04 a0 04 add %l2, 4, %l2
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
200803c: 80 a4 80 13 cmp %l2, %l3
2008040: 32 bf ff ea bne,a 2007fe8 <rtems_iterate_over_all_threads+0x1c>
2008044: c2 04 80 00 ld [ %l2 ], %g1
2008048: 81 c7 e0 08 ret
200804c: 81 e8 00 00 restore
0200f160 <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f160: 9d e3 bf 90 save %sp, -112, %sp
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
200f164: a2 96 20 00 orcc %i0, 0, %l1
200f168: 02 80 00 16 be 200f1c0 <rtems_message_queue_create+0x60>
200f16c: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200f170: 80 a7 20 00 cmp %i4, 0
200f174: 02 80 00 13 be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f178: b0 10 20 09 mov 9, %i0
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
!_System_state_Is_multiprocessing )
return RTEMS_MP_NOT_CONFIGURED;
#endif
if ( count == 0 )
200f17c: 80 a6 60 00 cmp %i1, 0
200f180: 02 80 00 10 be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f184: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
200f188: 80 a6 a0 00 cmp %i2, 0
200f18c: 02 80 00 0d be 200f1c0 <rtems_message_queue_create+0x60> <== NEVER TAKEN
200f190: b0 10 20 08 mov 8, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200f194: 05 00 80 c1 sethi %hi(0x2030400), %g2
200f198: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
200f19c: 82 00 60 01 inc %g1
200f1a0: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
200f1a4: 40 00 24 9f call 2018420 <_Message_queue_Allocate>
200f1a8: 01 00 00 00 nop
if ( !the_message_queue ) {
200f1ac: a0 92 20 00 orcc %o0, 0, %l0
200f1b0: 12 80 00 06 bne 200f1c8 <rtems_message_queue_create+0x68>
200f1b4: 80 8e e0 04 btst 4, %i3
_Thread_Enable_dispatch();
200f1b8: 40 00 15 dd call 201492c <_Thread_Enable_dispatch>
200f1bc: b0 10 20 05 mov 5, %i0
200f1c0: 81 c7 e0 08 ret
200f1c4: 81 e8 00 00 restore
}
#endif
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
200f1c8: 02 80 00 05 be 200f1dc <rtems_message_queue_create+0x7c>
200f1cc: f6 24 20 10 st %i3, [ %l0 + 0x10 ]
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
200f1d0: 82 10 20 01 mov 1, %g1
200f1d4: 10 80 00 03 b 200f1e0 <rtems_message_queue_create+0x80>
200f1d8: c2 27 bf f4 st %g1, [ %fp + -12 ]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
200f1dc: c0 27 bf f4 clr [ %fp + -12 ]
if ( ! _CORE_message_queue_Initialize(
200f1e0: 94 10 00 19 mov %i1, %o2
200f1e4: 96 10 00 1a mov %i2, %o3
200f1e8: 90 04 20 14 add %l0, 0x14, %o0
200f1ec: 40 00 0d 2a call 2012694 <_CORE_message_queue_Initialize>
200f1f0: 92 07 bf f4 add %fp, -12, %o1
200f1f4: 80 8a 20 ff btst 0xff, %o0
200f1f8: 12 80 00 0a bne 200f220 <rtems_message_queue_create+0xc0>
200f1fc: 03 00 80 c2 sethi %hi(0x2030800), %g1
*/
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
Message_queue_Control *the_message_queue
)
{
_Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
200f200: 90 10 60 20 or %g1, 0x20, %o0 ! 2030820 <_Message_queue_Information>
200f204: 92 10 00 10 mov %l0, %o1
200f208: 40 00 12 dc call 2013d78 <_Objects_Free>
200f20c: b0 10 20 0d mov 0xd, %i0
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
200f210: 40 00 15 c7 call 201492c <_Thread_Enable_dispatch>
200f214: 01 00 00 00 nop
200f218: 81 c7 e0 08 ret
200f21c: 81 e8 00 00 restore
200f220: c4 04 20 08 ld [ %l0 + 8 ], %g2
200f224: 82 10 60 20 or %g1, 0x20, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f228: e2 24 20 0c st %l1, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f22c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
200f230: c4 27 00 00 st %g2, [ %i4 ]
200f234: 03 00 00 3f sethi %hi(0xfc00), %g1
200f238: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f23c: 84 08 80 01 and %g2, %g1, %g2
200f240: 85 28 a0 02 sll %g2, 2, %g2
name,
0
);
#endif
_Thread_Enable_dispatch();
200f244: b0 10 20 00 clr %i0
200f248: 40 00 15 b9 call 201492c <_Thread_Enable_dispatch>
200f24c: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
200f250: 81 c7 e0 08 ret
200f254: 81 e8 00 00 restore
0200f2c0 <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
200f2c0: 9d e3 bf 90 save %sp, -112, %sp
200f2c4: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f2c8: 80 a6 60 00 cmp %i1, 0
200f2cc: 02 80 00 0f be 200f308 <rtems_message_queue_flush+0x48> <== NEVER TAKEN
200f2d0: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Message_queue_Control *)
200f2d4: 11 00 80 c2 sethi %hi(0x2030800), %o0
200f2d8: 94 07 bf f4 add %fp, -12, %o2
200f2dc: 40 00 13 26 call 2013f74 <_Objects_Get>
200f2e0: 90 12 20 20 or %o0, 0x20, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f2e4: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f2e8: 80 a0 60 00 cmp %g1, 0
200f2ec: 12 80 00 07 bne 200f308 <rtems_message_queue_flush+0x48>
200f2f0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
200f2f4: 40 00 0c c8 call 2012614 <_CORE_message_queue_Flush>
200f2f8: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
200f2fc: b0 10 20 00 clr %i0
200f300: 40 00 15 8b call 201492c <_Thread_Enable_dispatch>
200f304: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f308: 81 c7 e0 08 ret
200f30c: 81 e8 00 00 restore
0200f310 <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
Objects_Id id,
uint32_t *count
)
{
200f310: 9d e3 bf 90 save %sp, -112, %sp
200f314: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f318: 80 a6 60 00 cmp %i1, 0
200f31c: 02 80 00 0e be 200f354 <rtems_message_queue_get_number_pending+0x44><== NEVER TAKEN
200f320: b0 10 20 09 mov 9, %i0
200f324: 11 00 80 c2 sethi %hi(0x2030800), %o0
200f328: 94 07 bf f4 add %fp, -12, %o2
200f32c: 40 00 13 12 call 2013f74 <_Objects_Get>
200f330: 90 12 20 20 or %o0, 0x20, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f334: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f338: 80 a0 60 00 cmp %g1, 0
200f33c: 12 80 00 06 bne 200f354 <rtems_message_queue_get_number_pending+0x44>
200f340: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
200f344: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
_Thread_Enable_dispatch();
200f348: b0 10 20 00 clr %i0
200f34c: 40 00 15 78 call 201492c <_Thread_Enable_dispatch>
200f350: c2 26 40 00 st %g1, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f354: 81 c7 e0 08 ret
200f358: 81 e8 00 00 restore
0200f41c <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f41c: 9d e3 bf 88 save %sp, -120, %sp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
200f420: 80 a6 60 00 cmp %i1, 0
200f424: 02 80 00 1a be 200f48c <rtems_message_queue_send+0x70> <== NEVER TAKEN
200f428: 90 10 20 09 mov 9, %o0
200f42c: 11 00 80 c2 sethi %hi(0x2030800), %o0
200f430: 92 10 00 18 mov %i0, %o1
200f434: 90 12 20 20 or %o0, 0x20, %o0
200f438: 40 00 12 cf call 2013f74 <_Objects_Get>
200f43c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f440: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f444: 84 10 00 08 mov %o0, %g2
200f448: 80 a0 60 00 cmp %g1, 0
200f44c: 12 80 00 10 bne 200f48c <rtems_message_queue_send+0x70>
200f450: 90 10 20 04 mov 4, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f454: 92 10 00 19 mov %i1, %o1
200f458: 94 10 00 1a mov %i2, %o2
200f45c: 96 10 00 18 mov %i0, %o3
200f460: 90 00 a0 14 add %g2, 0x14, %o0
200f464: 98 10 20 00 clr %o4
200f468: c0 23 a0 5c clr [ %sp + 0x5c ]
200f46c: c0 23 a0 60 clr [ %sp + 0x60 ]
200f470: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5
200f474: 40 00 0c fe call 201286c <_CORE_message_queue_Submit>
200f478: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff <RAM_END+0x7dbfffff>
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f47c: 40 00 15 2c call 201492c <_Thread_Enable_dispatch>
200f480: a0 10 00 08 mov %o0, %l0
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
200f484: 40 00 00 04 call 200f494 <_Message_queue_Translate_core_message_queue_return_code>
200f488: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f48c: 81 c7 e0 08 ret
200f490: 91 e8 00 08 restore %g0, %o0, %o0
0200f4a8 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f4a8: 9d e3 bf 88 save %sp, -120, %sp
register Message_queue_Control *the_message_queue;
Objects_Locations location;
CORE_message_queue_Status status;
if ( !buffer )
200f4ac: 80 a6 60 00 cmp %i1, 0
200f4b0: 02 80 00 19 be 200f514 <rtems_message_queue_urgent+0x6c> <== NEVER TAKEN
200f4b4: 90 10 20 09 mov 9, %o0
200f4b8: 11 00 80 c2 sethi %hi(0x2030800), %o0
200f4bc: 92 10 00 18 mov %i0, %o1
200f4c0: 90 12 20 20 or %o0, 0x20, %o0
200f4c4: 40 00 12 ac call 2013f74 <_Objects_Get>
200f4c8: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f4cc: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f4d0: 84 10 00 08 mov %o0, %g2
200f4d4: 80 a0 60 00 cmp %g1, 0
200f4d8: 12 80 00 0f bne 200f514 <rtems_message_queue_urgent+0x6c>
200f4dc: 90 10 20 04 mov 4, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f4e0: 92 10 00 19 mov %i1, %o1
200f4e4: 94 10 00 1a mov %i2, %o2
200f4e8: 96 10 00 18 mov %i0, %o3
200f4ec: 90 00 a0 14 add %g2, 0x14, %o0
200f4f0: 98 10 20 00 clr %o4
200f4f4: 1b 20 00 00 sethi %hi(0x80000000), %o5
200f4f8: c0 23 a0 5c clr [ %sp + 0x5c ]
200f4fc: 40 00 0c dc call 201286c <_CORE_message_queue_Submit>
200f500: c0 23 a0 60 clr [ %sp + 0x60 ]
id,
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f504: 40 00 15 0a call 201492c <_Thread_Enable_dispatch>
200f508: a0 10 00 08 mov %o0, %l0
/*
* Since this API does not allow for blocking sends, we can directly
* return the returned status.
*/
return _Message_queue_Translate_core_message_queue_return_code(status);
200f50c: 7f ff ff e2 call 200f494 <_Message_queue_Translate_core_message_queue_return_code>
200f510: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f514: 81 c7 e0 08 ret
200f518: 91 e8 00 08 restore %g0, %o0, %o0
02006cec <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
2006cec: 9d e3 bf 90 save %sp, -112, %sp
2006cf0: 90 10 00 18 mov %i0, %o0
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
2006cf4: 80 a6 60 00 cmp %i1, 0
2006cf8: 02 80 00 18 be 2006d58 <rtems_object_set_name+0x6c> <== NEVER TAKEN
2006cfc: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2006d00: b0 92 20 00 orcc %o0, 0, %i0
2006d04: 12 80 00 04 bne 2006d14 <rtems_object_set_name+0x28>
2006d08: 03 00 80 6f sethi %hi(0x201bc00), %g1
2006d0c: c2 00 61 14 ld [ %g1 + 0x114 ], %g1 ! 201bd14 <_Thread_Executing>
2006d10: f0 00 60 08 ld [ %g1 + 8 ], %i0
information = _Objects_Get_information_id( tmpId );
2006d14: 40 00 06 82 call 200871c <_Objects_Get_information_id>
2006d18: 90 10 00 18 mov %i0, %o0
if ( !information )
2006d1c: a0 92 20 00 orcc %o0, 0, %l0
2006d20: 02 80 00 10 be 2006d60 <rtems_object_set_name+0x74>
2006d24: 92 10 00 18 mov %i0, %o1
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
2006d28: 40 00 07 0c call 2008958 <_Objects_Get>
2006d2c: 94 07 bf f4 add %fp, -12, %o2
switch ( location ) {
2006d30: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006d34: 80 a0 60 00 cmp %g1, 0
2006d38: 32 80 00 08 bne,a 2006d58 <rtems_object_set_name+0x6c>
2006d3c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
2006d40: 92 10 00 08 mov %o0, %o1
2006d44: 94 10 00 19 mov %i1, %o2
2006d48: 40 00 07 96 call 2008ba0 <_Objects_Set_name>
2006d4c: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
2006d50: 40 00 09 ae call 2009408 <_Thread_Enable_dispatch>
2006d54: b0 10 20 00 clr %i0
2006d58: 81 c7 e0 08 ret
2006d5c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
2006d60: b0 10 20 04 mov 4, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006d64: 81 c7 e0 08 ret
2006d68: 81 e8 00 00 restore
0200f51c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f51c: 9d e3 bf 98 save %sp, -104, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
200f520: a6 96 20 00 orcc %i0, 0, %l3
200f524: 02 80 00 1e be 200f59c <rtems_partition_create+0x80>
200f528: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
200f52c: 80 a6 60 00 cmp %i1, 0
200f530: 02 80 00 38 be 200f610 <rtems_partition_create+0xf4> <== NEVER TAKEN
200f534: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
200f538: 02 80 00 36 be 200f610 <rtems_partition_create+0xf4> <== NEVER TAKEN
200f53c: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
200f540: 22 80 00 17 be,a 200f59c <rtems_partition_create+0x80>
200f544: b0 10 20 08 mov 8, %i0
200f548: 80 a6 e0 00 cmp %i3, 0
200f54c: 22 80 00 14 be,a 200f59c <rtems_partition_create+0x80>
200f550: b0 10 20 08 mov 8, %i0
200f554: 80 a6 80 1b cmp %i2, %i3
200f558: 0a 80 00 30 bcs 200f618 <rtems_partition_create+0xfc>
200f55c: 80 8e e0 07 btst 7, %i3
200f560: 12 80 00 2e bne 200f618 <rtems_partition_create+0xfc>
200f564: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
200f568: 12 80 00 2a bne 200f610 <rtems_partition_create+0xf4>
200f56c: 05 00 80 c1 sethi %hi(0x2030400), %g2
200f570: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
200f574: 82 00 60 01 inc %g1
200f578: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
* 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 );
200f57c: 25 00 80 c0 sethi %hi(0x2030000), %l2
200f580: 40 00 11 11 call 20139c4 <_Objects_Allocate>
200f584: 90 14 a2 f4 or %l2, 0x2f4, %o0 ! 20302f4 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
200f588: a2 92 20 00 orcc %o0, 0, %l1
200f58c: 12 80 00 06 bne 200f5a4 <rtems_partition_create+0x88>
200f590: 92 10 00 1b mov %i3, %o1
_Thread_Enable_dispatch();
200f594: 40 00 14 e6 call 201492c <_Thread_Enable_dispatch>
200f598: b0 10 20 05 mov 5, %i0
200f59c: 81 c7 e0 08 ret
200f5a0: 81 e8 00 00 restore
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
200f5a4: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
200f5a8: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
200f5ac: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
the_partition->buffer_size = buffer_size;
200f5b0: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
200f5b4: c0 24 60 20 clr [ %l1 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
200f5b8: 40 00 4a f4 call 2022188 <.udiv>
200f5bc: 90 10 00 1a mov %i2, %o0
200f5c0: 92 10 00 19 mov %i1, %o1
200f5c4: 94 10 00 08 mov %o0, %o2
200f5c8: 96 10 00 1b mov %i3, %o3
200f5cc: a0 04 60 24 add %l1, 0x24, %l0
200f5d0: 40 00 0b d7 call 201252c <_Chain_Initialize>
200f5d4: 90 10 00 10 mov %l0, %o0
200f5d8: c4 04 60 08 ld [ %l1 + 8 ], %g2
200f5dc: 82 14 a2 f4 or %l2, 0x2f4, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f5e0: e6 24 60 0c st %l3, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f5e4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
200f5e8: c4 27 40 00 st %g2, [ %i5 ]
200f5ec: 03 00 00 3f sethi %hi(0xfc00), %g1
200f5f0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f5f4: 84 08 80 01 and %g2, %g1, %g2
200f5f8: 85 28 a0 02 sll %g2, 2, %g2
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
200f5fc: b0 10 20 00 clr %i0
200f600: 40 00 14 cb call 201492c <_Thread_Enable_dispatch>
200f604: e2 20 c0 02 st %l1, [ %g3 + %g2 ]
200f608: 81 c7 e0 08 ret
200f60c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
200f610: 81 c7 e0 08 ret
200f614: 91 e8 20 09 restore %g0, 9, %o0
200f618: b0 10 20 08 mov 8, %i0
}
200f61c: 81 c7 e0 08 ret
200f620: 81 e8 00 00 restore
0200f698 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
Objects_Id id,
void **buffer
)
{
200f698: 9d e3 bf 90 save %sp, -112, %sp
200f69c: 92 10 00 18 mov %i0, %o1
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
200f6a0: 80 a6 60 00 cmp %i1, 0
200f6a4: 02 80 00 19 be 200f708 <rtems_partition_get_buffer+0x70> <== NEVER TAKEN
200f6a8: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
200f6ac: 11 00 80 c0 sethi %hi(0x2030000), %o0
200f6b0: 94 07 bf f4 add %fp, -12, %o2
200f6b4: 40 00 12 30 call 2013f74 <_Objects_Get>
200f6b8: 90 12 22 f4 or %o0, 0x2f4, %o0
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
200f6bc: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f6c0: a0 10 00 08 mov %o0, %l0
200f6c4: 80 a0 60 00 cmp %g1, 0
200f6c8: 12 80 00 10 bne 200f708 <rtems_partition_get_buffer+0x70>
200f6cc: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
200f6d0: 40 00 0b 87 call 20124ec <_Chain_Get>
200f6d4: 90 02 20 24 add %o0, 0x24, %o0
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
200f6d8: b0 92 20 00 orcc %o0, 0, %i0
200f6dc: 02 80 00 09 be 200f700 <rtems_partition_get_buffer+0x68>
200f6e0: 01 00 00 00 nop
the_partition->number_of_used_blocks += 1;
200f6e4: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
200f6e8: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
200f6ec: 40 00 14 90 call 201492c <_Thread_Enable_dispatch>
200f6f0: c2 24 20 20 st %g1, [ %l0 + 0x20 ]
*buffer = the_buffer;
200f6f4: f0 26 40 00 st %i0, [ %i1 ]
200f6f8: 81 c7 e0 08 ret
200f6fc: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
200f700: 40 00 14 8b call 201492c <_Thread_Enable_dispatch>
200f704: b0 10 20 0d mov 0xd, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f708: 81 c7 e0 08 ret
200f70c: 81 e8 00 00 restore
0200eaa4 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
Objects_Id *id
)
{
200eaa4: 9d e3 bf 98 save %sp, -104, %sp
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
200eaa8: a2 96 20 00 orcc %i0, 0, %l1
200eaac: 02 80 00 14 be 200eafc <rtems_port_create+0x58>
200eab0: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200eab4: 80 a7 20 00 cmp %i4, 0
200eab8: 02 80 00 24 be 200eb48 <rtems_port_create+0xa4> <== NEVER TAKEN
200eabc: 82 16 80 19 or %i2, %i1, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
200eac0: 80 88 60 07 btst 7, %g1
200eac4: 12 80 00 0e bne 200eafc <rtems_port_create+0x58>
200eac8: b0 10 20 09 mov 9, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200eacc: 05 00 80 c1 sethi %hi(0x2030400), %g2
200ead0: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
200ead4: 82 00 60 01 inc %g1
200ead8: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
200eadc: 21 00 80 c0 sethi %hi(0x2030000), %l0
200eae0: 40 00 13 b9 call 20139c4 <_Objects_Allocate>
200eae4: 90 14 22 b4 or %l0, 0x2b4, %o0 ! 20302b4 <_Dual_ported_memory_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
200eae8: 80 a2 20 00 cmp %o0, 0
200eaec: 32 80 00 06 bne,a 200eb04 <rtems_port_create+0x60>
200eaf0: c4 02 20 08 ld [ %o0 + 8 ], %g2
_Thread_Enable_dispatch();
200eaf4: 40 00 17 8e call 201492c <_Thread_Enable_dispatch>
200eaf8: b0 10 20 05 mov 5, %i0
200eafc: 81 c7 e0 08 ret
200eb00: 81 e8 00 00 restore
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb04: 82 14 22 b4 or %l0, 0x2b4, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200eb08: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb0c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
200eb10: 82 06 ff ff add %i3, -1, %g1
200eb14: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
200eb18: c4 27 00 00 st %g2, [ %i4 ]
200eb1c: 03 00 00 3f sethi %hi(0xfc00), %g1
200eb20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200eb24: 84 08 80 01 and %g2, %g1, %g2
200eb28: 85 28 a0 02 sll %g2, 2, %g2
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
200eb2c: f2 22 20 10 st %i1, [ %o0 + 0x10 ]
the_port->external_base = external_start;
200eb30: f4 22 20 14 st %i2, [ %o0 + 0x14 ]
200eb34: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
200eb38: 40 00 17 7d call 201492c <_Thread_Enable_dispatch>
200eb3c: b0 10 20 00 clr %i0
200eb40: 81 c7 e0 08 ret
200eb44: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
200eb48: b0 10 20 09 mov 9, %i0 <== NOT EXECUTED
}
200eb4c: 81 c7 e0 08 ret <== NOT EXECUTED
200eb50: 81 e8 00 00 restore <== NOT EXECUTED
0200ebac <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
Objects_Id id,
void *external,
void **internal
)
{
200ebac: 9d e3 bf 90 save %sp, -112, %sp
200ebb0: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
200ebb4: 80 a6 a0 00 cmp %i2, 0
200ebb8: 02 80 00 16 be 200ec10 <rtems_port_external_to_internal+0x64><== NEVER TAKEN
200ebbc: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
200ebc0: 11 00 80 c0 sethi %hi(0x2030000), %o0
200ebc4: 94 07 bf f4 add %fp, -12, %o2
200ebc8: 40 00 14 eb call 2013f74 <_Objects_Get>
200ebcc: 90 12 22 b4 or %o0, 0x2b4, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ebd0: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ebd4: 80 a0 60 00 cmp %g1, 0
200ebd8: 12 80 00 0e bne 200ec10 <rtems_port_external_to_internal+0x64>
200ebdc: b0 10 20 04 mov 4, %i0
RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract (
void *left,
void *right
)
{
return ((char *) left - (char *) right);
200ebe0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
200ebe4: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ebe8: 86 26 40 01 sub %i1, %g1, %g3
200ebec: 80 a0 c0 02 cmp %g3, %g2
200ebf0: 28 80 00 04 bleu,a 200ec00 <rtems_port_external_to_internal+0x54>
200ebf4: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
*internal = external;
200ebf8: 10 80 00 04 b 200ec08 <rtems_port_external_to_internal+0x5c>
200ebfc: f2 26 80 00 st %i1, [ %i2 ]
else
*internal = _Addresses_Add_offset( the_port->internal_base,
200ec00: 82 00 40 03 add %g1, %g3, %g1
200ec04: c2 26 80 00 st %g1, [ %i2 ]
ending );
_Thread_Enable_dispatch();
200ec08: 40 00 17 49 call 201492c <_Thread_Enable_dispatch>
200ec0c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ec10: 81 c7 e0 08 ret
200ec14: 81 e8 00 00 restore
0200ec4c <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
Objects_Id id,
void *internal,
void **external
)
{
200ec4c: 9d e3 bf 90 save %sp, -112, %sp
200ec50: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
200ec54: 80 a6 a0 00 cmp %i2, 0
200ec58: 02 80 00 16 be 200ecb0 <rtems_port_internal_to_external+0x64><== NEVER TAKEN
200ec5c: b0 10 20 09 mov 9, %i0
200ec60: 11 00 80 c0 sethi %hi(0x2030000), %o0
200ec64: 94 07 bf f4 add %fp, -12, %o2
200ec68: 40 00 14 c3 call 2013f74 <_Objects_Get>
200ec6c: 90 12 22 b4 or %o0, 0x2b4, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ec70: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ec74: 80 a0 60 00 cmp %g1, 0
200ec78: 12 80 00 0e bne 200ecb0 <rtems_port_internal_to_external+0x64>
200ec7c: b0 10 20 04 mov 4, %i0
200ec80: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
200ec84: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ec88: 86 26 40 01 sub %i1, %g1, %g3
200ec8c: 80 a0 c0 02 cmp %g3, %g2
200ec90: 28 80 00 04 bleu,a 200eca0 <rtems_port_internal_to_external+0x54>
200ec94: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
*external = internal;
200ec98: 10 80 00 04 b 200eca8 <rtems_port_internal_to_external+0x5c>
200ec9c: f2 26 80 00 st %i1, [ %i2 ]
else
*external = _Addresses_Add_offset( the_port->external_base,
200eca0: 82 00 40 03 add %g1, %g3, %g1
200eca4: c2 26 80 00 st %g1, [ %i2 ]
ending );
_Thread_Enable_dispatch();
200eca8: 40 00 17 21 call 201492c <_Thread_Enable_dispatch>
200ecac: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ecb0: 81 c7 e0 08 ret
200ecb4: 81 e8 00 00 restore
020063d8 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
Objects_Id *id
)
{
20063d8: 9d e3 bf 98 save %sp, -104, %sp
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
20063dc: a4 96 20 00 orcc %i0, 0, %l2
20063e0: 02 80 00 11 be 2006424 <rtems_rate_monotonic_create+0x4c>
20063e4: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
20063e8: 80 a6 60 00 cmp %i1, 0
20063ec: 02 80 00 0e be 2006424 <rtems_rate_monotonic_create+0x4c> <== NEVER TAKEN
20063f0: b0 10 20 09 mov 9, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20063f4: 05 00 80 6d sethi %hi(0x201b400), %g2
20063f8: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1 ! 201b490 <_Thread_Dispatch_disable_level>
20063fc: 82 00 60 01 inc %g1
2006400: c2 20 a0 90 st %g1, [ %g2 + 0x90 ]
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
2006404: 23 00 80 6c sethi %hi(0x201b000), %l1
2006408: 40 00 07 cc call 2008338 <_Objects_Allocate>
200640c: 90 14 63 14 or %l1, 0x314, %o0 ! 201b314 <_Rate_monotonic_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
2006410: a0 92 20 00 orcc %o0, 0, %l0
2006414: 12 80 00 06 bne 200642c <rtems_rate_monotonic_create+0x54>
2006418: 03 00 80 6d sethi %hi(0x201b400), %g1
_Thread_Enable_dispatch();
200641c: 40 00 0b d5 call 2009370 <_Thread_Enable_dispatch>
2006420: b0 10 20 05 mov 5, %i0
2006424: 81 c7 e0 08 ret
2006428: 81 e8 00 00 restore
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
200642c: c2 00 61 54 ld [ %g1 + 0x154 ], %g1
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006430: 92 10 20 00 clr %o1
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
2006434: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006438: 94 10 20 38 mov 0x38, %o2
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
the_period->state = RATE_MONOTONIC_INACTIVE;
200643c: c0 24 20 38 clr [ %l0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006440: c0 24 20 18 clr [ %l0 + 0x18 ]
the_watchdog->routine = routine;
2006444: c0 24 20 2c clr [ %l0 + 0x2c ]
the_watchdog->id = id;
2006448: c0 24 20 30 clr [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
200644c: c0 24 20 34 clr [ %l0 + 0x34 ]
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006450: 40 00 22 65 call 200ede4 <memset>
2006454: 90 04 20 54 add %l0, 0x54, %o0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006458: c4 04 20 08 ld [ %l0 + 8 ], %g2
200645c: 82 14 63 14 or %l1, 0x314, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2006460: e4 24 20 0c st %l2, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006464: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2006468: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
200646c: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
2006470: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
2006474: c2 24 20 5c st %g1, [ %l0 + 0x5c ]
2006478: c2 24 20 60 st %g1, [ %l0 + 0x60 ]
200647c: c2 24 20 74 st %g1, [ %l0 + 0x74 ]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
2006480: c4 26 40 00 st %g2, [ %i1 ]
2006484: 03 00 00 3f sethi %hi(0xfc00), %g1
2006488: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200648c: 84 08 80 01 and %g2, %g1, %g2
2006490: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
2006494: b0 10 20 00 clr %i0
2006498: 40 00 0b b6 call 2009370 <_Thread_Enable_dispatch>
200649c: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
20064a0: 81 c7 e0 08 ret
20064a4: 81 e8 00 00 restore
0200cce8 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
200cce8: 9d e3 bf 90 save %sp, -112, %sp
200ccec: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
200ccf0: 80 a6 60 00 cmp %i1, 0
200ccf4: 02 80 00 10 be 200cd34 <rtems_rate_monotonic_get_statistics+0x4c><== NEVER TAKEN
200ccf8: b0 10 20 09 mov 9, %i0
200ccfc: 11 00 80 6c sethi %hi(0x201b000), %o0
200cd00: 94 07 bf f4 add %fp, -12, %o2
200cd04: 7f ff ef 2d call 20089b8 <_Objects_Get>
200cd08: 90 12 23 14 or %o0, 0x314, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200cd0c: c2 07 bf f4 ld [ %fp + -12 ], %g1
200cd10: 80 a0 60 00 cmp %g1, 0
200cd14: 12 80 00 08 bne 200cd34 <rtems_rate_monotonic_get_statistics+0x4c>
200cd18: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
200cd1c: 92 02 20 54 add %o0, 0x54, %o1
200cd20: 94 10 20 38 mov 0x38, %o2
200cd24: 40 00 07 f7 call 200ed00 <memcpy>
200cd28: 90 10 00 19 mov %i1, %o0
_Thread_Enable_dispatch();
200cd2c: 7f ff f1 91 call 2009370 <_Thread_Enable_dispatch>
200cd30: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200cd34: 81 c7 e0 08 ret
200cd38: 81 e8 00 00 restore
0200cd3c <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
200cd3c: 9d e3 bf 88 save %sp, -120, %sp
200cd40: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
200cd44: 80 a6 60 00 cmp %i1, 0
200cd48: 02 80 00 28 be 200cde8 <rtems_rate_monotonic_get_status+0xac><== NEVER TAKEN
200cd4c: b0 10 20 09 mov 9, %i0
200cd50: 11 00 80 6c sethi %hi(0x201b000), %o0
200cd54: 94 07 bf f4 add %fp, -12, %o2
200cd58: 7f ff ef 18 call 20089b8 <_Objects_Get>
200cd5c: 90 12 23 14 or %o0, 0x314, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200cd60: c2 07 bf f4 ld [ %fp + -12 ], %g1
200cd64: a2 10 00 08 mov %o0, %l1
200cd68: 80 a0 60 00 cmp %g1, 0
200cd6c: 12 80 00 1f bne 200cde8 <rtems_rate_monotonic_get_status+0xac>
200cd70: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200cd74: c2 02 20 50 ld [ %o0 + 0x50 ], %g1
200cd78: 80 a0 60 00 cmp %g1, 0
200cd7c: 02 80 00 03 be 200cd88 <rtems_rate_monotonic_get_status+0x4c><== NEVER TAKEN
200cd80: 84 10 20 00 clr %g2
200cd84: c4 00 60 08 ld [ %g1 + 8 ], %g2
status->state = the_period->state;
200cd88: c2 04 60 38 ld [ %l1 + 0x38 ], %g1
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200cd8c: c4 26 40 00 st %g2, [ %i1 ]
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
200cd90: 80 a0 60 00 cmp %g1, 0
200cd94: 12 80 00 07 bne 200cdb0 <rtems_rate_monotonic_get_status+0x74>
200cd98: c2 26 60 04 st %g1, [ %i1 + 4 ]
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
status->executed_since_last_period.tv_nsec = 0;
200cd9c: c0 26 60 14 clr [ %i1 + 0x14 ]
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
status->since_last_period.tv_sec = 0;
200cda0: c0 26 60 08 clr [ %i1 + 8 ]
status->since_last_period.tv_nsec = 0;
200cda4: c0 26 60 0c clr [ %i1 + 0xc ]
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
200cda8: 10 80 00 0e b 200cde0 <rtems_rate_monotonic_get_status+0xa4>
200cdac: c0 26 60 10 clr [ %i1 + 0x10 ]
* This lets them share one single invocation of _TOD_Get_uptime().
*/
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \
defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
struct timespec uptime;
_TOD_Get_uptime( &uptime );
200cdb0: a0 07 bf ec add %fp, -20, %l0
200cdb4: 7f ff ec 5e call 2007f2c <_TOD_Get_uptime>
200cdb8: 90 10 00 10 mov %l0, %o0
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
200cdbc: 90 04 60 44 add %l1, 0x44, %o0
200cdc0: 92 10 00 10 mov %l0, %o1
200cdc4: 7f ff f6 06 call 200a5dc <_Timespec_Subtract>
200cdc8: 94 06 60 08 add %i1, 8, %o2
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
200cdcc: 11 00 80 6d sethi %hi(0x201b400), %o0
200cdd0: 92 10 00 10 mov %l0, %o1
200cdd4: 94 06 60 10 add %i1, 0x10, %o2
200cdd8: 7f ff f6 01 call 200a5dc <_Timespec_Subtract>
200cddc: 90 12 21 5c or %o0, 0x15c, %o0
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
200cde0: 7f ff f1 64 call 2009370 <_Thread_Enable_dispatch>
200cde4: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200cde8: 81 c7 e0 08 ret
200cdec: 81 e8 00 00 restore
020066b4 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
Objects_Id id,
rtems_interval length
)
{
20066b4: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
20066b8: 11 00 80 6c sethi %hi(0x201b000), %o0
20066bc: 92 10 00 18 mov %i0, %o1
20066c0: 90 12 23 14 or %o0, 0x314, %o0
20066c4: 40 00 08 bd call 20089b8 <_Objects_Get>
20066c8: 94 07 bf f4 add %fp, -12, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
20066cc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20066d0: 80 a0 60 00 cmp %g1, 0
20066d4: 12 80 00 64 bne 2006864 <rtems_rate_monotonic_period+0x1b0>
20066d8: a2 10 00 08 mov %o0, %l1
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
20066dc: 27 00 80 6d sethi %hi(0x201b400), %l3
20066e0: c4 02 20 50 ld [ %o0 + 0x50 ], %g2
20066e4: c2 04 e1 54 ld [ %l3 + 0x154 ], %g1
20066e8: 80 a0 80 01 cmp %g2, %g1
20066ec: 02 80 00 06 be 2006704 <rtems_rate_monotonic_period+0x50>
20066f0: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
20066f4: 40 00 0b 1f call 2009370 <_Thread_Enable_dispatch>
20066f8: b0 10 20 17 mov 0x17, %i0
20066fc: 81 c7 e0 08 ret
2006700: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2006704: 12 80 00 0c bne 2006734 <rtems_rate_monotonic_period+0x80>
2006708: 01 00 00 00 nop
switch ( the_period->state ) {
200670c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2006710: 80 a0 60 00 cmp %g1, 0
2006714: 02 80 00 50 be 2006854 <rtems_rate_monotonic_period+0x1a0>
2006718: b0 10 20 0b mov 0xb, %i0
200671c: 82 00 7f fd add %g1, -3, %g1
2006720: 80 a0 60 01 cmp %g1, 1
2006724: 18 80 00 4c bgu 2006854 <rtems_rate_monotonic_period+0x1a0>
2006728: b0 10 20 00 clr %i0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
200672c: 10 80 00 4a b 2006854 <rtems_rate_monotonic_period+0x1a0>
2006730: b0 10 20 06 mov 6, %i0
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
2006734: 7f ff f1 48 call 2002c54 <sparc_disable_interrupts>
2006738: 01 00 00 00 nop
200673c: a0 10 00 08 mov %o0, %l0
switch ( the_period->state ) {
2006740: e4 04 60 38 ld [ %l1 + 0x38 ], %l2
2006744: 80 a4 a0 02 cmp %l2, 2
2006748: 02 80 00 1a be 20067b0 <rtems_rate_monotonic_period+0xfc>
200674c: 80 a4 a0 04 cmp %l2, 4
2006750: 02 80 00 34 be 2006820 <rtems_rate_monotonic_period+0x16c>
2006754: 80 a4 a0 00 cmp %l2, 0
2006758: 12 80 00 43 bne 2006864 <rtems_rate_monotonic_period+0x1b0><== NEVER TAKEN
200675c: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
2006760: 7f ff f1 41 call 2002c64 <sparc_enable_interrupts>
2006764: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2006768: 7f ff ff 5e call 20064e0 <_Rate_monotonic_Initiate_statistics>
200676c: 90 10 00 11 mov %l1, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006770: 82 10 20 02 mov 2, %g1
2006774: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006778: 03 00 80 1a sethi %hi(0x2006800), %g1
200677c: 82 10 63 38 or %g1, 0x338, %g1 ! 2006b38 <_Rate_monotonic_Timeout>
the_watchdog->id = id;
2006780: f0 24 60 30 st %i0, [ %l1 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006784: 92 04 60 10 add %l1, 0x10, %o1
2006788: 11 00 80 6d sethi %hi(0x201b400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200678c: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006790: 90 12 21 74 or %o0, 0x174, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006794: c0 24 60 18 clr [ %l1 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006798: c0 24 60 34 clr [ %l1 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
200679c: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20067a0: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20067a4: 40 00 10 4c call 200a8d4 <_Watchdog_Insert>
20067a8: b0 10 20 00 clr %i0
20067ac: 30 80 00 2a b,a 2006854 <rtems_rate_monotonic_period+0x1a0>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
20067b0: 7f ff ff 68 call 2006550 <_Rate_monotonic_Update_statistics>
20067b4: 90 10 00 11 mov %l1, %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;
20067b8: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
20067bc: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
/*
* 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;
20067c0: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
20067c4: 7f ff f1 28 call 2002c64 <sparc_enable_interrupts>
20067c8: 90 10 00 10 mov %l0, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
20067cc: c2 04 e1 54 ld [ %l3 + 0x154 ], %g1
20067d0: c4 04 60 08 ld [ %l1 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
20067d4: 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;
20067d8: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
20067dc: 40 00 0d 6f call 2009d98 <_Thread_Set_state>
20067e0: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
20067e4: 7f ff f1 1c call 2002c54 <sparc_disable_interrupts>
20067e8: 01 00 00 00 nop
local_state = the_period->state;
20067ec: e0 04 60 38 ld [ %l1 + 0x38 ], %l0
the_period->state = RATE_MONOTONIC_ACTIVE;
20067f0: e4 24 60 38 st %l2, [ %l1 + 0x38 ]
_ISR_Enable( level );
20067f4: 7f ff f1 1c call 2002c64 <sparc_enable_interrupts>
20067f8: 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 )
20067fc: 80 a4 20 03 cmp %l0, 3
2006800: 12 80 00 04 bne 2006810 <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
2006804: d0 04 e1 54 ld [ %l3 + 0x154 ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2006808: 40 00 09 c4 call 2008f18 <_Thread_Clear_state> <== NOT EXECUTED
200680c: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED
_Thread_Enable_dispatch();
2006810: 40 00 0a d8 call 2009370 <_Thread_Enable_dispatch>
2006814: b0 10 20 00 clr %i0
2006818: 81 c7 e0 08 ret
200681c: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2006820: 7f ff ff 4c call 2006550 <_Rate_monotonic_Update_statistics>
2006824: 90 10 00 11 mov %l1, %o0
_ISR_Enable( level );
2006828: 7f ff f1 0f call 2002c64 <sparc_enable_interrupts>
200682c: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006830: 82 10 20 02 mov 2, %g1
2006834: 11 00 80 6d sethi %hi(0x201b400), %o0
2006838: 92 04 60 10 add %l1, 0x10, %o1
200683c: 90 12 21 74 or %o0, 0x174, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006840: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
the_period->next_length = length;
2006844: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006848: 40 00 10 23 call 200a8d4 <_Watchdog_Insert>
200684c: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2006850: b0 10 20 06 mov 6, %i0
2006854: 40 00 0a c7 call 2009370 <_Thread_Enable_dispatch>
2006858: 01 00 00 00 nop
200685c: 81 c7 e0 08 ret
2006860: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006864: 81 c7 e0 08 ret
2006868: 91 e8 20 04 restore %g0, 4, %o0
0200686c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
200686c: 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 )
2006870: 80 a6 60 00 cmp %i1, 0
2006874: 02 80 00 7c be 2006a64 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f8><== NEVER TAKEN
2006878: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
200687c: 13 00 80 63 sethi %hi(0x2018c00), %o1
2006880: 9f c6 40 00 call %i1
2006884: 92 12 62 70 or %o1, 0x270, %o1 ! 2018e70 <rtems_status_assoc+0x1b8>
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
2006888: 90 10 00 18 mov %i0, %o0
200688c: 13 00 80 63 sethi %hi(0x2018c00), %o1
2006890: 9f c6 40 00 call %i1
2006894: 92 12 62 90 or %o1, 0x290, %o1 ! 2018e90 <rtems_status_assoc+0x1d8>
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
2006898: 90 10 00 18 mov %i0, %o0
200689c: 13 00 80 63 sethi %hi(0x2018c00), %o1
20068a0: 9f c6 40 00 call %i1
20068a4: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 2018eb8 <rtems_status_assoc+0x200>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
20068a8: 90 10 00 18 mov %i0, %o0
20068ac: 13 00 80 63 sethi %hi(0x2018c00), %o1
20068b0: 9f c6 40 00 call %i1
20068b4: 92 12 62 e0 or %o1, 0x2e0, %o1 ! 2018ee0 <rtems_status_assoc+0x228>
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
20068b8: 90 10 00 18 mov %i0, %o0
20068bc: 13 00 80 63 sethi %hi(0x2018c00), %o1
20068c0: 9f c6 40 00 call %i1
20068c4: 92 12 63 30 or %o1, 0x330, %o1 ! 2018f30 <rtems_status_assoc+0x278>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20068c8: 03 00 80 63 sethi %hi(0x2018c00), %g1
20068cc: b4 10 63 80 or %g1, 0x380, %i2 ! 2018f80 <rtems_status_assoc+0x2c8>
_Timespec_Divide_by_integer(
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
20068d0: 03 00 80 63 sethi %hi(0x2018c00), %g1
20068d4: b6 10 63 98 or %g1, 0x398, %i3 ! 2018f98 <rtems_status_assoc+0x2e0>
_Timespec_Divide_by_integer(
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20068d8: 03 00 80 63 sethi %hi(0x2018c00), %g1
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20068dc: 05 00 80 6c sethi %hi(0x201b000), %g2
_Timespec_Divide_by_integer(
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20068e0: b8 10 63 b8 or %g1, 0x3b8, %i4
/*
* 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 ;
20068e4: 84 10 a3 14 or %g2, 0x314, %g2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
20068e8: 03 00 80 63 sethi %hi(0x2018c00), %g1
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
20068ec: e4 00 a0 08 ld [ %g2 + 8 ], %l2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
20068f0: ba 10 62 b0 or %g1, 0x2b0, %i5
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 );
20068f4: ae 07 bf d0 add %fp, -48, %l7
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
20068f8: a8 07 bf f0 add %fp, -16, %l4
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
20068fc: ac 07 bf b0 add %fp, -80, %l6
2006900: a6 07 bf e8 add %fp, -24, %l3
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
2006904: 10 80 00 52 b 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
2006908: aa 07 bf c8 add %fp, -56, %l5
* 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 );
200690c: 40 00 18 f7 call 200cce8 <rtems_rate_monotonic_get_statistics>
2006910: 92 07 bf 98 add %fp, -104, %o1
if ( status != RTEMS_SUCCESSFUL )
2006914: 80 a2 20 00 cmp %o0, 0
2006918: 32 80 00 4d bne,a 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
200691c: a4 04 a0 01 inc %l2
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
2006920: 92 10 00 17 mov %l7, %o1
2006924: 40 00 19 06 call 200cd3c <rtems_rate_monotonic_get_status>
2006928: 90 10 00 12 mov %l2, %o0
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
200692c: d0 07 bf d0 ld [ %fp + -48 ], %o0
2006930: 80 a2 20 00 cmp %o0, 0
2006934: 02 80 00 05 be 2006948 <rtems_rate_monotonic_report_statistics_with_plugin+0xdc><== NEVER TAKEN
2006938: c0 2f bf f0 clrb [ %fp + -16 ]
rtems_object_get_name( the_status.owner, sizeof(name), name );
200693c: 94 10 00 14 mov %l4, %o2
2006940: 40 00 00 ae call 2006bf8 <rtems_object_get_name>
2006944: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2006948: d8 1f bf 98 ldd [ %fp + -104 ], %o4
200694c: 94 10 00 12 mov %l2, %o2
2006950: 92 10 00 1a mov %i2, %o1
2006954: 96 10 00 14 mov %l4, %o3
2006958: 9f c6 40 00 call %i1
200695c: 90 10 00 18 mov %i0, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2006960: c2 07 bf 98 ld [ %fp + -104 ], %g1
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006964: 94 10 00 13 mov %l3, %o2
2006968: 90 10 00 16 mov %l6, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
200696c: 80 a0 60 00 cmp %g1, 0
2006970: 12 80 00 06 bne 2006988 <rtems_rate_monotonic_report_statistics_with_plugin+0x11c>
2006974: 92 10 00 1d mov %i5, %o1
(*print)( context, "\n" );
2006978: 9f c6 40 00 call %i1
200697c: 90 10 00 18 mov %i0, %o0
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2006980: 10 80 00 33 b 2006a4c <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0>
2006984: a4 04 a0 01 inc %l2
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006988: 40 00 0e ae call 200a440 <_Timespec_Divide_by_integer>
200698c: 92 10 00 01 mov %g1, %o1
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
2006990: d0 07 bf a4 ld [ %fp + -92 ], %o0
2006994: 40 00 40 2b call 2016a40 <.div>
2006998: 92 10 23 e8 mov 0x3e8, %o1
200699c: a2 10 00 08 mov %o0, %l1
20069a0: d0 07 bf ac ld [ %fp + -84 ], %o0
20069a4: 40 00 40 27 call 2016a40 <.div>
20069a8: 92 10 23 e8 mov 0x3e8, %o1
20069ac: c2 07 bf e8 ld [ %fp + -24 ], %g1
20069b0: a0 10 00 08 mov %o0, %l0
20069b4: d0 07 bf ec ld [ %fp + -20 ], %o0
20069b8: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20069bc: 40 00 40 21 call 2016a40 <.div>
20069c0: 92 10 23 e8 mov 0x3e8, %o1
20069c4: d8 07 bf a8 ld [ %fp + -88 ], %o4
20069c8: d4 07 bf a0 ld [ %fp + -96 ], %o2
20069cc: 96 10 00 11 mov %l1, %o3
20069d0: 9a 10 00 10 mov %l0, %o5
20069d4: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
20069d8: 92 10 00 1b mov %i3, %o1
20069dc: 9f c6 40 00 call %i1
20069e0: 90 10 00 18 mov %i0, %o0
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
20069e4: d2 07 bf 98 ld [ %fp + -104 ], %o1
20069e8: 94 10 00 13 mov %l3, %o2
20069ec: 40 00 0e 95 call 200a440 <_Timespec_Divide_by_integer>
20069f0: 90 10 00 15 mov %l5, %o0
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
20069f4: d0 07 bf bc ld [ %fp + -68 ], %o0
20069f8: 40 00 40 12 call 2016a40 <.div>
20069fc: 92 10 23 e8 mov 0x3e8, %o1
2006a00: a2 10 00 08 mov %o0, %l1
2006a04: d0 07 bf c4 ld [ %fp + -60 ], %o0
2006a08: 40 00 40 0e call 2016a40 <.div>
2006a0c: 92 10 23 e8 mov 0x3e8, %o1
2006a10: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006a14: a0 10 00 08 mov %o0, %l0
2006a18: d0 07 bf ec ld [ %fp + -20 ], %o0
2006a1c: 92 10 23 e8 mov 0x3e8, %o1
2006a20: 40 00 40 08 call 2016a40 <.div>
2006a24: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2006a28: d4 07 bf b8 ld [ %fp + -72 ], %o2
2006a2c: d8 07 bf c0 ld [ %fp + -64 ], %o4
2006a30: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2006a34: 96 10 00 11 mov %l1, %o3
2006a38: 9a 10 00 10 mov %l0, %o5
2006a3c: 90 10 00 18 mov %i0, %o0
2006a40: 9f c6 40 00 call %i1
2006a44: 92 10 00 1c mov %i4, %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++ ) {
2006a48: a4 04 a0 01 inc %l2
/*
* 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 ;
2006a4c: 05 00 80 6c sethi %hi(0x201b000), %g2
2006a50: 84 10 a3 14 or %g2, 0x314, %g2 ! 201b314 <_Rate_monotonic_Information>
2006a54: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
2006a58: 80 a4 80 01 cmp %l2, %g1
2006a5c: 08 bf ff ac bleu 200690c <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
2006a60: 90 10 00 12 mov %l2, %o0
2006a64: 81 c7 e0 08 ret
2006a68: 81 e8 00 00 restore
0201004c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
201004c: 9d e3 bf 90 save %sp, -112, %sp
2010050: a0 10 00 18 mov %i0, %l0
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
2010054: 80 a6 60 00 cmp %i1, 0
2010058: 02 80 00 2c be 2010108 <rtems_region_extend+0xbc> <== NEVER TAKEN
201005c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
2010060: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010064: 40 00 08 f4 call 2012434 <_API_Mutex_Lock>
2010068: d0 00 61 fc ld [ %g1 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
201006c: 92 10 00 10 mov %l0, %o1
2010070: 11 00 80 c0 sethi %hi(0x2030000), %o0
2010074: 94 07 bf f0 add %fp, -16, %o2
2010078: 40 00 0f ad call 2013f2c <_Objects_Get_no_protection>
201007c: 90 12 23 74 or %o0, 0x374, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010080: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010084: 80 a0 60 00 cmp %g1, 0
2010088: 02 80 00 05 be 201009c <rtems_region_extend+0x50>
201008c: a0 10 00 08 mov %o0, %l0
2010090: 80 a0 60 01 cmp %g1, 1
2010094: 10 80 00 0f b 20100d0 <rtems_region_extend+0x84>
2010098: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
201009c: 92 10 00 19 mov %i1, %o1
20100a0: 94 10 00 1a mov %i2, %o2
20100a4: 90 02 20 68 add %o0, 0x68, %o0
20100a8: 96 07 bf f4 add %fp, -12, %o3
20100ac: 40 00 0b e3 call 2013038 <_Heap_Extend>
20100b0: b0 10 20 09 mov 9, %i0
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20100b4: 80 a2 20 01 cmp %o0, 1
20100b8: 02 80 00 12 be 2010100 <rtems_region_extend+0xb4>
20100bc: 03 00 80 c1 sethi %hi(0x2030400), %g1
20100c0: 0a 80 00 08 bcs 20100e0 <rtems_region_extend+0x94>
20100c4: c6 07 bf f4 ld [ %fp + -12 ], %g3
20100c8: 80 a2 20 02 cmp %o0, 2
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
20100cc: b0 10 20 18 mov 0x18, %i0
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20100d0: 32 80 00 0b bne,a 20100fc <rtems_region_extend+0xb0> <== NEVER TAKEN
20100d4: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
20100d8: 10 80 00 0a b 2010100 <rtems_region_extend+0xb4>
20100dc: 03 00 80 c1 sethi %hi(0x2030400), %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100e0: c4 04 20 54 ld [ %l0 + 0x54 ], %g2
the_region->maximum_segment_size += amount_extended;
20100e4: c2 04 20 5c ld [ %l0 + 0x5c ], %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100e8: 84 00 80 03 add %g2, %g3, %g2
the_region->maximum_segment_size += amount_extended;
20100ec: 82 00 40 03 add %g1, %g3, %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20100f0: c4 24 20 54 st %g2, [ %l0 + 0x54 ]
the_region->maximum_segment_size += amount_extended;
20100f4: c2 24 20 5c st %g1, [ %l0 + 0x5c ]
20100f8: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
20100fc: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010100: 40 00 08 e3 call 201248c <_API_Mutex_Unlock>
2010104: d0 00 61 fc ld [ %g1 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
return return_status;
}
2010108: 81 c7 e0 08 ret
201010c: 81 e8 00 00 restore
0201021c <rtems_region_get_segment>:
uint32_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
201021c: 9d e3 bf 90 save %sp, -112, %sp
2010220: a6 10 00 18 mov %i0, %l3
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
2010224: 80 a7 20 00 cmp %i4, 0
2010228: 02 80 00 41 be 201032c <rtems_region_get_segment+0x110> <== NEVER TAKEN
201022c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
2010230: c0 27 00 00 clr [ %i4 ]
if ( size == 0 )
2010234: 80 a6 60 00 cmp %i1, 0
2010238: 02 80 00 3d be 201032c <rtems_region_get_segment+0x110> <== NEVER TAKEN
201023c: b0 10 20 08 mov 8, %i0
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
2010240: 25 00 80 c1 sethi %hi(0x2030400), %l2
2010244: 40 00 08 7c call 2012434 <_API_Mutex_Lock>
2010248: d0 04 a1 fc ld [ %l2 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
executing = _Thread_Executing;
201024c: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010250: 92 10 00 13 mov %l3, %o1
2010254: e2 00 62 04 ld [ %g1 + 0x204 ], %l1
2010258: 11 00 80 c0 sethi %hi(0x2030000), %o0
201025c: 94 07 bf f4 add %fp, -12, %o2
2010260: 40 00 0f 33 call 2013f2c <_Objects_Get_no_protection>
2010264: 90 12 23 74 or %o0, 0x374, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010268: c2 07 bf f4 ld [ %fp + -12 ], %g1
201026c: 80 a0 60 00 cmp %g1, 0
2010270: 02 80 00 08 be 2010290 <rtems_region_get_segment+0x74>
2010274: a0 10 00 08 mov %o0, %l0
2010278: 82 18 60 01 xor %g1, 1, %g1
201027c: 80 a0 00 01 cmp %g0, %g1
2010280: 82 40 3f ff addx %g0, -1, %g1
2010284: b0 08 7f eb and %g1, -21, %i0
2010288: 10 80 00 2b b 2010334 <rtems_region_get_segment+0x118>
201028c: b0 06 20 19 add %i0, 0x19, %i0
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
2010290: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
2010294: 80 a6 40 01 cmp %i1, %g1
2010298: 18 80 00 27 bgu 2010334 <rtems_region_get_segment+0x118>
201029c: b0 10 20 08 mov 8, %i0
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uint32_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
20102a0: 90 02 20 68 add %o0, 0x68, %o0
20102a4: 40 00 0b 3e call 2012f9c <_Heap_Allocate>
20102a8: 92 10 00 19 mov %i1, %o1
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
20102ac: 80 a2 20 00 cmp %o0, 0
20102b0: 02 80 00 07 be 20102cc <rtems_region_get_segment+0xb0>
20102b4: b0 10 20 00 clr %i0
the_region->number_of_used_blocks += 1;
20102b8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1
*segment = the_segment;
20102bc: d0 27 00 00 st %o0, [ %i4 ]
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
20102c0: 82 00 60 01 inc %g1
20102c4: 10 80 00 1c b 2010334 <rtems_region_get_segment+0x118>
20102c8: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
}
else if ( _Options_Is_no_wait( option_set ) ) {
20102cc: 80 8e a0 01 btst 1, %i2
20102d0: 12 80 00 19 bne 2010334 <rtems_region_get_segment+0x118>
20102d4: b0 10 20 0d mov 0xd, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20102d8: 05 00 80 c1 sethi %hi(0x2030400), %g2
20102dc: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
20102e0: 82 00 60 01 inc %g1
20102e4: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
* Switch from using the memory allocation mutex to using a
* dispatching disabled critical section. We have to do this
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
20102e8: 40 00 08 69 call 201248c <_API_Mutex_Unlock>
20102ec: d0 04 a1 fc ld [ %l2 + 0x1fc ], %o0
executing->Wait.queue = &the_region->Wait_queue;
20102f0: 82 04 20 10 add %l0, 0x10, %g1
executing->Wait.count = size;
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
20102f4: 92 10 00 1b mov %i3, %o1
20102f8: 90 10 00 01 mov %g1, %o0
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
20102fc: c2 24 60 44 st %g1, [ %l1 + 0x44 ]
executing->Wait.count = size;
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
2010300: 15 00 80 54 sethi %hi(0x2015000), %o2
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;
2010304: 82 10 20 01 mov 1, %g1
2010308: 94 12 a2 54 or %o2, 0x254, %o2
201030c: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
executing->Wait.id = id;
2010310: e6 24 60 20 st %l3, [ %l1 + 0x20 ]
executing->Wait.count = size;
2010314: f2 24 60 24 st %i1, [ %l1 + 0x24 ]
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
2010318: 40 00 12 dc call 2014e88 <_Thread_queue_Enqueue_with_handler>
201031c: f8 24 60 28 st %i4, [ %l1 + 0x28 ]
_Thread_Enable_dispatch();
2010320: 40 00 11 83 call 201492c <_Thread_Enable_dispatch>
2010324: 01 00 00 00 nop
return (rtems_status_code) executing->Wait.return_code;
2010328: f0 04 60 34 ld [ %l1 + 0x34 ], %i0
201032c: 81 c7 e0 08 ret
2010330: 81 e8 00 00 restore
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010334: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010338: 40 00 08 55 call 201248c <_API_Mutex_Unlock>
201033c: d0 00 61 fc ld [ %g1 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
return return_status;
}
2010340: 81 c7 e0 08 ret
2010344: 81 e8 00 00 restore
02010414 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
2010414: 9d e3 bf 88 save %sp, -120, %sp
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
2010418: 80 a6 e0 00 cmp %i3, 0
201041c: 02 80 00 32 be 20104e4 <rtems_region_resize_segment+0xd0>
2010420: 21 00 80 c1 sethi %hi(0x2030400), %l0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
2010424: 40 00 08 04 call 2012434 <_API_Mutex_Lock>
2010428: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
201042c: 92 10 00 18 mov %i0, %o1
2010430: 11 00 80 c0 sethi %hi(0x2030000), %o0
2010434: 94 07 bf f0 add %fp, -16, %o2
2010438: 40 00 0e bd call 2013f2c <_Objects_Get_no_protection>
201043c: 90 12 23 74 or %o0, 0x374, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010440: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010444: 80 a0 60 00 cmp %g1, 0
2010448: 02 80 00 0b be 2010474 <rtems_region_resize_segment+0x60>
201044c: b0 10 00 08 mov %o0, %i0
2010450: 82 18 60 01 xor %g1, 1, %g1
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010454: d0 04 21 fc ld [ %l0 + 0x1fc ], %o0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
2010458: 80 a0 00 01 cmp %g0, %g1
201045c: 82 40 3f ff addx %g0, -1, %g1
2010460: b0 08 7f eb and %g1, -21, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010464: 40 00 08 0a call 201248c <_API_Mutex_Unlock>
2010468: b0 06 20 19 add %i0, 0x19, %i0
201046c: 81 c7 e0 08 ret
2010470: 81 e8 00 00 restore
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
2010474: 94 10 00 1a mov %i2, %o2
2010478: 92 10 00 19 mov %i1, %o1
201047c: 90 02 20 68 add %o0, 0x68, %o0
2010480: 96 07 bf ec add %fp, -20, %o3
2010484: 40 00 0c 6d call 2013638 <_Heap_Resize_block>
2010488: 98 07 bf f4 add %fp, -12, %o4
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
201048c: c2 07 bf ec ld [ %fp + -20 ], %g1
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
2010490: b4 92 20 00 orcc %o0, 0, %i2
2010494: 12 80 00 0b bne 20104c0 <rtems_region_resize_segment+0xac><== ALWAYS TAKEN
2010498: c2 26 c0 00 st %g1, [ %i3 ]
201049c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
20104a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20104a4: 02 80 00 08 be 20104c4 <rtems_region_resize_segment+0xb0> <== NOT EXECUTED
20104a8: 03 00 80 c1 sethi %hi(0x2030400), %g1 <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
20104ac: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20104b0: 40 00 20 09 call 20184d4 <_Region_Process_queue> <== NOT EXECUTED
20104b4: b0 10 20 00 clr %i0 <== NOT EXECUTED
20104b8: 81 c7 e0 08 ret <== NOT EXECUTED
20104bc: 81 e8 00 00 restore <== NOT EXECUTED
else
_RTEMS_Unlock_allocator();
20104c0: 03 00 80 c1 sethi %hi(0x2030400), %g1
20104c4: d0 00 61 fc ld [ %g1 + 0x1fc ], %o0 ! 20305fc <_RTEMS_Allocator_Mutex>
20104c8: 40 00 07 f1 call 201248c <_API_Mutex_Unlock>
20104cc: b0 10 20 00 clr %i0
return
20104d0: 80 a6 a0 00 cmp %i2, 0
20104d4: 02 bf ff e6 be 201046c <rtems_region_resize_segment+0x58> <== NEVER TAKEN
20104d8: 80 a6 a0 01 cmp %i2, 1
20104dc: 02 bf ff e4 be 201046c <rtems_region_resize_segment+0x58> <== NEVER TAKEN
20104e0: b0 10 20 0d mov 0xd, %i0
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
20104e4: b0 10 20 09 mov 9, %i0
}
20104e8: 81 c7 e0 08 ret
20104ec: 81 e8 00 00 restore
02005224 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
2005224: 9d e3 bf 80 save %sp, -128, %sp
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attributes;
CORE_semaphore_Attributes the_semaphore_attributes;
if ( !rtems_is_name_valid( name ) )
2005228: a4 96 20 00 orcc %i0, 0, %l2
200522c: 02 80 00 23 be 20052b8 <rtems_semaphore_create+0x94>
2005230: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2005234: 80 a7 20 00 cmp %i4, 0
2005238: 02 80 00 20 be 20052b8 <rtems_semaphore_create+0x94> <== NEVER TAKEN
200523c: b0 10 20 09 mov 9, %i0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
2005240: 84 8e a0 c0 andcc %i2, 0xc0, %g2
2005244: 02 80 00 0d be 2005278 <rtems_semaphore_create+0x54>
2005248: a2 8e a0 30 andcc %i2, 0x30, %l1
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_binary_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
200524c: 82 0e a0 30 and %i2, 0x30, %g1
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) ||
2005250: 80 a0 60 10 cmp %g1, 0x10
2005254: 02 80 00 04 be 2005264 <rtems_semaphore_create+0x40>
2005258: 80 a0 60 20 cmp %g1, 0x20
200525c: 32 80 00 17 bne,a 20052b8 <rtems_semaphore_create+0x94>
2005260: b0 10 20 0b mov 0xb, %i0
2005264: 80 8e a0 04 btst 4, %i2
2005268: 02 80 00 64 be 20053f8 <rtems_semaphore_create+0x1d4>
200526c: 80 a0 a0 c0 cmp %g2, 0xc0
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
2005270: 02 80 00 62 be 20053f8 <rtems_semaphore_create+0x1d4>
2005274: a2 8e a0 30 andcc %i2, 0x30, %l1
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
2005278: 02 80 00 04 be 2005288 <rtems_semaphore_create+0x64>
200527c: 80 a6 60 01 cmp %i1, 1
2005280: 18 80 00 0e bgu 20052b8 <rtems_semaphore_create+0x94>
2005284: b0 10 20 0a mov 0xa, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005288: 03 00 80 5a sethi %hi(0x2016800), %g1
200528c: c4 00 61 a0 ld [ %g1 + 0x1a0 ], %g2 ! 20169a0 <_Thread_Dispatch_disable_level>
2005290: 84 00 a0 01 inc %g2
2005294: c4 20 61 a0 st %g2, [ %g1 + 0x1a0 ]
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
2005298: 11 00 80 5a sethi %hi(0x2016800), %o0
200529c: 40 00 05 30 call 200675c <_Objects_Allocate>
20052a0: 90 12 20 6c or %o0, 0x6c, %o0 ! 201686c <_Semaphore_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
20052a4: a0 92 20 00 orcc %o0, 0, %l0
20052a8: 12 80 00 06 bne 20052c0 <rtems_semaphore_create+0x9c>
20052ac: 80 a4 60 00 cmp %l1, 0
_Thread_Enable_dispatch();
20052b0: 40 00 08 f3 call 200767c <_Thread_Enable_dispatch>
20052b4: b0 10 20 05 mov 5, %i0
20052b8: 81 c7 e0 08 ret
20052bc: 81 e8 00 00 restore
* If it is not a counting semaphore, then it is either a
* simple binary semaphore or a more powerful mutex style binary
* semaphore.
*/
if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) {
20052c0: 02 80 00 33 be 200538c <rtems_semaphore_create+0x168>
20052c4: f4 24 20 10 st %i2, [ %l0 + 0x10 ]
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
20052c8: 80 8e a0 40 btst 0x40, %i2
20052cc: 12 80 00 06 bne 20052e4 <rtems_semaphore_create+0xc0>
20052d0: 82 10 20 02 mov 2, %g1
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
else if ( _Attributes_Is_priority_ceiling( attribute_set ) )
20052d4: 80 8e a0 80 btst 0x80, %i2
20052d8: 02 80 00 05 be 20052ec <rtems_semaphore_create+0xc8>
20052dc: 80 8e a0 04 btst 4, %i2
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
20052e0: 82 10 20 03 mov 3, %g1
20052e4: 10 80 00 05 b 20052f8 <rtems_semaphore_create+0xd4>
20052e8: c2 27 bf e8 st %g1, [ %fp + -24 ]
else if ( _Attributes_Is_priority( attribute_set ) )
20052ec: 12 bf ff fe bne 20052e4 <rtems_semaphore_create+0xc0>
20052f0: 82 10 20 01 mov 1, %g1
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
20052f4: c0 27 bf e8 clr [ %fp + -24 ]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
20052f8: 80 a4 60 10 cmp %l1, 0x10
20052fc: 12 80 00 0f bne 2005338 <rtems_semaphore_create+0x114>
2005300: 82 10 20 02 mov 2, %g1
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
2005304: c2 07 bf e8 ld [ %fp + -24 ], %g1
2005308: 80 a0 60 01 cmp %g1, 1
200530c: 08 80 00 07 bleu 2005328 <rtems_semaphore_create+0x104>
2005310: c0 27 bf e0 clr [ %fp + -32 ]
2005314: 80 a0 60 03 cmp %g1, 3
2005318: 38 80 00 0b bgu,a 2005344 <rtems_semaphore_create+0x120> <== NEVER TAKEN
200531c: 82 1e 60 01 xor %i1, 1, %g1 <== NOT EXECUTED
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
2005320: 10 80 00 04 b 2005330 <rtems_semaphore_create+0x10c>
2005324: 82 10 20 01 mov 1, %g1
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
2005328: 10 80 00 06 b 2005340 <rtems_semaphore_create+0x11c>
200532c: c0 2f bf e4 clrb [ %fp + -28 ]
break;
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
2005330: 10 80 00 04 b 2005340 <rtems_semaphore_create+0x11c>
2005334: c2 2f bf e4 stb %g1, [ %fp + -28 ]
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
2005338: c0 2f bf e4 clrb [ %fp + -28 ]
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
the_mutex_attributes.only_owner_release = TRUE;
break;
}
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
200533c: c2 27 bf e0 st %g1, [ %fp + -32 ]
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
2005340: 82 1e 60 01 xor %i1, 1, %g1
2005344: 80 a0 00 01 cmp %g0, %g1
} else {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
2005348: f6 27 bf ec st %i3, [ %fp + -20 ]
mutex_status = _CORE_mutex_Initialize(
200534c: 94 60 3f ff subx %g0, -1, %o2
2005350: 90 04 20 14 add %l0, 0x14, %o0
2005354: 40 00 03 03 call 2005f60 <_CORE_mutex_Initialize>
2005358: 92 07 bf e0 add %fp, -32, %o1
&the_semaphore->Core_control.mutex,
&the_mutex_attributes,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
200535c: 80 a2 20 06 cmp %o0, 6
2005360: 32 80 00 19 bne,a 20053c4 <rtems_semaphore_create+0x1a0> <== ALWAYS TAKEN
2005364: c4 04 20 08 ld [ %l0 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
2005368: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
200536c: 11 00 80 5a sethi %hi(0x2016800), %o0 <== NOT EXECUTED
2005370: 90 12 20 6c or %o0, 0x6c, %o0 ! 201686c <_Semaphore_Information><== NOT EXECUTED
2005374: 40 00 05 e7 call 2006b10 <_Objects_Free> <== NOT EXECUTED
2005378: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
200537c: 40 00 08 c0 call 200767c <_Thread_Enable_dispatch> <== NOT EXECUTED
2005380: 01 00 00 00 nop <== NOT EXECUTED
2005384: 81 c7 e0 08 ret <== NOT EXECUTED
2005388: 81 e8 00 00 restore <== NOT EXECUTED
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
200538c: 80 8e a0 04 btst 4, %i2
2005390: 22 80 00 04 be,a 20053a0 <rtems_semaphore_create+0x17c>
2005394: c0 27 bf f4 clr [ %fp + -12 ]
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
2005398: 82 10 20 01 mov 1, %g1
200539c: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20053a0: 82 10 3f ff mov -1, %g1
/*
* The following are just to make Purify happy.
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
20053a4: c0 27 bf e0 clr [ %fp + -32 ]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
20053a8: c0 27 bf ec clr [ %fp + -20 ]
_CORE_semaphore_Initialize(
20053ac: 94 10 00 19 mov %i1, %o2
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20053b0: c2 27 bf f0 st %g1, [ %fp + -16 ]
*/
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
20053b4: 90 04 20 14 add %l0, 0x14, %o0
20053b8: 40 00 03 c1 call 20062bc <_CORE_semaphore_Initialize>
20053bc: 92 07 bf f0 add %fp, -16, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20053c0: c4 04 20 08 ld [ %l0 + 8 ], %g2
20053c4: 03 00 80 5a sethi %hi(0x2016800), %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20053c8: e4 24 20 0c st %l2, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20053cc: c6 00 60 88 ld [ %g1 + 0x88 ], %g3
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
20053d0: c4 27 00 00 st %g2, [ %i4 ]
20053d4: 03 00 00 3f sethi %hi(0xfc00), %g1
20053d8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20053dc: 84 08 80 01 and %g2, %g1, %g2
20053e0: 85 28 a0 02 sll %g2, 2, %g2
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
20053e4: b0 10 20 00 clr %i0
20053e8: 40 00 08 a5 call 200767c <_Thread_Enable_dispatch>
20053ec: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
20053f0: 81 c7 e0 08 ret
20053f4: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20053f8: b0 10 20 0b mov 0xb, %i0
}
20053fc: 81 c7 e0 08 ret
2005400: 81 e8 00 00 restore
02010824 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
2010824: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
2010828: 11 00 80 c0 sethi %hi(0x2030000), %o0
201082c: 92 10 00 18 mov %i0, %o1
2010830: 90 12 23 b4 or %o0, 0x3b4, %o0
2010834: 40 00 0d d0 call 2013f74 <_Objects_Get>
2010838: 94 07 bf f4 add %fp, -12, %o2
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
201083c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2010840: 80 a0 60 00 cmp %g1, 0
2010844: 12 80 00 0f bne 2010880 <rtems_semaphore_flush+0x5c>
2010848: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
201084c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2010850: 80 88 60 30 btst 0x30, %g1
2010854: 02 80 00 06 be 201086c <rtems_semaphore_flush+0x48> <== NEVER TAKEN
2010858: 90 02 20 14 add %o0, 0x14, %o0
_CORE_mutex_Flush(
201085c: 92 10 20 00 clr %o1
2010860: 40 00 08 4c call 2012990 <_CORE_mutex_Flush>
2010864: 94 10 20 01 mov 1, %o2
2010868: 30 80 00 04 b,a 2010878 <rtems_semaphore_flush+0x54>
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
201086c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2010870: 40 00 09 1f call 2012cec <_CORE_semaphore_Flush> <== NOT EXECUTED
2010874: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
2010878: 40 00 10 2d call 201492c <_Thread_Enable_dispatch>
201087c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010880: 81 c7 e0 08 ret
2010884: 81 e8 00 00 restore
020140c4 <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
20140c4: 9d e3 bf 10 save %sp, -240, %sp
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
20140c8: 05 00 80 5a sethi %hi(0x2016800), %g2
20140cc: c2 00 a3 44 ld [ %g2 + 0x344 ], %g1 ! 2016b44 <_System_state_Current>
20140d0: 80 a0 60 04 cmp %g1, 4
20140d4: 02 80 00 07 be 20140f0 <rtems_shutdown_executive+0x2c> <== NEVER TAKEN
20140d8: 82 10 20 04 mov 4, %g1
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
20140dc: 13 00 80 5a sethi %hi(0x2016800), %o1
20140e0: c2 20 a3 44 st %g1, [ %g2 + 0x344 ]
20140e4: 92 12 61 18 or %o1, 0x118, %o1
20140e8: 7f ff d2 fe call 2008ce0 <_CPU_Context_switch>
20140ec: 90 07 bf 70 add %fp, -144, %o0
20140f0: 81 c7 e0 08 ret <== NOT EXECUTED
20140f4: 81 e8 00 00 restore <== NOT EXECUTED
02010a88 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
Objects_Id id,
rtems_signal_set signal_set
)
{
2010a88: 9d e3 bf 90 save %sp, -112, %sp
2010a8c: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
2010a90: 80 a6 60 00 cmp %i1, 0
2010a94: 02 80 00 2f be 2010b50 <rtems_signal_send+0xc8> <== NEVER TAKEN
2010a98: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010a9c: 40 00 0f b1 call 2014960 <_Thread_Get>
2010aa0: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2010aa4: c2 07 bf f4 ld [ %fp + -12 ], %g1
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010aa8: a0 10 00 08 mov %o0, %l0
switch ( location ) {
2010aac: 80 a0 60 00 cmp %g1, 0
2010ab0: 12 80 00 28 bne 2010b50 <rtems_signal_send+0xc8>
2010ab4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2010ab8: f0 02 21 68 ld [ %o0 + 0x168 ], %i0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2010abc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2010ac0: 80 a0 60 00 cmp %g1, 0
2010ac4: 02 80 00 25 be 2010b58 <rtems_signal_send+0xd0>
2010ac8: 01 00 00 00 nop
if ( asr->is_enabled ) {
2010acc: c2 0e 20 08 ldub [ %i0 + 8 ], %g1
2010ad0: 80 a0 60 00 cmp %g1, 0
2010ad4: 02 80 00 16 be 2010b2c <rtems_signal_send+0xa4>
2010ad8: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010adc: 7f ff ea 92 call 200b524 <sparc_disable_interrupts>
2010ae0: 01 00 00 00 nop
*signal_set |= signals;
2010ae4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2010ae8: 82 10 40 19 or %g1, %i1, %g1
2010aec: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
_ISR_Enable( _level );
2010af0: 7f ff ea 91 call 200b534 <sparc_enable_interrupts>
2010af4: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2010af8: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010afc: c2 00 61 e0 ld [ %g1 + 0x1e0 ], %g1 ! 20305e0 <_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;
2010b00: 84 10 20 01 mov 1, %g2
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2010b04: 80 a0 60 00 cmp %g1, 0
2010b08: 02 80 00 10 be 2010b48 <rtems_signal_send+0xc0>
2010b0c: c4 2c 20 75 stb %g2, [ %l0 + 0x75 ]
2010b10: 03 00 80 c1 sethi %hi(0x2030400), %g1
2010b14: c2 00 62 04 ld [ %g1 + 0x204 ], %g1 ! 2030604 <_Thread_Executing>
2010b18: 80 a4 00 01 cmp %l0, %g1
2010b1c: 12 80 00 0b bne 2010b48 <rtems_signal_send+0xc0> <== NEVER TAKEN
2010b20: 03 00 80 c1 sethi %hi(0x2030400), %g1
_ISR_Signals_to_thread_executing = TRUE;
2010b24: 10 80 00 09 b 2010b48 <rtems_signal_send+0xc0>
2010b28: c4 28 62 98 stb %g2, [ %g1 + 0x298 ] ! 2030698 <_ISR_Signals_to_thread_executing>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010b2c: 7f ff ea 7e call 200b524 <sparc_disable_interrupts>
2010b30: 01 00 00 00 nop
*signal_set |= signals;
2010b34: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2010b38: 82 10 40 19 or %g1, %i1, %g1
2010b3c: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( _level );
2010b40: 7f ff ea 7d call 200b534 <sparc_enable_interrupts>
2010b44: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2010b48: 40 00 0f 79 call 201492c <_Thread_Enable_dispatch>
2010b4c: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2010b50: 81 c7 e0 08 ret
2010b54: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2010b58: 40 00 0f 75 call 201492c <_Thread_Enable_dispatch>
2010b5c: b0 10 20 0b mov 0xb, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010b60: 81 c7 e0 08 ret
2010b64: 81 e8 00 00 restore
02005688 <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
2005688: 9d e3 bf 78 save %sp, -136, %sp
200568c: a6 10 00 18 mov %i0, %l3
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
2005690: 80 a7 60 00 cmp %i5, 0
2005694: 02 80 00 1e be 200570c <rtems_task_create+0x84> <== NEVER TAKEN
2005698: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
200569c: 80 a4 e0 00 cmp %l3, 0
20056a0: 02 80 00 1b be 200570c <rtems_task_create+0x84>
20056a4: b0 10 20 03 mov 3, %i0
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
20056a8: 03 00 00 20 sethi %hi(0x8000), %g1
20056ac: 80 8f 00 01 btst %i4, %g1
20056b0: 12 80 00 0b bne 20056dc <rtems_task_create+0x54>
20056b4: 80 a6 60 00 cmp %i1, 0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
20056b8: 02 80 00 06 be 20056d0 <rtems_task_create+0x48>
20056bc: 82 10 20 00 clr %g1
20056c0: 03 00 80 56 sethi %hi(0x2015800), %g1
20056c4: c2 08 63 f4 ldub [ %g1 + 0x3f4 ], %g1 ! 2015bf4 <rtems_maximum_priority>
20056c8: 80 a0 40 19 cmp %g1, %i1
20056cc: 82 60 3f ff subx %g0, -1, %g1
if ( !_RTEMS_tasks_Priority_is_valid( initial_priority ) )
20056d0: 80 a0 60 00 cmp %g1, 0
20056d4: 02 80 00 0e be 200570c <rtems_task_create+0x84>
20056d8: b0 10 20 13 mov 0x13, %i0
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
20056dc: 25 00 80 5a sethi %hi(0x2016800), %l2
20056e0: d0 04 a2 5c ld [ %l2 + 0x25c ], %o0 ! 2016a5c <_RTEMS_Allocator_Mutex>
20056e4: 40 00 01 ed call 2005e98 <_API_Mutex_Lock>
20056e8: 23 00 80 5a sethi %hi(0x2016800), %l1
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
20056ec: 40 00 04 1c call 200675c <_Objects_Allocate>
20056f0: 90 14 60 ac or %l1, 0xac, %o0 ! 20168ac <_RTEMS_tasks_Information>
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
20056f4: a0 92 20 00 orcc %o0, 0, %l0
20056f8: 12 80 00 07 bne 2005714 <rtems_task_create+0x8c>
20056fc: 83 36 e0 08 srl %i3, 8, %g1
_RTEMS_Unlock_allocator();
2005700: d0 04 a2 5c ld [ %l2 + 0x25c ], %o0
2005704: 40 00 01 fb call 2005ef0 <_API_Mutex_Unlock>
2005708: b0 10 20 05 mov 5, %i0
200570c: 81 c7 e0 08 ret
2005710: 81 e8 00 00 restore
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
2005714: 82 18 60 01 xor %g1, 1, %g1
2005718: 82 08 60 01 and %g1, 1, %g1
200571c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2005720: 83 36 e0 09 srl %i3, 9, %g1
2005724: 82 08 60 01 and %g1, 1, %g1
2005728: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
200572c: 82 0e e0 0f and %i3, 0xf, %g1
2005730: c2 23 a0 68 st %g1, [ %sp + 0x68 ]
2005734: 82 07 bf f4 add %fp, -12, %g1
2005738: e6 27 bf f4 st %l3, [ %fp + -12 ]
200573c: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
2005740: c0 23 a0 64 clr [ %sp + 0x64 ]
2005744: 90 14 60 ac or %l1, 0xac, %o0
2005748: 96 10 00 1a mov %i2, %o3
200574c: 98 0f 20 01 and %i4, 1, %o4
2005750: 9a 10 00 19 mov %i1, %o5
2005754: 92 10 00 10 mov %l0, %o1
2005758: 40 00 08 02 call 2007760 <_Thread_Initialize>
200575c: 94 10 20 00 clr %o2
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
2005760: 80 8a 20 ff btst 0xff, %o0
2005764: 12 80 00 0b bne 2005790 <rtems_task_create+0x108>
2005768: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
200576c: 40 00 05 0d call 2006ba0 <_Objects_Get_information_id>
2005770: 90 10 00 01 mov %g1, %o0
2005774: 40 00 04 e7 call 2006b10 <_Objects_Free>
2005778: 92 10 00 10 mov %l0, %o1
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
200577c: d0 04 a2 5c ld [ %l2 + 0x25c ], %o0
2005780: 40 00 01 dc call 2005ef0 <_API_Mutex_Unlock>
2005784: b0 10 20 0d mov 0xd, %i0
2005788: 81 c7 e0 08 ret
200578c: 81 e8 00 00 restore
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
2005790: c4 04 21 68 ld [ %l0 + 0x168 ], %g2
);
}
#endif
_RTEMS_Unlock_allocator();
2005794: d0 04 a2 5c ld [ %l2 + 0x25c ], %o0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
*id = the_thread->Object.id;
2005798: c2 27 40 00 st %g1, [ %i5 ]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
200579c: 83 36 e0 0a srl %i3, 0xa, %g1
20057a0: 82 18 60 01 xor %g1, 1, %g1
20057a4: 82 08 60 01 and %g1, 1, %g1
);
}
#endif
_RTEMS_Unlock_allocator();
20057a8: b0 10 20 00 clr %i0
20057ac: 40 00 01 d1 call 2005ef0 <_API_Mutex_Unlock>
20057b0: c2 28 a0 08 stb %g1, [ %g2 + 8 ]
return RTEMS_SUCCESSFUL;
}
20057b4: 81 c7 e0 08 ret
20057b8: 81 e8 00 00 restore
020074e0 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
20074e0: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20074e4: 03 00 80 70 sethi %hi(0x201c000), %g1
20074e8: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201c3dc <_Configuration_Table>
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
20074ec: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20074f0: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
20074f4: c2 08 60 04 ldub [ %g1 + 4 ], %g1
20074f8: 80 a0 60 00 cmp %g1, 0
20074fc: 02 80 00 26 be 2007594 <rtems_task_get_note+0xb4> <== NEVER TAKEN
2007500: b0 10 20 16 mov 0x16, %i0
return RTEMS_NOT_CONFIGURED;
if ( !note )
2007504: 80 a6 a0 00 cmp %i2, 0
2007508: 02 80 00 23 be 2007594 <rtems_task_get_note+0xb4> <== NEVER TAKEN
200750c: b0 10 20 09 mov 9, %i0
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
2007510: 80 a6 60 0f cmp %i1, 0xf
2007514: 18 80 00 20 bgu 2007594 <rtems_task_get_note+0xb4>
2007518: b0 10 20 0a mov 0xa, %i0
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
200751c: 80 a2 20 00 cmp %o0, 0
2007520: 02 80 00 07 be 200753c <rtems_task_get_note+0x5c>
2007524: 03 00 80 71 sethi %hi(0x201c400), %g1
2007528: c2 00 60 04 ld [ %g1 + 4 ], %g1 ! 201c404 <_Thread_Executing>
200752c: c2 00 60 08 ld [ %g1 + 8 ], %g1
2007530: 80 a2 00 01 cmp %o0, %g1
2007534: 12 80 00 0b bne 2007560 <rtems_task_get_note+0x80>
2007538: 01 00 00 00 nop
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
200753c: 03 00 80 71 sethi %hi(0x201c400), %g1
2007540: c4 00 60 04 ld [ %g1 + 4 ], %g2 ! 201c404 <_Thread_Executing>
2007544: 82 06 60 08 add %i1, 8, %g1
2007548: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2
200754c: 83 28 60 02 sll %g1, 2, %g1
2007550: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2007554: c2 26 80 00 st %g1, [ %i2 ]
2007558: 81 c7 e0 08 ret
200755c: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007560: 40 00 08 6d call 2009714 <_Thread_Get>
2007564: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007568: c2 07 bf f4 ld [ %fp + -12 ], %g1
200756c: 80 a0 60 00 cmp %g1, 0
2007570: 12 80 00 09 bne 2007594 <rtems_task_get_note+0xb4>
2007574: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
2007578: c2 02 21 68 ld [ %o0 + 0x168 ], %g1
200757c: 84 06 60 08 add %i1, 8, %g2
2007580: 85 28 a0 02 sll %g2, 2, %g2
2007584: c2 00 40 02 ld [ %g1 + %g2 ], %g1
_Thread_Enable_dispatch();
2007588: b0 10 20 00 clr %i0
200758c: 40 00 08 55 call 20096e0 <_Thread_Enable_dispatch>
2007590: c2 26 80 00 st %g1, [ %i2 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007594: 81 c7 e0 08 ret
2007598: 81 e8 00 00 restore
02005838 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
Objects_Id *id
)
{
2005838: 9d e3 bf 98 save %sp, -104, %sp
200583c: 92 10 00 18 mov %i0, %o1
2005840: 96 10 00 1a mov %i2, %o3
2005844: 94 10 00 19 mov %i1, %o2
Objects_Name_or_id_lookup_errors status;
if ( !id )
2005848: 80 a6 a0 00 cmp %i2, 0
200584c: 02 80 00 11 be 2005890 <rtems_task_ident+0x58> <== NEVER TAKEN
2005850: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
2005854: 80 a2 60 00 cmp %o1, 0
2005858: 12 80 00 07 bne 2005874 <rtems_task_ident+0x3c>
200585c: 03 00 80 5a sethi %hi(0x2016800), %g1
*id = _Thread_Executing->Object.id;
2005860: c2 00 62 64 ld [ %g1 + 0x264 ], %g1 ! 2016a64 <_Thread_Executing>
2005864: c2 00 60 08 ld [ %g1 + 8 ], %g1
2005868: c2 26 80 00 st %g1, [ %i2 ]
200586c: 81 c7 e0 08 ret
2005870: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
2005874: 11 00 80 5a sethi %hi(0x2016800), %o0
2005878: 40 00 05 72 call 2006e40 <_Objects_Name_to_id_u32>
200587c: 90 12 20 ac or %o0, 0xac, %o0 ! 20168ac <_RTEMS_tasks_Information>
return _Status_Object_name_errors_to_status[ status ];
2005880: 03 00 80 53 sethi %hi(0x2014c00), %g1
2005884: 91 2a 20 02 sll %o0, 2, %o0
2005888: 82 10 63 e0 or %g1, 0x3e0, %g1
200588c: f0 00 40 08 ld [ %g1 + %o0 ], %i0
}
2005890: 81 c7 e0 08 ret
2005894: 81 e8 00 00 restore
02005ea0 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
Objects_Id id
)
{
2005ea0: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2005ea4: 90 10 00 18 mov %i0, %o0
2005ea8: 40 00 07 7c call 2007c98 <_Thread_Get>
2005eac: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2005eb0: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005eb4: 80 a0 60 00 cmp %g1, 0
2005eb8: 12 80 00 08 bne 2005ed8 <rtems_task_is_suspended+0x38> <== NEVER TAKEN
2005ebc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
2005ec0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2005ec4: 80 88 60 02 btst 2, %g1
2005ec8: 12 80 00 06 bne 2005ee0 <rtems_task_is_suspended+0x40>
2005ecc: 01 00 00 00 nop
_Thread_Enable_dispatch();
2005ed0: 40 00 07 65 call 2007c64 <_Thread_Enable_dispatch>
2005ed4: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2005ed8: 81 c7 e0 08 ret
2005edc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2005ee0: 40 00 07 61 call 2007c64 <_Thread_Enable_dispatch>
2005ee4: b0 10 20 0f mov 0xf, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005ee8: 81 c7 e0 08 ret
2005eec: 81 e8 00 00 restore
0200bee0 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200bee0: 9d e3 bf 98 save %sp, -104, %sp
200bee4: a8 10 00 18 mov %i0, %l4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200bee8: 80 a6 a0 00 cmp %i2, 0
200beec: 02 80 00 53 be 200c038 <rtems_task_mode+0x158> <== NEVER TAKEN
200bef0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200bef4: 03 00 80 5a sethi %hi(0x2016800), %g1
200bef8: e6 00 62 64 ld [ %g1 + 0x264 ], %l3 ! 2016a64 <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200befc: c2 0c e0 76 ldub [ %l3 + 0x76 ], %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200bf00: c4 04 e0 7c ld [ %l3 + 0x7c ], %g2
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200bf04: 80 a0 00 01 cmp %g0, %g1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200bf08: e4 04 e1 68 ld [ %l3 + 0x168 ], %l2
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200bf0c: 82 60 3f ff subx %g0, -1, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200bf10: 80 a0 a0 00 cmp %g2, 0
200bf14: 02 80 00 03 be 200bf20 <rtems_task_mode+0x40>
200bf18: a3 28 60 08 sll %g1, 8, %l1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200bf1c: a2 14 62 00 or %l1, 0x200, %l1
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200bf20: c2 0c a0 08 ldub [ %l2 + 8 ], %g1
200bf24: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200bf28: 7f ff f4 73 call 20090f4 <_CPU_ISR_Get_level>
200bf2c: a0 60 3f ff subx %g0, -1, %l0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200bf30: a1 2c 20 0a sll %l0, 0xa, %l0
200bf34: a0 14 00 08 or %l0, %o0, %l0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200bf38: a0 14 00 11 or %l0, %l1, %l0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200bf3c: 80 8e 61 00 btst 0x100, %i1
200bf40: 02 80 00 06 be 200bf58 <rtems_task_mode+0x78>
200bf44: e0 26 80 00 st %l0, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
200bf48: 83 35 20 08 srl %l4, 8, %g1
200bf4c: 82 18 60 01 xor %g1, 1, %g1
200bf50: 82 08 60 01 and %g1, 1, %g1
200bf54: c2 2c e0 76 stb %g1, [ %l3 + 0x76 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200bf58: 80 8e 62 00 btst 0x200, %i1
200bf5c: 02 80 00 0b be 200bf88 <rtems_task_mode+0xa8>
200bf60: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
200bf64: 80 8d 22 00 btst 0x200, %l4
200bf68: 22 80 00 07 be,a 200bf84 <rtems_task_mode+0xa4>
200bf6c: c0 24 e0 7c clr [ %l3 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200bf70: 03 00 80 5a sethi %hi(0x2016800), %g1
200bf74: c2 00 60 f8 ld [ %g1 + 0xf8 ], %g1 ! 20168f8 <_Thread_Ticks_per_timeslice>
200bf78: c2 24 e0 78 st %g1, [ %l3 + 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;
200bf7c: 82 10 20 01 mov 1, %g1
200bf80: c2 24 e0 7c st %g1, [ %l3 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200bf84: 80 8e 60 0f btst 0xf, %i1
200bf88: 02 80 00 06 be 200bfa0 <rtems_task_mode+0xc0>
200bf8c: 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 ) );
200bf90: 90 0d 20 0f and %l4, 0xf, %o0
200bf94: 7f ff d7 7a call 2001d7c <sparc_enable_interrupts>
200bf98: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200bf9c: 80 8e 64 00 btst 0x400, %i1
200bfa0: 02 80 00 18 be 200c000 <rtems_task_mode+0x120>
200bfa4: a0 10 20 00 clr %l0
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200bfa8: c4 0c a0 08 ldub [ %l2 + 8 ], %g2
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200bfac: 83 35 20 0a srl %l4, 0xa, %g1
200bfb0: 82 18 60 01 xor %g1, 1, %g1
200bfb4: 82 08 60 01 and %g1, 1, %g1
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200bfb8: 80 a0 40 02 cmp %g1, %g2
200bfbc: 22 80 00 12 be,a 200c004 <rtems_task_mode+0x124>
200bfc0: 03 00 80 5a sethi %hi(0x2016800), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200bfc4: 7f ff d7 6a call 2001d6c <sparc_disable_interrupts>
200bfc8: c2 2c a0 08 stb %g1, [ %l2 + 8 ]
_signals = information->signals_pending;
200bfcc: c2 04 a0 18 ld [ %l2 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
200bfd0: c4 04 a0 14 ld [ %l2 + 0x14 ], %g2
information->signals_posted = _signals;
200bfd4: c2 24 a0 14 st %g1, [ %l2 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200bfd8: c4 24 a0 18 st %g2, [ %l2 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200bfdc: 7f ff d7 68 call 2001d7c <sparc_enable_interrupts>
200bfe0: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200bfe4: c2 04 a0 14 ld [ %l2 + 0x14 ], %g1
200bfe8: 80 a0 60 00 cmp %g1, 0
200bfec: 22 80 00 05 be,a 200c000 <rtems_task_mode+0x120>
200bff0: a0 10 20 00 clr %l0
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200bff4: 82 10 20 01 mov 1, %g1
200bff8: a0 10 20 01 mov 1, %l0
200bffc: c2 2c e0 75 stb %g1, [ %l3 + 0x75 ]
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
200c000: 03 00 80 5a sethi %hi(0x2016800), %g1
200c004: c2 00 63 44 ld [ %g1 + 0x344 ], %g1 ! 2016b44 <_System_state_Current>
200c008: 80 a0 60 03 cmp %g1, 3
200c00c: 12 80 00 0b bne 200c038 <rtems_task_mode+0x158> <== NEVER TAKEN
200c010: b0 10 20 00 clr %i0
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
200c014: 40 00 00 7b call 200c200 <_Thread_Evaluate_mode>
200c018: 01 00 00 00 nop
200c01c: 80 8a 20 ff btst 0xff, %o0
200c020: 12 80 00 04 bne 200c030 <rtems_task_mode+0x150>
200c024: 80 8c 20 ff btst 0xff, %l0
200c028: 02 80 00 06 be 200c040 <rtems_task_mode+0x160>
200c02c: 01 00 00 00 nop
_Thread_Dispatch();
200c030: 7f ff ed 32 call 20074f8 <_Thread_Dispatch>
200c034: b0 10 20 00 clr %i0 ! 0 <PROM_START>
200c038: 81 c7 e0 08 ret
200c03c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
200c040: 81 c7 e0 08 ret
200c044: 81 e8 00 00 restore
020076a4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20076a4: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20076a8: 03 00 80 70 sethi %hi(0x201c000), %g1
20076ac: c2 00 63 dc ld [ %g1 + 0x3dc ], %g1 ! 201c3dc <_Configuration_Table>
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20076b0: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20076b4: c2 00 60 40 ld [ %g1 + 0x40 ], %g1
20076b8: c2 08 60 04 ldub [ %g1 + 4 ], %g1
20076bc: 80 a0 60 00 cmp %g1, 0
20076c0: 02 80 00 21 be 2007744 <rtems_task_set_note+0xa0> <== NEVER TAKEN
20076c4: b0 10 20 16 mov 0x16, %i0
/*
* NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would
* be checking an unsigned number for being negative.
*/
if ( notepad > RTEMS_NOTEPAD_LAST )
20076c8: 80 a6 60 0f cmp %i1, 0xf
20076cc: 18 80 00 1e bgu 2007744 <rtems_task_set_note+0xa0>
20076d0: b0 10 20 0a mov 0xa, %i0
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
20076d4: 80 a2 20 00 cmp %o0, 0
20076d8: 02 80 00 07 be 20076f4 <rtems_task_set_note+0x50>
20076dc: 03 00 80 71 sethi %hi(0x201c400), %g1
20076e0: c2 00 60 04 ld [ %g1 + 4 ], %g1 ! 201c404 <_Thread_Executing>
20076e4: c2 00 60 08 ld [ %g1 + 8 ], %g1
20076e8: 80 a2 00 01 cmp %o0, %g1
20076ec: 12 80 00 0a bne 2007714 <rtems_task_set_note+0x70> <== ALWAYS TAKEN
20076f0: 01 00 00 00 nop
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
20076f4: 03 00 80 71 sethi %hi(0x201c400), %g1
20076f8: c4 00 60 04 ld [ %g1 + 4 ], %g2 ! 201c404 <_Thread_Executing>
20076fc: c4 00 a1 68 ld [ %g2 + 0x168 ], %g2
2007700: 82 06 60 08 add %i1, 8, %g1
2007704: 83 28 60 02 sll %g1, 2, %g1
2007708: f4 20 80 01 st %i2, [ %g2 + %g1 ]
200770c: 81 c7 e0 08 ret
2007710: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007714: 40 00 08 00 call 2009714 <_Thread_Get>
2007718: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
200771c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007720: 80 a0 60 00 cmp %g1, 0
2007724: 12 80 00 08 bne 2007744 <rtems_task_set_note+0xa0>
2007728: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
200772c: c4 02 21 68 ld [ %o0 + 0x168 ], %g2
2007730: 82 06 60 08 add %i1, 8, %g1
2007734: 83 28 60 02 sll %g1, 2, %g1
_Thread_Enable_dispatch();
2007738: b0 10 20 00 clr %i0
200773c: 40 00 07 e9 call 20096e0 <_Thread_Enable_dispatch>
2007740: f4 20 80 01 st %i2, [ %g2 + %g1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007744: 81 c7 e0 08 ret
2007748: 81 e8 00 00 restore
02006bfc <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
2006bfc: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
2006c00: 80 a6 60 00 cmp %i1, 0
2006c04: 02 80 00 07 be 2006c20 <rtems_task_set_priority+0x24>
2006c08: 90 10 00 18 mov %i0, %o0
2006c0c: 03 00 80 67 sethi %hi(0x2019c00), %g1
2006c10: c2 08 61 34 ldub [ %g1 + 0x134 ], %g1 ! 2019d34 <rtems_maximum_priority>
2006c14: 80 a6 40 01 cmp %i1, %g1
2006c18: 18 80 00 1c bgu 2006c88 <rtems_task_set_priority+0x8c>
2006c1c: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
2006c20: 80 a6 a0 00 cmp %i2, 0
2006c24: 02 80 00 19 be 2006c88 <rtems_task_set_priority+0x8c> <== NEVER TAKEN
2006c28: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
2006c2c: 40 00 07 cb call 2008b58 <_Thread_Get>
2006c30: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2006c34: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006c38: 80 a0 60 00 cmp %g1, 0
2006c3c: 12 80 00 13 bne 2006c88 <rtems_task_set_priority+0x8c>
2006c40: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
2006c44: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
2006c48: 80 a6 60 00 cmp %i1, 0
2006c4c: 02 80 00 0d be 2006c80 <rtems_task_set_priority+0x84>
2006c50: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
2006c54: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006c58: 80 a0 60 00 cmp %g1, 0
2006c5c: 02 80 00 06 be 2006c74 <rtems_task_set_priority+0x78>
2006c60: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
2006c64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
2006c68: 80 a0 40 19 cmp %g1, %i1
2006c6c: 08 80 00 05 bleu 2006c80 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
2006c70: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, FALSE );
2006c74: 92 10 00 19 mov %i1, %o1
2006c78: 40 00 06 1d call 20084ec <_Thread_Change_priority>
2006c7c: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
2006c80: 40 00 07 a9 call 2008b24 <_Thread_Enable_dispatch>
2006c84: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006c88: 81 c7 e0 08 ret
2006c8c: 81 e8 00 00 restore
0200726c <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
200726c: 9d e3 bf 90 save %sp, -112, %sp
2007270: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
2007274: 80 a6 60 00 cmp %i1, 0
2007278: 02 80 00 11 be 20072bc <rtems_task_variable_add+0x50> <== NEVER TAKEN
200727c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
2007280: 40 00 07 d2 call 20091c8 <_Thread_Get>
2007284: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2007288: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
200728c: a0 10 00 08 mov %o0, %l0
switch (location) {
2007290: 80 a0 60 00 cmp %g1, 0
2007294: 12 80 00 0a bne 20072bc <rtems_task_variable_add+0x50> <== NEVER TAKEN
2007298: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
200729c: 10 80 00 0a b 20072c4 <rtems_task_variable_add+0x58>
20072a0: c4 02 21 78 ld [ %o0 + 0x178 ], %g2
while (tvp) {
if (tvp->ptr == ptr) {
20072a4: 80 a0 40 19 cmp %g1, %i1
20072a8: 32 80 00 07 bne,a 20072c4 <rtems_task_variable_add+0x58>
20072ac: c4 00 80 00 ld [ %g2 ], %g2
tvp->dtor = dtor;
20072b0: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
_Thread_Enable_dispatch();
20072b4: 40 00 07 b8 call 2009194 <_Thread_Enable_dispatch>
20072b8: b0 10 20 00 clr %i0
20072bc: 81 c7 e0 08 ret
20072c0: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
20072c4: 80 a0 a0 00 cmp %g2, 0
20072c8: 32 bf ff f7 bne,a 20072a4 <rtems_task_variable_add+0x38>
20072cc: c2 00 a0 04 ld [ %g2 + 4 ], %g1
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
20072d0: 40 00 0d 42 call 200a7d8 <_Workspace_Allocate>
20072d4: 90 10 20 14 mov 0x14, %o0
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
20072d8: 80 a2 20 00 cmp %o0, 0
20072dc: 32 80 00 06 bne,a 20072f4 <rtems_task_variable_add+0x88>
20072e0: c4 04 21 78 ld [ %l0 + 0x178 ], %g2
_Thread_Enable_dispatch();
20072e4: 40 00 07 ac call 2009194 <_Thread_Enable_dispatch>
20072e8: b0 10 20 1a mov 0x1a, %i0
20072ec: 81 c7 e0 08 ret
20072f0: 81 e8 00 00 restore
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
20072f4: c2 06 40 00 ld [ %i1 ], %g1
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
the_thread->task_variables = new;
20072f8: d0 24 21 78 st %o0, [ %l0 + 0x178 ]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
20072fc: c2 22 20 08 st %g1, [ %o0 + 8 ]
new->ptr = ptr;
2007300: f2 22 20 04 st %i1, [ %o0 + 4 ]
new->dtor = dtor;
2007304: f4 22 20 10 st %i2, [ %o0 + 0x10 ]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
2007308: c4 22 00 00 st %g2, [ %o0 ]
the_thread->task_variables = new;
_Thread_Enable_dispatch();
200730c: 40 00 07 a2 call 2009194 <_Thread_Enable_dispatch>
2007310: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007314: 81 c7 e0 08 ret
2007318: 81 e8 00 00 restore
0200731c <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
200731c: 9d e3 bf 90 save %sp, -112, %sp
2007320: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2007324: 80 a6 60 00 cmp %i1, 0
2007328: 02 80 00 18 be 2007388 <rtems_task_variable_delete+0x6c>
200732c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
2007330: 40 00 07 a6 call 20091c8 <_Thread_Get>
2007334: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2007338: c2 07 bf f4 ld [ %fp + -12 ], %g1
200733c: 80 a0 60 00 cmp %g1, 0
2007340: 12 80 00 12 bne 2007388 <rtems_task_variable_delete+0x6c> <== NEVER TAKEN
2007344: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2007348: d2 02 21 78 ld [ %o0 + 0x178 ], %o1
200734c: 10 80 00 12 b 2007394 <rtems_task_variable_delete+0x78>
2007350: 84 10 20 00 clr %g2
while (tvp) {
if (tvp->ptr == ptr) {
2007354: 80 a0 40 19 cmp %g1, %i1
2007358: 32 80 00 0e bne,a 2007390 <rtems_task_variable_delete+0x74>
200735c: 84 10 00 09 mov %o1, %g2
if (prev)
2007360: 80 a0 a0 00 cmp %g2, 0
2007364: 02 80 00 04 be 2007374 <rtems_task_variable_delete+0x58>
2007368: c2 02 40 00 ld [ %o1 ], %g1
prev->next = tvp->next;
200736c: 10 80 00 03 b 2007378 <rtems_task_variable_delete+0x5c>
2007370: c2 20 80 00 st %g1, [ %g2 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2007374: c2 22 21 78 st %g1, [ %o0 + 0x178 ]
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
2007378: 40 00 00 30 call 2007438 <_RTEMS_Tasks_Invoke_task_variable_dtor>
200737c: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2007380: 40 00 07 85 call 2009194 <_Thread_Enable_dispatch>
2007384: 01 00 00 00 nop
2007388: 81 c7 e0 08 ret
200738c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
2007390: d2 02 40 00 ld [ %o1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
2007394: 80 a2 60 00 cmp %o1, 0
2007398: 32 bf ff ef bne,a 2007354 <rtems_task_variable_delete+0x38>
200739c: c2 02 60 04 ld [ %o1 + 4 ], %g1
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
20073a0: 40 00 07 7d call 2009194 <_Thread_Enable_dispatch>
20073a4: b0 10 20 09 mov 9, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20073a8: 81 c7 e0 08 ret
20073ac: 81 e8 00 00 restore
020073b0 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
20073b0: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
20073b4: 80 a6 60 00 cmp %i1, 0
20073b8: 02 80 00 1d be 200742c <rtems_task_variable_get+0x7c>
20073bc: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
if ( !result )
20073c0: 80 a6 a0 00 cmp %i2, 0
20073c4: 02 80 00 11 be 2007408 <rtems_task_variable_get+0x58>
20073c8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
20073cc: 40 00 07 7f call 20091c8 <_Thread_Get>
20073d0: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
20073d4: c2 07 bf f4 ld [ %fp + -12 ], %g1
20073d8: 80 a0 60 00 cmp %g1, 0
20073dc: 12 80 00 0b bne 2007408 <rtems_task_variable_get+0x58> <== NEVER TAKEN
20073e0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
20073e4: 10 80 00 0b b 2007410 <rtems_task_variable_get+0x60>
20073e8: d0 02 21 78 ld [ %o0 + 0x178 ], %o0
while (tvp) {
if (tvp->ptr == ptr) {
20073ec: 80 a0 40 19 cmp %g1, %i1
20073f0: 32 80 00 08 bne,a 2007410 <rtems_task_variable_get+0x60>
20073f4: d0 02 00 00 ld [ %o0 ], %o0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
20073f8: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
20073fc: b0 10 20 00 clr %i0
2007400: 40 00 07 65 call 2009194 <_Thread_Enable_dispatch>
2007404: c2 26 80 00 st %g1, [ %i2 ]
2007408: 81 c7 e0 08 ret
200740c: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
2007410: 80 a2 20 00 cmp %o0, 0
2007414: 32 bf ff f6 bne,a 20073ec <rtems_task_variable_get+0x3c>
2007418: c2 02 20 04 ld [ %o0 + 4 ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
200741c: 40 00 07 5e call 2009194 <_Thread_Enable_dispatch>
2007420: b0 10 20 09 mov 9, %i0
2007424: 81 c7 e0 08 ret
2007428: 81 e8 00 00 restore
return RTEMS_INVALID_ADDRESS;
200742c: b0 10 20 09 mov 9, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007430: 81 c7 e0 08 ret
2007434: 81 e8 00 00 restore
02006f04 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2006f04: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
2006f08: 03 00 80 68 sethi %hi(0x201a000), %g1
2006f0c: c2 08 62 94 ldub [ %g1 + 0x294 ], %g1 ! 201a294 <_TOD_Is_set>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2006f10: a0 10 00 18 mov %i0, %l0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
2006f14: 80 a0 60 00 cmp %g1, 0
2006f18: 02 80 00 2c be 2006fc8 <rtems_task_wake_when+0xc4>
2006f1c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
2006f20: 80 a4 20 00 cmp %l0, 0
2006f24: 02 80 00 29 be 2006fc8 <rtems_task_wake_when+0xc4> <== NEVER TAKEN
2006f28: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
2006f2c: c0 24 20 18 clr [ %l0 + 0x18 ]
if ( !_TOD_Validate( time_buffer ) )
2006f30: 7f ff fc d0 call 2006270 <_TOD_Validate>
2006f34: 90 10 00 10 mov %l0, %o0
2006f38: 80 8a 20 ff btst 0xff, %o0
2006f3c: 22 80 00 23 be,a 2006fc8 <rtems_task_wake_when+0xc4>
2006f40: b0 10 20 14 mov 0x14, %i0
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
2006f44: 7f ff fc 98 call 20061a4 <_TOD_To_seconds>
2006f48: 90 10 00 10 mov %l0, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2006f4c: 23 00 80 68 sethi %hi(0x201a000), %l1
2006f50: c2 04 63 14 ld [ %l1 + 0x314 ], %g1 ! 201a314 <_TOD_Now>
2006f54: 80 a2 00 01 cmp %o0, %g1
2006f58: 08 80 00 1e bleu 2006fd0 <rtems_task_wake_when+0xcc>
2006f5c: b0 10 00 08 mov %o0, %i0
2006f60: 05 00 80 68 sethi %hi(0x201a000), %g2
2006f64: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 201a280 <_Thread_Dispatch_disable_level>
2006f68: 82 00 60 01 inc %g1
2006f6c: c2 20 a2 80 st %g1, [ %g2 + 0x280 ]
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
2006f70: 21 00 80 68 sethi %hi(0x201a000), %l0
2006f74: d0 04 23 44 ld [ %l0 + 0x344 ], %o0 ! 201a344 <_Thread_Executing>
2006f78: 40 00 09 a4 call 2009608 <_Thread_Set_state>
2006f7c: 92 10 20 10 mov 0x10, %o1
_Watchdog_Initialize(
2006f80: c4 04 23 44 ld [ %l0 + 0x344 ], %g2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006f84: 11 00 80 68 sethi %hi(0x201a000), %o0
2006f88: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2006f8c: 90 12 23 58 or %o0, 0x358, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2006f90: c2 20 a0 68 st %g1, [ %g2 + 0x68 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f94: c2 04 63 14 ld [ %l1 + 0x314 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006f98: 92 00 a0 48 add %g2, 0x48, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f9c: 82 26 00 01 sub %i0, %g1, %g1
2006fa0: c2 20 a0 54 st %g1, [ %g2 + 0x54 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006fa4: 03 00 80 22 sethi %hi(0x2008800), %g1
2006fa8: 82 10 62 74 or %g1, 0x274, %g1 ! 2008a74 <_Thread_Delay_ended>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006fac: c0 20 a0 50 clr [ %g2 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006fb0: c0 20 a0 6c clr [ %g2 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006fb4: c2 20 a0 64 st %g1, [ %g2 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2006fb8: 40 00 0b bd call 2009eac <_Watchdog_Insert>
2006fbc: b0 10 20 00 clr %i0
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
2006fc0: 40 00 07 1e call 2008c38 <_Thread_Enable_dispatch>
2006fc4: 01 00 00 00 nop
2006fc8: 81 c7 e0 08 ret
2006fcc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
2006fd0: b0 10 20 14 mov 0x14, %i0
}
2006fd4: 81 c7 e0 08 ret
2006fd8: 81 e8 00 00 restore
020112d8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
Objects_Id id
)
{
20112d8: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
20112dc: 11 00 80 c2 sethi %hi(0x2030800), %o0
20112e0: 92 10 00 18 mov %i0, %o1
20112e4: 90 12 20 60 or %o0, 0x60, %o0
20112e8: 40 00 0b 23 call 2013f74 <_Objects_Get>
20112ec: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20112f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20112f4: 80 a0 60 00 cmp %g1, 0
20112f8: 12 80 00 0a bne 2011320 <rtems_timer_cancel+0x48>
20112fc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2011300: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011304: 80 a0 60 04 cmp %g1, 4
2011308: 02 80 00 04 be 2011318 <rtems_timer_cancel+0x40> <== NEVER TAKEN
201130c: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
2011310: 40 00 13 b2 call 20161d8 <_Watchdog_Remove>
2011314: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2011318: 40 00 0d 85 call 201492c <_Thread_Enable_dispatch>
201131c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011320: 81 c7 e0 08 ret
2011324: 81 e8 00 00 restore
02011328 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
Objects_Id *id
)
{
2011328: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
201132c: a2 96 20 00 orcc %i0, 0, %l1
2011330: 02 80 00 11 be 2011374 <rtems_timer_create+0x4c>
2011334: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2011338: 80 a6 60 00 cmp %i1, 0
201133c: 02 80 00 0e be 2011374 <rtems_timer_create+0x4c> <== NEVER TAKEN
2011340: b0 10 20 09 mov 9, %i0
2011344: 05 00 80 c1 sethi %hi(0x2030400), %g2
2011348: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
201134c: 82 00 60 01 inc %g1
2011350: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
2011354: 21 00 80 c2 sethi %hi(0x2030800), %l0
2011358: 40 00 09 9b call 20139c4 <_Objects_Allocate>
201135c: 90 14 20 60 or %l0, 0x60, %o0 ! 2030860 <_Timer_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
2011360: 80 a2 20 00 cmp %o0, 0
2011364: 32 80 00 06 bne,a 201137c <rtems_timer_create+0x54>
2011368: c4 02 20 08 ld [ %o0 + 8 ], %g2
_Thread_Enable_dispatch();
201136c: 40 00 0d 70 call 201492c <_Thread_Enable_dispatch>
2011370: b0 10 20 05 mov 5, %i0
2011374: 81 c7 e0 08 ret
2011378: 81 e8 00 00 restore
201137c: 82 14 20 60 or %l0, 0x60, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2011380: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2011384: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2011388: c0 22 20 30 clr [ %o0 + 0x30 ]
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
201138c: 82 10 20 04 mov 4, %g1
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
2011390: c4 26 40 00 st %g2, [ %i1 ]
if ( !the_timer ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
2011394: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
2011398: 03 00 00 3f sethi %hi(0xfc00), %g1
201139c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20113a0: 84 08 80 01 and %g2, %g1, %g2
20113a4: 85 28 a0 02 sll %g2, 2, %g2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20113a8: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
20113ac: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20113b0: c0 22 20 34 clr [ %o0 + 0x34 ]
20113b4: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
20113b8: 40 00 0d 5d call 201492c <_Thread_Enable_dispatch>
20113bc: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
20113c0: 81 c7 e0 08 ret
20113c4: 81 e8 00 00 restore
02011428 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011428: 9d e3 bf 90 save %sp, -112, %sp
201142c: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
2011430: 80 a6 60 00 cmp %i1, 0
2011434: 02 80 00 1c be 20114a4 <rtems_timer_fire_after+0x7c>
2011438: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( !routine )
201143c: 80 a6 a0 00 cmp %i2, 0
2011440: 02 80 00 19 be 20114a4 <rtems_timer_fire_after+0x7c> <== NEVER TAKEN
2011444: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2011448: 11 00 80 c2 sethi %hi(0x2030800), %o0
201144c: 92 10 00 12 mov %l2, %o1
2011450: 90 12 20 60 or %o0, 0x60, %o0
2011454: 40 00 0a c8 call 2013f74 <_Objects_Get>
2011458: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201145c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011460: a0 10 00 08 mov %o0, %l0
2011464: 80 a0 60 00 cmp %g1, 0
2011468: 12 80 00 0f bne 20114a4 <rtems_timer_fire_after+0x7c>
201146c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011470: a2 02 20 10 add %o0, 0x10, %l1
2011474: 40 00 13 59 call 20161d8 <_Watchdog_Remove>
2011478: 90 10 00 11 mov %l1, %o0
_ISR_Disable( level );
201147c: 7f ff e8 2a call 200b524 <sparc_disable_interrupts>
2011480: 01 00 00 00 nop
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
2011484: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2011488: 80 a0 60 00 cmp %g1, 0
201148c: 22 80 00 08 be,a 20114ac <rtems_timer_fire_after+0x84> <== ALWAYS TAKEN
2011490: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
_ISR_Enable( level );
2011494: 7f ff e8 28 call 200b534 <sparc_enable_interrupts> <== NOT EXECUTED
2011498: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
201149c: 40 00 0d 24 call 201492c <_Thread_Enable_dispatch> <== NOT EXECUTED
20114a0: 01 00 00 00 nop <== NOT EXECUTED
20114a4: 81 c7 e0 08 ret
20114a8: 81 e8 00 00 restore
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
20114ac: e4 24 20 30 st %l2, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
20114b0: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL;
20114b4: c0 24 20 38 clr [ %l0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20114b8: c0 24 20 18 clr [ %l0 + 0x18 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
20114bc: 7f ff e8 1e call 200b534 <sparc_enable_interrupts>
20114c0: b0 10 20 00 clr %i0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20114c4: 92 10 00 11 mov %l1, %o1
20114c8: 11 00 80 c1 sethi %hi(0x2030400), %o0
20114cc: 90 12 22 24 or %o0, 0x224, %o0 ! 2030624 <_Watchdog_Ticks_chain>
20114d0: 40 00 12 e8 call 2016070 <_Watchdog_Insert>
20114d4: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
20114d8: 40 00 0d 15 call 201492c <_Thread_Enable_dispatch>
20114dc: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20114e0: 81 c7 e0 08 ret
20114e4: 81 e8 00 00 restore
020114e8 <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20114e8: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
20114ec: 03 00 80 c1 sethi %hi(0x2030400), %g1
20114f0: c2 08 61 54 ldub [ %g1 + 0x154 ], %g1 ! 2030554 <_TOD_Is_set>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20114f4: a6 10 00 18 mov %i0, %l3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
20114f8: 80 a0 60 00 cmp %g1, 0
20114fc: 02 80 00 2d be 20115b0 <rtems_timer_fire_when+0xc8>
2011500: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
2011504: 7f ff f5 34 call 200e9d4 <_TOD_Validate>
2011508: 90 10 00 19 mov %i1, %o0
201150c: 80 8a 20 ff btst 0xff, %o0
2011510: 02 80 00 2a be 20115b8 <rtems_timer_fire_when+0xd0>
2011514: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_CLOCK;
if ( !routine )
2011518: 02 80 00 26 be 20115b0 <rtems_timer_fire_when+0xc8> <== NEVER TAKEN
201151c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
2011520: 7f ff f4 fa call 200e908 <_TOD_To_seconds>
2011524: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011528: 25 00 80 c1 sethi %hi(0x2030400), %l2
201152c: c2 04 a1 d4 ld [ %l2 + 0x1d4 ], %g1 ! 20305d4 <_TOD_Now>
2011530: 80 a2 00 01 cmp %o0, %g1
2011534: 08 80 00 21 bleu 20115b8 <rtems_timer_fire_when+0xd0>
2011538: a2 10 00 08 mov %o0, %l1
201153c: 11 00 80 c2 sethi %hi(0x2030800), %o0
2011540: 92 10 00 13 mov %l3, %o1
2011544: 90 12 20 60 or %o0, 0x60, %o0
2011548: 40 00 0a 8b call 2013f74 <_Objects_Get>
201154c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011550: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011554: b2 10 00 08 mov %o0, %i1
2011558: 80 a0 60 00 cmp %g1, 0
201155c: 12 80 00 15 bne 20115b0 <rtems_timer_fire_when+0xc8>
2011560: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011564: a0 02 20 10 add %o0, 0x10, %l0
2011568: 40 00 13 1c call 20161d8 <_Watchdog_Remove>
201156c: 90 10 00 10 mov %l0, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2011570: e6 26 60 30 st %l3, [ %i1 + 0x30 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011574: c2 04 a1 d4 ld [ %l2 + 0x1d4 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011578: 92 10 00 10 mov %l0, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
201157c: 82 24 40 01 sub %l1, %g1, %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011580: 11 00 80 c1 sethi %hi(0x2030400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011584: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011588: 90 12 22 18 or %o0, 0x218, %o0
the_timer->the_class = TIMER_TIME_OF_DAY;
201158c: 82 10 20 02 mov 2, %g1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2011590: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
2011594: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011598: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
201159c: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20115a0: 40 00 12 b4 call 2016070 <_Watchdog_Insert>
20115a4: b0 10 20 00 clr %i0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
20115a8: 40 00 0c e1 call 201492c <_Thread_Enable_dispatch>
20115ac: 01 00 00 00 nop
20115b0: 81 c7 e0 08 ret
20115b4: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20115b8: b0 10 20 14 mov 0x14, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20115bc: 81 c7 e0 08 ret
20115c0: 81 e8 00 00 restore
020115c4 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
Objects_Id id,
rtems_timer_information *the_info
)
{
20115c4: 9d e3 bf 90 save %sp, -112, %sp
20115c8: 92 10 00 18 mov %i0, %o1
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
20115cc: 80 a6 60 00 cmp %i1, 0
20115d0: 02 80 00 14 be 2011620 <rtems_timer_get_information+0x5c> <== NEVER TAKEN
20115d4: b0 10 20 09 mov 9, %i0
20115d8: 11 00 80 c2 sethi %hi(0x2030800), %o0
20115dc: 94 07 bf f4 add %fp, -12, %o2
20115e0: 40 00 0a 65 call 2013f74 <_Objects_Get>
20115e4: 90 12 20 60 or %o0, 0x60, %o0
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20115e8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20115ec: 80 a0 60 00 cmp %g1, 0
20115f0: 12 80 00 0c bne 2011620 <rtems_timer_get_information+0x5c>
20115f4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
the_info->initial = the_timer->Ticker.initial;
20115f8: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
20115fc: c4 02 20 38 ld [ %o0 + 0x38 ], %g2
the_info->initial = the_timer->Ticker.initial;
2011600: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->start_time = the_timer->Ticker.start_time;
2011604: c2 02 20 24 ld [ %o0 + 0x24 ], %g1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
2011608: c4 26 40 00 st %g2, [ %i1 ]
the_info->initial = the_timer->Ticker.initial;
the_info->start_time = the_timer->Ticker.start_time;
201160c: c2 26 60 08 st %g1, [ %i1 + 8 ]
the_info->stop_time = the_timer->Ticker.stop_time;
2011610: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
_Thread_Enable_dispatch();
2011614: b0 10 20 00 clr %i0
2011618: 40 00 0c c5 call 201492c <_Thread_Enable_dispatch>
201161c: c2 26 60 0c st %g1, [ %i1 + 0xc ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011620: 81 c7 e0 08 ret
2011624: 81 e8 00 00 restore
020118ec <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
20118ec: 9d e3 bf 90 save %sp, -112, %sp
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
20118f0: 80 a6 20 00 cmp %i0, 0
20118f4: 02 80 00 06 be 201190c <rtems_timer_initiate_server+0x20>
20118f8: 82 10 20 00 clr %g1
20118fc: 03 00 80 ac sethi %hi(0x202b000), %g1
2011900: c2 08 63 f4 ldub [ %g1 + 0x3f4 ], %g1 ! 202b3f4 <rtems_maximum_priority>
2011904: 80 a0 40 18 cmp %g1, %i0
2011908: 82 60 3f ff subx %g0, -1, %g1
* Make sure the requested priority is valid. The if is
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
201190c: 80 a0 60 00 cmp %g1, 0
2011910: 12 80 00 06 bne 2011928 <rtems_timer_initiate_server+0x3c><== NEVER TAKEN
2011914: a2 10 00 18 mov %i0, %l1
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
2011918: 80 a6 3f ff cmp %i0, -1
201191c: 12 80 00 56 bne 2011a74 <rtems_timer_initiate_server+0x188>
2011920: 90 10 20 13 mov 0x13, %o0
2011924: a2 10 20 00 clr %l1
2011928: 05 00 80 c1 sethi %hi(0x2030400), %g2
201192c: c2 00 a1 40 ld [ %g2 + 0x140 ], %g1 ! 2030540 <_Thread_Dispatch_disable_level>
2011930: 82 00 60 01 inc %g1
2011934: c2 20 a1 40 st %g1, [ %g2 + 0x140 ]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011938: 31 00 80 af sethi %hi(0x202bc00), %i0
initialized = true;
201193c: 82 10 20 01 mov 1, %g1
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011940: e0 0e 22 b4 ldub [ %i0 + 0x2b4 ], %l0
initialized = true;
_Thread_Enable_dispatch();
2011944: 40 00 0b fa call 201492c <_Thread_Enable_dispatch>
2011948: c2 2e 22 b4 stb %g1, [ %i0 + 0x2b4 ]
if ( tmpInitialized )
201194c: 80 a4 20 00 cmp %l0, 0
2011950: 12 80 00 49 bne 2011a74 <rtems_timer_initiate_server+0x188>
2011954: 90 10 20 0e mov 0xe, %o0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011958: 05 00 80 c1 sethi %hi(0x2030400), %g2
201195c: 82 10 a0 54 or %g2, 0x54, %g1 ! 2030454 <_Timer_To_be_inserted>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011960: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011964: c0 20 60 04 clr [ %g1 + 4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011968: 82 00 60 04 add %g1, 4, %g1
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
201196c: 92 10 00 11 mov %l1, %o1
2011970: 94 10 00 19 mov %i1, %o2
2011974: 19 00 00 20 sethi %hi(0x8000), %o4
2011978: c2 20 a0 54 st %g1, [ %g2 + 0x54 ]
201197c: 98 16 80 0c or %i2, %o4, %o4
2011980: 11 15 12 53 sethi %hi(0x54494c00), %o0
2011984: 96 10 21 00 mov 0x100, %o3
2011988: 90 12 21 45 or %o0, 0x145, %o0
201198c: 7f ff fc 77 call 2010b68 <rtems_task_create>
2011990: 9a 07 bf f4 add %fp, -12, %o5
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
2011994: 80 a2 20 00 cmp %o0, 0
2011998: 02 80 00 04 be 20119a8 <rtems_timer_initiate_server+0xbc>
201199c: 03 00 80 c0 sethi %hi(0x2030000), %g1
initialized = false;
20119a0: 10 80 00 35 b 2011a74 <rtems_timer_initiate_server+0x188>
20119a4: c0 2e 22 b4 clrb [ %i0 + 0x2b4 ]
* to a TCB pointer from here out.
*
* NOTE: Setting the pointer to the Timer Server TCB to a value other than
* NULL indicates that task-based timer support is initialized.
*/
_Timer_Server = (Thread_Control *)_Objects_Get_local_object(
20119a8: d6 07 bf f4 ld [ %fp + -12 ], %o3
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
20119ac: 86 10 63 f4 or %g1, 0x3f4, %g3
20119b0: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2
20119b4: 03 00 00 3f sethi %hi(0xfc00), %g1
20119b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20119bc: 82 0a c0 01 and %o3, %g1, %g1
20119c0: 80 a0 40 02 cmp %g1, %g2
20119c4: 18 80 00 05 bgu 20119d8 <rtems_timer_initiate_server+0xec><== NEVER TAKEN
20119c8: 98 10 20 00 clr %o4
return NULL;
return information->local_table[ index ];
20119cc: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2
20119d0: 83 28 60 02 sll %g1, 2, %g1
20119d4: d8 00 80 01 ld [ %g2 + %g1 ], %o4
20119d8: 1b 00 80 c1 sethi %hi(0x2030400), %o5
20119dc: 82 13 60 48 or %o5, 0x48, %g1 ! 2030448 <_Timer_Seconds_chain>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
20119e0: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
20119e4: c0 20 60 04 clr [ %g1 + 4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
20119e8: 82 00 60 04 add %g1, 4, %g1
20119ec: c2 23 60 48 st %g1, [ %o5 + 0x48 ]
20119f0: 03 00 80 c2 sethi %hi(0x2030800), %g1
20119f4: 09 00 80 c1 sethi %hi(0x2030400), %g4
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20119f8: c0 23 20 6c clr [ %o4 + 0x6c ]
20119fc: 84 11 20 34 or %g4, 0x34, %g2
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a00: c0 23 20 50 clr [ %o4 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011a04: d6 23 20 68 st %o3, [ %o4 + 0x68 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011a08: c4 20 a0 08 st %g2, [ %g2 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011a0c: c0 20 a0 04 clr [ %g2 + 4 ]
2011a10: d8 20 60 a4 st %o4, [ %g1 + 0xa4 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011a14: 84 00 a0 04 add %g2, 4, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2011a18: 07 00 80 51 sethi %hi(0x2014400), %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a1c: 03 00 80 c1 sethi %hi(0x2030400), %g1
the_watchdog->routine = routine;
2011a20: 86 10 e3 68 or %g3, 0x368, %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a24: 82 10 60 60 or %g1, 0x60, %g1
the_watchdog->routine = routine;
2011a28: c6 23 20 64 st %g3, [ %o4 + 0x64 ]
2011a2c: c4 21 20 34 st %g2, [ %g4 + 0x34 ]
2011a30: c6 20 60 1c st %g3, [ %g1 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011a34: c0 20 60 24 clr [ %g1 + 0x24 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011a38: c0 20 60 08 clr [ %g1 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011a3c: d6 20 60 20 st %o3, [ %g1 + 0x20 ]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011a40: 05 00 80 c2 sethi %hi(0x2030800), %g2
2011a44: 03 00 80 46 sethi %hi(0x2011800), %g1
2011a48: 82 10 62 7c or %g1, 0x27c, %g1 ! 2011a7c <_Timer_Server_schedule_operation_method>
/*
* Start the timer server
*/
status = rtems_task_start(
2011a4c: 90 10 00 0b mov %o3, %o0
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011a50: c2 20 a0 a0 st %g1, [ %g2 + 0xa0 ]
/*
* Start the timer server
*/
status = rtems_task_start(
2011a54: 13 00 80 46 sethi %hi(0x2011800), %o1
2011a58: 94 10 20 00 clr %o2
2011a5c: 7f ff fd 99 call 20110c0 <rtems_task_start>
2011a60: 92 12 63 2c or %o1, 0x32c, %o1
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
2011a64: 80 a2 20 00 cmp %o0, 0
2011a68: 02 80 00 03 be 2011a74 <rtems_timer_initiate_server+0x188><== ALWAYS TAKEN
2011a6c: 03 00 80 af sethi %hi(0x202bc00), %g1
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
2011a70: c0 28 62 b4 clrb [ %g1 + 0x2b4 ] ! 202beb4 <initialized.4141><== NOT EXECUTED
}
return status;
}
2011a74: 81 c7 e0 08 ret
2011a78: 91 e8 00 08 restore %g0, %o0, %o0
02011660 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
2011660: 9d e3 bf 90 save %sp, -112, %sp
2011664: 11 00 80 c2 sethi %hi(0x2030800), %o0
2011668: 92 10 00 18 mov %i0, %o1
201166c: 90 12 20 60 or %o0, 0x60, %o0
2011670: 40 00 0a 41 call 2013f74 <_Objects_Get>
2011674: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011678: c2 07 bf f4 ld [ %fp + -12 ], %g1
201167c: a0 10 00 08 mov %o0, %l0
2011680: 80 a0 60 00 cmp %g1, 0
2011684: 12 80 00 19 bne 20116e8 <rtems_timer_reset+0x88>
2011688: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
201168c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011690: 80 a0 60 01 cmp %g1, 1
2011694: 22 80 00 0f be,a 20116d0 <rtems_timer_reset+0x70>
2011698: 31 00 80 c2 sethi %hi(0x2030800), %i0
201169c: 2a 80 00 06 bcs,a 20116b4 <rtems_timer_reset+0x54>
20116a0: a0 02 20 10 add %o0, 0x10, %l0
20116a4: 80 a0 60 04 cmp %g1, 4
20116a8: 18 80 00 1c bgu 2011718 <rtems_timer_reset+0xb8> <== NEVER TAKEN
20116ac: 01 00 00 00 nop
20116b0: 30 80 00 16 b,a 2011708 <rtems_timer_reset+0xa8>
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
20116b4: 40 00 12 c9 call 20161d8 <_Watchdog_Remove>
20116b8: 90 10 00 10 mov %l0, %o0
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
20116bc: 92 10 00 10 mov %l0, %o1
20116c0: 11 00 80 c1 sethi %hi(0x2030400), %o0
20116c4: 40 00 12 6b call 2016070 <_Watchdog_Insert>
20116c8: 90 12 22 24 or %o0, 0x224, %o0 ! 2030624 <_Watchdog_Ticks_chain>
20116cc: 30 80 00 13 b,a 2011718 <rtems_timer_reset+0xb8>
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
20116d0: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1
20116d4: 80 a0 60 00 cmp %g1, 0
20116d8: 12 80 00 06 bne 20116f0 <rtems_timer_reset+0x90> <== ALWAYS TAKEN
20116dc: 01 00 00 00 nop
_Thread_Enable_dispatch();
20116e0: 40 00 0c 93 call 201492c <_Thread_Enable_dispatch> <== NOT EXECUTED
20116e4: b0 10 20 0e mov 0xe, %i0 ! e <PROM_START+0xe> <== NOT EXECUTED
20116e8: 81 c7 e0 08 ret
20116ec: 81 e8 00 00 restore
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
20116f0: 40 00 12 ba call 20161d8 <_Watchdog_Remove>
20116f4: 90 02 20 10 add %o0, 0x10, %o0
(*_Timer_Server_schedule_operation)( the_timer );
20116f8: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1
20116fc: 9f c0 40 00 call %g1
2011700: 90 10 00 10 mov %l0, %o0
2011704: 30 80 00 05 b,a 2011718 <rtems_timer_reset+0xb8>
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
2011708: 40 00 0c 89 call 201492c <_Thread_Enable_dispatch>
201170c: b0 10 20 0b mov 0xb, %i0
2011710: 81 c7 e0 08 ret
2011714: 81 e8 00 00 restore
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
2011718: 40 00 0c 85 call 201492c <_Thread_Enable_dispatch>
201171c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011720: 81 c7 e0 08 ret
2011724: 81 e8 00 00 restore
02011728 <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011728: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
201172c: 03 00 80 c2 sethi %hi(0x2030800), %g1
2011730: c2 00 60 a4 ld [ %g1 + 0xa4 ], %g1 ! 20308a4 <_Timer_Server>
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011734: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
2011738: 80 a0 60 00 cmp %g1, 0
201173c: 02 80 00 1e be 20117b4 <rtems_timer_server_fire_after+0x8c>
2011740: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !routine )
2011744: 80 a6 a0 00 cmp %i2, 0
2011748: 02 80 00 1b be 20117b4 <rtems_timer_server_fire_after+0x8c><== NEVER TAKEN
201174c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
2011750: 80 a6 60 00 cmp %i1, 0
2011754: 02 80 00 18 be 20117b4 <rtems_timer_server_fire_after+0x8c>
2011758: b0 10 20 0a mov 0xa, %i0
201175c: 11 00 80 c2 sethi %hi(0x2030800), %o0
2011760: 92 10 00 11 mov %l1, %o1
2011764: 90 12 20 60 or %o0, 0x60, %o0
2011768: 40 00 0a 03 call 2013f74 <_Objects_Get>
201176c: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011770: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011774: a0 10 00 08 mov %o0, %l0
2011778: 80 a0 60 00 cmp %g1, 0
201177c: 12 80 00 0e bne 20117b4 <rtems_timer_server_fire_after+0x8c>
2011780: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011784: 40 00 12 95 call 20161d8 <_Watchdog_Remove>
2011788: 90 02 20 10 add %o0, 0x10, %o0
_ISR_Disable( level );
201178c: 7f ff e7 66 call 200b524 <sparc_disable_interrupts>
2011790: 01 00 00 00 nop
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
2011794: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2011798: 80 a0 60 00 cmp %g1, 0
201179c: 02 80 00 08 be 20117bc <rtems_timer_server_fire_after+0x94><== ALWAYS TAKEN
20117a0: 82 10 20 01 mov 1, %g1
_ISR_Enable( level );
20117a4: 7f ff e7 64 call 200b534 <sparc_enable_interrupts> <== NOT EXECUTED
20117a8: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20117ac: 40 00 0c 60 call 201492c <_Thread_Enable_dispatch> <== NOT EXECUTED
20117b0: 01 00 00 00 nop <== NOT EXECUTED
20117b4: 81 c7 e0 08 ret
20117b8: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20117bc: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
the_watchdog->id = id;
20117c0: e2 24 20 30 st %l1, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
20117c4: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
20117c8: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20117cc: c0 24 20 18 clr [ %l0 + 0x18 ]
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
20117d0: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
_ISR_Enable( level );
20117d4: 7f ff e7 58 call 200b534 <sparc_enable_interrupts>
20117d8: b0 10 20 00 clr %i0
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20117dc: 03 00 80 c2 sethi %hi(0x2030800), %g1
20117e0: c2 00 60 a0 ld [ %g1 + 0xa0 ], %g1 ! 20308a0 <_Timer_Server_schedule_operation>
20117e4: 9f c0 40 00 call %g1
20117e8: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
20117ec: 40 00 0c 50 call 201492c <_Thread_Enable_dispatch>
20117f0: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20117f4: 81 c7 e0 08 ret
20117f8: 81 e8 00 00 restore
020117fc <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20117fc: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
2011800: 03 00 80 c2 sethi %hi(0x2030800), %g1
2011804: c2 00 60 a4 ld [ %g1 + 0xa4 ], %g1 ! 20308a4 <_Timer_Server>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011808: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
201180c: 80 a0 60 00 cmp %g1, 0
2011810: 02 80 00 32 be 20118d8 <rtems_timer_server_fire_when+0xdc>
2011814: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
2011818: 03 00 80 c1 sethi %hi(0x2030400), %g1
201181c: c2 08 61 54 ldub [ %g1 + 0x154 ], %g1 ! 2030554 <_TOD_Is_set>
2011820: 80 a0 60 00 cmp %g1, 0
2011824: 02 80 00 2d be 20118d8 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
2011828: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
201182c: 80 a6 a0 00 cmp %i2, 0
2011830: 02 80 00 2a be 20118d8 <rtems_timer_server_fire_when+0xdc><== NEVER TAKEN
2011834: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
2011838: 7f ff f4 67 call 200e9d4 <_TOD_Validate>
201183c: 90 10 00 19 mov %i1, %o0
2011840: 80 8a 20 ff btst 0xff, %o0
2011844: 22 80 00 25 be,a 20118d8 <rtems_timer_server_fire_when+0xdc>
2011848: b0 10 20 14 mov 0x14, %i0
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
201184c: 7f ff f4 2f call 200e908 <_TOD_To_seconds>
2011850: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011854: 23 00 80 c1 sethi %hi(0x2030400), %l1
2011858: c2 04 61 d4 ld [ %l1 + 0x1d4 ], %g1 ! 20305d4 <_TOD_Now>
201185c: 80 a2 00 01 cmp %o0, %g1
2011860: 08 80 00 20 bleu 20118e0 <rtems_timer_server_fire_when+0xe4>
2011864: a0 10 00 08 mov %o0, %l0
2011868: 11 00 80 c2 sethi %hi(0x2030800), %o0
201186c: 92 10 00 12 mov %l2, %o1
2011870: 90 12 20 60 or %o0, 0x60, %o0
2011874: 40 00 09 c0 call 2013f74 <_Objects_Get>
2011878: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
201187c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011880: b2 10 00 08 mov %o0, %i1
2011884: 80 a0 60 00 cmp %g1, 0
2011888: 12 80 00 14 bne 20118d8 <rtems_timer_server_fire_when+0xdc>
201188c: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011890: 40 00 12 52 call 20161d8 <_Watchdog_Remove>
2011894: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
2011898: e4 26 60 30 st %l2, [ %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;
201189c: c4 04 61 d4 ld [ %l1 + 0x1d4 ], %g2
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118a0: 03 00 80 c2 sethi %hi(0x2030800), %g1
20118a4: c6 00 60 a0 ld [ %g1 + 0xa0 ], %g3 ! 20308a0 <_Timer_Server_schedule_operation>
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;
20118a8: 84 24 00 02 sub %l0, %g2, %g2
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;
20118ac: 82 10 20 03 mov 3, %g1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118b0: 90 10 00 19 mov %i1, %o0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20118b4: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
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;
20118b8: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20118bc: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20118c0: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20118c4: c0 26 60 18 clr [ %i1 + 0x18 ]
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118c8: 9f c0 c0 00 call %g3
20118cc: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20118d0: 40 00 0c 17 call 201492c <_Thread_Enable_dispatch>
20118d4: 01 00 00 00 nop
20118d8: 81 c7 e0 08 ret
20118dc: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
20118e0: b0 10 20 14 mov 0x14, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20118e4: 81 c7 e0 08 ret
20118e8: 81 e8 00 00 restore