RTEMS 4.11Annotated Report
Sat Jul 14 16:18:15 2012
0200a954 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
200a954: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
200a958: 03 00 80 84 sethi %hi(0x2021000), %g1
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
200a95c: 7f ff e4 a1 call 2003be0 <sparc_disable_interrupts>
200a960: fa 00 61 2c ld [ %g1 + 0x12c ], %i5 ! 202112c <_Per_CPU_Information+0xc>
200a964: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
200a968: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
200a96c: 80 a0 60 00 cmp %g1, 0
200a970: 12 80 00 08 bne 200a990 <_CORE_RWLock_Release+0x3c>
200a974: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
200a978: 7f ff e4 9e call 2003bf0 <sparc_enable_interrupts>
200a97c: b0 10 20 00 clr %i0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
200a980: 82 10 20 02 mov 2, %g1
200a984: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
200a988: 81 c7 e0 08 ret
200a98c: 81 e8 00 00 restore
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
200a990: 32 80 00 0b bne,a 200a9bc <_CORE_RWLock_Release+0x68>
200a994: c0 27 60 34 clr [ %i5 + 0x34 ]
the_rwlock->number_of_readers -= 1;
200a998: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a99c: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
200a9a0: 80 a0 60 00 cmp %g1, 0
200a9a4: 02 80 00 05 be 200a9b8 <_CORE_RWLock_Release+0x64>
200a9a8: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
200a9ac: 7f ff e4 91 call 2003bf0 <sparc_enable_interrupts>
200a9b0: b0 10 20 00 clr %i0
return CORE_RWLOCK_SUCCESSFUL;
200a9b4: 30 80 00 24 b,a 200aa44 <_CORE_RWLock_Release+0xf0>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
200a9b8: c0 27 60 34 clr [ %i5 + 0x34 ]
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
200a9bc: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
200a9c0: 7f ff e4 8c call 2003bf0 <sparc_enable_interrupts>
200a9c4: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
200a9c8: 40 00 07 9d call 200c83c <_Thread_queue_Dequeue>
200a9cc: 90 10 00 18 mov %i0, %o0
if ( next ) {
200a9d0: 80 a2 20 00 cmp %o0, 0
200a9d4: 22 80 00 1c be,a 200aa44 <_CORE_RWLock_Release+0xf0>
200a9d8: b0 10 20 00 clr %i0
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
200a9dc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
200a9e0: 80 a0 60 01 cmp %g1, 1
200a9e4: 32 80 00 05 bne,a 200a9f8 <_CORE_RWLock_Release+0xa4>
200a9e8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
200a9ec: 82 10 20 02 mov 2, %g1
return CORE_RWLOCK_SUCCESSFUL;
200a9f0: 10 80 00 14 b 200aa40 <_CORE_RWLock_Release+0xec>
200a9f4: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
200a9f8: 82 00 60 01 inc %g1
200a9fc: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
200aa00: 82 10 20 01 mov 1, %g1
200aa04: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
200aa08: 40 00 08 c9 call 200cd2c <_Thread_queue_First>
200aa0c: 90 10 00 18 mov %i0, %o0
if ( !next ||
200aa10: 92 92 20 00 orcc %o0, 0, %o1
200aa14: 22 80 00 0c be,a 200aa44 <_CORE_RWLock_Release+0xf0>
200aa18: b0 10 20 00 clr %i0
200aa1c: c2 02 60 30 ld [ %o1 + 0x30 ], %g1
200aa20: 80 a0 60 01 cmp %g1, 1
200aa24: 02 80 00 07 be 200aa40 <_CORE_RWLock_Release+0xec> <== NEVER TAKEN
200aa28: 90 10 00 18 mov %i0, %o0
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
200aa2c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200aa30: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
200aa34: 40 00 08 6f call 200cbf0 <_Thread_queue_Extract>
200aa38: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
}
200aa3c: 30 bf ff f3 b,a 200aa08 <_CORE_RWLock_Release+0xb4>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
200aa40: b0 10 20 00 clr %i0
200aa44: 81 c7 e0 08 ret
200aa48: 81 e8 00 00 restore
0200aa4c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
200aa4c: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200aa50: 90 10 00 18 mov %i0, %o0
200aa54: 40 00 06 a2 call 200c4dc <_Thread_Get>
200aa58: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200aa5c: c2 07 bf fc ld [ %fp + -4 ], %g1
200aa60: 80 a0 60 00 cmp %g1, 0
200aa64: 12 80 00 09 bne 200aa88 <_CORE_RWLock_Timeout+0x3c> <== NEVER TAKEN
200aa68: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200aa6c: 40 00 08 ed call 200ce20 <_Thread_queue_Process_timeout>
200aa70: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200aa74: 03 00 80 82 sethi %hi(0x2020800), %g1
200aa78: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 2020bf0 <_Thread_Dispatch_disable_level>
200aa7c: 84 00 bf ff add %g2, -1, %g2
200aa80: c4 20 63 f0 st %g2, [ %g1 + 0x3f0 ]
return _Thread_Dispatch_disable_level;
200aa84: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1
200aa88: 81 c7 e0 08 ret
200aa8c: 81 e8 00 00 restore
020110e4 <_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
)
{
20110e4: 9d e3 bf a0 save %sp, -96, %sp
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
20110e8: f4 26 20 44 st %i2, [ %i0 + 0x44 ]
the_message_queue->number_of_pending_messages = 0;
20110ec: c0 26 20 48 clr [ %i0 + 0x48 ]
the_message_queue->maximum_message_size = maximum_message_size;
20110f0: 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;
20110f4: c0 26 20 60 clr [ %i0 + 0x60 ]
/*
* 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)) {
20110f8: 80 8e e0 03 btst 3, %i3
20110fc: 02 80 00 09 be 2011120 <_CORE_message_queue_Initialize+0x3c>
2011100: c0 26 20 64 clr [ %i0 + 0x64 ]
allocated_message_size += sizeof(uint32_t);
2011104: 96 06 e0 04 add %i3, 4, %o3
allocated_message_size &= ~(sizeof(uint32_t) - 1);
2011108: 96 0a ff fc and %o3, -4, %o3
}
if (allocated_message_size < maximum_message_size)
201110c: 80 a2 c0 1b cmp %o3, %i3
2011110: 3a 80 00 06 bcc,a 2011128 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN
2011114: ba 02 e0 14 add %o3, 0x14, %i5
return false;
2011118: 10 80 00 24 b 20111a8 <_CORE_message_queue_Initialize+0xc4>
201111c: b0 10 20 00 clr %i0
/*
* 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)) {
2011120: 96 10 00 1b mov %i3, %o3
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
2011124: ba 02 e0 14 add %o3, 0x14, %i5
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
2011128: 90 10 20 00 clr %o0
201112c: 92 10 00 1a mov %i2, %o1
2011130: 94 10 20 00 clr %o2
2011134: 40 00 43 75 call 2021f08 <__muldi3>
2011138: 96 10 00 1d mov %i5, %o3
if ( x > SIZE_MAX )
201113c: 80 a2 20 00 cmp %o0, 0
2011140: 34 80 00 1a bg,a 20111a8 <_CORE_message_queue_Initialize+0xc4>
2011144: b0 10 20 00 clr %i0
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
2011148: 40 00 0c 1c call 20141b8 <_Workspace_Allocate>
201114c: 90 10 00 09 mov %o1, %o0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
2011150: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
2011154: 80 a2 20 00 cmp %o0, 0
2011158: 02 bf ff f0 be 2011118 <_CORE_message_queue_Initialize+0x34>
201115c: 92 10 00 08 mov %o0, %o1
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
2011160: 90 06 20 68 add %i0, 0x68, %o0
2011164: 94 10 00 1a mov %i2, %o2
2011168: 7f ff ff d1 call 20110ac <_Chain_Initialize>
201116c: 96 10 00 1d mov %i5, %o3
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
2011170: 82 06 20 50 add %i0, 0x50, %g1
head->next = tail;
head->previous = NULL;
tail->previous = head;
2011174: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
2011178: c2 06 40 00 ld [ %i1 ], %g1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
201117c: 84 06 20 54 add %i0, 0x54, %g2
2011180: 82 18 60 01 xor %g1, 1, %g1
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
2011184: 80 a0 00 01 cmp %g0, %g1
head->next = tail;
2011188: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
head->previous = NULL;
201118c: c0 26 20 54 clr [ %i0 + 0x54 ]
2011190: 90 10 00 18 mov %i0, %o0
2011194: 92 60 3f ff subx %g0, -1, %o1
2011198: 94 10 20 80 mov 0x80, %o2
201119c: 96 10 20 06 mov 6, %o3
20111a0: 40 00 09 da call 2013908 <_Thread_queue_Initialize>
20111a4: b0 10 20 01 mov 1, %i0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
20111a8: b0 0e 20 01 and %i0, 1, %i0
20111ac: 81 c7 e0 08 ret
20111b0: 81 e8 00 00 restore
020087a0 <_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
)
{
20087a0: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
20087a4: 90 10 00 18 mov %i0, %o0
20087a8: 40 00 07 6e call 200a560 <_Thread_queue_Dequeue>
20087ac: ba 10 00 18 mov %i0, %i5
20087b0: 80 a2 20 00 cmp %o0, 0
20087b4: 12 80 00 0e bne 20087ec <_CORE_semaphore_Surrender+0x4c>
20087b8: b0 10 20 00 clr %i0
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
20087bc: 7f ff e7 c2 call 20026c4 <sparc_disable_interrupts>
20087c0: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
20087c4: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
20087c8: c4 07 60 40 ld [ %i5 + 0x40 ], %g2
20087cc: 80 a0 40 02 cmp %g1, %g2
20087d0: 1a 80 00 05 bcc 20087e4 <_CORE_semaphore_Surrender+0x44> <== NEVER TAKEN
20087d4: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
20087d8: 82 00 60 01 inc %g1
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
20087dc: b0 10 20 00 clr %i0
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
20087e0: c2 27 60 48 st %g1, [ %i5 + 0x48 ]
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
20087e4: 7f ff e7 bc call 20026d4 <sparc_enable_interrupts>
20087e8: 01 00 00 00 nop
}
return status;
}
20087ec: 81 c7 e0 08 ret
20087f0: 81 e8 00 00 restore
02007488 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2007488: 9d e3 bf a0 save %sp, -96, %sp
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
200748c: f8 06 21 58 ld [ %i0 + 0x158 ], %i4
option_set = (rtems_option) the_thread->Wait.option;
2007490: f6 06 20 30 ld [ %i0 + 0x30 ], %i3
_ISR_Disable( level );
2007494: 7f ff ec 8c call 20026c4 <sparc_disable_interrupts>
2007498: ba 10 00 18 mov %i0, %i5
200749c: b0 10 00 08 mov %o0, %i0
pending_events = api->pending_events;
20074a0: c4 07 00 00 ld [ %i4 ], %g2
event_condition = (rtems_event_set) the_thread->Wait.count;
20074a4: c6 07 60 24 ld [ %i5 + 0x24 ], %g3
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
20074a8: 82 88 c0 02 andcc %g3, %g2, %g1
20074ac: 02 80 00 42 be 20075b4 <_Event_Surrender+0x12c>
20074b0: 09 00 80 78 sethi %hi(0x201e000), %g4
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
20074b4: 88 11 20 20 or %g4, 0x20, %g4 ! 201e020 <_Per_CPU_Information>
20074b8: f4 01 20 08 ld [ %g4 + 8 ], %i2
20074bc: 80 a6 a0 00 cmp %i2, 0
20074c0: 22 80 00 1d be,a 2007534 <_Event_Surrender+0xac>
20074c4: c8 07 60 10 ld [ %i5 + 0x10 ], %g4
20074c8: c8 01 20 0c ld [ %g4 + 0xc ], %g4
20074cc: 80 a7 40 04 cmp %i5, %g4
20074d0: 32 80 00 19 bne,a 2007534 <_Event_Surrender+0xac>
20074d4: c8 07 60 10 ld [ %i5 + 0x10 ], %g4
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
20074d8: 09 00 80 79 sethi %hi(0x201e400), %g4
20074dc: f4 01 20 20 ld [ %g4 + 0x20 ], %i2 ! 201e420 <_Event_Sync_state>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
20074e0: 80 a6 a0 02 cmp %i2, 2
20074e4: 02 80 00 07 be 2007500 <_Event_Surrender+0x78> <== NEVER TAKEN
20074e8: 80 a0 40 03 cmp %g1, %g3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
20074ec: c8 01 20 20 ld [ %g4 + 0x20 ], %g4
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
20074f0: 80 a1 20 01 cmp %g4, 1
20074f4: 32 80 00 10 bne,a 2007534 <_Event_Surrender+0xac>
20074f8: c8 07 60 10 ld [ %i5 + 0x10 ], %g4
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
20074fc: 80 a0 40 03 cmp %g1, %g3
2007500: 02 80 00 04 be 2007510 <_Event_Surrender+0x88>
2007504: 80 8e e0 02 btst 2, %i3
2007508: 02 80 00 2b be 20075b4 <_Event_Surrender+0x12c> <== NEVER TAKEN
200750c: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
2007510: 84 28 80 01 andn %g2, %g1, %g2
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2007514: c4 27 00 00 st %g2, [ %i4 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007518: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
200751c: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007520: c2 20 80 00 st %g1, [ %g2 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2007524: 84 10 20 03 mov 3, %g2
2007528: 03 00 80 79 sethi %hi(0x201e400), %g1
200752c: c4 20 60 20 st %g2, [ %g1 + 0x20 ] ! 201e420 <_Event_Sync_state>
2007530: 30 80 00 21 b,a 20075b4 <_Event_Surrender+0x12c>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
2007534: 80 89 21 00 btst 0x100, %g4
2007538: 02 80 00 1f be 20075b4 <_Event_Surrender+0x12c>
200753c: 80 a0 40 03 cmp %g1, %g3
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
2007540: 02 80 00 04 be 2007550 <_Event_Surrender+0xc8>
2007544: 80 8e e0 02 btst 2, %i3
2007548: 02 80 00 1b be 20075b4 <_Event_Surrender+0x12c> <== NEVER TAKEN
200754c: 01 00 00 00 nop
2007550: 84 28 80 01 andn %g2, %g1, %g2
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
2007554: c4 27 00 00 st %g2, [ %i4 ]
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007558: c4 07 60 28 ld [ %i5 + 0x28 ], %g2
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
200755c: c0 27 60 24 clr [ %i5 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
2007560: c2 20 80 00 st %g1, [ %g2 ]
_ISR_Flash( level );
2007564: 7f ff ec 5c call 20026d4 <sparc_enable_interrupts>
2007568: 90 10 00 18 mov %i0, %o0
200756c: 7f ff ec 56 call 20026c4 <sparc_disable_interrupts>
2007570: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
2007574: c2 07 60 50 ld [ %i5 + 0x50 ], %g1
2007578: 80 a0 60 02 cmp %g1, 2
200757c: 02 80 00 06 be 2007594 <_Event_Surrender+0x10c>
2007580: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2007584: 7f ff ec 54 call 20026d4 <sparc_enable_interrupts>
2007588: 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 );
200758c: 10 80 00 08 b 20075ac <_Event_Surrender+0x124>
2007590: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2007594: c2 27 60 50 st %g1, [ %i5 + 0x50 ]
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
2007598: 7f ff ec 4f call 20026d4 <sparc_enable_interrupts>
200759c: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
20075a0: 40 00 0e ae call 200b058 <_Watchdog_Remove>
20075a4: 90 07 60 48 add %i5, 0x48, %o0
20075a8: b2 16 63 f8 or %i1, 0x3f8, %i1
20075ac: 40 00 0a 28 call 2009e4c <_Thread_Clear_state>
20075b0: 91 e8 00 1d restore %g0, %i5, %o0
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
20075b4: 7f ff ec 48 call 20026d4 <sparc_enable_interrupts>
20075b8: 81 e8 00 00 restore
020075bc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
20075bc: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
20075c0: 90 10 00 18 mov %i0, %o0
20075c4: 40 00 0b 0f call 200a200 <_Thread_Get>
20075c8: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
20075cc: c2 07 bf fc ld [ %fp + -4 ], %g1
20075d0: 80 a0 60 00 cmp %g1, 0
20075d4: 12 80 00 1d bne 2007648 <_Event_Timeout+0x8c> <== NEVER TAKEN
20075d8: ba 10 00 08 mov %o0, %i5
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
20075dc: 7f ff ec 3a call 20026c4 <sparc_disable_interrupts>
20075e0: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
20075e4: 03 00 80 78 sethi %hi(0x201e000), %g1
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
20075e8: c2 00 60 2c ld [ %g1 + 0x2c ], %g1 ! 201e02c <_Per_CPU_Information+0xc>
20075ec: 80 a7 40 01 cmp %i5, %g1
20075f0: 12 80 00 09 bne 2007614 <_Event_Timeout+0x58>
20075f4: c0 27 60 24 clr [ %i5 + 0x24 ]
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
20075f8: 03 00 80 79 sethi %hi(0x201e400), %g1
20075fc: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 ! 201e420 <_Event_Sync_state>
2007600: 80 a0 a0 01 cmp %g2, 1
2007604: 32 80 00 05 bne,a 2007618 <_Event_Timeout+0x5c>
2007608: 82 10 20 06 mov 6, %g1
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
200760c: 84 10 20 02 mov 2, %g2
2007610: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2007614: 82 10 20 06 mov 6, %g1
2007618: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
_ISR_Enable( level );
200761c: 7f ff ec 2e call 20026d4 <sparc_enable_interrupts>
2007620: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007624: 90 10 00 1d mov %i5, %o0
2007628: 13 04 00 ff sethi %hi(0x1003fc00), %o1
200762c: 40 00 0a 08 call 2009e4c <_Thread_Clear_state>
2007630: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
2007634: 03 00 80 76 sethi %hi(0x201d800), %g1
2007638: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
200763c: 84 00 bf ff add %g2, -1, %g2
2007640: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
2007644: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
2007648: 81 c7 e0 08 ret
200764c: 81 e8 00 00 restore
0200d758 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
200d758: 9d e3 bf 90 save %sp, -112, %sp
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
200d75c: c0 27 bf f8 clr [ %fp + -8 ]
Heap_Block *extend_last_block = NULL;
200d760: c0 27 bf fc clr [ %fp + -4 ]
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
200d764: ba 06 40 1a add %i1, %i2, %i5
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
200d768: ea 06 20 20 ld [ %i0 + 0x20 ], %l5
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
200d76c: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
uintptr_t const min_block_size = heap->min_block_size;
200d770: d6 06 20 14 ld [ %i0 + 0x14 ], %o3
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
200d774: 80 a7 40 19 cmp %i5, %i1
200d778: 1a 80 00 04 bcc 200d788 <_Heap_Extend+0x30>
200d77c: e6 06 20 30 ld [ %i0 + 0x30 ], %l3
return false;
200d780: 10 80 00 a2 b 200da08 <_Heap_Extend+0x2b0>
200d784: b0 10 20 00 clr %i0
}
extend_area_ok = _Heap_Get_first_and_last_block(
200d788: 90 10 00 19 mov %i1, %o0
200d78c: 92 10 00 1a mov %i2, %o1
200d790: 94 10 00 16 mov %l6, %o2
200d794: 98 07 bf f8 add %fp, -8, %o4
200d798: 7f ff ec 9e call 2008a10 <_Heap_Get_first_and_last_block>
200d79c: 9a 07 bf fc add %fp, -4, %o5
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
200d7a0: 80 8a 20 ff btst 0xff, %o0
200d7a4: 02 bf ff f7 be 200d780 <_Heap_Extend+0x28>
200d7a8: a4 10 20 00 clr %l2
200d7ac: b4 10 00 15 mov %l5, %i2
200d7b0: a8 10 20 00 clr %l4
200d7b4: b8 10 20 00 clr %i4
200d7b8: a2 10 20 00 clr %l1
200d7bc: ee 06 20 18 ld [ %i0 + 0x18 ], %l7
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
uintptr_t const sub_area_end = start_block->prev_size;
200d7c0: e0 06 80 00 ld [ %i2 ], %l0
200d7c4: 92 10 00 16 mov %l6, %o1
200d7c8: 82 04 3f f8 add %l0, -8, %g1
200d7cc: 90 10 00 10 mov %l0, %o0
200d7d0: 40 00 2d 82 call 2018dd8 <.urem>
200d7d4: c2 27 bf f4 st %g1, [ %fp + -12 ]
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200d7d8: c2 07 bf f4 ld [ %fp + -12 ], %g1
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
200d7dc: 80 a5 c0 1d cmp %l7, %i5
200d7e0: 1a 80 00 05 bcc 200d7f4 <_Heap_Extend+0x9c>
200d7e4: 90 20 40 08 sub %g1, %o0, %o0
200d7e8: 80 a6 40 10 cmp %i1, %l0
200d7ec: 2a 80 00 87 bcs,a 200da08 <_Heap_Extend+0x2b0>
200d7f0: b0 10 20 00 clr %i0
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
200d7f4: 80 a7 40 17 cmp %i5, %l7
200d7f8: 02 80 00 06 be 200d810 <_Heap_Extend+0xb8>
200d7fc: 80 a7 40 10 cmp %i5, %l0
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
200d800: 2a 80 00 05 bcs,a 200d814 <_Heap_Extend+0xbc>
200d804: a8 10 00 1a mov %i2, %l4
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
200d808: 10 80 00 04 b 200d818 <_Heap_Extend+0xc0>
200d80c: 80 a4 00 19 cmp %l0, %i1
200d810: a2 10 00 1a mov %i2, %l1
200d814: 80 a4 00 19 cmp %l0, %i1
200d818: 12 80 00 05 bne 200d82c <_Heap_Extend+0xd4>
200d81c: 80 a4 00 19 cmp %l0, %i1
start_block->prev_size = extend_area_end;
200d820: fa 26 80 00 st %i5, [ %i2 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
200d824: 10 80 00 04 b 200d834 <_Heap_Extend+0xdc>
200d828: b8 10 00 08 mov %o0, %i4
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
200d82c: 2a 80 00 02 bcs,a 200d834 <_Heap_Extend+0xdc>
200d830: a4 10 00 08 mov %o0, %l2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200d834: f4 02 20 04 ld [ %o0 + 4 ], %i2
200d838: b4 0e bf fe and %i2, -2, %i2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d83c: b4 02 00 1a add %o0, %i2, %i2
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
200d840: 80 a6 80 15 cmp %i2, %l5
200d844: 12 bf ff df bne 200d7c0 <_Heap_Extend+0x68>
200d848: ae 10 00 1a mov %i2, %l7
if ( extend_area_begin < heap->area_begin ) {
200d84c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200d850: 80 a6 40 01 cmp %i1, %g1
200d854: 3a 80 00 04 bcc,a 200d864 <_Heap_Extend+0x10c>
200d858: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
heap->area_begin = extend_area_begin;
200d85c: 10 80 00 05 b 200d870 <_Heap_Extend+0x118>
200d860: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
} else if ( heap->area_end < extend_area_end ) {
200d864: 80 a0 40 1d cmp %g1, %i5
200d868: 2a 80 00 02 bcs,a 200d870 <_Heap_Extend+0x118>
200d86c: fa 26 20 1c st %i5, [ %i0 + 0x1c ]
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
200d870: c4 07 bf f8 ld [ %fp + -8 ], %g2
200d874: c2 07 bf fc ld [ %fp + -4 ], %g1
extend_first_block->prev_size = extend_area_end;
200d878: fa 20 80 00 st %i5, [ %g2 ]
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
200d87c: 86 20 40 02 sub %g1, %g2, %g3
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
200d880: 88 10 e0 01 or %g3, 1, %g4
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
200d884: c6 20 40 00 st %g3, [ %g1 ]
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
200d888: c8 20 a0 04 st %g4, [ %g2 + 4 ]
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
200d88c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
200d890: 80 a0 c0 02 cmp %g3, %g2
200d894: 08 80 00 04 bleu 200d8a4 <_Heap_Extend+0x14c>
200d898: c0 20 60 04 clr [ %g1 + 4 ]
heap->first_block = extend_first_block;
200d89c: 10 80 00 06 b 200d8b4 <_Heap_Extend+0x15c>
200d8a0: c4 26 20 20 st %g2, [ %i0 + 0x20 ]
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
200d8a4: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
200d8a8: 80 a0 80 01 cmp %g2, %g1
200d8ac: 2a 80 00 02 bcs,a 200d8b4 <_Heap_Extend+0x15c>
200d8b0: c2 26 20 24 st %g1, [ %i0 + 0x24 ]
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
200d8b4: 80 a4 60 00 cmp %l1, 0
200d8b8: 02 80 00 14 be 200d908 <_Heap_Extend+0x1b0>
200d8bc: b2 06 60 08 add %i1, 8, %i1
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
200d8c0: f4 06 20 10 ld [ %i0 + 0x10 ], %i2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
200d8c4: 92 10 00 1a mov %i2, %o1
200d8c8: 40 00 2d 44 call 2018dd8 <.urem>
200d8cc: 90 10 00 19 mov %i1, %o0
if ( remainder != 0 ) {
200d8d0: 80 a2 20 00 cmp %o0, 0
200d8d4: 02 80 00 04 be 200d8e4 <_Heap_Extend+0x18c>
200d8d8: c2 04 40 00 ld [ %l1 ], %g1
return value - remainder + alignment;
200d8dc: b2 06 40 1a add %i1, %i2, %i1
200d8e0: b2 26 40 08 sub %i1, %o0, %i1
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
200d8e4: 92 06 7f f8 add %i1, -8, %o1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
200d8e8: c2 26 7f f8 st %g1, [ %i1 + -8 ]
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
200d8ec: 82 24 40 09 sub %l1, %o1, %g1
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
200d8f0: 82 10 60 01 or %g1, 1, %g1
_Heap_Free_block( heap, new_first_block );
200d8f4: 90 10 00 18 mov %i0, %o0
200d8f8: 7f ff ff 8e call 200d730 <_Heap_Free_block>
200d8fc: c2 22 60 04 st %g1, [ %o1 + 4 ]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200d900: 10 80 00 08 b 200d920 <_Heap_Extend+0x1c8>
200d904: 80 a7 20 00 cmp %i4, 0
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
200d908: 80 a5 20 00 cmp %l4, 0
200d90c: 02 80 00 04 be 200d91c <_Heap_Extend+0x1c4>
200d910: a8 25 00 01 sub %l4, %g1, %l4
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
200d914: a8 15 20 01 or %l4, 1, %l4
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
200d918: e8 20 60 04 st %l4, [ %g1 + 4 ]
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
200d91c: 80 a7 20 00 cmp %i4, 0
200d920: 02 80 00 15 be 200d974 <_Heap_Extend+0x21c>
200d924: ba 07 7f f8 add %i5, -8, %i5
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d928: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
200d92c: ba 27 40 1c sub %i5, %i4, %i5
200d930: 40 00 2d 2a call 2018dd8 <.urem>
200d934: 90 10 00 1d mov %i5, %o0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
200d938: c4 07 20 04 ld [ %i4 + 4 ], %g2
200d93c: 90 27 40 08 sub %i5, %o0, %o0
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200d940: 82 02 00 1c add %o0, %i4, %g1
(last_block->size_and_flag - last_block_new_size)
200d944: 84 20 80 08 sub %g2, %o0, %g2
| HEAP_PREV_BLOCK_USED;
200d948: 84 10 a0 01 or %g2, 1, %g2
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
200d94c: c4 20 60 04 st %g2, [ %g1 + 4 ]
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d950: c2 07 20 04 ld [ %i4 + 4 ], %g1
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
200d954: 92 10 00 1c mov %i4, %o1
200d958: 82 08 60 01 and %g1, 1, %g1
block->size_and_flag = size | flag;
200d95c: 90 12 00 01 or %o0, %g1, %o0
200d960: d0 27 20 04 st %o0, [ %i4 + 4 ]
200d964: 7f ff ff 73 call 200d730 <_Heap_Free_block>
200d968: 90 10 00 18 mov %i0, %o0
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200d96c: 10 80 00 0f b 200d9a8 <_Heap_Extend+0x250>
200d970: 80 a7 20 00 cmp %i4, 0
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
200d974: 80 a4 a0 00 cmp %l2, 0
200d978: 02 80 00 0b be 200d9a4 <_Heap_Extend+0x24c>
200d97c: c6 07 bf f8 ld [ %fp + -8 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d980: c4 04 a0 04 ld [ %l2 + 4 ], %g2
_Heap_Link_above(
200d984: c2 07 bf fc ld [ %fp + -4 ], %g1
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
200d988: 86 20 c0 12 sub %g3, %l2, %g3
200d98c: 84 08 a0 01 and %g2, 1, %g2
block->size_and_flag = size | flag;
200d990: 84 10 c0 02 or %g3, %g2, %g2
200d994: c4 24 a0 04 st %g2, [ %l2 + 4 ]
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
200d998: c4 00 60 04 ld [ %g1 + 4 ], %g2
200d99c: 84 10 a0 01 or %g2, 1, %g2
200d9a0: c4 20 60 04 st %g2, [ %g1 + 4 ]
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
200d9a4: 80 a7 20 00 cmp %i4, 0
200d9a8: 32 80 00 09 bne,a 200d9cc <_Heap_Extend+0x274>
200d9ac: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d9b0: 80 a4 60 00 cmp %l1, 0
200d9b4: 32 80 00 06 bne,a 200d9cc <_Heap_Extend+0x274>
200d9b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
_Heap_Free_block( heap, extend_first_block );
200d9bc: d2 07 bf f8 ld [ %fp + -8 ], %o1
200d9c0: 7f ff ff 5c call 200d730 <_Heap_Free_block>
200d9c4: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
200d9c8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200d9cc: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d9d0: c4 00 60 04 ld [ %g1 + 4 ], %g2
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
200d9d4: 86 20 c0 01 sub %g3, %g1, %g3
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d9d8: 84 08 a0 01 and %g2, 1, %g2
block->size_and_flag = size | flag;
200d9dc: 84 10 c0 02 or %g3, %g2, %g2
200d9e0: c4 20 60 04 st %g2, [ %g1 + 4 ]
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200d9e4: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
200d9e8: 80 a6 e0 00 cmp %i3, 0
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
200d9ec: a6 20 40 13 sub %g1, %l3, %l3
/* Statistics */
stats->size += extended_size;
200d9f0: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
200d9f4: 82 00 40 13 add %g1, %l3, %g1
if ( extended_size_ptr != NULL )
200d9f8: 02 80 00 03 be 200da04 <_Heap_Extend+0x2ac> <== NEVER TAKEN
200d9fc: c2 26 20 2c st %g1, [ %i0 + 0x2c ]
*extended_size_ptr = extended_size;
200da00: e6 26 c0 00 st %l3, [ %i3 ]
return true;
200da04: b0 10 20 01 mov 1, %i0
}
200da08: b0 0e 20 01 and %i0, 1, %i0
200da0c: 81 c7 e0 08 ret
200da10: 81 e8 00 00 restore
0200d784 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
200d784: 9d e3 bf a0 save %sp, -96, %sp
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
200d788: 80 a6 60 00 cmp %i1, 0
200d78c: 02 80 00 7a be 200d974 <_Heap_Free+0x1f0>
200d790: 88 10 20 01 mov 1, %g4
200d794: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200d798: 40 00 2c ec call 2018b48 <.urem>
200d79c: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
200d7a0: f6 06 20 20 ld [ %i0 + 0x20 ], %i3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200d7a4: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200d7a8: 90 27 40 08 sub %i5, %o0, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d7ac: 80 a2 00 1b cmp %o0, %i3
200d7b0: 0a 80 00 05 bcs 200d7c4 <_Heap_Free+0x40>
200d7b4: 82 10 20 00 clr %g1
200d7b8: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200d7bc: 80 a0 40 08 cmp %g1, %o0
200d7c0: 82 60 3f ff subx %g0, -1, %g1
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
200d7c4: 80 a0 60 00 cmp %g1, 0
200d7c8: 02 80 00 6b be 200d974 <_Heap_Free+0x1f0>
200d7cc: 88 10 20 00 clr %g4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200d7d0: f8 02 20 04 ld [ %o0 + 4 ], %i4
200d7d4: 84 0f 3f fe and %i4, -2, %g2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d7d8: 82 02 00 02 add %o0, %g2, %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d7dc: 80 a0 40 1b cmp %g1, %i3
200d7e0: 0a 80 00 05 bcs 200d7f4 <_Heap_Free+0x70> <== NEVER TAKEN
200d7e4: 86 10 20 00 clr %g3
200d7e8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200d7ec: 80 a0 c0 01 cmp %g3, %g1
200d7f0: 86 60 3f ff subx %g0, -1, %g3
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
200d7f4: 80 a0 e0 00 cmp %g3, 0
200d7f8: 02 80 00 5f be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d7fc: 88 10 20 00 clr %g4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d800: fa 00 60 04 ld [ %g1 + 4 ], %i5
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
200d804: 80 8f 60 01 btst 1, %i5
200d808: 22 80 00 5c be,a 200d978 <_Heap_Free+0x1f4> <== NEVER TAKEN
200d80c: b0 09 20 01 and %g4, 1, %i0 <== NOT EXECUTED
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
200d810: c8 06 20 24 ld [ %i0 + 0x24 ], %g4
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
200d814: 80 a0 40 04 cmp %g1, %g4
200d818: 02 80 00 07 be 200d834 <_Heap_Free+0xb0>
200d81c: ba 0f 7f fe and %i5, -2, %i5
200d820: 86 00 40 1d add %g1, %i5, %g3
200d824: f4 00 e0 04 ld [ %g3 + 4 ], %i2
200d828: b4 1e a0 01 xor %i2, 1, %i2
200d82c: 10 80 00 03 b 200d838 <_Heap_Free+0xb4>
200d830: b4 0e a0 01 and %i2, 1, %i2
200d834: b4 10 20 00 clr %i2
if ( !_Heap_Is_prev_used( block ) ) {
200d838: 80 8f 20 01 btst 1, %i4
200d83c: 12 80 00 26 bne 200d8d4 <_Heap_Free+0x150>
200d840: 80 8e a0 ff btst 0xff, %i2
uintptr_t const prev_size = block->prev_size;
200d844: f8 02 00 00 ld [ %o0 ], %i4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200d848: 86 22 00 1c sub %o0, %i4, %g3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200d84c: 80 a0 c0 1b cmp %g3, %i3
200d850: 0a 80 00 04 bcs 200d860 <_Heap_Free+0xdc> <== NEVER TAKEN
200d854: b2 10 20 00 clr %i1
200d858: 80 a1 00 03 cmp %g4, %g3
200d85c: b2 60 3f ff subx %g0, -1, %i1
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
200d860: 80 a6 60 00 cmp %i1, 0
200d864: 02 80 00 44 be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d868: 88 10 20 00 clr %g4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200d86c: f6 00 e0 04 ld [ %g3 + 4 ], %i3
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
200d870: 80 8e e0 01 btst 1, %i3
200d874: 02 80 00 40 be 200d974 <_Heap_Free+0x1f0> <== NEVER TAKEN
200d878: 80 8e a0 ff btst 0xff, %i2
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
200d87c: 22 80 00 0f be,a 200d8b8 <_Heap_Free+0x134>
200d880: b8 00 80 1c add %g2, %i4, %i4
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
200d884: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = block->prev;
200d888: c2 00 60 0c ld [ %g1 + 0xc ], %g1
uintptr_t const size = block_size + prev_size + next_block_size;
200d88c: ba 00 80 1d add %g2, %i5, %i5
prev->next = next;
200d890: c8 20 60 08 st %g4, [ %g1 + 8 ]
next->prev = prev;
200d894: c2 21 20 0c st %g1, [ %g4 + 0xc ]
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200d898: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
200d89c: b8 07 40 1c add %i5, %i4, %i4
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
200d8a0: 82 00 7f ff add %g1, -1, %g1
200d8a4: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200d8a8: f8 20 c0 1c st %i4, [ %g3 + %i4 ]
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d8ac: 82 17 20 01 or %i4, 1, %g1
200d8b0: 10 80 00 27 b 200d94c <_Heap_Free+0x1c8>
200d8b4: c2 20 e0 04 st %g1, [ %g3 + 4 ]
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d8b8: 88 17 20 01 or %i4, 1, %g4
200d8bc: c8 20 e0 04 st %g4, [ %g3 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d8c0: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = size;
200d8c4: f8 22 00 02 st %i4, [ %o0 + %g2 ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d8c8: 86 08 ff fe and %g3, -2, %g3
200d8cc: 10 80 00 20 b 200d94c <_Heap_Free+0x1c8>
200d8d0: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
200d8d4: 22 80 00 0d be,a 200d908 <_Heap_Free+0x184>
200d8d8: c6 06 20 08 ld [ %i0 + 8 ], %g3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
200d8dc: c8 00 60 08 ld [ %g1 + 8 ], %g4
Heap_Block *prev = old_block->prev;
200d8e0: c2 00 60 0c ld [ %g1 + 0xc ], %g1
new_block->next = next;
200d8e4: c8 22 20 08 st %g4, [ %o0 + 8 ]
new_block->prev = prev;
200d8e8: c2 22 20 0c st %g1, [ %o0 + 0xc ]
uintptr_t const size = block_size + next_block_size;
200d8ec: 86 07 40 02 add %i5, %g2, %g3
next->prev = new_block;
prev->next = new_block;
200d8f0: d0 20 60 08 st %o0, [ %g1 + 8 ]
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
200d8f4: d0 21 20 0c st %o0, [ %g4 + 0xc ]
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d8f8: 82 10 e0 01 or %g3, 1, %g1
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
200d8fc: c6 22 00 03 st %g3, [ %o0 + %g3 ]
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
200d900: 10 80 00 13 b 200d94c <_Heap_Free+0x1c8>
200d904: c2 22 20 04 st %g1, [ %o0 + 4 ]
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
200d908: f0 22 20 0c st %i0, [ %o0 + 0xc ]
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
200d90c: c6 22 20 08 st %g3, [ %o0 + 8 ]
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
200d910: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
200d914: 86 10 a0 01 or %g2, 1, %g3
200d918: c6 22 20 04 st %g3, [ %o0 + 4 ]
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d91c: c6 00 60 04 ld [ %g1 + 4 ], %g3
next_block->prev_size = block_size;
200d920: c4 22 00 02 st %g2, [ %o0 + %g2 ]
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
200d924: 86 08 ff fe and %g3, -2, %g3
200d928: c6 20 60 04 st %g3, [ %g1 + 4 ]
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200d92c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
if ( stats->max_free_blocks < stats->free_blocks ) {
200d930: c6 06 20 3c ld [ %i0 + 0x3c ], %g3
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
200d934: 82 00 60 01 inc %g1
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
200d938: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks ) {
200d93c: 80 a0 c0 01 cmp %g3, %g1
200d940: 1a 80 00 03 bcc 200d94c <_Heap_Free+0x1c8>
200d944: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200d948: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
}
}
/* Statistics */
--stats->used_blocks;
200d94c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
200d950: 82 00 7f ff add %g1, -1, %g1
200d954: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
++stats->frees;
200d958: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200d95c: 82 00 60 01 inc %g1
200d960: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
stats->free_size += block_size;
200d964: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200d968: 84 00 40 02 add %g1, %g2, %g2
200d96c: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
200d970: 88 10 20 01 mov 1, %g4
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
200d974: b0 09 20 01 and %g4, 1, %i0
200d978: 81 c7 e0 08 ret
200d97c: 81 e8 00 00 restore
0201214c <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
201214c: 9d e3 bf a0 save %sp, -96, %sp
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
2012150: 90 10 20 00 clr %o0
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
Heap_Block *current = heap->first_block;
2012154: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
2012158: 10 80 00 0a b 2012180 <_Heap_Iterate+0x34>
201215c: f8 06 20 24 ld [ %i0 + 0x24 ], %i4
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
2012160: 90 10 00 01 mov %g1, %o0
2012164: 92 0a 7f fe and %o1, -2, %o1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2012168: ba 00 40 09 add %g1, %o1, %i5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
201216c: d4 07 60 04 ld [ %i5 + 4 ], %o2
2012170: 96 10 00 1a mov %i2, %o3
2012174: 9f c6 40 00 call %i1
2012178: 94 0a a0 01 and %o2, 1, %o2
201217c: 82 10 00 1d mov %i5, %g1
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
2012180: 80 a0 40 1c cmp %g1, %i4
2012184: 02 80 00 05 be 2012198 <_Heap_Iterate+0x4c>
2012188: 90 1a 20 01 xor %o0, 1, %o0
201218c: 80 8a 20 ff btst 0xff, %o0
2012190: 32 bf ff f4 bne,a 2012160 <_Heap_Iterate+0x14> <== ALWAYS TAKEN
2012194: d2 00 60 04 ld [ %g1 + 4 ], %o1
2012198: 81 c7 e0 08 ret
201219c: 81 e8 00 00 restore
0200daa8 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
200daa8: 9d e3 bf a0 save %sp, -96, %sp
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200daac: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200dab0: 40 00 2c 26 call 2018b48 <.urem>
200dab4: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
200dab8: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
200dabc: ba 06 7f f8 add %i1, -8, %i5
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
200dac0: 90 27 40 08 sub %i5, %o0, %o0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200dac4: 80 a2 00 04 cmp %o0, %g4
200dac8: 0a 80 00 05 bcs 200dadc <_Heap_Size_of_alloc_area+0x34>
200dacc: 82 10 20 00 clr %g1
200dad0: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200dad4: 80 a0 40 08 cmp %g1, %o0
200dad8: 82 60 3f ff subx %g0, -1, %g1
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
200dadc: 80 a0 60 00 cmp %g1, 0
200dae0: 02 80 00 15 be 200db34 <_Heap_Size_of_alloc_area+0x8c>
200dae4: 86 10 20 00 clr %g3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
200dae8: c2 02 20 04 ld [ %o0 + 4 ], %g1
200daec: 82 08 7f fe and %g1, -2, %g1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
200daf0: 82 02 00 01 add %o0, %g1, %g1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
200daf4: 80 a0 40 04 cmp %g1, %g4
200daf8: 0a 80 00 05 bcs 200db0c <_Heap_Size_of_alloc_area+0x64> <== NEVER TAKEN
200dafc: 84 10 20 00 clr %g2
200db00: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
200db04: 80 a0 80 01 cmp %g2, %g1
200db08: 84 60 3f ff subx %g0, -1, %g2
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
200db0c: 80 a0 a0 00 cmp %g2, 0
200db10: 02 80 00 09 be 200db34 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
200db14: 86 10 20 00 clr %g3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
200db18: c4 00 60 04 ld [ %g1 + 4 ], %g2
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
200db1c: 80 88 a0 01 btst 1, %g2
200db20: 02 80 00 05 be 200db34 <_Heap_Size_of_alloc_area+0x8c> <== NEVER TAKEN
200db24: 82 20 40 19 sub %g1, %i1, %g1
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
200db28: 86 10 20 01 mov 1, %g3
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
200db2c: 82 00 60 04 add %g1, 4, %g1
200db30: c2 26 80 00 st %g1, [ %i2 ]
return true;
}
200db34: b0 08 e0 01 and %g3, 1, %i0
200db38: 81 c7 e0 08 ret
200db3c: 81 e8 00 00 restore
020098d8 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
20098d8: 9d e3 bf 80 save %sp, -128, %sp
20098dc: ac 10 00 19 mov %i1, %l6
uintptr_t const page_size = heap->page_size;
20098e0: f8 06 20 10 ld [ %i0 + 0x10 ], %i4
uintptr_t const min_block_size = heap->min_block_size;
20098e4: f6 06 20 14 ld [ %i0 + 0x14 ], %i3
Heap_Block *const first_block = heap->first_block;
20098e8: f2 06 20 20 ld [ %i0 + 0x20 ], %i1
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
20098ec: 80 a6 a0 00 cmp %i2, 0
20098f0: 02 80 00 05 be 2009904 <_Heap_Walk+0x2c>
20098f4: e0 06 20 24 ld [ %i0 + 0x24 ], %l0
20098f8: 3b 00 80 26 sethi %hi(0x2009800), %i5
20098fc: 10 80 00 04 b 200990c <_Heap_Walk+0x34>
2009900: ba 17 60 88 or %i5, 0x88, %i5 ! 2009888 <_Heap_Walk_print>
2009904: 3b 00 80 26 sethi %hi(0x2009800), %i5
2009908: ba 17 60 80 or %i5, 0x80, %i5 ! 2009880 <_Heap_Walk_print_nothing>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
200990c: 05 00 80 80 sethi %hi(0x2020000), %g2
2009910: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 ! 2020010 <_System_state_Current>
2009914: 80 a0 a0 03 cmp %g2, 3
2009918: 22 80 00 04 be,a 2009928 <_Heap_Walk+0x50>
200991c: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
return true;
2009920: 10 80 01 2a b 2009dc8 <_Heap_Walk+0x4f0>
2009924: b0 10 20 01 mov 1, %i0
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
2009928: da 06 20 18 ld [ %i0 + 0x18 ], %o5
200992c: c4 23 a0 5c st %g2, [ %sp + 0x5c ]
2009930: f2 23 a0 60 st %i1, [ %sp + 0x60 ]
2009934: e0 23 a0 64 st %l0, [ %sp + 0x64 ]
2009938: c4 06 20 08 ld [ %i0 + 8 ], %g2
200993c: 90 10 00 16 mov %l6, %o0
2009940: c4 23 a0 68 st %g2, [ %sp + 0x68 ]
2009944: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2009948: 92 10 20 00 clr %o1
200994c: c4 23 a0 6c st %g2, [ %sp + 0x6c ]
2009950: 15 00 80 72 sethi %hi(0x201c800), %o2
2009954: 96 10 00 1c mov %i4, %o3
2009958: 94 12 a0 f8 or %o2, 0xf8, %o2
200995c: 9f c7 40 00 call %i5
2009960: 98 10 00 1b mov %i3, %o4
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
2009964: 80 a7 20 00 cmp %i4, 0
2009968: 12 80 00 07 bne 2009984 <_Heap_Walk+0xac>
200996c: 80 8f 20 07 btst 7, %i4
(*printer)( source, true, "page size is zero\n" );
2009970: 15 00 80 72 sethi %hi(0x201c800), %o2
2009974: 90 10 00 16 mov %l6, %o0
2009978: 92 10 20 01 mov 1, %o1
200997c: 10 80 00 37 b 2009a58 <_Heap_Walk+0x180>
2009980: 94 12 a1 90 or %o2, 0x190, %o2
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
2009984: 22 80 00 08 be,a 20099a4 <_Heap_Walk+0xcc>
2009988: 90 10 00 1b mov %i3, %o0
(*printer)(
200998c: 15 00 80 72 sethi %hi(0x201c800), %o2
2009990: 90 10 00 16 mov %l6, %o0
2009994: 92 10 20 01 mov 1, %o1
2009998: 94 12 a1 a8 or %o2, 0x1a8, %o2
200999c: 10 80 01 12 b 2009de4 <_Heap_Walk+0x50c>
20099a0: 96 10 00 1c mov %i4, %o3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
20099a4: 7f ff e0 78 call 2001b84 <.urem>
20099a8: 92 10 00 1c mov %i4, %o1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
20099ac: 80 a2 20 00 cmp %o0, 0
20099b0: 22 80 00 08 be,a 20099d0 <_Heap_Walk+0xf8>
20099b4: 90 06 60 08 add %i1, 8, %o0
(*printer)(
20099b8: 15 00 80 72 sethi %hi(0x201c800), %o2
20099bc: 90 10 00 16 mov %l6, %o0
20099c0: 92 10 20 01 mov 1, %o1
20099c4: 94 12 a1 c8 or %o2, 0x1c8, %o2
20099c8: 10 80 01 07 b 2009de4 <_Heap_Walk+0x50c>
20099cc: 96 10 00 1b mov %i3, %o3
20099d0: 7f ff e0 6d call 2001b84 <.urem>
20099d4: 92 10 00 1c mov %i4, %o1
);
return false;
}
if (
20099d8: 80 a2 20 00 cmp %o0, 0
20099dc: 22 80 00 07 be,a 20099f8 <_Heap_Walk+0x120>
20099e0: c4 06 60 04 ld [ %i1 + 4 ], %g2
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
20099e4: 15 00 80 72 sethi %hi(0x201c800), %o2
20099e8: 90 10 00 16 mov %l6, %o0
20099ec: 92 10 20 01 mov 1, %o1
20099f0: 10 80 00 fc b 2009de0 <_Heap_Walk+0x508>
20099f4: 94 12 a1 f0 or %o2, 0x1f0, %o2
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
20099f8: 80 88 a0 01 btst 1, %g2
20099fc: 32 80 00 07 bne,a 2009a18 <_Heap_Walk+0x140>
2009a00: f4 04 20 04 ld [ %l0 + 4 ], %i2
(*printer)(
2009a04: 15 00 80 72 sethi %hi(0x201c800), %o2
2009a08: 90 10 00 16 mov %l6, %o0
2009a0c: 92 10 20 01 mov 1, %o1
2009a10: 10 80 00 12 b 2009a58 <_Heap_Walk+0x180>
2009a14: 94 12 a2 28 or %o2, 0x228, %o2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009a18: b4 0e bf fe and %i2, -2, %i2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2009a1c: b4 04 00 1a add %l0, %i2, %i2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2009a20: c4 06 a0 04 ld [ %i2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
2009a24: 80 88 a0 01 btst 1, %g2
2009a28: 12 80 00 07 bne 2009a44 <_Heap_Walk+0x16c>
2009a2c: 80 a6 80 19 cmp %i2, %i1
(*printer)(
2009a30: 15 00 80 72 sethi %hi(0x201c800), %o2
2009a34: 90 10 00 16 mov %l6, %o0
2009a38: 92 10 20 01 mov 1, %o1
2009a3c: 10 80 00 07 b 2009a58 <_Heap_Walk+0x180>
2009a40: 94 12 a2 58 or %o2, 0x258, %o2
);
return false;
}
if (
2009a44: 02 80 00 0a be 2009a6c <_Heap_Walk+0x194>
2009a48: 15 00 80 72 sethi %hi(0x201c800), %o2
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
2009a4c: 90 10 00 16 mov %l6, %o0
2009a50: 92 10 20 01 mov 1, %o1
2009a54: 94 12 a2 70 or %o2, 0x270, %o2
2009a58: 9f c7 40 00 call %i5
2009a5c: b0 10 20 00 clr %i0
2009a60: b0 0e 20 ff and %i0, 0xff, %i0
2009a64: 81 c7 e0 08 ret
2009a68: 81 e8 00 00 restore
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
2009a6c: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
2009a70: d6 06 20 08 ld [ %i0 + 8 ], %o3
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
2009a74: 10 80 00 30 b 2009b34 <_Heap_Walk+0x25c>
2009a78: b2 10 00 18 mov %i0, %i1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2009a7c: 80 a0 c0 0b cmp %g3, %o3
2009a80: 18 80 00 05 bgu 2009a94 <_Heap_Walk+0x1bc>
2009a84: 84 10 20 00 clr %g2
2009a88: c4 06 20 24 ld [ %i0 + 0x24 ], %g2
2009a8c: 80 a0 80 0b cmp %g2, %o3
2009a90: 84 60 3f ff subx %g0, -1, %g2
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
2009a94: 80 a0 a0 00 cmp %g2, 0
2009a98: 32 80 00 07 bne,a 2009ab4 <_Heap_Walk+0x1dc>
2009a9c: 90 02 e0 08 add %o3, 8, %o0
(*printer)(
2009aa0: 15 00 80 72 sethi %hi(0x201c800), %o2
2009aa4: 90 10 00 16 mov %l6, %o0
2009aa8: 92 10 20 01 mov 1, %o1
2009aac: 10 80 00 ce b 2009de4 <_Heap_Walk+0x50c>
2009ab0: 94 12 a2 a0 or %o2, 0x2a0, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009ab4: d6 27 bf fc st %o3, [ %fp + -4 ]
2009ab8: 7f ff e0 33 call 2001b84 <.urem>
2009abc: 92 10 00 11 mov %l1, %o1
);
return false;
}
if (
2009ac0: 80 a2 20 00 cmp %o0, 0
2009ac4: 02 80 00 07 be 2009ae0 <_Heap_Walk+0x208>
2009ac8: d6 07 bf fc ld [ %fp + -4 ], %o3
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
2009acc: 15 00 80 72 sethi %hi(0x201c800), %o2
2009ad0: 90 10 00 16 mov %l6, %o0
2009ad4: 92 10 20 01 mov 1, %o1
2009ad8: 10 80 00 c3 b 2009de4 <_Heap_Walk+0x50c>
2009adc: 94 12 a2 c0 or %o2, 0x2c0, %o2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009ae0: c4 02 e0 04 ld [ %o3 + 4 ], %g2
2009ae4: 84 08 bf fe and %g2, -2, %g2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2009ae8: 84 02 c0 02 add %o3, %g2, %g2
2009aec: c4 00 a0 04 ld [ %g2 + 4 ], %g2
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
2009af0: 80 88 a0 01 btst 1, %g2
2009af4: 22 80 00 07 be,a 2009b10 <_Heap_Walk+0x238>
2009af8: d8 02 e0 0c ld [ %o3 + 0xc ], %o4
(*printer)(
2009afc: 15 00 80 72 sethi %hi(0x201c800), %o2
2009b00: 90 10 00 16 mov %l6, %o0
2009b04: 92 10 20 01 mov 1, %o1
2009b08: 10 80 00 b7 b 2009de4 <_Heap_Walk+0x50c>
2009b0c: 94 12 a2 f0 or %o2, 0x2f0, %o2
);
return false;
}
if ( free_block->prev != prev_block ) {
2009b10: 80 a3 00 19 cmp %o4, %i1
2009b14: 02 80 00 07 be 2009b30 <_Heap_Walk+0x258>
2009b18: b2 10 00 0b mov %o3, %i1
(*printer)(
2009b1c: 15 00 80 72 sethi %hi(0x201c800), %o2
2009b20: 90 10 00 16 mov %l6, %o0
2009b24: 92 10 20 01 mov 1, %o1
2009b28: 10 80 00 4d b 2009c5c <_Heap_Walk+0x384>
2009b2c: 94 12 a3 10 or %o2, 0x310, %o2
return false;
}
prev_block = free_block;
free_block = free_block->next;
2009b30: d6 02 e0 08 ld [ %o3 + 8 ], %o3
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
2009b34: 80 a2 c0 18 cmp %o3, %i0
2009b38: 32 bf ff d1 bne,a 2009a7c <_Heap_Walk+0x1a4>
2009b3c: c6 06 20 20 ld [ %i0 + 0x20 ], %g3
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009b40: 2b 00 80 73 sethi %hi(0x201cc00), %l5
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
2009b44: b2 10 00 1a mov %i2, %i1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009b48: aa 15 60 10 or %l5, 0x10, %l5
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
2009b4c: 23 00 80 73 sethi %hi(0x201cc00), %l1
2009b50: 2f 00 80 72 sethi %hi(0x201c800), %l7
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009b54: e4 06 60 04 ld [ %i1 + 4 ], %l2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2009b58: d8 06 20 20 ld [ %i0 + 0x20 ], %o4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
2009b5c: 9e 1e 40 10 xor %i1, %l0, %o7
2009b60: 80 a0 00 0f cmp %g0, %o7
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
2009b64: a8 0c bf fe and %l2, -2, %l4
2009b68: 9a 40 20 00 addx %g0, 0, %o5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
2009b6c: a6 06 40 14 add %i1, %l4, %l3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
2009b70: a4 0c a0 01 and %l2, 1, %l2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
2009b74: 80 a3 00 13 cmp %o4, %l3
2009b78: 18 80 00 05 bgu 2009b8c <_Heap_Walk+0x2b4> <== NEVER TAKEN
2009b7c: 9e 10 20 00 clr %o7
2009b80: de 06 20 24 ld [ %i0 + 0x24 ], %o7
2009b84: 80 a3 c0 13 cmp %o7, %l3
2009b88: 9e 60 3f ff subx %g0, -1, %o7
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
2009b8c: 80 a3 e0 00 cmp %o7, 0
2009b90: 32 80 00 07 bne,a 2009bac <_Heap_Walk+0x2d4>
2009b94: da 27 bf f8 st %o5, [ %fp + -8 ]
(*printer)(
2009b98: 15 00 80 72 sethi %hi(0x201c800), %o2
2009b9c: 90 10 00 16 mov %l6, %o0
2009ba0: 92 10 20 01 mov 1, %o1
2009ba4: 10 80 00 2c b 2009c54 <_Heap_Walk+0x37c>
2009ba8: 94 12 a3 48 or %o2, 0x348, %o2
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
2009bac: 90 10 00 14 mov %l4, %o0
2009bb0: 7f ff df f5 call 2001b84 <.urem>
2009bb4: 92 10 00 1c mov %i4, %o1
2009bb8: da 07 bf f8 ld [ %fp + -8 ], %o5
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
2009bbc: 80 a2 20 00 cmp %o0, 0
2009bc0: 02 80 00 0c be 2009bf0 <_Heap_Walk+0x318>
2009bc4: 9e 0b 60 ff and %o5, 0xff, %o7
2009bc8: 80 a3 e0 00 cmp %o7, 0
2009bcc: 02 80 00 19 be 2009c30 <_Heap_Walk+0x358>
2009bd0: 80 a6 40 13 cmp %i1, %l3
(*printer)(
2009bd4: 15 00 80 72 sethi %hi(0x201c800), %o2
2009bd8: 90 10 00 16 mov %l6, %o0
2009bdc: 92 10 20 01 mov 1, %o1
2009be0: 94 12 a3 78 or %o2, 0x378, %o2
2009be4: 96 10 00 19 mov %i1, %o3
2009be8: 10 80 00 1d b 2009c5c <_Heap_Walk+0x384>
2009bec: 98 10 00 14 mov %l4, %o4
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
2009bf0: 80 a3 e0 00 cmp %o7, 0
2009bf4: 02 80 00 0f be 2009c30 <_Heap_Walk+0x358>
2009bf8: 80 a6 40 13 cmp %i1, %l3
2009bfc: 80 a5 00 1b cmp %l4, %i3
2009c00: 1a 80 00 0c bcc 2009c30 <_Heap_Walk+0x358>
2009c04: 80 a6 40 13 cmp %i1, %l3
(*printer)(
2009c08: 90 10 00 16 mov %l6, %o0
2009c0c: 92 10 20 01 mov 1, %o1
2009c10: 15 00 80 72 sethi %hi(0x201c800), %o2
2009c14: 96 10 00 19 mov %i1, %o3
2009c18: 94 12 a3 a8 or %o2, 0x3a8, %o2
2009c1c: 98 10 00 14 mov %l4, %o4
2009c20: 9f c7 40 00 call %i5
2009c24: 9a 10 00 1b mov %i3, %o5
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2009c28: 10 80 00 68 b 2009dc8 <_Heap_Walk+0x4f0>
2009c2c: b0 10 20 00 clr %i0
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
2009c30: 2a 80 00 10 bcs,a 2009c70 <_Heap_Walk+0x398>
2009c34: de 04 e0 04 ld [ %l3 + 4 ], %o7
2009c38: 80 8b 60 ff btst 0xff, %o5
2009c3c: 22 80 00 0d be,a 2009c70 <_Heap_Walk+0x398>
2009c40: de 04 e0 04 ld [ %l3 + 4 ], %o7
(*printer)(
2009c44: 15 00 80 72 sethi %hi(0x201c800), %o2
2009c48: 90 10 00 16 mov %l6, %o0
2009c4c: 92 10 20 01 mov 1, %o1
2009c50: 94 12 a3 d8 or %o2, 0x3d8, %o2
2009c54: 96 10 00 19 mov %i1, %o3
2009c58: 98 10 00 13 mov %l3, %o4
2009c5c: 9f c7 40 00 call %i5
2009c60: b0 10 20 00 clr %i0
2009c64: b0 0e 20 ff and %i0, 0xff, %i0
2009c68: 81 c7 e0 08 ret
2009c6c: 81 e8 00 00 restore
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
2009c70: 80 8b e0 01 btst 1, %o7
2009c74: 12 80 00 3f bne 2009d70 <_Heap_Walk+0x498>
2009c78: 90 10 00 16 mov %l6, %o0
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
2009c7c: da 06 60 0c ld [ %i1 + 0xc ], %o5
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009c80: d8 06 20 08 ld [ %i0 + 8 ], %o4
2009c84: 80 a3 40 0c cmp %o5, %o4
2009c88: 02 80 00 08 be 2009ca8 <_Heap_Walk+0x3d0>
2009c8c: de 06 20 0c ld [ %i0 + 0xc ], %o7
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
2009c90: 80 a3 40 18 cmp %o5, %i0
2009c94: 12 80 00 07 bne 2009cb0 <_Heap_Walk+0x3d8>
2009c98: 96 14 60 80 or %l1, 0x80, %o3
2009c9c: 17 00 80 72 sethi %hi(0x201c800), %o3
2009ca0: 10 80 00 04 b 2009cb0 <_Heap_Walk+0x3d8>
2009ca4: 96 12 e0 c8 or %o3, 0xc8, %o3 ! 201c8c8 <__log2table+0x130>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009ca8: 03 00 80 72 sethi %hi(0x201c800), %g1
2009cac: 96 10 60 b8 or %g1, 0xb8, %o3 ! 201c8b8 <__log2table+0x120>
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
2009cb0: d8 06 60 08 ld [ %i1 + 8 ], %o4
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009cb4: 80 a3 00 0f cmp %o4, %o7
2009cb8: 02 80 00 06 be 2009cd0 <_Heap_Walk+0x3f8>
2009cbc: 80 a3 00 18 cmp %o4, %i0
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
2009cc0: 12 80 00 06 bne 2009cd8 <_Heap_Walk+0x400>
2009cc4: 9e 14 60 80 or %l1, 0x80, %o7
2009cc8: 10 80 00 04 b 2009cd8 <_Heap_Walk+0x400>
2009ccc: 9e 15 e0 e8 or %l7, 0xe8, %o7
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
2009cd0: 03 00 80 72 sethi %hi(0x201c800), %g1
2009cd4: 9e 10 60 d8 or %g1, 0xd8, %o7 ! 201c8d8 <__log2table+0x140>
2009cd8: d6 23 a0 5c st %o3, [ %sp + 0x5c ]
2009cdc: d8 23 a0 60 st %o4, [ %sp + 0x60 ]
2009ce0: de 23 a0 64 st %o7, [ %sp + 0x64 ]
2009ce4: 90 10 00 16 mov %l6, %o0
2009ce8: 92 10 20 00 clr %o1
2009cec: 94 10 00 15 mov %l5, %o2
2009cf0: 96 10 00 19 mov %i1, %o3
2009cf4: 9f c7 40 00 call %i5
2009cf8: 98 10 00 14 mov %l4, %o4
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
2009cfc: da 04 c0 00 ld [ %l3 ], %o5
2009d00: 80 a5 00 0d cmp %l4, %o5
2009d04: 02 80 00 0c be 2009d34 <_Heap_Walk+0x45c>
2009d08: 80 a4 a0 00 cmp %l2, 0
(*printer)(
2009d0c: e6 23 a0 5c st %l3, [ %sp + 0x5c ]
2009d10: 90 10 00 16 mov %l6, %o0
2009d14: 92 10 20 01 mov 1, %o1
2009d18: 15 00 80 73 sethi %hi(0x201cc00), %o2
2009d1c: 96 10 00 19 mov %i1, %o3
2009d20: 94 12 a0 48 or %o2, 0x48, %o2
2009d24: 9f c7 40 00 call %i5
2009d28: 98 10 00 14 mov %l4, %o4
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
2009d2c: 10 bf ff ce b 2009c64 <_Heap_Walk+0x38c>
2009d30: b0 10 20 00 clr %i0
);
return false;
}
if ( !prev_used ) {
2009d34: 32 80 00 0a bne,a 2009d5c <_Heap_Walk+0x484>
2009d38: c6 06 20 08 ld [ %i0 + 8 ], %g3
(*printer)(
2009d3c: 15 00 80 73 sethi %hi(0x201cc00), %o2
2009d40: 90 10 00 16 mov %l6, %o0
2009d44: 92 10 20 01 mov 1, %o1
2009d48: 10 80 00 26 b 2009de0 <_Heap_Walk+0x508>
2009d4c: 94 12 a0 88 or %o2, 0x88, %o2
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
2009d50: 22 80 00 19 be,a 2009db4 <_Heap_Walk+0x4dc>
2009d54: b2 10 00 13 mov %l3, %i1
return true;
}
free_block = free_block->next;
2009d58: c6 00 e0 08 ld [ %g3 + 8 ], %g3
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
2009d5c: 80 a0 c0 18 cmp %g3, %i0
2009d60: 12 bf ff fc bne 2009d50 <_Heap_Walk+0x478>
2009d64: 80 a0 c0 19 cmp %g3, %i1
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2009d68: 10 80 00 1b b 2009dd4 <_Heap_Walk+0x4fc>
2009d6c: 15 00 80 73 sethi %hi(0x201cc00), %o2
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
2009d70: 80 a4 a0 00 cmp %l2, 0
2009d74: 02 80 00 09 be 2009d98 <_Heap_Walk+0x4c0>
2009d78: 92 10 20 00 clr %o1
(*printer)(
2009d7c: 15 00 80 73 sethi %hi(0x201cc00), %o2
2009d80: 96 10 00 19 mov %i1, %o3
2009d84: 94 12 a0 b8 or %o2, 0xb8, %o2
2009d88: 9f c7 40 00 call %i5
2009d8c: 98 10 00 14 mov %l4, %o4
2009d90: 10 80 00 09 b 2009db4 <_Heap_Walk+0x4dc>
2009d94: b2 10 00 13 mov %l3, %i1
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
2009d98: da 06 40 00 ld [ %i1 ], %o5
2009d9c: 15 00 80 73 sethi %hi(0x201cc00), %o2
2009da0: 96 10 00 19 mov %i1, %o3
2009da4: 94 12 a0 d0 or %o2, 0xd0, %o2
2009da8: 9f c7 40 00 call %i5
2009dac: 98 10 00 14 mov %l4, %o4
2009db0: b2 10 00 13 mov %l3, %i1
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
2009db4: 80 a4 c0 1a cmp %l3, %i2
2009db8: 32 bf ff 68 bne,a 2009b58 <_Heap_Walk+0x280>
2009dbc: e4 06 60 04 ld [ %i1 + 4 ], %l2
2009dc0: 10 80 00 02 b 2009dc8 <_Heap_Walk+0x4f0>
2009dc4: b0 10 20 01 mov 1, %i0
2009dc8: b0 0e 20 ff and %i0, 0xff, %i0
2009dcc: 81 c7 e0 08 ret
2009dd0: 81 e8 00 00 restore
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
2009dd4: 90 10 00 16 mov %l6, %o0
2009dd8: 92 10 20 01 mov 1, %o1
2009ddc: 94 12 a0 f8 or %o2, 0xf8, %o2
2009de0: 96 10 00 19 mov %i1, %o3
2009de4: 9f c7 40 00 call %i5
2009de8: b0 10 20 00 clr %i0
2009dec: b0 0e 20 ff and %i0, 0xff, %i0
2009df0: 81 c7 e0 08 ret
2009df4: 81 e8 00 00 restore
02008d7c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2008d7c: 9d e3 bf a0 save %sp, -96, %sp
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2008d80: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2008d84: 80 a0 60 00 cmp %g1, 0
2008d88: 12 80 00 04 bne 2008d98 <_Objects_Allocate+0x1c> <== ALWAYS TAKEN
2008d8c: ba 10 00 18 mov %i0, %i5
return NULL;
2008d90: 81 c7 e0 08 ret
2008d94: 91 e8 20 00 restore %g0, 0, %o0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2008d98: b8 06 20 20 add %i0, 0x20, %i4
2008d9c: 7f ff fd 83 call 20083a8 <_Chain_Get>
2008da0: 90 10 00 1c mov %i4, %o0
if ( information->auto_extend ) {
2008da4: c2 0f 60 12 ldub [ %i5 + 0x12 ], %g1
2008da8: 80 a0 60 00 cmp %g1, 0
2008dac: 02 80 00 1d be 2008e20 <_Objects_Allocate+0xa4>
2008db0: 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 ) {
2008db4: 80 a2 20 00 cmp %o0, 0
2008db8: 32 80 00 0a bne,a 2008de0 <_Objects_Allocate+0x64>
2008dbc: c4 07 60 08 ld [ %i5 + 8 ], %g2
_Objects_Extend_information( information );
2008dc0: 40 00 00 21 call 2008e44 <_Objects_Extend_information>
2008dc4: 90 10 00 1d mov %i5, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2008dc8: 7f ff fd 78 call 20083a8 <_Chain_Get>
2008dcc: 90 10 00 1c mov %i4, %o0
}
if ( the_object ) {
2008dd0: b0 92 20 00 orcc %o0, 0, %i0
2008dd4: 02 bf ff ef be 2008d90 <_Objects_Allocate+0x14>
2008dd8: 01 00 00 00 nop
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2008ddc: c4 07 60 08 ld [ %i5 + 8 ], %g2
2008de0: d0 06 20 08 ld [ %i0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2008de4: d2 17 60 14 lduh [ %i5 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
2008de8: 03 00 00 3f sethi %hi(0xfc00), %g1
2008dec: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2008df0: 90 0a 00 01 and %o0, %g1, %o0
2008df4: 82 08 80 01 and %g2, %g1, %g1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
2008df8: 40 00 3e a8 call 2018898 <.udiv>
2008dfc: 90 22 00 01 sub %o0, %g1, %o0
information->inactive_per_block[ block ]--;
2008e00: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2008e04: 91 2a 20 02 sll %o0, 2, %o0
2008e08: c4 00 40 08 ld [ %g1 + %o0 ], %g2
2008e0c: 84 00 bf ff add %g2, -1, %g2
2008e10: c4 20 40 08 st %g2, [ %g1 + %o0 ]
information->inactive--;
2008e14: c2 17 60 2c lduh [ %i5 + 0x2c ], %g1
2008e18: 82 00 7f ff add %g1, -1, %g1
2008e1c: c2 37 60 2c sth %g1, [ %i5 + 0x2c ]
);
}
#endif
return the_object;
}
2008e20: 81 c7 e0 08 ret
2008e24: 81 e8 00 00 restore
0200918c <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
200918c: 9d e3 bf a0 save %sp, -96, %sp
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
2009190: 80 a6 60 00 cmp %i1, 0
2009194: 12 80 00 04 bne 20091a4 <_Objects_Get_information+0x18>
2009198: 01 00 00 00 nop
return NULL;
200919c: 81 c7 e0 08 ret
20091a0: 91 e8 20 00 restore %g0, 0, %o0
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
20091a4: 40 00 12 67 call 200db40 <_Objects_API_maximum_class>
20091a8: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum == 0 )
20091ac: 80 a2 20 00 cmp %o0, 0
20091b0: 02 bf ff fb be 200919c <_Objects_Get_information+0x10>
20091b4: 80 a6 40 08 cmp %i1, %o0
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
20091b8: 18 bf ff f9 bgu 200919c <_Objects_Get_information+0x10>
20091bc: 03 00 80 76 sethi %hi(0x201d800), %g1
return NULL;
if ( !_Objects_Information_table[ the_api ] )
20091c0: b1 2e 20 02 sll %i0, 2, %i0
20091c4: 82 10 62 54 or %g1, 0x254, %g1
20091c8: c2 00 40 18 ld [ %g1 + %i0 ], %g1
20091cc: 80 a0 60 00 cmp %g1, 0
20091d0: 02 bf ff f3 be 200919c <_Objects_Get_information+0x10> <== NEVER TAKEN
20091d4: b3 2e 60 02 sll %i1, 2, %i1
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
20091d8: f0 00 40 19 ld [ %g1 + %i1 ], %i0
if ( !info )
20091dc: 80 a6 20 00 cmp %i0, 0
20091e0: 02 bf ff ef be 200919c <_Objects_Get_information+0x10> <== NEVER TAKEN
20091e4: 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 )
20091e8: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
20091ec: 80 a0 60 00 cmp %g1, 0
20091f0: 02 bf ff eb be 200919c <_Objects_Get_information+0x10>
20091f4: 01 00 00 00 nop
return NULL;
#endif
return info;
}
20091f8: 81 c7 e0 08 ret
20091fc: 81 e8 00 00 restore
0201b510 <_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;
201b510: c2 02 20 08 ld [ %o0 + 8 ], %g1
201b514: 92 22 40 01 sub %o1, %g1, %o1
if ( information->maximum >= index ) {
201b518: c2 12 20 10 lduh [ %o0 + 0x10 ], %g1
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
201b51c: 92 02 60 01 inc %o1
if ( information->maximum >= index ) {
201b520: 80 a0 40 09 cmp %g1, %o1
201b524: 0a 80 00 09 bcs 201b548 <_Objects_Get_no_protection+0x38>
201b528: 93 2a 60 02 sll %o1, 2, %o1
if ( (the_object = information->local_table[ index ]) != NULL ) {
201b52c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
201b530: d0 00 40 09 ld [ %g1 + %o1 ], %o0
201b534: 80 a2 20 00 cmp %o0, 0
201b538: 02 80 00 05 be 201b54c <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
201b53c: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
return the_object;
201b540: 81 c3 e0 08 retl
201b544: 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;
201b548: 82 10 20 01 mov 1, %g1
return NULL;
201b54c: 90 10 20 00 clr %o0
}
201b550: 81 c3 e0 08 retl
201b554: c2 22 80 00 st %g1, [ %o2 ]
0200d290 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
200d290: 9d e3 bf 98 save %sp, -104, %sp
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
200d294: 80 a6 20 00 cmp %i0, 0
200d298: 12 80 00 06 bne 200d2b0 <_Objects_Id_to_name+0x20>
200d29c: 83 36 20 18 srl %i0, 0x18, %g1
200d2a0: 03 00 80 b8 sethi %hi(0x202e000), %g1
200d2a4: c2 00 62 fc ld [ %g1 + 0x2fc ], %g1 ! 202e2fc <_Per_CPU_Information+0xc>
200d2a8: f0 00 60 08 ld [ %g1 + 8 ], %i0
200d2ac: 83 36 20 18 srl %i0, 0x18, %g1
200d2b0: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
200d2b4: 84 00 7f ff add %g1, -1, %g2
200d2b8: 80 a0 a0 02 cmp %g2, 2
200d2bc: 08 80 00 18 bleu 200d31c <_Objects_Id_to_name+0x8c>
200d2c0: 83 28 60 02 sll %g1, 2, %g1
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
200d2c4: 81 c7 e0 08 ret
200d2c8: 91 e8 20 03 restore %g0, 3, %o0
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
200d2cc: 85 28 a0 02 sll %g2, 2, %g2
200d2d0: d0 00 40 02 ld [ %g1 + %g2 ], %o0
if ( !information )
200d2d4: 80 a2 20 00 cmp %o0, 0
200d2d8: 02 bf ff fb be 200d2c4 <_Objects_Id_to_name+0x34> <== NEVER TAKEN
200d2dc: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
200d2e0: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
200d2e4: 80 a0 60 00 cmp %g1, 0
200d2e8: 12 bf ff f7 bne 200d2c4 <_Objects_Id_to_name+0x34> <== NEVER TAKEN
200d2ec: 92 10 00 18 mov %i0, %o1
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
200d2f0: 7f ff ff ca call 200d218 <_Objects_Get>
200d2f4: 94 07 bf fc add %fp, -4, %o2
if ( !the_object )
200d2f8: 80 a2 20 00 cmp %o0, 0
200d2fc: 02 bf ff f2 be 200d2c4 <_Objects_Id_to_name+0x34>
200d300: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
*name = the_object->name;
200d304: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
200d308: b0 10 20 00 clr %i0
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
200d30c: 40 00 03 c3 call 200e218 <_Thread_Enable_dispatch>
200d310: c2 26 40 00 st %g1, [ %i1 ]
200d314: 81 c7 e0 08 ret
200d318: 81 e8 00 00 restore
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
200d31c: 05 00 80 b7 sethi %hi(0x202dc00), %g2
200d320: 84 10 a0 e4 or %g2, 0xe4, %g2 ! 202dce4 <_Objects_Information_table>
200d324: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200d328: 80 a0 60 00 cmp %g1, 0
200d32c: 12 bf ff e8 bne 200d2cc <_Objects_Id_to_name+0x3c>
200d330: 85 36 20 1b srl %i0, 0x1b, %g2
200d334: 30 bf ff e4 b,a 200d2c4 <_Objects_Id_to_name+0x34>
0200f0c4 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
200f0c4: 9d e3 bf a0 save %sp, -96, %sp
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
200f0c8: c2 06 20 08 ld [ %i0 + 8 ], %g1
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
200f0cc: 39 00 00 3f sethi %hi(0xfc00), %i4
200f0d0: b5 30 60 18 srl %g1, 0x18, %i2
200f0d4: b8 17 23 ff or %i4, 0x3ff, %i4
200f0d8: b4 0e a0 07 and %i2, 7, %i2
200f0dc: b8 08 40 1c and %g1, %i4, %i4
200f0e0: b4 06 a0 04 add %i2, 4, %i2
200f0e4: b9 2f 20 02 sll %i4, 2, %i4
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
200f0e8: 37 00 80 77 sethi %hi(0x201dc00), %i3
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
200f0ec: b5 2e a0 02 sll %i2, 2, %i2
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
200f0f0: 82 16 e2 f8 or %i3, 0x2f8, %g1
done = true;
for ( index = 1 ; index <= max ; ++index ) {
200f0f4: ba 10 20 01 mov 1, %i5
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
200f0f8: 84 10 20 01 mov 1, %g2
for ( index = 1 ; index <= max ; ++index ) {
200f0fc: 10 80 00 18 b 200f15c <_POSIX_Keys_Run_destructors+0x98>
200f100: f2 10 60 10 lduh [ %g1 + 0x10 ], %i1
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
200f104: 86 16 e2 f8 or %i3, 0x2f8, %g3
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
200f108: c6 00 e0 1c ld [ %g3 + 0x1c ], %g3
200f10c: 83 28 60 02 sll %g1, 2, %g1
200f110: c2 00 c0 01 ld [ %g3 + %g1 ], %g1
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
200f114: 80 a0 60 00 cmp %g1, 0
200f118: 22 80 00 11 be,a 200f15c <_POSIX_Keys_Run_destructors+0x98>
200f11c: ba 07 60 01 inc %i5
200f120: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200f124: 80 a0 e0 00 cmp %g3, 0
200f128: 02 80 00 0c be 200f158 <_POSIX_Keys_Run_destructors+0x94>
200f12c: 86 00 40 1a add %g1, %i2, %g3
void *value = key->Values [ thread_api ][ thread_index ];
200f130: c6 00 e0 04 ld [ %g3 + 4 ], %g3
200f134: d0 00 c0 1c ld [ %g3 + %i4 ], %o0
if ( value != NULL ) {
200f138: 80 a2 20 00 cmp %o0, 0
200f13c: 22 80 00 08 be,a 200f15c <_POSIX_Keys_Run_destructors+0x98><== ALWAYS TAKEN
200f140: ba 07 60 01 inc %i5
key->Values [ thread_api ][ thread_index ] = NULL;
200f144: c0 20 c0 1c clr [ %g3 + %i4 ] <== NOT EXECUTED
(*key->destructor)( value );
200f148: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED
200f14c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200f150: 01 00 00 00 nop <== NOT EXECUTED
done = false;
200f154: 84 10 20 00 clr %g2 ! 0 <PROM_START> <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
200f158: ba 07 60 01 inc %i5
200f15c: 83 2f 60 10 sll %i5, 0x10, %g1
200f160: 83 30 60 10 srl %g1, 0x10, %g1
200f164: 80 a0 40 19 cmp %g1, %i1
200f168: 08 bf ff e7 bleu 200f104 <_POSIX_Keys_Run_destructors+0x40>
200f16c: 80 88 a0 ff btst 0xff, %g2
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
200f170: 02 bf ff e1 be 200f0f4 <_POSIX_Keys_Run_destructors+0x30> <== NEVER TAKEN
200f174: 82 16 e2 f8 or %i3, 0x2f8, %g1
done = false;
}
}
}
}
}
200f178: 81 c7 e0 08 ret
200f17c: 81 e8 00 00 restore
0200ca64 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
200ca64: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
200ca68: 11 00 80 ab sethi %hi(0x202ac00), %o0
200ca6c: 92 10 00 18 mov %i0, %o1
200ca70: 90 12 21 3c or %o0, 0x13c, %o0
200ca74: 40 00 0c bc call 200fd64 <_Objects_Get>
200ca78: 94 07 bf f8 add %fp, -8, %o2
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
200ca7c: c2 07 bf f8 ld [ %fp + -8 ], %g1
200ca80: 80 a0 60 00 cmp %g1, 0
200ca84: 12 80 00 40 bne 200cb84 <_POSIX_Message_queue_Receive_support+0x120>
200ca88: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
200ca8c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200ca90: 84 08 60 03 and %g1, 3, %g2
200ca94: 80 a0 a0 01 cmp %g2, 1
200ca98: 32 80 00 05 bne,a 200caac <_POSIX_Message_queue_Receive_support+0x48>
200ca9c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
_Thread_Enable_dispatch();
200caa0: 40 00 10 83 call 2010cac <_Thread_Enable_dispatch>
200caa4: 01 00 00 00 nop
200caa8: 30 80 00 37 b,a 200cb84 <_POSIX_Message_queue_Receive_support+0x120>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
200caac: c4 02 20 68 ld [ %o0 + 0x68 ], %g2
200cab0: 80 a6 80 02 cmp %i2, %g2
200cab4: 1a 80 00 08 bcc 200cad4 <_POSIX_Message_queue_Receive_support+0x70>
200cab8: 84 10 3f ff mov -1, %g2
_Thread_Enable_dispatch();
200cabc: 40 00 10 7c call 2010cac <_Thread_Enable_dispatch>
200cac0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EMSGSIZE );
200cac4: 40 00 28 7f call 2016cc0 <__errno>
200cac8: 01 00 00 00 nop
200cacc: 10 80 00 31 b 200cb90 <_POSIX_Message_queue_Receive_support+0x12c>
200cad0: 82 10 20 7a mov 0x7a, %g1 ! 7a <PROM_START+0x7a>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
200cad4: c4 27 bf fc st %g2, [ %fp + -4 ]
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
200cad8: 80 a7 20 00 cmp %i4, 0
200cadc: 02 80 00 05 be 200caf0 <_POSIX_Message_queue_Receive_support+0x8c>
200cae0: 98 10 20 00 clr %o4
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
200cae4: 99 30 60 0e srl %g1, 0xe, %o4
200cae8: 98 1b 20 01 xor %o4, 1, %o4
200caec: 98 0b 20 01 and %o4, 1, %o4
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
200caf0: 90 02 20 1c add %o0, 0x1c, %o0
200caf4: 92 10 00 18 mov %i0, %o1
200caf8: 94 10 00 19 mov %i1, %o2
200cafc: 96 07 bf fc add %fp, -4, %o3
200cb00: 98 0b 20 01 and %o4, 1, %o4
200cb04: 40 00 08 6d call 200ecb8 <_CORE_message_queue_Seize>
200cb08: 9a 10 00 1d mov %i5, %o5
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
200cb0c: 40 00 10 68 call 2010cac <_Thread_Enable_dispatch>
200cb10: 01 00 00 00 nop
if (msg_prio) {
200cb14: 80 a6 e0 00 cmp %i3, 0
200cb18: 02 80 00 08 be 200cb38 <_POSIX_Message_queue_Receive_support+0xd4><== NEVER TAKEN
200cb1c: 03 00 80 ab sethi %hi(0x202ac00), %g1
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
200cb20: c2 00 61 bc ld [ %g1 + 0x1bc ], %g1 ! 202adbc <_Per_CPU_Information+0xc>
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return (unsigned int) ((priority >= 0) ? priority : -priority);
200cb24: c4 00 60 24 ld [ %g1 + 0x24 ], %g2
200cb28: 83 38 a0 1f sra %g2, 0x1f, %g1
200cb2c: 84 18 40 02 xor %g1, %g2, %g2
200cb30: 82 20 80 01 sub %g2, %g1, %g1
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
200cb34: c2 26 c0 00 st %g1, [ %i3 ]
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
200cb38: 3b 00 80 ab sethi %hi(0x202ac00), %i5
200cb3c: ba 17 61 b0 or %i5, 0x1b0, %i5 ! 202adb0 <_Per_CPU_Information>
200cb40: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200cb44: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
200cb48: 80 a0 60 00 cmp %g1, 0
200cb4c: 12 80 00 05 bne 200cb60 <_POSIX_Message_queue_Receive_support+0xfc>
200cb50: 01 00 00 00 nop
return length_out;
200cb54: f0 07 bf fc ld [ %fp + -4 ], %i0
200cb58: 81 c7 e0 08 ret
200cb5c: 81 e8 00 00 restore
rtems_set_errno_and_return_minus_one(
200cb60: 40 00 28 58 call 2016cc0 <__errno>
200cb64: b0 10 3f ff mov -1, %i0
200cb68: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200cb6c: b8 10 00 08 mov %o0, %i4
200cb70: 40 00 00 96 call 200cdc8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
200cb74: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
200cb78: d0 27 00 00 st %o0, [ %i4 ]
200cb7c: 81 c7 e0 08 ret
200cb80: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
200cb84: 40 00 28 4f call 2016cc0 <__errno>
200cb88: 01 00 00 00 nop
200cb8c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
200cb90: c2 22 00 00 st %g1, [ %o0 ]
200cb94: b0 10 3f ff mov -1, %i0
}
200cb98: 81 c7 e0 08 ret
200cb9c: 81 e8 00 00 restore
0200ee20 <_POSIX_Semaphore_Create_support>:
size_t name_len,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
200ee20: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Semaphore_Control *the_semaphore;
CORE_semaphore_Attributes *the_sem_attr;
char *name;
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0)
200ee24: 80 a6 a0 00 cmp %i2, 0
200ee28: 22 80 00 06 be,a 200ee40 <_POSIX_Semaphore_Create_support+0x20>
200ee2c: 03 00 80 89 sethi %hi(0x2022400), %g1
rtems_set_errno_and_return_minus_one( ENOSYS );
200ee30: 40 00 0a d2 call 2011978 <__errno>
200ee34: 01 00 00 00 nop
200ee38: 10 80 00 11 b 200ee7c <_POSIX_Semaphore_Create_support+0x5c>
200ee3c: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200ee40: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2
200ee44: 84 00 a0 01 inc %g2
200ee48: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
200ee4c: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
200ee50: 21 00 80 8a sethi %hi(0x2022800), %l0
200ee54: 7f ff ee ee call 200aa0c <_Objects_Allocate>
200ee58: 90 14 20 e0 or %l0, 0xe0, %o0 ! 20228e0 <_POSIX_Semaphore_Information>
_Thread_Disable_dispatch();
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
200ee5c: ba 92 20 00 orcc %o0, 0, %i5
200ee60: 12 80 00 0a bne 200ee88 <_POSIX_Semaphore_Create_support+0x68>
200ee64: 80 a6 20 00 cmp %i0, 0
_Thread_Enable_dispatch();
200ee68: 7f ff f4 0c call 200be98 <_Thread_Enable_dispatch>
200ee6c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
200ee70: 40 00 0a c2 call 2011978 <__errno>
200ee74: 01 00 00 00 nop
200ee78: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c>
200ee7c: c2 22 00 00 st %g1, [ %o0 ]
200ee80: 81 c7 e0 08 ret
200ee84: 91 e8 3f ff restore %g0, -1, %o0
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
if ( name_arg != NULL ) {
200ee88: 02 80 00 10 be 200eec8 <_POSIX_Semaphore_Create_support+0xa8>
200ee8c: 90 10 00 18 mov %i0, %o0
name = _Workspace_String_duplicate( name_arg, name_len );
200ee90: 40 00 04 78 call 2010070 <_Workspace_String_duplicate>
200ee94: 92 10 00 19 mov %i1, %o1
if ( !name ) {
200ee98: b4 92 20 00 orcc %o0, 0, %i2
200ee9c: 12 80 00 0d bne 200eed0 <_POSIX_Semaphore_Create_support+0xb0><== ALWAYS TAKEN
200eea0: 80 a6 a0 00 cmp %i2, 0
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
200eea4: 90 14 20 e0 or %l0, 0xe0, %o0 <== NOT EXECUTED
200eea8: 7f ff ef b0 call 200ad68 <_Objects_Free> <== NOT EXECUTED
200eeac: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
200eeb0: 7f ff f3 fa call 200be98 <_Thread_Enable_dispatch> <== NOT EXECUTED
200eeb4: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
200eeb8: 40 00 0a b0 call 2011978 <__errno> <== NOT EXECUTED
200eebc: 01 00 00 00 nop <== NOT EXECUTED
200eec0: 10 bf ff ef b 200ee7c <_POSIX_Semaphore_Create_support+0x5c><== NOT EXECUTED
200eec4: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
}
} else {
name = NULL;
200eec8: b4 10 20 00 clr %i2
}
the_semaphore->process_shared = pshared;
if ( name ) {
200eecc: 80 a6 a0 00 cmp %i2, 0
200eed0: 02 80 00 08 be 200eef0 <_POSIX_Semaphore_Create_support+0xd0>
200eed4: c0 27 60 10 clr [ %i5 + 0x10 ]
the_semaphore->named = true;
200eed8: 82 10 20 01 mov 1, %g1
200eedc: c2 2f 60 14 stb %g1, [ %i5 + 0x14 ]
the_semaphore->open_count = 1;
200eee0: 82 10 20 01 mov 1, %g1
200eee4: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
the_semaphore->linked = true;
200eee8: 10 80 00 05 b 200eefc <_POSIX_Semaphore_Create_support+0xdc>
200eeec: c2 2f 60 15 stb %g1, [ %i5 + 0x15 ]
} else {
the_semaphore->named = false;
200eef0: c0 2f 60 14 clrb [ %i5 + 0x14 ]
the_semaphore->open_count = 0;
200eef4: c0 27 60 18 clr [ %i5 + 0x18 ]
the_semaphore->linked = false;
200eef8: c0 2f 60 15 clrb [ %i5 + 0x15 ]
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200eefc: 82 10 3f ff mov -1, %g1
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200ef00: 90 07 60 1c add %i5, 0x1c, %o0
the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200ef04: c2 27 60 5c st %g1, [ %i5 + 0x5c ]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200ef08: 92 07 60 5c add %i5, 0x5c, %o1
200ef0c: 94 10 00 1b mov %i3, %o2
200ef10: 7f ff ed 33 call 200a3dc <_CORE_semaphore_Initialize>
200ef14: c0 27 60 60 clr [ %i5 + 0x60 ]
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
200ef18: c2 17 60 0a lduh [ %i5 + 0xa ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200ef1c: 05 00 80 8a sethi %hi(0x2022800), %g2
200ef20: c4 00 a0 fc ld [ %g2 + 0xfc ], %g2 ! 20228fc <_POSIX_Semaphore_Information+0x1c>
200ef24: 83 28 60 02 sll %g1, 2, %g1
200ef28: fa 20 80 01 st %i5, [ %g2 + %g1 ]
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
200ef2c: f4 27 60 0c st %i2, [ %i5 + 0xc ]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name
);
*the_sem = the_semaphore;
200ef30: fa 27 00 00 st %i5, [ %i4 ]
_Thread_Enable_dispatch();
200ef34: 7f ff f3 d9 call 200be98 <_Thread_Enable_dispatch>
200ef38: b0 10 20 00 clr %i0
return 0;
}
200ef3c: 81 c7 e0 08 ret
200ef40: 81 e8 00 00 restore
0200c8d8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
Thread_Control *the_thread
)
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
200c8d8: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200c8dc: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2
200c8e0: 80 a0 a0 00 cmp %g2, 0
200c8e4: 12 80 00 13 bne 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58><== NEVER TAKEN
200c8e8: 01 00 00 00 nop
200c8ec: c4 00 60 dc ld [ %g1 + 0xdc ], %g2
200c8f0: 80 a0 a0 01 cmp %g2, 1
200c8f4: 12 80 00 0f bne 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58>
200c8f8: 01 00 00 00 nop
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
200c8fc: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1
200c900: 80 a0 60 00 cmp %g1, 0
200c904: 02 80 00 0b be 200c930 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x58>
200c908: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200c90c: 03 00 80 77 sethi %hi(0x201dc00), %g1
200c910: c4 00 63 50 ld [ %g1 + 0x350 ], %g2 ! 201df50 <_Thread_Dispatch_disable_level>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
200c914: 92 10 3f ff mov -1, %o1
200c918: 84 00 bf ff add %g2, -1, %g2
200c91c: c4 20 63 50 st %g2, [ %g1 + 0x350 ]
return _Thread_Dispatch_disable_level;
200c920: c2 00 63 50 ld [ %g1 + 0x350 ], %g1
200c924: 82 13 c0 00 mov %o7, %g1
200c928: 40 00 01 b5 call 200cffc <_POSIX_Thread_Exit>
200c92c: 9e 10 40 00 mov %g1, %o7
} else
_Thread_Enable_dispatch();
200c930: 82 13 c0 00 mov %o7, %g1
200c934: 7f ff f6 58 call 200a294 <_Thread_Enable_dispatch>
200c938: 9e 10 40 00 mov %g1, %o7
0200dc80 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
200dc80: 9d e3 bf a0 save %sp, -96, %sp
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
200dc84: 7f ff ff f4 call 200dc54 <_POSIX_Priority_Is_valid>
200dc88: d0 06 40 00 ld [ %i1 ], %o0
200dc8c: 80 8a 20 ff btst 0xff, %o0
200dc90: 32 80 00 04 bne,a 200dca0 <_POSIX_Thread_Translate_sched_param+0x20><== ALWAYS TAKEN
200dc94: c0 26 80 00 clr [ %i2 ]
return EINVAL;
200dc98: 81 c7 e0 08 ret
200dc9c: 91 e8 20 16 restore %g0, 0x16, %o0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
200dca0: 80 a6 20 00 cmp %i0, 0
200dca4: 12 80 00 06 bne 200dcbc <_POSIX_Thread_Translate_sched_param+0x3c>
200dca8: c0 26 c0 00 clr [ %i3 ]
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200dcac: 82 10 20 01 mov 1, %g1
200dcb0: c2 26 80 00 st %g1, [ %i2 ]
return 0;
200dcb4: 81 c7 e0 08 ret
200dcb8: 81 e8 00 00 restore
}
if ( policy == SCHED_FIFO ) {
200dcbc: 80 a6 20 01 cmp %i0, 1
200dcc0: 02 80 00 29 be 200dd64 <_POSIX_Thread_Translate_sched_param+0xe4>
200dcc4: 80 a6 20 02 cmp %i0, 2
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
200dcc8: 12 80 00 04 bne 200dcd8 <_POSIX_Thread_Translate_sched_param+0x58>
200dccc: 80 a6 20 04 cmp %i0, 4
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
200dcd0: 10 80 00 25 b 200dd64 <_POSIX_Thread_Translate_sched_param+0xe4>
200dcd4: f0 26 80 00 st %i0, [ %i2 ]
return 0;
}
if ( policy == SCHED_SPORADIC ) {
200dcd8: 12 bf ff f0 bne 200dc98 <_POSIX_Thread_Translate_sched_param+0x18>
200dcdc: 01 00 00 00 nop
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
200dce0: c2 06 60 08 ld [ %i1 + 8 ], %g1
200dce4: 80 a0 60 00 cmp %g1, 0
200dce8: 32 80 00 07 bne,a 200dd04 <_POSIX_Thread_Translate_sched_param+0x84>
200dcec: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200dcf0: c2 06 60 0c ld [ %i1 + 0xc ], %g1
200dcf4: 80 a0 60 00 cmp %g1, 0
200dcf8: 02 bf ff e8 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18>
200dcfc: 01 00 00 00 nop
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
200dd00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200dd04: 80 a0 60 00 cmp %g1, 0
200dd08: 12 80 00 06 bne 200dd20 <_POSIX_Thread_Translate_sched_param+0xa0>
200dd0c: 01 00 00 00 nop
200dd10: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200dd14: 80 a0 60 00 cmp %g1, 0
200dd18: 02 bf ff e0 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18>
200dd1c: 01 00 00 00 nop
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200dd20: 7f ff f7 6d call 200bad4 <_Timespec_To_ticks>
200dd24: 90 06 60 08 add %i1, 8, %o0
200dd28: ba 10 00 08 mov %o0, %i5
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
200dd2c: 7f ff f7 6a call 200bad4 <_Timespec_To_ticks>
200dd30: 90 06 60 10 add %i1, 0x10, %o0
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
200dd34: 80 a7 40 08 cmp %i5, %o0
200dd38: 0a bf ff d8 bcs 200dc98 <_POSIX_Thread_Translate_sched_param+0x18>
200dd3c: 01 00 00 00 nop
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
200dd40: 7f ff ff c5 call 200dc54 <_POSIX_Priority_Is_valid>
200dd44: d0 06 60 04 ld [ %i1 + 4 ], %o0
200dd48: 80 8a 20 ff btst 0xff, %o0
200dd4c: 02 bf ff d3 be 200dc98 <_POSIX_Thread_Translate_sched_param+0x18>
200dd50: 82 10 20 03 mov 3, %g1
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
200dd54: c2 26 80 00 st %g1, [ %i2 ]
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
200dd58: 03 00 80 1f sethi %hi(0x2007c00), %g1
200dd5c: 82 10 62 14 or %g1, 0x214, %g1 ! 2007e14 <_POSIX_Threads_Sporadic_budget_callout>
200dd60: c2 26 c0 00 st %g1, [ %i3 ]
return 0;
}
return EINVAL;
}
200dd64: 81 c7 e0 08 ret
200dd68: 91 e8 20 00 restore %g0, 0, %o0
0200cc30 <_POSIX_Threads_Delete_extension>:
*/
static void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
200cc30: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
200cc34: f0 06 61 5c ld [ %i1 + 0x15c ], %i0
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
200cc38: 40 00 09 09 call 200f05c <_POSIX_Threads_cancel_run>
200cc3c: 90 10 00 19 mov %i1, %o0
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
200cc40: 90 10 00 19 mov %i1, %o0
200cc44: 40 00 09 20 call 200f0c4 <_POSIX_Keys_Run_destructors>
200cc48: ba 06 20 44 add %i0, 0x44, %i5
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
200cc4c: 10 80 00 03 b 200cc58 <_POSIX_Threads_Delete_extension+0x28>
200cc50: f8 06 60 28 ld [ %i1 + 0x28 ], %i4
*(void **)the_thread->Wait.return_argument = value_ptr;
200cc54: f8 20 40 00 st %i4, [ %g1 ] <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
200cc58: 7f ff f6 42 call 200a560 <_Thread_queue_Dequeue>
200cc5c: 90 10 00 1d mov %i5, %o0
200cc60: 80 a2 20 00 cmp %o0, 0
200cc64: 32 bf ff fc bne,a 200cc54 <_POSIX_Threads_Delete_extension+0x24><== NEVER TAKEN
200cc68: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 <== NOT EXECUTED
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
200cc6c: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
200cc70: 80 a0 60 04 cmp %g1, 4
200cc74: 32 80 00 05 bne,a 200cc88 <_POSIX_Threads_Delete_extension+0x58>
200cc78: c0 26 61 5c clr [ %i1 + 0x15c ]
(void) _Watchdog_Remove( &api->Sporadic_timer );
200cc7c: 7f ff f8 f7 call 200b058 <_Watchdog_Remove>
200cc80: 90 06 20 a8 add %i0, 0xa8, %o0
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
200cc84: c0 26 61 5c clr [ %i1 + 0x15c ]
_Workspace_Free( api );
200cc88: 7f ff f9 6d call 200b23c <_Workspace_Free>
200cc8c: 81 e8 00 00 restore
02007b70 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
2007b70: 9d e3 bf 58 save %sp, -168, %sp
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
2007b74: 03 00 80 86 sethi %hi(0x2021800), %g1
2007b78: 82 10 62 60 or %g1, 0x260, %g1 ! 2021a60 <Configuration_POSIX_API>
maximum = Configuration_POSIX_API.number_of_initialization_threads;
2007b7c: f6 00 60 30 ld [ %g1 + 0x30 ], %i3
if ( !user_threads || maximum == 0 )
2007b80: 80 a6 e0 00 cmp %i3, 0
2007b84: 02 80 00 1d be 2007bf8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
2007b88: fa 00 60 34 ld [ %g1 + 0x34 ], %i5
2007b8c: 80 a7 60 00 cmp %i5, 0
2007b90: 02 80 00 1a be 2007bf8 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
2007b94: b8 10 20 00 clr %i4
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
2007b98: 40 00 18 75 call 200dd6c <pthread_attr_init>
2007b9c: 90 07 bf c0 add %fp, -64, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
2007ba0: 92 10 20 02 mov 2, %o1
2007ba4: 40 00 18 7e call 200dd9c <pthread_attr_setinheritsched>
2007ba8: 90 07 bf c0 add %fp, -64, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
2007bac: d2 07 60 04 ld [ %i5 + 4 ], %o1
2007bb0: 40 00 18 8a call 200ddd8 <pthread_attr_setstacksize>
2007bb4: 90 07 bf c0 add %fp, -64, %o0
status = pthread_create(
2007bb8: d4 07 40 00 ld [ %i5 ], %o2
2007bbc: 90 07 bf bc add %fp, -68, %o0
2007bc0: 92 07 bf c0 add %fp, -64, %o1
2007bc4: 96 10 20 00 clr %o3
2007bc8: 7f ff ff 16 call 2007820 <pthread_create>
2007bcc: ba 07 60 08 add %i5, 8, %i5
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
2007bd0: 80 a2 20 00 cmp %o0, 0
2007bd4: 02 80 00 05 be 2007be8 <_POSIX_Threads_Initialize_user_threads_body+0x78>
2007bd8: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
2007bdc: 90 10 20 02 mov 2, %o0
2007be0: 40 00 07 f9 call 2009bc4 <_Internal_error_Occurred>
2007be4: 92 10 20 01 mov 1, %o1
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
2007be8: b8 07 20 01 inc %i4
2007bec: 80 a7 00 1b cmp %i4, %i3
2007bf0: 12 bf ff ea bne 2007b98 <_POSIX_Threads_Initialize_user_threads_body+0x28><== NEVER TAKEN
2007bf4: 01 00 00 00 nop
2007bf8: 81 c7 e0 08 ret
2007bfc: 81 e8 00 00 restore
0200cd84 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
200cd84: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200cd88: fa 06 61 5c ld [ %i1 + 0x15c ], %i5
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
200cd8c: 40 00 04 30 call 200de4c <_Timespec_To_ticks>
200cd90: 90 07 60 98 add %i5, 0x98, %o0
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
200cd94: 03 00 80 73 sethi %hi(0x201cc00), %g1
200cd98: d2 08 61 48 ldub [ %g1 + 0x148 ], %o1 ! 201cd48 <rtems_maximum_priority>
200cd9c: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
the_thread->cpu_time_budget = ticks;
200cda0: d0 26 60 74 st %o0, [ %i1 + 0x74 ]
200cda4: 92 22 40 01 sub %o1, %g1, %o1
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200cda8: c2 06 60 1c ld [ %i1 + 0x1c ], %g1
200cdac: 80 a0 60 00 cmp %g1, 0
200cdb0: 12 80 00 09 bne 200cdd4 <_POSIX_Threads_Sporadic_budget_TSR+0x50><== NEVER TAKEN
200cdb4: d2 26 60 18 st %o1, [ %i1 + 0x18 ]
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
200cdb8: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200cdbc: 80 a0 40 09 cmp %g1, %o1
200cdc0: 08 80 00 06 bleu 200cdd8 <_POSIX_Threads_Sporadic_budget_TSR+0x54>
200cdc4: 90 07 60 90 add %i5, 0x90, %o0
_Thread_Change_priority( the_thread, new_priority, true );
200cdc8: 90 10 00 19 mov %i1, %o0
200cdcc: 7f ff f3 db call 2009d38 <_Thread_Change_priority>
200cdd0: 94 10 20 01 mov 1, %o2
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
200cdd4: 90 07 60 90 add %i5, 0x90, %o0
200cdd8: 40 00 04 1d call 200de4c <_Timespec_To_ticks>
200cddc: 31 00 80 76 sethi %hi(0x201d800), %i0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cde0: b0 16 23 98 or %i0, 0x398, %i0 ! 201db98 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200cde4: d0 27 60 b4 st %o0, [ %i5 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200cde8: 7f ff f8 44 call 200aef8 <_Watchdog_Insert>
200cdec: 93 ef 60 a8 restore %i5, 0xa8, %o1
0200cdf0 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200cdf0: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
200cdf4: 86 10 3f ff mov -1, %g3
200cdf8: c4 00 a0 8c ld [ %g2 + 0x8c ], %g2
200cdfc: c6 22 20 74 st %g3, [ %o0 + 0x74 ]
200ce00: 07 00 80 73 sethi %hi(0x201cc00), %g3
200ce04: d2 08 e1 48 ldub [ %g3 + 0x148 ], %o1 ! 201cd48 <rtems_maximum_priority>
200ce08: 92 22 40 02 sub %o1, %g2, %o1
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
200ce0c: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
200ce10: 80 a0 a0 00 cmp %g2, 0
200ce14: 12 80 00 09 bne 200ce38 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN
200ce18: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
200ce1c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200ce20: 80 a0 40 09 cmp %g1, %o1
200ce24: 1a 80 00 05 bcc 200ce38 <_POSIX_Threads_Sporadic_budget_callout+0x48><== NEVER TAKEN
200ce28: 94 10 20 01 mov 1, %o2
_Thread_Change_priority( the_thread, new_priority, true );
200ce2c: 82 13 c0 00 mov %o7, %g1
200ce30: 7f ff f3 c2 call 2009d38 <_Thread_Change_priority>
200ce34: 9e 10 40 00 mov %g1, %o7
200ce38: 81 c3 e0 08 retl <== NOT EXECUTED
02007614 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
2007614: 9d e3 bf 98 save %sp, -104, %sp
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2007618: c2 06 60 68 ld [ %i1 + 0x68 ], %g1
200761c: 82 00 60 01 inc %g1
2007620: c2 26 60 68 st %g1, [ %i1 + 0x68 ]
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2007624: c2 06 60 54 ld [ %i1 + 0x54 ], %g1
2007628: 80 a0 60 00 cmp %g1, 0
200762c: 32 80 00 07 bne,a 2007648 <_POSIX_Timer_TSR+0x34>
2007630: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
2007634: c2 06 60 58 ld [ %i1 + 0x58 ], %g1
2007638: 80 a0 60 00 cmp %g1, 0
200763c: 02 80 00 1e be 20076b4 <_POSIX_Timer_TSR+0xa0> <== NEVER TAKEN
2007640: 82 10 20 04 mov 4, %g1
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
2007644: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
2007648: d4 06 60 08 ld [ %i1 + 8 ], %o2
200764c: 90 06 60 10 add %i1, 0x10, %o0
2007650: 17 00 80 1d sethi %hi(0x2007400), %o3
2007654: 98 10 00 19 mov %i1, %o4
2007658: 40 00 18 0b call 200d684 <_POSIX_Timer_Insert_helper>
200765c: 96 12 e2 14 or %o3, 0x214, %o3
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
2007660: 80 8a 20 ff btst 0xff, %o0
2007664: 02 80 00 19 be 20076c8 <_POSIX_Timer_TSR+0xb4> <== NEVER TAKEN
2007668: 01 00 00 00 nop
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
200766c: 40 00 05 da call 2008dd4 <_TOD_Get_as_timestamp>
2007670: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2007674: f8 1f bf f8 ldd [ %fp + -8 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007678: 94 10 20 00 clr %o2
200767c: 90 10 00 1c mov %i4, %o0
2007680: 92 10 00 1d mov %i5, %o1
2007684: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007688: 40 00 48 c9 call 20199ac <__divdi3>
200768c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007690: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007694: d2 26 60 6c st %o1, [ %i1 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007698: 94 10 20 00 clr %o2
200769c: 92 10 00 1d mov %i5, %o1
20076a0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20076a4: 40 00 49 ad call 2019d58 <__moddi3>
20076a8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
20076ac: 82 10 20 03 mov 3, %g1
20076b0: d2 26 60 70 st %o1, [ %i1 + 0x70 ]
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
20076b4: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
20076b8: d2 06 60 44 ld [ %i1 + 0x44 ], %o1
20076bc: 40 00 16 e5 call 200d250 <pthread_kill>
20076c0: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
20076c4: c0 26 60 68 clr [ %i1 + 0x68 ]
20076c8: 81 c7 e0 08 ret
20076cc: 81 e8 00 00 restore
0200f180 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
200f180: 9d e3 bf 68 save %sp, -152, %sp
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
200f184: 98 10 20 01 mov 1, %o4
200f188: 90 10 00 18 mov %i0, %o0
200f18c: 92 10 00 19 mov %i1, %o1
200f190: 94 07 bf cc add %fp, -52, %o2
200f194: 40 00 00 2e call 200f24c <_POSIX_signals_Clear_signals>
200f198: 96 10 00 1a mov %i2, %o3
200f19c: 80 8a 20 ff btst 0xff, %o0
200f1a0: 02 80 00 28 be 200f240 <_POSIX_signals_Check_signal+0xc0>
200f1a4: 82 10 20 00 clr %g1
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
200f1a8: 85 2e 60 02 sll %i1, 2, %g2
200f1ac: 35 00 80 78 sethi %hi(0x201e000), %i2
200f1b0: b7 2e 60 04 sll %i1, 4, %i3
200f1b4: b4 16 a0 80 or %i2, 0x80, %i2
200f1b8: b6 26 c0 02 sub %i3, %g2, %i3
200f1bc: 84 06 80 1b add %i2, %i3, %g2
200f1c0: fa 00 a0 08 ld [ %g2 + 8 ], %i5
200f1c4: 80 a7 60 01 cmp %i5, 1
200f1c8: 02 80 00 1e be 200f240 <_POSIX_signals_Check_signal+0xc0> <== NEVER TAKEN
200f1cc: 90 07 bf d8 add %fp, -40, %o0
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
200f1d0: f8 06 20 d0 ld [ %i0 + 0xd0 ], %i4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200f1d4: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200f1d8: 82 10 40 1c or %g1, %i4, %g1
200f1dc: c2 26 20 d0 st %g1, [ %i0 + 0xd0 ]
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
200f1e0: 03 00 80 78 sethi %hi(0x201e000), %g1
200f1e4: d2 00 60 2c ld [ %g1 + 0x2c ], %o1 ! 201e02c <_Per_CPU_Information+0xc>
200f1e8: 94 10 20 28 mov 0x28, %o2
200f1ec: 40 00 04 52 call 2010334 <memcpy>
200f1f0: 92 02 60 20 add %o1, 0x20, %o1
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200f1f4: c2 06 80 1b ld [ %i2 + %i3 ], %g1
200f1f8: 80 a0 60 02 cmp %g1, 2
200f1fc: 12 80 00 07 bne 200f218 <_POSIX_signals_Check_signal+0x98>
200f200: 90 10 00 19 mov %i1, %o0
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
200f204: 92 07 bf cc add %fp, -52, %o1
200f208: 9f c7 40 00 call %i5
200f20c: 94 10 20 00 clr %o2
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
200f210: 10 80 00 05 b 200f224 <_POSIX_signals_Check_signal+0xa4>
200f214: 03 00 80 78 sethi %hi(0x201e000), %g1
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
200f218: 9f c7 40 00 call %i5
200f21c: 01 00 00 00 nop
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
200f220: 03 00 80 78 sethi %hi(0x201e000), %g1
200f224: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 201e02c <_Per_CPU_Information+0xc>
200f228: 92 07 bf d8 add %fp, -40, %o1
200f22c: 90 02 20 20 add %o0, 0x20, %o0
200f230: 40 00 04 41 call 2010334 <memcpy>
200f234: 94 10 20 28 mov 0x28, %o2
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
200f238: 82 10 20 01 mov 1, %g1
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200f23c: f8 26 20 d0 st %i4, [ %i0 + 0xd0 ]
return true;
}
200f240: b0 08 60 01 and %g1, 1, %i0
200f244: 81 c7 e0 08 ret
200f248: 81 e8 00 00 restore
0200f974 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
200f974: 9d e3 bf a0 save %sp, -96, %sp
200f978: 82 06 3f ff add %i0, -1, %g1
200f97c: ba 10 20 01 mov 1, %i5
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
200f980: 7f ff cb 51 call 20026c4 <sparc_disable_interrupts>
200f984: bb 2f 40 01 sll %i5, %g1, %i5
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
200f988: 05 00 80 78 sethi %hi(0x201e000), %g2
200f98c: 83 2e 20 02 sll %i0, 2, %g1
200f990: 84 10 a0 80 or %g2, 0x80, %g2
200f994: b1 2e 20 04 sll %i0, 4, %i0
200f998: 82 26 00 01 sub %i0, %g1, %g1
200f99c: c4 00 80 01 ld [ %g2 + %g1 ], %g2
200f9a0: 80 a0 a0 02 cmp %g2, 2
200f9a4: 32 80 00 0c bne,a 200f9d4 <_POSIX_signals_Clear_process_signals+0x60>
200f9a8: 03 00 80 78 sethi %hi(0x201e000), %g1
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
200f9ac: 05 00 80 78 sethi %hi(0x201e000), %g2
200f9b0: 84 10 a2 78 or %g2, 0x278, %g2 ! 201e278 <_POSIX_signals_Siginfo>
200f9b4: 86 00 40 02 add %g1, %g2, %g3
200f9b8: c2 00 40 02 ld [ %g1 + %g2 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200f9bc: 86 00 e0 04 add %g3, 4, %g3
200f9c0: 80 a0 40 03 cmp %g1, %g3
200f9c4: 02 80 00 04 be 200f9d4 <_POSIX_signals_Clear_process_signals+0x60><== ALWAYS TAKEN
200f9c8: 03 00 80 78 sethi %hi(0x201e000), %g1
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
200f9cc: 7f ff cb 42 call 20026d4 <sparc_enable_interrupts>
200f9d0: 91 e8 00 08 restore %g0, %o0, %o0
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
200f9d4: c4 00 62 74 ld [ %g1 + 0x274 ], %g2
200f9d8: ba 28 80 1d andn %g2, %i5, %i5
200f9dc: 10 bf ff fc b 200f9cc <_POSIX_signals_Clear_process_signals+0x58>
200f9e0: fa 20 62 74 st %i5, [ %g1 + 0x274 ]
0200840c <_POSIX_signals_Get_lowest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200840c: 82 10 20 1b mov 0x1b, %g1
2008410: 84 10 20 01 mov 1, %g2
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
2008414: 86 00 7f ff add %g1, -1, %g3
2008418: 87 28 80 03 sll %g2, %g3, %g3
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
200841c: 80 88 c0 08 btst %g3, %o0
2008420: 12 80 00 11 bne 2008464 <_POSIX_signals_Get_lowest+0x58> <== NEVER TAKEN
2008424: 01 00 00 00 nop
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
2008428: 82 00 60 01 inc %g1
200842c: 80 a0 60 20 cmp %g1, 0x20
2008430: 12 bf ff fa bne 2008418 <_POSIX_signals_Get_lowest+0xc>
2008434: 86 00 7f ff add %g1, -1, %g3
2008438: 82 10 20 01 mov 1, %g1
200843c: 84 10 20 01 mov 1, %g2
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
static int _POSIX_signals_Get_lowest(
2008440: 86 00 7f ff add %g1, -1, %g3
2008444: 87 28 80 03 sll %g2, %g3, %g3
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
2008448: 80 88 c0 08 btst %g3, %o0
200844c: 12 80 00 06 bne 2008464 <_POSIX_signals_Get_lowest+0x58>
2008450: 01 00 00 00 nop
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
2008454: 82 00 60 01 inc %g1
2008458: 80 a0 60 1b cmp %g1, 0x1b
200845c: 12 bf ff fa bne 2008444 <_POSIX_signals_Get_lowest+0x38> <== ALWAYS TAKEN
2008460: 86 00 7f ff add %g1, -1, %g3
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
2008464: 81 c3 e0 08 retl
2008468: 90 10 00 01 mov %g1, %o0
0201a654 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
201a654: 9d e3 bf a0 save %sp, -96, %sp
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201a658: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
201a65c: 3b 04 00 20 sethi %hi(0x10008000), %i5
201a660: 84 06 7f ff add %i1, -1, %g2
201a664: 86 10 20 01 mov 1, %g3
201a668: b8 08 40 1d and %g1, %i5, %i4
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
201a66c: c8 06 21 5c ld [ %i0 + 0x15c ], %g4
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
201a670: 80 a7 00 1d cmp %i4, %i5
201a674: 12 80 00 1e bne 201a6ec <_POSIX_signals_Unblock_thread+0x98>
201a678: 85 28 c0 02 sll %g3, %g2, %g2
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
201a67c: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
201a680: 80 88 80 01 btst %g2, %g1
201a684: 12 80 00 08 bne 201a6a4 <_POSIX_signals_Unblock_thread+0x50>
201a688: 82 10 20 04 mov 4, %g1
201a68c: c2 01 20 d0 ld [ %g4 + 0xd0 ], %g1
201a690: 80 a8 80 01 andncc %g2, %g1, %g0
201a694: 32 80 00 04 bne,a 201a6a4 <_POSIX_signals_Unblock_thread+0x50>
201a698: 82 10 20 04 mov 4, %g1
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
201a69c: 10 80 00 3d b 201a790 <_POSIX_signals_Unblock_thread+0x13c>
201a6a0: b0 10 20 00 clr %i0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
201a6a4: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
201a6a8: 80 a6 a0 00 cmp %i2, 0
201a6ac: 12 80 00 07 bne 201a6c8 <_POSIX_signals_Unblock_thread+0x74>
201a6b0: d0 06 20 28 ld [ %i0 + 0x28 ], %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
201a6b4: 82 10 20 01 mov 1, %g1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
201a6b8: f2 22 00 00 st %i1, [ %o0 ]
the_info->si_code = SI_USER;
201a6bc: c2 22 20 04 st %g1, [ %o0 + 4 ]
the_info->si_value.sival_int = 0;
201a6c0: 10 80 00 05 b 201a6d4 <_POSIX_signals_Unblock_thread+0x80>
201a6c4: c0 22 20 08 clr [ %o0 + 8 ]
} else {
*the_info = *info;
201a6c8: 92 10 00 1a mov %i2, %o1
201a6cc: 7f ff d7 1a call 2010334 <memcpy>
201a6d0: 94 10 20 0c mov 0xc, %o2
}
_Thread_queue_Extract_with_proxy( the_thread );
201a6d4: 90 10 00 18 mov %i0, %o0
201a6d8: 7f ff c0 8f call 200a914 <_Thread_queue_Extract_with_proxy>
201a6dc: b0 10 20 01 mov 1, %i0
201a6e0: b0 0e 20 01 and %i0, 1, %i0
201a6e4: 81 c7 e0 08 ret
201a6e8: 81 e8 00 00 restore
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
201a6ec: c8 01 20 d0 ld [ %g4 + 0xd0 ], %g4
201a6f0: 80 a8 80 04 andncc %g2, %g4, %g0
201a6f4: 02 80 00 26 be 201a78c <_POSIX_signals_Unblock_thread+0x138>
201a6f8: 05 04 00 00 sethi %hi(0x10000000), %g2
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
201a6fc: 80 88 40 02 btst %g1, %g2
201a700: 02 80 00 17 be 201a75c <_POSIX_signals_Unblock_thread+0x108>
201a704: 80 a0 60 00 cmp %g1, 0
the_thread->Wait.return_code = EINTR;
201a708: 84 10 20 04 mov 4, %g2
201a70c: c4 26 20 34 st %g2, [ %i0 + 0x34 ]
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
201a710: 05 00 00 ef sethi %hi(0x3bc00), %g2
201a714: 84 10 a2 e0 or %g2, 0x2e0, %g2 ! 3bee0 <PROM_START+0x3bee0>
201a718: 80 88 40 02 btst %g1, %g2
201a71c: 02 80 00 06 be 201a734 <_POSIX_signals_Unblock_thread+0xe0>
201a720: 80 88 60 08 btst 8, %g1
_Thread_queue_Extract_with_proxy( the_thread );
201a724: 7f ff c0 7c call 200a914 <_Thread_queue_Extract_with_proxy>
201a728: 90 10 00 18 mov %i0, %o0
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
201a72c: 10 80 00 19 b 201a790 <_POSIX_signals_Unblock_thread+0x13c>
201a730: b0 10 20 00 clr %i0
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
201a734: 22 80 00 17 be,a 201a790 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN
201a738: b0 10 20 00 clr %i0 <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
201a73c: 7f ff c2 47 call 200b058 <_Watchdog_Remove>
201a740: 90 06 20 48 add %i0, 0x48, %o0
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
201a744: 90 10 00 18 mov %i0, %o0
201a748: 13 04 00 ff sethi %hi(0x1003fc00), %o1
201a74c: 7f ff bd c0 call 2009e4c <_Thread_Clear_state>
201a750: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
201a754: 10 80 00 0f b 201a790 <_POSIX_signals_Unblock_thread+0x13c>
201a758: b0 10 20 00 clr %i0
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
201a75c: 32 80 00 0d bne,a 201a790 <_POSIX_signals_Unblock_thread+0x13c><== NEVER TAKEN
201a760: b0 10 20 00 clr %i0 <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a764: 03 00 80 78 sethi %hi(0x201e000), %g1
201a768: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
201a76c: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a770: 80 a0 a0 00 cmp %g2, 0
201a774: 22 80 00 07 be,a 201a790 <_POSIX_signals_Unblock_thread+0x13c>
201a778: b0 10 20 00 clr %i0
201a77c: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201a780: 80 a6 00 02 cmp %i0, %g2
201a784: 22 80 00 02 be,a 201a78c <_POSIX_signals_Unblock_thread+0x138><== ALWAYS TAKEN
201a788: c6 28 60 18 stb %g3, [ %g1 + 0x18 ]
_Thread_Dispatch_necessary = true;
}
}
return false;
201a78c: b0 10 20 00 clr %i0
}
201a790: b0 0e 20 01 and %i0, 1, %i0
201a794: 81 c7 e0 08 ret
201a798: 81 e8 00 00 restore
0200a3a0 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a3a0: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
200a3a4: 80 a6 60 00 cmp %i1, 0
200a3a8: 02 80 00 69 be 200a54c <_RBTree_Extract_unprotected+0x1ac>
200a3ac: 01 00 00 00 nop
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
200a3b0: c2 06 20 08 ld [ %i0 + 8 ], %g1
200a3b4: 80 a6 40 01 cmp %i1, %g1
200a3b8: 32 80 00 07 bne,a 200a3d4 <_RBTree_Extract_unprotected+0x34>
200a3bc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
200a3c0: 90 10 00 19 mov %i1, %o0
200a3c4: 40 00 01 31 call 200a888 <_RBTree_Next_unprotected>
200a3c8: 92 10 20 01 mov 1, %o1
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
200a3cc: d0 26 20 08 st %o0, [ %i0 + 8 ]
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
200a3d0: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200a3d4: 80 a6 40 01 cmp %i1, %g1
200a3d8: 32 80 00 07 bne,a 200a3f4 <_RBTree_Extract_unprotected+0x54>
200a3dc: fa 06 60 04 ld [ %i1 + 4 ], %i5
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
200a3e0: 90 10 00 19 mov %i1, %o0
200a3e4: 40 00 01 29 call 200a888 <_RBTree_Next_unprotected>
200a3e8: 92 10 20 00 clr %o1
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
200a3ec: d0 26 20 0c st %o0, [ %i0 + 0xc ]
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
200a3f0: fa 06 60 04 ld [ %i1 + 4 ], %i5
200a3f4: 80 a7 60 00 cmp %i5, 0
200a3f8: 02 80 00 36 be 200a4d0 <_RBTree_Extract_unprotected+0x130>
200a3fc: f8 06 60 08 ld [ %i1 + 8 ], %i4
200a400: 80 a7 20 00 cmp %i4, 0
200a404: 32 80 00 05 bne,a 200a418 <_RBTree_Extract_unprotected+0x78>
200a408: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a40c: 10 80 00 35 b 200a4e0 <_RBTree_Extract_unprotected+0x140>
200a410: b8 10 00 1d mov %i5, %i4
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
200a414: c2 07 60 08 ld [ %i5 + 8 ], %g1
200a418: 80 a0 60 00 cmp %g1, 0
200a41c: 32 bf ff fe bne,a 200a414 <_RBTree_Extract_unprotected+0x74>
200a420: ba 10 00 01 mov %g1, %i5
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
200a424: f8 07 60 04 ld [ %i5 + 4 ], %i4
if(leaf) {
200a428: 80 a7 20 00 cmp %i4, 0
200a42c: 02 80 00 05 be 200a440 <_RBTree_Extract_unprotected+0xa0>
200a430: 01 00 00 00 nop
leaf->parent = target->parent;
200a434: c2 07 40 00 ld [ %i5 ], %g1
200a438: 10 80 00 04 b 200a448 <_RBTree_Extract_unprotected+0xa8>
200a43c: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
200a440: 7f ff ff 73 call 200a20c <_RBTree_Extract_validate_unprotected>
200a444: 90 10 00 1d mov %i5, %o0
}
victim_color = target->color;
dir = target != target->parent->child[0];
200a448: c4 07 40 00 ld [ %i5 ], %g2
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
200a44c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
dir = target != target->parent->child[0];
200a450: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a454: 86 1f 40 03 xor %i5, %g3, %g3
200a458: 80 a0 00 03 cmp %g0, %g3
200a45c: 86 40 20 00 addx %g0, 0, %g3
target->parent->child[dir] = leaf;
200a460: 87 28 e0 02 sll %g3, 2, %g3
200a464: 84 00 80 03 add %g2, %g3, %g2
200a468: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
200a46c: c4 06 40 00 ld [ %i1 ], %g2
200a470: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a474: 86 1e 40 03 xor %i1, %g3, %g3
200a478: 80 a0 00 03 cmp %g0, %g3
200a47c: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = target;
200a480: 87 28 e0 02 sll %g3, 2, %g3
200a484: 84 00 80 03 add %g2, %g3, %g2
200a488: fa 20 a0 04 st %i5, [ %g2 + 4 ]
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
200a48c: c4 06 60 08 ld [ %i1 + 8 ], %g2
200a490: c4 27 60 08 st %g2, [ %i5 + 8 ]
if (the_node->child[RBT_RIGHT])
200a494: c4 06 60 08 ld [ %i1 + 8 ], %g2
200a498: 80 a0 a0 00 cmp %g2, 0
200a49c: 32 80 00 02 bne,a 200a4a4 <_RBTree_Extract_unprotected+0x104><== ALWAYS TAKEN
200a4a0: fa 20 80 00 st %i5, [ %g2 ]
the_node->child[RBT_RIGHT]->parent = target;
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
200a4a4: c4 06 60 04 ld [ %i1 + 4 ], %g2
200a4a8: c4 27 60 04 st %g2, [ %i5 + 4 ]
if (the_node->child[RBT_LEFT])
200a4ac: c4 06 60 04 ld [ %i1 + 4 ], %g2
200a4b0: 80 a0 a0 00 cmp %g2, 0
200a4b4: 32 80 00 02 bne,a 200a4bc <_RBTree_Extract_unprotected+0x11c>
200a4b8: fa 20 80 00 st %i5, [ %g2 ]
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
200a4bc: c4 06 40 00 ld [ %i1 ], %g2
200a4c0: c4 27 40 00 st %g2, [ %i5 ]
target->color = the_node->color;
200a4c4: c4 06 60 0c ld [ %i1 + 0xc ], %g2
200a4c8: 10 80 00 14 b 200a518 <_RBTree_Extract_unprotected+0x178>
200a4cc: c4 27 60 0c st %g2, [ %i5 + 0xc ]
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
200a4d0: 80 a7 20 00 cmp %i4, 0
200a4d4: 32 80 00 04 bne,a 200a4e4 <_RBTree_Extract_unprotected+0x144>
200a4d8: c2 06 40 00 ld [ %i1 ], %g1
200a4dc: 30 80 00 04 b,a 200a4ec <_RBTree_Extract_unprotected+0x14c>
leaf->parent = the_node->parent;
200a4e0: c2 06 40 00 ld [ %i1 ], %g1
200a4e4: 10 80 00 04 b 200a4f4 <_RBTree_Extract_unprotected+0x154>
200a4e8: c2 27 00 00 st %g1, [ %i4 ]
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
200a4ec: 7f ff ff 48 call 200a20c <_RBTree_Extract_validate_unprotected>
200a4f0: 90 10 00 19 mov %i1, %o0
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200a4f4: c4 06 40 00 ld [ %i1 ], %g2
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
200a4f8: c2 06 60 0c ld [ %i1 + 0xc ], %g1
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
200a4fc: c6 00 a0 04 ld [ %g2 + 4 ], %g3
200a500: 86 1e 40 03 xor %i1, %g3, %g3
200a504: 80 a0 00 03 cmp %g0, %g3
200a508: 86 40 20 00 addx %g0, 0, %g3
the_node->parent->child[dir] = leaf;
200a50c: 87 28 e0 02 sll %g3, 2, %g3
200a510: 84 00 80 03 add %g2, %g3, %g2
200a514: f8 20 a0 04 st %i4, [ %g2 + 4 ]
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
200a518: 80 a0 60 00 cmp %g1, 0
200a51c: 32 80 00 06 bne,a 200a534 <_RBTree_Extract_unprotected+0x194>
200a520: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (leaf) {
200a524: 80 a7 20 00 cmp %i4, 0
200a528: 32 80 00 02 bne,a 200a530 <_RBTree_Extract_unprotected+0x190>
200a52c: c0 27 20 0c clr [ %i4 + 0xc ]
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
200a530: c2 06 20 04 ld [ %i0 + 4 ], %g1
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
200a534: c0 26 60 08 clr [ %i1 + 8 ]
200a538: c0 26 60 04 clr [ %i1 + 4 ]
200a53c: 80 a0 60 00 cmp %g1, 0
200a540: 02 80 00 03 be 200a54c <_RBTree_Extract_unprotected+0x1ac>
200a544: c0 26 40 00 clr [ %i1 ]
200a548: c0 20 60 0c clr [ %g1 + 0xc ]
200a54c: 81 c7 e0 08 ret
200a550: 81 e8 00 00 restore
0200b594 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
200b594: 9d e3 bf a0 save %sp, -96, %sp
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
200b598: 80 a6 20 00 cmp %i0, 0
200b59c: 02 80 00 10 be 200b5dc <_RBTree_Initialize+0x48> <== NEVER TAKEN
200b5a0: 01 00 00 00 nop
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
200b5a4: c0 26 00 00 clr [ %i0 ]
the_rbtree->root = NULL;
200b5a8: c0 26 20 04 clr [ %i0 + 4 ]
the_rbtree->first[0] = NULL;
200b5ac: c0 26 20 08 clr [ %i0 + 8 ]
the_rbtree->first[1] = NULL;
200b5b0: c0 26 20 0c clr [ %i0 + 0xc ]
the_rbtree->compare_function = compare_function;
200b5b4: f2 26 20 10 st %i1, [ %i0 + 0x10 ]
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200b5b8: 10 80 00 06 b 200b5d0 <_RBTree_Initialize+0x3c>
200b5bc: fa 2e 20 14 stb %i5, [ %i0 + 0x14 ]
_RBTree_Insert_unprotected(the_rbtree, next);
200b5c0: 90 10 00 18 mov %i0, %o0
200b5c4: 7f ff ff 2e call 200b27c <_RBTree_Insert_unprotected>
200b5c8: b4 06 80 1c add %i2, %i4, %i2
200b5cc: b6 06 ff ff add %i3, -1, %i3
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
200b5d0: 80 a6 e0 00 cmp %i3, 0
200b5d4: 12 bf ff fb bne 200b5c0 <_RBTree_Initialize+0x2c>
200b5d8: 92 10 00 1a mov %i2, %o1
200b5dc: 81 c7 e0 08 ret
200b5e0: 81 e8 00 00 restore
0200a5f4 <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
200a5f4: 9d e3 bf a0 save %sp, -96, %sp
if(!the_node) return (RBTree_Node*)-1;
200a5f8: 80 a6 60 00 cmp %i1, 0
200a5fc: 02 80 00 7c be 200a7ec <_RBTree_Insert_unprotected+0x1f8>
200a600: ba 10 00 18 mov %i0, %i5
RBTree_Node *iter_node = the_rbtree->root;
200a604: f0 06 20 04 ld [ %i0 + 4 ], %i0
int compare_result;
if (!iter_node) { /* special case: first node inserted */
200a608: b6 96 20 00 orcc %i0, 0, %i3
200a60c: 32 80 00 0c bne,a 200a63c <_RBTree_Insert_unprotected+0x48>
200a610: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
the_node->color = RBT_BLACK;
200a614: c0 26 60 0c clr [ %i1 + 0xc ]
the_rbtree->root = the_node;
200a618: f2 27 60 04 st %i1, [ %i5 + 4 ]
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
200a61c: f2 27 60 0c st %i1, [ %i5 + 0xc ]
200a620: f2 27 60 08 st %i1, [ %i5 + 8 ]
the_node->parent = (RBTree_Node *) the_rbtree;
200a624: fa 26 40 00 st %i5, [ %i1 ]
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200a628: c0 26 60 08 clr [ %i1 + 8 ]
200a62c: c0 26 60 04 clr [ %i1 + 4 ]
200a630: 81 c7 e0 08 ret
200a634: 81 e8 00 00 restore
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
200a638: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
200a63c: 90 10 00 19 mov %i1, %o0
200a640: 9f c0 40 00 call %g1
200a644: 92 10 00 18 mov %i0, %o1
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
200a648: c2 0f 60 14 ldub [ %i5 + 0x14 ], %g1
200a64c: 80 a0 60 00 cmp %g1, 0
200a650: 02 80 00 05 be 200a664 <_RBTree_Insert_unprotected+0x70>
200a654: b8 38 00 08 xnor %g0, %o0, %i4
200a658: 80 a2 20 00 cmp %o0, 0
200a65c: 02 80 00 65 be 200a7f0 <_RBTree_Insert_unprotected+0x1fc>
200a660: 01 00 00 00 nop
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
200a664: b9 37 20 1f srl %i4, 0x1f, %i4
if (!iter_node->child[dir]) {
200a668: 83 2f 20 02 sll %i4, 2, %g1
200a66c: 82 06 00 01 add %i0, %g1, %g1
200a670: f0 00 60 04 ld [ %g1 + 4 ], %i0
200a674: 80 a6 20 00 cmp %i0, 0
200a678: 32 bf ff f0 bne,a 200a638 <_RBTree_Insert_unprotected+0x44>
200a67c: b6 10 00 18 mov %i0, %i3
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
200a680: c0 26 60 08 clr [ %i1 + 8 ]
200a684: c0 26 60 04 clr [ %i1 + 4 ]
the_node->color = RBT_RED;
200a688: 84 10 20 01 mov 1, %g2
iter_node->child[dir] = the_node;
200a68c: f2 20 60 04 st %i1, [ %g1 + 4 ]
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
200a690: c4 26 60 0c st %g2, [ %i1 + 0xc ]
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
200a694: f6 26 40 00 st %i3, [ %i1 ]
/* update min/max */
compare_result = the_rbtree->compare_function(
200a698: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200a69c: b6 07 20 02 add %i4, 2, %i3
200a6a0: 85 2e e0 02 sll %i3, 2, %g2
200a6a4: d2 07 40 02 ld [ %i5 + %g2 ], %o1
200a6a8: 9f c0 40 00 call %g1
200a6ac: 90 10 00 19 mov %i1, %o0
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
200a6b0: 80 a7 20 00 cmp %i4, 0
200a6b4: 12 80 00 06 bne 200a6cc <_RBTree_Insert_unprotected+0xd8>
200a6b8: 80 a2 20 00 cmp %o0, 0
200a6bc: 36 80 00 3c bge,a 200a7ac <_RBTree_Insert_unprotected+0x1b8>
200a6c0: d0 06 40 00 ld [ %i1 ], %o0
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
200a6c4: 10 80 00 04 b 200a6d4 <_RBTree_Insert_unprotected+0xe0>
200a6c8: b7 2e e0 02 sll %i3, 2, %i3
compare_result = the_rbtree->compare_function(
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
(dir && _RBTree_Is_greater(compare_result)) ) {
200a6cc: 04 80 00 37 ble 200a7a8 <_RBTree_Insert_unprotected+0x1b4>
200a6d0: b7 2e e0 02 sll %i3, 2, %i3
the_rbtree->first[dir] = the_node;
200a6d4: 10 80 00 35 b 200a7a8 <_RBTree_Insert_unprotected+0x1b4>
200a6d8: f2 27 40 1b st %i1, [ %i5 + %i3 ]
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
200a6dc: 02 80 00 13 be 200a728 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN
200a6e0: 82 10 20 00 clr %g1
if(!(the_node->parent->parent->parent)) return NULL;
200a6e4: c2 07 40 00 ld [ %i5 ], %g1
200a6e8: 80 a0 60 00 cmp %g1, 0
200a6ec: 02 80 00 0f be 200a728 <_RBTree_Insert_unprotected+0x134> <== NEVER TAKEN
200a6f0: 82 10 20 00 clr %g1
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
200a6f4: c2 07 60 04 ld [ %i5 + 4 ], %g1
200a6f8: 80 a2 00 01 cmp %o0, %g1
200a6fc: 22 80 00 02 be,a 200a704 <_RBTree_Insert_unprotected+0x110>
200a700: c2 07 60 08 ld [ %i5 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a704: 80 a0 60 00 cmp %g1, 0
200a708: 02 80 00 09 be 200a72c <_RBTree_Insert_unprotected+0x138>
200a70c: 84 10 20 00 clr %g2
200a710: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200a714: 80 a0 a0 01 cmp %g2, 1
200a718: 32 80 00 05 bne,a 200a72c <_RBTree_Insert_unprotected+0x138>
200a71c: 84 10 20 00 clr %g2
200a720: 10 80 00 03 b 200a72c <_RBTree_Insert_unprotected+0x138>
200a724: 84 10 20 01 mov 1, %g2
200a728: 84 10 20 00 clr %g2 <== NOT EXECUTED
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
200a72c: 80 a0 a0 00 cmp %g2, 0
200a730: 22 80 00 08 be,a 200a750 <_RBTree_Insert_unprotected+0x15c>
200a734: c2 07 60 04 ld [ %i5 + 4 ], %g1
the_node->parent->color = RBT_BLACK;
200a738: c0 22 20 0c clr [ %o0 + 0xc ]
u->color = RBT_BLACK;
200a73c: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
200a740: b2 10 00 1d mov %i5, %i1
200a744: 82 10 20 01 mov 1, %g1
200a748: 10 80 00 18 b 200a7a8 <_RBTree_Insert_unprotected+0x1b4>
200a74c: c2 27 60 0c st %g1, [ %i5 + 0xc ]
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
200a750: 82 1a 00 01 xor %o0, %g1, %g1
200a754: 80 a0 00 01 cmp %g0, %g1
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200a758: c2 02 20 04 ld [ %o0 + 4 ], %g1
RBTree_Direction pdir = the_node->parent != g->child[0];
200a75c: b8 40 20 00 addx %g0, 0, %i4
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
200a760: 82 1e 40 01 xor %i1, %g1, %g1
200a764: 80 a0 00 01 cmp %g0, %g1
200a768: 82 40 20 00 addx %g0, 0, %g1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
200a76c: 80 a0 40 1c cmp %g1, %i4
200a770: 22 80 00 08 be,a 200a790 <_RBTree_Insert_unprotected+0x19c>
200a774: c2 06 40 00 ld [ %i1 ], %g1
_RBTree_Rotate(the_node->parent, pdir);
200a778: 7f ff ff 80 call 200a578 <_RBTree_Rotate>
200a77c: 92 10 00 1c mov %i4, %o1
the_node = the_node->child[pdir];
200a780: 83 2f 20 02 sll %i4, 2, %g1
200a784: b2 06 40 01 add %i1, %g1, %i1
200a788: f2 06 60 04 ld [ %i1 + 4 ], %i1
}
the_node->parent->color = RBT_BLACK;
200a78c: c2 06 40 00 ld [ %i1 ], %g1
g->color = RBT_RED;
200a790: 92 10 20 01 mov 1, %o1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
200a794: c0 20 60 0c clr [ %g1 + 0xc ]
g->color = RBT_RED;
200a798: d2 27 60 0c st %o1, [ %i5 + 0xc ]
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
200a79c: 90 10 00 1d mov %i5, %o0
200a7a0: 7f ff ff 76 call 200a578 <_RBTree_Rotate>
200a7a4: 92 22 40 1c sub %o1, %i4, %o1
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
200a7a8: d0 06 40 00 ld [ %i1 ], %o0
200a7ac: fa 02 00 00 ld [ %o0 ], %i5
200a7b0: 80 a7 60 00 cmp %i5, 0
200a7b4: 22 80 00 06 be,a 200a7cc <_RBTree_Insert_unprotected+0x1d8>
200a7b8: 82 10 20 00 clr %g1
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
200a7bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1
200a7c0: 82 18 60 01 xor %g1, 1, %g1
200a7c4: 80 a0 00 01 cmp %g0, %g1
200a7c8: 82 60 3f ff subx %g0, -1, %g1
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
200a7cc: 80 a0 60 00 cmp %g1, 0
200a7d0: 12 bf ff c3 bne 200a6dc <_RBTree_Insert_unprotected+0xe8>
200a7d4: 80 a7 60 00 cmp %i5, 0
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
200a7d8: 12 80 00 06 bne 200a7f0 <_RBTree_Insert_unprotected+0x1fc>
200a7dc: 01 00 00 00 nop
200a7e0: c0 26 60 0c clr [ %i1 + 0xc ]
200a7e4: 81 c7 e0 08 ret
200a7e8: 81 e8 00 00 restore
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
200a7ec: b0 10 3f ff mov -1, %i0
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
200a7f0: 81 c7 e0 08 ret
200a7f4: 81 e8 00 00 restore
0200a828 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
200a828: 9d e3 bf a0 save %sp, -96, %sp
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
200a82c: b8 10 20 00 clr %i4
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a830: 80 a0 00 19 cmp %g0, %i1
200a834: 82 60 3f ff subx %g0, -1, %g1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
200a838: 82 00 60 02 add %g1, 2, %g1
200a83c: 83 28 60 02 sll %g1, 2, %g1
while ( !stop && current != NULL ) {
200a840: 10 80 00 0a b 200a868 <_RBTree_Iterate_unprotected+0x40>
200a844: fa 06 00 01 ld [ %i0 + %g1 ], %i5
stop = (*visitor)( current, dir, visitor_arg );
200a848: 92 10 00 19 mov %i1, %o1
200a84c: 9f c6 80 00 call %i2
200a850: 94 10 00 1b mov %i3, %o2
current = _RBTree_Next_unprotected( current, dir );
200a854: 92 10 00 19 mov %i1, %o1
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
200a858: b8 10 00 08 mov %o0, %i4
current = _RBTree_Next_unprotected( current, dir );
200a85c: 40 00 00 0b call 200a888 <_RBTree_Next_unprotected>
200a860: 90 10 00 1d mov %i5, %o0
200a864: ba 10 00 08 mov %o0, %i5
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
200a868: 80 a7 60 00 cmp %i5, 0
200a86c: 02 80 00 05 be 200a880 <_RBTree_Iterate_unprotected+0x58>
200a870: b8 1f 20 01 xor %i4, 1, %i4
200a874: 80 8f 20 ff btst 0xff, %i4
200a878: 12 bf ff f4 bne 200a848 <_RBTree_Iterate_unprotected+0x20><== ALWAYS TAKEN
200a87c: 90 10 00 1d mov %i5, %o0
200a880: 81 c7 e0 08 ret
200a884: 81 e8 00 00 restore
0200a190 <_RBTree_Rotate>:
RBTree_Node *the_node,
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
200a190: 80 a2 20 00 cmp %o0, 0
200a194: 02 80 00 1c be 200a204 <_RBTree_Rotate+0x74> <== NEVER TAKEN
200a198: 80 a0 00 09 cmp %g0, %o1
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
200a19c: 86 60 3f ff subx %g0, -1, %g3
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[_RBTree_Opposite_direction(dir)] == NULL) return;
200a1a0: 87 28 e0 02 sll %g3, 2, %g3
200a1a4: 86 02 00 03 add %o0, %g3, %g3
200a1a8: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200a1ac: 80 a0 60 00 cmp %g1, 0
200a1b0: 02 80 00 15 be 200a204 <_RBTree_Rotate+0x74> <== NEVER TAKEN
200a1b4: 93 2a 60 02 sll %o1, 2, %o1
c = the_node->child[_RBTree_Opposite_direction(dir)];
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
200a1b8: 84 00 40 09 add %g1, %o1, %g2
200a1bc: c8 00 a0 04 ld [ %g2 + 4 ], %g4
200a1c0: c8 20 e0 04 st %g4, [ %g3 + 4 ]
if (c->child[dir])
200a1c4: c4 00 a0 04 ld [ %g2 + 4 ], %g2
200a1c8: 80 a0 a0 00 cmp %g2, 0
200a1cc: 32 80 00 02 bne,a 200a1d4 <_RBTree_Rotate+0x44>
200a1d0: d0 20 80 00 st %o0, [ %g2 ]
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a1d4: c4 02 00 00 ld [ %o0 ], %g2
the_node->child[_RBTree_Opposite_direction(dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
200a1d8: 92 00 40 09 add %g1, %o1, %o1
200a1dc: d0 22 60 04 st %o0, [ %o1 + 4 ]
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a1e0: c6 00 a0 04 ld [ %g2 + 4 ], %g3
c->parent = the_node->parent;
200a1e4: c4 20 40 00 st %g2, [ %g1 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a1e8: 86 1a 00 03 xor %o0, %g3, %g3
c->parent = the_node->parent;
the_node->parent = c;
200a1ec: c2 22 00 00 st %g1, [ %o0 ]
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
200a1f0: 80 a0 00 03 cmp %g0, %g3
200a1f4: 86 40 20 00 addx %g0, 0, %g3
200a1f8: 87 28 e0 02 sll %g3, 2, %g3
200a1fc: 86 00 80 03 add %g2, %g3, %g3
200a200: c2 20 e0 04 st %g1, [ %g3 + 4 ]
200a204: 81 c3 e0 08 retl
0200a140 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
200a140: 80 a2 20 00 cmp %o0, 0
200a144: 02 80 00 10 be 200a184 <_RBTree_Sibling+0x44> <== NEVER TAKEN
200a148: 82 10 20 00 clr %g1
if(!(the_node->parent)) return NULL;
200a14c: c4 02 00 00 ld [ %o0 ], %g2
200a150: 80 a0 a0 00 cmp %g2, 0
200a154: 22 80 00 0d be,a 200a188 <_RBTree_Sibling+0x48> <== NEVER TAKEN
200a158: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
if(!(the_node->parent->parent)) return NULL;
200a15c: c2 00 80 00 ld [ %g2 ], %g1
200a160: 80 a0 60 00 cmp %g1, 0
200a164: 02 80 00 08 be 200a184 <_RBTree_Sibling+0x44>
200a168: 82 10 20 00 clr %g1
if(the_node == the_node->parent->child[RBT_LEFT])
200a16c: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200a170: 80 a2 00 01 cmp %o0, %g1
200a174: 22 80 00 04 be,a 200a184 <_RBTree_Sibling+0x44>
200a178: c2 00 a0 08 ld [ %g2 + 8 ], %g1
return the_node->parent->child[RBT_RIGHT];
200a17c: 81 c3 e0 08 retl
200a180: 90 10 00 01 mov %g1, %o0
else
return the_node->parent->child[RBT_LEFT];
}
200a184: 90 10 00 01 mov %g1, %o0
200a188: 81 c3 e0 08 retl
02032cb4 <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
2032cb4: 9d e3 bf 98 save %sp, -104, %sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
2032cb8: f6 06 20 40 ld [ %i0 + 0x40 ], %i3
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2032cbc: 7f ff 72 0c call 200f4ec <_TOD_Get_uptime>
2032cc0: 90 07 bf f8 add %fp, -8, %o0
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2032cc4: c4 1e 20 50 ldd [ %i0 + 0x50 ], %g2
_Timestamp_Subtract(
2032cc8: d8 1f bf f8 ldd [ %fp + -8 ], %o4
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
2032ccc: 82 10 20 01 mov 1, %g1
2032cd0: 86 a3 40 03 subcc %o5, %g3, %g3
2032cd4: 84 63 00 02 subx %o4, %g2, %g2
2032cd8: c4 3e 40 00 std %g2, [ %i1 ]
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
2032cdc: 05 00 81 89 sethi %hi(0x2062400), %g2
2032ce0: 84 10 a0 90 or %g2, 0x90, %g2 ! 2062490 <_Per_CPU_Information>
2032ce4: c6 00 a0 0c ld [ %g2 + 0xc ], %g3
2032ce8: 80 a6 c0 03 cmp %i3, %g3
2032cec: 12 80 00 15 bne 2032d40 <_Rate_monotonic_Get_status+0x8c>
2032cf0: f8 1e e0 80 ldd [ %i3 + 0x80 ], %i4
2032cf4: c4 18 a0 20 ldd [ %g2 + 0x20 ], %g2
2032cf8: 9a a3 40 03 subcc %o5, %g3, %o5
2032cfc: 98 63 00 02 subx %o4, %g2, %o4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2032d00: c4 1e 20 48 ldd [ %i0 + 0x48 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2032d04: ba 87 40 0d addcc %i5, %o5, %i5
2032d08: b8 47 00 0c addx %i4, %o4, %i4
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
2032d0c: 80 a0 80 1c cmp %g2, %i4
2032d10: 34 80 00 0c bg,a 2032d40 <_Rate_monotonic_Get_status+0x8c><== NEVER TAKEN
2032d14: 82 10 20 00 clr %g1 <== NOT EXECUTED
2032d18: 32 80 00 06 bne,a 2032d30 <_Rate_monotonic_Get_status+0x7c>
2032d1c: 86 a7 40 03 subcc %i5, %g3, %g3
2032d20: 80 a0 c0 1d cmp %g3, %i5
2032d24: 18 80 00 06 bgu 2032d3c <_Rate_monotonic_Get_status+0x88>
2032d28: 86 a7 40 03 subcc %i5, %g3, %g3
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
2032d2c: 82 10 20 01 mov 1, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
2032d30: 84 67 00 02 subx %i4, %g2, %g2
2032d34: 10 80 00 03 b 2032d40 <_Rate_monotonic_Get_status+0x8c>
2032d38: c4 3e 80 00 std %g2, [ %i2 ]
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
return false;
2032d3c: 82 10 20 00 clr %g1
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
2032d40: b0 08 60 01 and %g1, 1, %i0
2032d44: 81 c7 e0 08 ret
2032d48: 81 e8 00 00 restore
020330ac <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
20330ac: 9d e3 bf 98 save %sp, -104, %sp
20330b0: 11 00 81 8a sethi %hi(0x2062800), %o0
20330b4: 92 10 00 18 mov %i0, %o1
20330b8: 90 12 22 50 or %o0, 0x250, %o0
20330bc: 7f ff 57 b9 call 2008fa0 <_Objects_Get>
20330c0: 94 07 bf fc add %fp, -4, %o2
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
20330c4: c2 07 bf fc ld [ %fp + -4 ], %g1
20330c8: 80 a0 60 00 cmp %g1, 0
20330cc: 12 80 00 25 bne 2033160 <_Rate_monotonic_Timeout+0xb4> <== NEVER TAKEN
20330d0: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
the_thread = the_period->owner;
20330d4: d0 02 20 40 ld [ %o0 + 0x40 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
20330d8: 03 00 00 10 sethi %hi(0x4000), %g1
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
20330dc: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
20330e0: 80 88 80 01 btst %g2, %g1
20330e4: 22 80 00 0b be,a 2033110 <_Rate_monotonic_Timeout+0x64>
20330e8: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
20330ec: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
20330f0: c2 07 60 08 ld [ %i5 + 8 ], %g1
20330f4: 80 a0 80 01 cmp %g2, %g1
20330f8: 32 80 00 06 bne,a 2033110 <_Rate_monotonic_Timeout+0x64>
20330fc: c2 07 60 38 ld [ %i5 + 0x38 ], %g1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2033100: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2033104: 7f ff 5a 73 call 2009ad0 <_Thread_Clear_state>
2033108: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
203310c: 30 80 00 06 b,a 2033124 <_Rate_monotonic_Timeout+0x78>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
2033110: 80 a0 60 01 cmp %g1, 1
2033114: 12 80 00 0d bne 2033148 <_Rate_monotonic_Timeout+0x9c>
2033118: 82 10 20 04 mov 4, %g1
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
203311c: 82 10 20 03 mov 3, %g1
2033120: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
_Rate_monotonic_Initiate_statistics( the_period );
2033124: 7f ff ff 53 call 2032e70 <_Rate_monotonic_Initiate_statistics>
2033128: 90 10 00 1d mov %i5, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
203312c: c2 07 60 3c ld [ %i5 + 0x3c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2033130: 11 00 81 88 sethi %hi(0x2062000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2033134: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2033138: 90 12 20 08 or %o0, 8, %o0
203313c: 7f ff 5e 90 call 200ab7c <_Watchdog_Insert>
2033140: 92 07 60 10 add %i5, 0x10, %o1
2033144: 30 80 00 02 b,a 203314c <_Rate_monotonic_Timeout+0xa0>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2033148: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
203314c: 03 00 81 87 sethi %hi(0x2061c00), %g1
2033150: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 2061f60 <_Thread_Dispatch_disable_level>
2033154: 84 00 bf ff add %g2, -1, %g2
2033158: c4 20 63 60 st %g2, [ %g1 + 0x360 ]
return _Thread_Dispatch_disable_level;
203315c: c2 00 63 60 ld [ %g1 + 0x360 ], %g1
2033160: 81 c7 e0 08 ret
2033164: 81 e8 00 00 restore
02032d4c <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
2032d4c: 9d e3 bf 90 save %sp, -112, %sp
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
2032d50: c2 06 20 58 ld [ %i0 + 0x58 ], %g1
2032d54: 82 00 60 01 inc %g1
2032d58: c2 26 20 58 st %g1, [ %i0 + 0x58 ]
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
2032d5c: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
2032d60: 80 a0 60 04 cmp %g1, 4
2032d64: 12 80 00 05 bne 2032d78 <_Rate_monotonic_Update_statistics+0x2c>
2032d68: 90 10 00 18 mov %i0, %o0
stats->missed_count++;
2032d6c: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
2032d70: 82 00 60 01 inc %g1
2032d74: c2 26 20 5c st %g1, [ %i0 + 0x5c ]
/*
* Grab status for time statistics.
*/
valid_status =
2032d78: 92 07 bf f8 add %fp, -8, %o1
2032d7c: 7f ff ff ce call 2032cb4 <_Rate_monotonic_Get_status>
2032d80: 94 07 bf f0 add %fp, -16, %o2
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
2032d84: 80 8a 20 ff btst 0xff, %o0
2032d88: 02 80 00 38 be 2032e68 <_Rate_monotonic_Update_statistics+0x11c>
2032d8c: c4 1f bf f0 ldd [ %fp + -16 ], %g2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
2032d90: f8 1e 20 70 ldd [ %i0 + 0x70 ], %i4
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
2032d94: c2 06 20 60 ld [ %i0 + 0x60 ], %g1
2032d98: ba 87 40 03 addcc %i5, %g3, %i5
2032d9c: b8 47 00 02 addx %i4, %g2, %i4
2032da0: 80 a0 40 02 cmp %g1, %g2
2032da4: 14 80 00 09 bg 2032dc8 <_Rate_monotonic_Update_statistics+0x7c>
2032da8: f8 3e 20 70 std %i4, [ %i0 + 0x70 ]
2032dac: 80 a0 40 02 cmp %g1, %g2
2032db0: 32 80 00 08 bne,a 2032dd0 <_Rate_monotonic_Update_statistics+0x84><== NEVER TAKEN
2032db4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1 <== NOT EXECUTED
2032db8: c2 06 20 64 ld [ %i0 + 0x64 ], %g1
2032dbc: 80 a0 40 03 cmp %g1, %g3
2032dc0: 28 80 00 04 bleu,a 2032dd0 <_Rate_monotonic_Update_statistics+0x84>
2032dc4: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
stats->min_cpu_time = executed;
2032dc8: c4 3e 20 60 std %g2, [ %i0 + 0x60 ]
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
2032dcc: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
2032dd0: 80 a0 40 02 cmp %g1, %g2
2032dd4: 26 80 00 0a bl,a 2032dfc <_Rate_monotonic_Update_statistics+0xb0><== NEVER TAKEN
2032dd8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ] <== NOT EXECUTED
2032ddc: 80 a0 40 02 cmp %g1, %g2
2032de0: 32 80 00 08 bne,a 2032e00 <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
2032de4: c4 1f bf f8 ldd [ %fp + -8 ], %g2 <== NOT EXECUTED
2032de8: c2 06 20 6c ld [ %i0 + 0x6c ], %g1
2032dec: 80 a0 40 03 cmp %g1, %g3
2032df0: 3a 80 00 04 bcc,a 2032e00 <_Rate_monotonic_Update_statistics+0xb4>
2032df4: c4 1f bf f8 ldd [ %fp + -8 ], %g2
stats->max_cpu_time = executed;
2032df8: c4 3e 20 68 std %g2, [ %i0 + 0x68 ]
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
2032dfc: c4 1f bf f8 ldd [ %fp + -8 ], %g2
2032e00: f8 1e 20 88 ldd [ %i0 + 0x88 ], %i4
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
2032e04: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2032e08: ba 87 40 03 addcc %i5, %g3, %i5
2032e0c: b8 47 00 02 addx %i4, %g2, %i4
2032e10: 80 a0 40 02 cmp %g1, %g2
2032e14: 14 80 00 09 bg 2032e38 <_Rate_monotonic_Update_statistics+0xec>
2032e18: f8 3e 20 88 std %i4, [ %i0 + 0x88 ]
2032e1c: 80 a0 40 02 cmp %g1, %g2
2032e20: 32 80 00 08 bne,a 2032e40 <_Rate_monotonic_Update_statistics+0xf4><== NEVER TAKEN
2032e24: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2032e28: c2 06 20 7c ld [ %i0 + 0x7c ], %g1
2032e2c: 80 a0 40 03 cmp %g1, %g3
2032e30: 28 80 00 04 bleu,a 2032e40 <_Rate_monotonic_Update_statistics+0xf4>
2032e34: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
stats->min_wall_time = since_last_period;
2032e38: c4 3e 20 78 std %g2, [ %i0 + 0x78 ]
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
2032e3c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1
2032e40: 80 a0 40 02 cmp %g1, %g2
2032e44: 26 80 00 09 bl,a 2032e68 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
2032e48: c4 3e 20 80 std %g2, [ %i0 + 0x80 ] <== NOT EXECUTED
2032e4c: 80 a0 40 02 cmp %g1, %g2
2032e50: 12 80 00 06 bne 2032e68 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
2032e54: 01 00 00 00 nop
2032e58: c2 06 20 84 ld [ %i0 + 0x84 ], %g1
2032e5c: 80 a0 40 03 cmp %g1, %g3
2032e60: 2a 80 00 02 bcs,a 2032e68 <_Rate_monotonic_Update_statistics+0x11c>
2032e64: c4 3e 20 80 std %g2, [ %i0 + 0x80 ]
2032e68: 81 c7 e0 08 ret
2032e6c: 81 e8 00 00 restore
0200b50c <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
200b50c: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200b510: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200b514: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200b518: 80 a0 40 09 cmp %g1, %o1
200b51c: 32 80 00 02 bne,a 200b524 <_Scheduler_CBS_Budget_callout+0x18><== ALWAYS TAKEN
200b520: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200b524: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200b528: 80 a0 40 09 cmp %g1, %o1
200b52c: 02 80 00 04 be 200b53c <_Scheduler_CBS_Budget_callout+0x30><== NEVER TAKEN
200b530: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200b534: 40 00 01 8e call 200bb6c <_Thread_Change_priority>
200b538: 94 10 20 01 mov 1, %o2
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
200b53c: fa 06 20 88 ld [ %i0 + 0x88 ], %i5
if ( sched_info->cbs_server->cbs_budget_overrun ) {
200b540: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b544: c4 00 60 0c ld [ %g1 + 0xc ], %g2
200b548: 80 a0 a0 00 cmp %g2, 0
200b54c: 02 80 00 09 be 200b570 <_Scheduler_CBS_Budget_callout+0x64><== NEVER TAKEN
200b550: 01 00 00 00 nop
_Scheduler_CBS_Get_server_id(
200b554: d0 00 40 00 ld [ %g1 ], %o0
200b558: 7f ff ff d7 call 200b4b4 <_Scheduler_CBS_Get_server_id>
200b55c: 92 07 bf fc add %fp, -4, %o1
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
200b560: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
200b564: c2 00 60 0c ld [ %g1 + 0xc ], %g1
200b568: 9f c0 40 00 call %g1
200b56c: d0 07 bf fc ld [ %fp + -4 ], %o0
200b570: 81 c7 e0 08 ret
200b574: 81 e8 00 00 restore
0200b114 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
200b114: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
200b118: c2 06 20 04 ld [ %i0 + 4 ], %g1
200b11c: 80 a0 60 00 cmp %g1, 0
200b120: 04 80 00 1d ble 200b194 <_Scheduler_CBS_Create_server+0x80>
200b124: 01 00 00 00 nop
200b128: c2 06 00 00 ld [ %i0 ], %g1
200b12c: 80 a0 60 00 cmp %g1, 0
200b130: 04 80 00 19 ble 200b194 <_Scheduler_CBS_Create_server+0x80>
200b134: 03 00 80 81 sethi %hi(0x2020400), %g1
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b138: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 20204bc <_Scheduler_CBS_Maximum_servers>
if ( !_Scheduler_CBS_Server_list[i] )
200b13c: 03 00 80 85 sethi %hi(0x2021400), %g1
200b140: c6 00 63 88 ld [ %g1 + 0x388 ], %g3 ! 2021788 <_Scheduler_CBS_Server_list>
200b144: 10 80 00 07 b 200b160 <_Scheduler_CBS_Create_server+0x4c>
200b148: 82 10 20 00 clr %g1
200b14c: c8 00 c0 1c ld [ %g3 + %i4 ], %g4
200b150: 80 a1 20 00 cmp %g4, 0
200b154: 02 80 00 14 be 200b1a4 <_Scheduler_CBS_Create_server+0x90>
200b158: 3b 00 80 85 sethi %hi(0x2021400), %i5
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
200b15c: 82 00 60 01 inc %g1
200b160: 80 a0 40 02 cmp %g1, %g2
200b164: 12 bf ff fa bne 200b14c <_Scheduler_CBS_Create_server+0x38>
200b168: b9 28 60 02 sll %g1, 2, %i4
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
200b16c: 81 c7 e0 08 ret
200b170: 91 e8 3f e6 restore %g0, -26, %o0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b174: c4 20 60 04 st %g2, [ %g1 + 4 ]
200b178: c4 06 20 04 ld [ %i0 + 4 ], %g2
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
200b17c: f2 20 60 0c st %i1, [ %g1 + 0xc ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
200b180: c4 20 60 08 st %g2, [ %g1 + 8 ]
the_server->task_id = -1;
200b184: 84 10 3f ff mov -1, %g2
200b188: c4 20 40 00 st %g2, [ %g1 ]
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
200b18c: 81 c7 e0 08 ret
200b190: 91 e8 20 00 restore %g0, 0, %o0
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
200b194: 81 c7 e0 08 ret
200b198: 91 e8 3f ee restore %g0, -18, %o0
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
200b19c: 81 c7 e0 08 ret <== NOT EXECUTED
200b1a0: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200b1a4: f6 07 63 88 ld [ %i5 + 0x388 ], %i3
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
200b1a8: c2 26 80 00 st %g1, [ %i2 ]
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
200b1ac: 40 00 07 a9 call 200d050 <_Workspace_Allocate>
200b1b0: 90 10 20 10 mov 0x10, %o0
the_server = _Scheduler_CBS_Server_list[*server_id];
200b1b4: c2 06 80 00 ld [ %i2 ], %g1
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
200b1b8: d0 26 c0 1c st %o0, [ %i3 + %i4 ]
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
200b1bc: c4 07 63 88 ld [ %i5 + 0x388 ], %g2
200b1c0: 83 28 60 02 sll %g1, 2, %g1
200b1c4: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( !the_server )
200b1c8: 80 a0 60 00 cmp %g1, 0
200b1cc: 32 bf ff ea bne,a 200b174 <_Scheduler_CBS_Create_server+0x60><== ALWAYS TAKEN
200b1d0: c4 06 00 00 ld [ %i0 ], %g2
200b1d4: 30 bf ff f2 b,a 200b19c <_Scheduler_CBS_Create_server+0x88><== NOT EXECUTED
0200b24c <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
200b24c: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
200b250: 90 10 00 19 mov %i1, %o0
200b254: 40 00 03 78 call 200c034 <_Thread_Get>
200b258: 92 07 bf fc add %fp, -4, %o1
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
200b25c: ba 92 20 00 orcc %o0, 0, %i5
200b260: 02 80 00 05 be 200b274 <_Scheduler_CBS_Detach_thread+0x28>
200b264: 03 00 80 81 sethi %hi(0x2020400), %g1
_Thread_Enable_dispatch();
200b268: 40 00 03 66 call 200c000 <_Thread_Enable_dispatch>
200b26c: 01 00 00 00 nop
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
200b270: 03 00 80 81 sethi %hi(0x2020400), %g1
200b274: c2 00 60 bc ld [ %g1 + 0xbc ], %g1 ! 20204bc <_Scheduler_CBS_Maximum_servers>
200b278: 80 a6 00 01 cmp %i0, %g1
200b27c: 1a 80 00 1b bcc 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c>
200b280: 80 a7 60 00 cmp %i5, 0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
200b284: 02 80 00 19 be 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c>
200b288: 03 00 80 85 sethi %hi(0x2021400), %g1
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
200b28c: c2 00 63 88 ld [ %g1 + 0x388 ], %g1 ! 2021788 <_Scheduler_CBS_Server_list>
200b290: b1 2e 20 02 sll %i0, 2, %i0
200b294: c2 00 40 18 ld [ %g1 + %i0 ], %g1
200b298: 80 a0 60 00 cmp %g1, 0
200b29c: 02 80 00 11 be 200b2e0 <_Scheduler_CBS_Detach_thread+0x94>
200b2a0: 01 00 00 00 nop
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
200b2a4: c4 00 40 00 ld [ %g1 ], %g2
200b2a8: 80 a0 80 19 cmp %g2, %i1
200b2ac: 12 80 00 0f bne 200b2e8 <_Scheduler_CBS_Detach_thread+0x9c><== NEVER TAKEN
200b2b0: 84 10 3f ff mov -1, %g2
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
200b2b4: c4 20 40 00 st %g2, [ %g1 ]
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
200b2b8: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
200b2bc: c0 20 60 18 clr [ %g1 + 0x18 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200b2c0: c2 07 60 a0 ld [ %i5 + 0xa0 ], %g1
200b2c4: c2 27 60 78 st %g1, [ %i5 + 0x78 ]
the_thread->budget_callout = the_thread->Start.budget_callout;
200b2c8: c2 07 60 a4 ld [ %i5 + 0xa4 ], %g1
200b2cc: c2 27 60 7c st %g1, [ %i5 + 0x7c ]
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200b2d0: c2 0f 60 9c ldub [ %i5 + 0x9c ], %g1
200b2d4: c2 2f 60 70 stb %g1, [ %i5 + 0x70 ]
return SCHEDULER_CBS_OK;
200b2d8: 81 c7 e0 08 ret
200b2dc: 91 e8 20 00 restore %g0, 0, %o0
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
200b2e0: 81 c7 e0 08 ret
200b2e4: 91 e8 3f e7 restore %g0, -25, %o0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
200b2e8: 81 c7 e0 08 ret
200b2ec: 91 e8 3f ee restore %g0, -18, %o0
0200b578 <_Scheduler_CBS_Initialize>:
}
}
int _Scheduler_CBS_Initialize(void)
{
200b578: 9d e3 bf a0 save %sp, -96, %sp
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
200b57c: 3b 00 80 81 sethi %hi(0x2020400), %i5
200b580: d0 07 60 bc ld [ %i5 + 0xbc ], %o0 ! 20204bc <_Scheduler_CBS_Maximum_servers>
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
200b584: 40 00 06 b3 call 200d050 <_Workspace_Allocate>
200b588: 91 2a 20 02 sll %o0, 2, %o0
200b58c: 05 00 80 85 sethi %hi(0x2021400), %g2
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
200b590: 80 a2 20 00 cmp %o0, 0
200b594: 02 80 00 0d be 200b5c8 <_Scheduler_CBS_Initialize+0x50> <== NEVER TAKEN
200b598: d0 20 a3 88 st %o0, [ %g2 + 0x388 ]
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b59c: c6 07 60 bc ld [ %i5 + 0xbc ], %g3
200b5a0: 10 80 00 05 b 200b5b4 <_Scheduler_CBS_Initialize+0x3c>
200b5a4: 82 10 20 00 clr %g1
_Scheduler_CBS_Server_list[i] = NULL;
200b5a8: 89 28 60 02 sll %g1, 2, %g4
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b5ac: 82 00 60 01 inc %g1
_Scheduler_CBS_Server_list[i] = NULL;
200b5b0: c0 27 40 04 clr [ %i5 + %g4 ]
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
200b5b4: 80 a0 40 03 cmp %g1, %g3
200b5b8: 12 bf ff fc bne 200b5a8 <_Scheduler_CBS_Initialize+0x30>
200b5bc: fa 00 a3 88 ld [ %g2 + 0x388 ], %i5
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
200b5c0: 81 c7 e0 08 ret
200b5c4: 91 e8 20 00 restore %g0, 0, %o0
}
200b5c8: 81 c7 e0 08 ret <== NOT EXECUTED
200b5cc: 91 e8 3f ef restore %g0, -17, %o0 <== NOT EXECUTED
0200a1c0 <_Scheduler_CBS_Release_job>:
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
200a1c0: c2 02 20 88 ld [ %o0 + 0x88 ], %g1
if (deadline) {
200a1c4: 80 a2 60 00 cmp %o1, 0
200a1c8: 02 80 00 10 be 200a208 <_Scheduler_CBS_Release_job+0x48>
200a1cc: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
/* Initializing or shifting deadline. */
if (serv_info)
200a1d0: 80 a0 60 00 cmp %g1, 0
200a1d4: 02 80 00 08 be 200a1f4 <_Scheduler_CBS_Release_job+0x34>
200a1d8: 05 00 80 7d sethi %hi(0x201f400), %g2
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
200a1dc: d2 00 a3 e8 ld [ %g2 + 0x3e8 ], %o1 ! 201f7e8 <_Watchdog_Ticks_since_boot>
200a1e0: c4 00 60 04 ld [ %g1 + 4 ], %g2
200a1e4: 92 02 40 02 add %o1, %g2, %o1
200a1e8: 05 20 00 00 sethi %hi(0x80000000), %g2
200a1ec: 10 80 00 0a b 200a214 <_Scheduler_CBS_Release_job+0x54>
200a1f0: 92 2a 40 02 andn %o1, %g2, %o1
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
200a1f4: c2 00 a3 e8 ld [ %g2 + 0x3e8 ], %g1
200a1f8: 92 02 40 01 add %o1, %g1, %o1
200a1fc: 03 20 00 00 sethi %hi(0x80000000), %g1
200a200: 10 80 00 07 b 200a21c <_Scheduler_CBS_Release_job+0x5c>
200a204: 92 2a 40 01 andn %o1, %g1, %o1
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
}
/* Budget replenishment for the next job. */
if (serv_info)
200a208: 80 a0 60 00 cmp %g1, 0
200a20c: 02 80 00 04 be 200a21c <_Scheduler_CBS_Release_job+0x5c> <== NEVER TAKEN
200a210: d2 02 20 ac ld [ %o0 + 0xac ], %o1
the_thread->cpu_time_budget = serv_info->parameters.budget;
200a214: c2 00 60 08 ld [ %g1 + 8 ], %g1
200a218: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
the_thread->real_priority = new_priority;
200a21c: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
_Thread_Change_priority(the_thread, new_priority, true);
200a220: 94 10 20 01 mov 1, %o2
200a224: 82 13 c0 00 mov %o7, %g1
200a228: 40 00 01 31 call 200a6ec <_Thread_Change_priority>
200a22c: 9e 10 40 00 mov %g1, %o7
0200a230 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
200a230: 9d e3 bf a0 save %sp, -96, %sp
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
200a234: 40 00 00 57 call 200a390 <_Scheduler_EDF_Enqueue>
200a238: 90 10 00 18 mov %i0, %o0
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
200a23c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1
200a240: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
200a244: 80 a7 60 00 cmp %i5, 0
200a248: 02 80 00 18 be 200a2a8 <_Scheduler_CBS_Unblock+0x78>
200a24c: 03 00 80 7d sethi %hi(0x201f400), %g1
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a250: d2 07 60 04 ld [ %i5 + 4 ], %o1
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
200a254: d0 00 63 e8 ld [ %g1 + 0x3e8 ], %o0
200a258: f8 06 20 18 ld [ %i0 + 0x18 ], %i4
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
200a25c: 40 00 3f c1 call 201a160 <.umul>
200a260: 90 27 00 08 sub %i4, %o0, %o0
200a264: d2 06 20 74 ld [ %i0 + 0x74 ], %o1
200a268: b6 10 00 08 mov %o0, %i3
200a26c: 40 00 3f bd call 201a160 <.umul>
200a270: d0 07 60 08 ld [ %i5 + 8 ], %o0
200a274: 80 a6 c0 08 cmp %i3, %o0
200a278: 24 80 00 0d ble,a 200a2ac <_Scheduler_CBS_Unblock+0x7c>
200a27c: 3b 00 80 7f sethi %hi(0x201fc00), %i5
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
200a280: d2 06 20 ac ld [ %i0 + 0xac ], %o1
if ( the_thread->real_priority != new_priority )
200a284: 80 a7 00 09 cmp %i4, %o1
200a288: 32 80 00 02 bne,a 200a290 <_Scheduler_CBS_Unblock+0x60>
200a28c: d2 26 20 18 st %o1, [ %i0 + 0x18 ]
the_thread->real_priority = new_priority;
if ( the_thread->current_priority != new_priority )
200a290: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a294: 80 a0 40 09 cmp %g1, %o1
200a298: 02 80 00 04 be 200a2a8 <_Scheduler_CBS_Unblock+0x78>
200a29c: 90 10 00 18 mov %i0, %o0
_Thread_Change_priority(the_thread, new_priority, true);
200a2a0: 40 00 01 13 call 200a6ec <_Thread_Change_priority>
200a2a4: 94 10 20 01 mov 1, %o2
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
200a2a8: 3b 00 80 7f sethi %hi(0x201fc00), %i5
200a2ac: ba 17 60 20 or %i5, 0x20, %i5 ! 201fc20 <_Per_CPU_Information>
200a2b0: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
200a2b4: 03 00 80 7a sethi %hi(0x201e800), %g1
200a2b8: d0 06 20 14 ld [ %i0 + 0x14 ], %o0
200a2bc: c2 00 61 b0 ld [ %g1 + 0x1b0 ], %g1
200a2c0: 9f c0 40 00 call %g1
200a2c4: d2 00 a0 14 ld [ %g2 + 0x14 ], %o1
200a2c8: 80 a2 20 00 cmp %o0, 0
200a2cc: 04 80 00 0f ble 200a308 <_Scheduler_CBS_Unblock+0xd8>
200a2d0: 01 00 00 00 nop
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a2d4: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
200a2d8: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a2dc: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a2e0: 80 a0 60 00 cmp %g1, 0
200a2e4: 12 80 00 06 bne 200a2fc <_Scheduler_CBS_Unblock+0xcc>
200a2e8: 84 10 20 01 mov 1, %g2
200a2ec: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a2f0: 80 a0 60 00 cmp %g1, 0
200a2f4: 12 80 00 05 bne 200a308 <_Scheduler_CBS_Unblock+0xd8> <== ALWAYS TAKEN
200a2f8: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a2fc: 03 00 80 7f sethi %hi(0x201fc00), %g1
200a300: 82 10 60 20 or %g1, 0x20, %g1 ! 201fc20 <_Per_CPU_Information>
200a304: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
200a308: 81 c7 e0 08 ret
200a30c: 81 e8 00 00 restore
0200a310 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
200a310: 9d e3 bf a0 save %sp, -96, %sp
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
200a314: 40 00 06 57 call 200bc70 <_Workspace_Allocate>
200a318: 90 10 20 18 mov 0x18, %o0
if ( sched ) {
200a31c: 80 a2 20 00 cmp %o0, 0
200a320: 02 80 00 05 be 200a334 <_Scheduler_EDF_Allocate+0x24> <== NEVER TAKEN
200a324: 82 10 20 02 mov 2, %g1
the_thread->scheduler_info = sched;
200a328: d0 26 20 88 st %o0, [ %i0 + 0x88 ]
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
200a32c: f0 22 00 00 st %i0, [ %o0 ]
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
200a330: c2 22 20 14 st %g1, [ %o0 + 0x14 ]
}
return sched;
}
200a334: 81 c7 e0 08 ret
200a338: 91 e8 00 08 restore %g0, %o0, %o0
0200a388 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
200a388: 9d e3 bf a0 save %sp, -96, %sp
_Scheduler_EDF_Enqueue(the_thread);
200a38c: 7f ff ff ad call 200a240 <_Scheduler_EDF_Enqueue>
200a390: 90 10 00 18 mov %i0, %o0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
200a394: 3b 00 80 7e sethi %hi(0x201f800), %i5
200a398: ba 17 63 70 or %i5, 0x370, %i5 ! 201fb70 <_Per_CPU_Information>
200a39c: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
200a3a0: 03 00 80 7a sethi %hi(0x201e800), %g1
200a3a4: d0 00 a0 14 ld [ %g2 + 0x14 ], %o0
200a3a8: c2 00 61 00 ld [ %g1 + 0x100 ], %g1
200a3ac: 9f c0 40 00 call %g1
200a3b0: d2 06 20 14 ld [ %i0 + 0x14 ], %o1
200a3b4: 80 a2 20 00 cmp %o0, 0
200a3b8: 16 80 00 0f bge 200a3f4 <_Scheduler_EDF_Unblock+0x6c>
200a3bc: 01 00 00 00 nop
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a3c0: c2 07 60 0c ld [ %i5 + 0xc ], %g1
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
200a3c4: f0 27 60 10 st %i0, [ %i5 + 0x10 ]
if ( _Thread_Executing->is_preemptible ||
200a3c8: c2 08 60 70 ldub [ %g1 + 0x70 ], %g1
200a3cc: 80 a0 60 00 cmp %g1, 0
200a3d0: 12 80 00 06 bne 200a3e8 <_Scheduler_EDF_Unblock+0x60>
200a3d4: 84 10 20 01 mov 1, %g2
200a3d8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200a3dc: 80 a0 60 00 cmp %g1, 0
200a3e0: 12 80 00 05 bne 200a3f4 <_Scheduler_EDF_Unblock+0x6c> <== ALWAYS TAKEN
200a3e4: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
200a3e8: 03 00 80 7e sethi %hi(0x201f800), %g1
200a3ec: 82 10 63 70 or %g1, 0x370, %g1 ! 201fb70 <_Per_CPU_Information>
200a3f0: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
200a3f4: 81 c7 e0 08 ret
200a3f8: 81 e8 00 00 restore
02009a7c <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
2009a7c: 9d e3 bf a0 save %sp, -96, %sp
Thread_Control *executing;
executing = _Thread_Executing;
2009a80: 03 00 80 78 sethi %hi(0x201e000), %g1
2009a84: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 ! 201e02c <_Per_CPU_Information+0xc>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
2009a88: c2 0f 60 70 ldub [ %i5 + 0x70 ], %g1
2009a8c: 80 a0 60 00 cmp %g1, 0
2009a90: 02 80 00 25 be 2009b24 <_Scheduler_priority_Tick+0xa8>
2009a94: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
2009a98: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
2009a9c: 80 a0 60 00 cmp %g1, 0
2009aa0: 12 80 00 21 bne 2009b24 <_Scheduler_priority_Tick+0xa8>
2009aa4: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
2009aa8: c2 07 60 78 ld [ %i5 + 0x78 ], %g1
2009aac: 80 a0 60 01 cmp %g1, 1
2009ab0: 0a 80 00 14 bcs 2009b00 <_Scheduler_priority_Tick+0x84>
2009ab4: 80 a0 60 02 cmp %g1, 2
2009ab8: 28 80 00 07 bleu,a 2009ad4 <_Scheduler_priority_Tick+0x58>
2009abc: c2 07 60 74 ld [ %i5 + 0x74 ], %g1
2009ac0: 80 a0 60 03 cmp %g1, 3
2009ac4: 12 80 00 18 bne 2009b24 <_Scheduler_priority_Tick+0xa8> <== NEVER TAKEN
2009ac8: 01 00 00 00 nop
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2009acc: 10 80 00 0f b 2009b08 <_Scheduler_priority_Tick+0x8c>
2009ad0: c2 07 60 74 ld [ %i5 + 0x74 ], %g1
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
2009ad4: 82 00 7f ff add %g1, -1, %g1
2009ad8: 80 a0 60 00 cmp %g1, 0
2009adc: 14 80 00 09 bg 2009b00 <_Scheduler_priority_Tick+0x84>
2009ae0: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
2009ae4: 03 00 80 73 sethi %hi(0x201cc00), %g1
2009ae8: c2 00 61 fc ld [ %g1 + 0x1fc ], %g1 ! 201cdfc <_Scheduler+0xc>
2009aec: 9f c0 40 00 call %g1
2009af0: 01 00 00 00 nop
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
2009af4: 03 00 80 76 sethi %hi(0x201d800), %g1
2009af8: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 201da50 <_Thread_Ticks_per_timeslice>
2009afc: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
2009b00: 81 c7 e0 08 ret
2009b04: 81 e8 00 00 restore
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2009b08: 82 00 7f ff add %g1, -1, %g1
2009b0c: 80 a0 60 00 cmp %g1, 0
2009b10: 12 bf ff fc bne 2009b00 <_Scheduler_priority_Tick+0x84>
2009b14: c2 27 60 74 st %g1, [ %i5 + 0x74 ]
(*executing->budget_callout)( executing );
2009b18: c2 07 60 7c ld [ %i5 + 0x7c ], %g1
2009b1c: 9f c0 40 00 call %g1
2009b20: 90 10 00 1d mov %i5, %o0
2009b24: 81 c7 e0 08 ret
2009b28: 81 e8 00 00 restore
020086ac <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
20086ac: 9d e3 bf a0 save %sp, -96, %sp
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
20086b0: 03 00 80 7d sethi %hi(0x201f400), %g1
20086b4: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 ! 201f41c <Configuration+0x10>
20086b8: 11 00 03 d0 sethi %hi(0xf4000), %o0
20086bc: 40 00 48 90 call 201a8fc <.udiv>
20086c0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
20086c4: 80 a6 20 00 cmp %i0, 0
20086c8: 02 80 00 28 be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN
20086cc: 84 10 20 00 clr %g2
20086d0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20086d4: 80 a0 40 08 cmp %g1, %o0
20086d8: 3a 80 00 25 bcc,a 200876c <_TOD_Validate+0xc0>
20086dc: b0 08 a0 01 and %g2, 1, %i0
(the_tod->ticks >= ticks_per_second) ||
20086e0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
20086e4: 80 a0 60 3b cmp %g1, 0x3b
20086e8: 38 80 00 21 bgu,a 200876c <_TOD_Validate+0xc0>
20086ec: b0 08 a0 01 and %g2, 1, %i0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
20086f0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20086f4: 80 a0 60 3b cmp %g1, 0x3b
20086f8: 38 80 00 1d bgu,a 200876c <_TOD_Validate+0xc0>
20086fc: b0 08 a0 01 and %g2, 1, %i0
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
2008700: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2008704: 80 a0 60 17 cmp %g1, 0x17
2008708: 38 80 00 19 bgu,a 200876c <_TOD_Validate+0xc0>
200870c: b0 08 a0 01 and %g2, 1, %i0
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
2008710: c2 06 20 04 ld [ %i0 + 4 ], %g1
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
2008714: 80 a0 60 00 cmp %g1, 0
2008718: 02 80 00 14 be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN
200871c: 80 a0 60 0c cmp %g1, 0xc
(the_tod->month == 0) ||
2008720: 38 80 00 13 bgu,a 200876c <_TOD_Validate+0xc0>
2008724: b0 08 a0 01 and %g2, 1, %i0
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
2008728: c8 06 00 00 ld [ %i0 ], %g4
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
200872c: 80 a1 27 c3 cmp %g4, 0x7c3
2008730: 28 80 00 0f bleu,a 200876c <_TOD_Validate+0xc0>
2008734: b0 08 a0 01 and %g2, 1, %i0
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
2008738: c6 06 20 08 ld [ %i0 + 8 ], %g3
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
200873c: 80 a0 e0 00 cmp %g3, 0
2008740: 02 80 00 0a be 2008768 <_TOD_Validate+0xbc> <== NEVER TAKEN
2008744: 80 89 20 03 btst 3, %g4
2008748: 05 00 80 77 sethi %hi(0x201dc00), %g2
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
200874c: 12 80 00 03 bne 2008758 <_TOD_Validate+0xac>
2008750: 84 10 a2 58 or %g2, 0x258, %g2 ! 201de58 <_TOD_Days_per_month>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2008754: 82 00 60 0d add %g1, 0xd, %g1
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
2008758: 83 28 60 02 sll %g1, 2, %g1
200875c: c2 00 80 01 ld [ %g2 + %g1 ], %g1
if ( the_tod->day > days_in_month )
2008760: 80 a0 40 03 cmp %g1, %g3
2008764: 84 60 3f ff subx %g0, -1, %g2
return false;
return true;
}
2008768: b0 08 a0 01 and %g2, 1, %i0
200876c: 81 c7 e0 08 ret
2008770: 81 e8 00 00 restore
02009d38 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
2009d38: 9d e3 bf a0 save %sp, -96, %sp
2009d3c: ba 10 00 18 mov %i0, %i5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
2009d40: f0 06 20 10 ld [ %i0 + 0x10 ], %i0
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
2009d44: 40 00 03 6a call 200aaec <_Thread_Set_transient>
2009d48: 90 10 00 1d mov %i5, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
2009d4c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2009d50: 80 a0 40 19 cmp %g1, %i1
2009d54: 02 80 00 04 be 2009d64 <_Thread_Change_priority+0x2c>
2009d58: 90 10 00 1d mov %i5, %o0
_Thread_Set_priority( the_thread, new_priority );
2009d5c: 40 00 03 4b call 200aa88 <_Thread_Set_priority>
2009d60: 92 10 00 19 mov %i1, %o1
_ISR_Disable( level );
2009d64: 7f ff e2 58 call 20026c4 <sparc_disable_interrupts>
2009d68: 01 00 00 00 nop
2009d6c: b6 10 00 08 mov %o0, %i3
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
2009d70: f8 07 60 10 ld [ %i5 + 0x10 ], %i4
if ( state != STATES_TRANSIENT ) {
2009d74: 80 a7 20 04 cmp %i4, 4
2009d78: 02 80 00 10 be 2009db8 <_Thread_Change_priority+0x80>
2009d7c: 82 0e 20 04 and %i0, 4, %g1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2009d80: 80 a0 60 00 cmp %g1, 0
2009d84: 12 80 00 03 bne 2009d90 <_Thread_Change_priority+0x58> <== NEVER TAKEN
2009d88: 82 0f 3f fb and %i4, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2009d8c: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
_ISR_Enable( level );
2009d90: 7f ff e2 51 call 20026d4 <sparc_enable_interrupts>
2009d94: 90 10 00 1b mov %i3, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2009d98: 03 00 00 ef sethi %hi(0x3bc00), %g1
2009d9c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
2009da0: 80 8f 00 01 btst %i4, %g1
2009da4: 02 80 00 28 be 2009e44 <_Thread_Change_priority+0x10c>
2009da8: 01 00 00 00 nop
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2009dac: f0 07 60 44 ld [ %i5 + 0x44 ], %i0
2009db0: 40 00 03 08 call 200a9d0 <_Thread_queue_Requeue>
2009db4: 93 e8 00 1d restore %g0, %i5, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
2009db8: 80 a0 60 00 cmp %g1, 0
2009dbc: 12 80 00 0b bne 2009de8 <_Thread_Change_priority+0xb0> <== NEVER TAKEN
2009dc0: 03 00 80 73 sethi %hi(0x201cc00), %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 );
2009dc4: c0 27 60 10 clr [ %i5 + 0x10 ]
if ( prepend_it )
2009dc8: 80 a6 a0 00 cmp %i2, 0
2009dcc: 02 80 00 04 be 2009ddc <_Thread_Change_priority+0xa4>
2009dd0: 82 10 61 f0 or %g1, 0x1f0, %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
2009dd4: 10 80 00 03 b 2009de0 <_Thread_Change_priority+0xa8>
2009dd8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
2009ddc: c2 00 60 24 ld [ %g1 + 0x24 ], %g1
2009de0: 9f c0 40 00 call %g1
2009de4: 90 10 00 1d mov %i5, %o0
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
2009de8: 7f ff e2 3b call 20026d4 <sparc_enable_interrupts>
2009dec: 90 10 00 1b mov %i3, %o0
2009df0: 7f ff e2 35 call 20026c4 <sparc_disable_interrupts>
2009df4: 01 00 00 00 nop
2009df8: b0 10 00 08 mov %o0, %i0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
2009dfc: 03 00 80 73 sethi %hi(0x201cc00), %g1
2009e00: c2 00 61 f8 ld [ %g1 + 0x1f8 ], %g1 ! 201cdf8 <_Scheduler+0x8>
2009e04: 9f c0 40 00 call %g1
2009e08: 01 00 00 00 nop
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2009e0c: 03 00 80 78 sethi %hi(0x201e000), %g1
2009e10: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
2009e14: c4 00 60 0c ld [ %g1 + 0xc ], %g2
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
2009e18: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
2009e1c: 80 a0 80 03 cmp %g2, %g3
2009e20: 02 80 00 07 be 2009e3c <_Thread_Change_priority+0x104>
2009e24: 01 00 00 00 nop
2009e28: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
2009e2c: 80 a0 a0 00 cmp %g2, 0
2009e30: 02 80 00 03 be 2009e3c <_Thread_Change_priority+0x104>
2009e34: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
2009e38: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
_ISR_Enable( level );
2009e3c: 7f ff e2 26 call 20026d4 <sparc_enable_interrupts>
2009e40: 81 e8 00 00 restore
2009e44: 81 c7 e0 08 ret
2009e48: 81 e8 00 00 restore
0200a038 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200a038: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200a03c: 90 10 00 18 mov %i0, %o0
200a040: 40 00 00 70 call 200a200 <_Thread_Get>
200a044: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a048: c2 07 bf fc ld [ %fp + -4 ], %g1
200a04c: 80 a0 60 00 cmp %g1, 0
200a050: 12 80 00 09 bne 200a074 <_Thread_Delay_ended+0x3c> <== NEVER TAKEN
200a054: 13 04 00 00 sethi %hi(0x10000000), %o1
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
200a058: 7f ff ff 7d call 2009e4c <_Thread_Clear_state>
200a05c: 92 12 60 18 or %o1, 0x18, %o1 ! 10000018 <RAM_END+0xdc00018>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a060: 03 00 80 76 sethi %hi(0x201d800), %g1
200a064: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
200a068: 84 00 bf ff add %g2, -1, %g2
200a06c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
200a070: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
200a074: 81 c7 e0 08 ret
200a078: 81 e8 00 00 restore
0200a07c <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
200a07c: 9d e3 bf 98 save %sp, -104, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200a080: 03 00 80 76 sethi %hi(0x201d800), %g1
200a084: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
200a088: 84 00 a0 01 inc %g2
200a08c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
200a090: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
200a094: 21 00 80 78 sethi %hi(0x201e000), %l0
200a098: 82 14 20 20 or %l0, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
_ISR_Disable( level );
200a09c: 7f ff e1 8a call 20026c4 <sparc_disable_interrupts>
200a0a0: f2 00 60 0c ld [ %g1 + 0xc ], %i1
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a0a4: 25 00 80 76 sethi %hi(0x201d800), %l2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
200a0a8: 27 00 80 76 sethi %hi(0x201d800), %l3
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
200a0ac: 10 80 00 42 b 200a1b4 <_Thread_Dispatch+0x138>
200a0b0: 23 00 80 76 sethi %hi(0x201d800), %l1
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
200a0b4: c0 28 60 18 clrb [ %g1 + 0x18 ]
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
200a0b8: 80 a6 00 19 cmp %i0, %i1
200a0bc: 12 80 00 0d bne 200a0f0 <_Thread_Dispatch+0x74>
200a0c0: f0 20 60 0c st %i0, [ %g1 + 0xc ]
_ISR_Disable( level );
}
post_switch:
_ISR_Enable( level );
200a0c4: 7f ff e1 84 call 20026d4 <sparc_enable_interrupts>
200a0c8: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200a0cc: 03 00 80 76 sethi %hi(0x201d800), %g1
200a0d0: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
200a0d4: 84 00 bf ff add %g2, -1, %g2
200a0d8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
200a0dc: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
200a0e0: 7f ff f8 5d call 2008254 <_API_extensions_Run_postswitch>
200a0e4: 01 00 00 00 nop
200a0e8: 81 c7 e0 08 ret
200a0ec: 81 e8 00 00 restore
*/
#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 )
200a0f0: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
200a0f4: 80 a0 60 01 cmp %g1, 1
200a0f8: 12 80 00 03 bne 200a104 <_Thread_Dispatch+0x88>
200a0fc: c2 04 a2 50 ld [ %l2 + 0x250 ], %g1
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a100: c2 26 20 74 st %g1, [ %i0 + 0x74 ]
_ISR_Enable( level );
200a104: 7f ff e1 74 call 20026d4 <sparc_enable_interrupts>
200a108: 01 00 00 00 nop
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
200a10c: 40 00 0d 1a call 200d574 <_TOD_Get_uptime>
200a110: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_Subtract(
200a114: c4 1f bf f8 ldd [ %fp + -8 ], %g2
200a118: 82 14 20 20 or %l0, 0x20, %g1
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
200a11c: f8 18 60 20 ldd [ %g1 + 0x20 ], %i4
200a120: b6 a0 c0 1d subcc %g3, %i5, %i3
200a124: b4 60 80 1c subx %g2, %i4, %i2
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
200a128: f8 1e 60 80 ldd [ %i1 + 0x80 ], %i4
200a12c: ba 87 40 1b addcc %i5, %i3, %i5
200a130: b8 47 00 1a addx %i4, %i2, %i4
200a134: f8 3e 60 80 std %i4, [ %i1 + 0x80 ]
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
200a138: c4 38 60 20 std %g2, [ %g1 + 0x20 ]
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
200a13c: c2 04 e3 6c ld [ %l3 + 0x36c ], %g1
200a140: 80 a0 60 00 cmp %g1, 0
200a144: 02 80 00 06 be 200a15c <_Thread_Dispatch+0xe0> <== NEVER TAKEN
200a148: 90 10 00 19 mov %i1, %o0
executing->libc_reent = *_Thread_libc_reent;
200a14c: c4 00 40 00 ld [ %g1 ], %g2
200a150: c4 26 61 54 st %g2, [ %i1 + 0x154 ]
*_Thread_libc_reent = heir->libc_reent;
200a154: c4 06 21 54 ld [ %i0 + 0x154 ], %g2
200a158: c4 20 40 00 st %g2, [ %g1 ]
}
_User_extensions_Thread_switch( executing, heir );
200a15c: 40 00 03 58 call 200aebc <_User_extensions_Thread_switch>
200a160: 92 10 00 18 mov %i0, %o1
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
200a164: 90 06 60 c8 add %i1, 0xc8, %o0
200a168: 40 00 04 83 call 200b374 <_CPU_Context_switch>
200a16c: 92 06 20 c8 add %i0, 0xc8, %o1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200a170: c2 06 61 50 ld [ %i1 + 0x150 ], %g1
200a174: 80 a0 60 00 cmp %g1, 0
200a178: 02 80 00 0c be 200a1a8 <_Thread_Dispatch+0x12c>
200a17c: d0 04 63 68 ld [ %l1 + 0x368 ], %o0
200a180: 80 a6 40 08 cmp %i1, %o0
200a184: 02 80 00 09 be 200a1a8 <_Thread_Dispatch+0x12c>
200a188: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200a18c: 02 80 00 04 be 200a19c <_Thread_Dispatch+0x120>
200a190: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200a194: 40 00 04 3e call 200b28c <_CPU_Context_save_fp>
200a198: 90 02 21 50 add %o0, 0x150, %o0
_Context_Restore_fp( &executing->fp_context );
200a19c: 40 00 04 59 call 200b300 <_CPU_Context_restore_fp>
200a1a0: 90 06 61 50 add %i1, 0x150, %o0
_Thread_Allocated_fp = executing;
200a1a4: f2 24 63 68 st %i1, [ %l1 + 0x368 ]
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
200a1a8: 82 14 20 20 or %l0, 0x20, %g1
_ISR_Disable( level );
200a1ac: 7f ff e1 46 call 20026c4 <sparc_disable_interrupts>
200a1b0: f2 00 60 0c ld [ %g1 + 0xc ], %i1
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
200a1b4: 82 14 20 20 or %l0, 0x20, %g1
200a1b8: c4 08 60 18 ldub [ %g1 + 0x18 ], %g2
200a1bc: 80 a0 a0 00 cmp %g2, 0
200a1c0: 32 bf ff bd bne,a 200a0b4 <_Thread_Dispatch+0x38>
200a1c4: f0 00 60 10 ld [ %g1 + 0x10 ], %i0
200a1c8: 30 bf ff bf b,a 200a0c4 <_Thread_Dispatch+0x48>
0200f7cc <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200f7cc: 9d e3 bf a0 save %sp, -96, %sp
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
200f7d0: 03 00 80 78 sethi %hi(0x201e000), %g1
200f7d4: fa 00 60 2c ld [ %g1 + 0x2c ], %i5 ! 201e02c <_Per_CPU_Information+0xc>
/*
* Some CPUs need to tinker with the call frame or registers when the
* thread actually begins to execute for the first time. This is a
* hook point where the port gets a shot at doing whatever it requires.
*/
_Context_Initialization_at_thread_begin();
200f7d8: 3f 00 80 3d sethi %hi(0x200f400), %i7
200f7dc: be 17 e3 cc or %i7, 0x3cc, %i7 ! 200f7cc <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200f7e0: d0 07 60 a8 ld [ %i5 + 0xa8 ], %o0
_ISR_Set_level(level);
200f7e4: 7f ff cb bc call 20026d4 <sparc_enable_interrupts>
200f7e8: 91 2a 20 08 sll %o0, 8, %o0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f7ec: 03 00 80 75 sethi %hi(0x201d400), %g1
doneConstructors = true;
200f7f0: 84 10 20 01 mov 1, %g2
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
200f7f4: f8 08 62 f0 ldub [ %g1 + 0x2f0 ], %i4
doneConstructors = true;
200f7f8: c4 28 62 f0 stb %g2, [ %g1 + 0x2f0 ]
#endif
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
200f7fc: c2 07 61 50 ld [ %i5 + 0x150 ], %g1
200f800: 80 a0 60 00 cmp %g1, 0
200f804: 02 80 00 0c be 200f834 <_Thread_Handler+0x68>
200f808: 03 00 80 76 sethi %hi(0x201d800), %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 );
200f80c: d0 00 63 68 ld [ %g1 + 0x368 ], %o0 ! 201db68 <_Thread_Allocated_fp>
200f810: 80 a7 40 08 cmp %i5, %o0
200f814: 02 80 00 08 be 200f834 <_Thread_Handler+0x68>
200f818: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
200f81c: 22 80 00 06 be,a 200f834 <_Thread_Handler+0x68>
200f820: fa 20 63 68 st %i5, [ %g1 + 0x368 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200f824: 7f ff ee 9a call 200b28c <_CPU_Context_save_fp>
200f828: 90 02 21 50 add %o0, 0x150, %o0
_Thread_Allocated_fp = executing;
200f82c: 03 00 80 76 sethi %hi(0x201d800), %g1
200f830: fa 20 63 68 st %i5, [ %g1 + 0x368 ] ! 201db68 <_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 );
200f834: 7f ff ed 2d call 200ace8 <_User_extensions_Thread_begin>
200f838: 90 10 00 1d mov %i5, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200f83c: 7f ff ea 64 call 200a1cc <_Thread_Enable_dispatch>
200f840: 01 00 00 00 nop
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (doCons) /* && (volatile void *)_init) */ {
200f844: 80 8f 20 ff btst 0xff, %i4
200f848: 32 80 00 05 bne,a 200f85c <_Thread_Handler+0x90>
200f84c: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
INIT_NAME ();
200f850: 40 00 35 1a call 201ccb8 <_init>
200f854: 01 00 00 00 nop
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
200f858: c2 07 60 90 ld [ %i5 + 0x90 ], %g1
200f85c: 80 a0 60 00 cmp %g1, 0
200f860: 12 80 00 05 bne 200f874 <_Thread_Handler+0xa8>
200f864: 80 a0 60 01 cmp %g1, 1
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
200f868: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
200f86c: 10 80 00 06 b 200f884 <_Thread_Handler+0xb8>
200f870: d0 07 60 98 ld [ %i5 + 0x98 ], %o0
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
200f874: 12 80 00 07 bne 200f890 <_Thread_Handler+0xc4> <== NEVER TAKEN
200f878: 01 00 00 00 nop
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
200f87c: c2 07 60 8c ld [ %i5 + 0x8c ], %g1
200f880: d0 07 60 94 ld [ %i5 + 0x94 ], %o0
200f884: 9f c0 40 00 call %g1
200f888: 01 00 00 00 nop
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
200f88c: d0 27 60 28 st %o0, [ %i5 + 0x28 ]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
200f890: 7f ff ed 27 call 200ad2c <_User_extensions_Thread_exitted>
200f894: 90 10 00 1d mov %i5, %o0
_Internal_error_Occurred(
200f898: 90 10 20 00 clr %o0
200f89c: 92 10 20 01 mov 1, %o1
200f8a0: 7f ff e5 0b call 2008ccc <_Internal_error_Occurred>
200f8a4: 94 10 20 05 mov 5, %o2
0200a4b0 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
200a4b0: 9d e3 bf 98 save %sp, -104, %sp
uint32_t ticks_per_timeslice =
200a4b4: 03 00 80 73 sethi %hi(0x201cc00), %g1
200a4b8: 82 10 60 fc or %g1, 0xfc, %g1 ! 201ccfc <Configuration>
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200a4bc: c6 00 60 2c ld [ %g1 + 0x2c ], %g3
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
200a4c0: fa 00 60 18 ld [ %g1 + 0x18 ], %i5
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
200a4c4: f8 00 60 0c ld [ %g1 + 0xc ], %i4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
200a4c8: 80 a0 e0 00 cmp %g3, 0
200a4cc: 02 80 00 06 be 200a4e4 <_Thread_Handler_initialization+0x34>
200a4d0: c4 00 60 28 ld [ %g1 + 0x28 ], %g2
200a4d4: c6 00 60 30 ld [ %g1 + 0x30 ], %g3
200a4d8: 80 a0 e0 00 cmp %g3, 0
200a4dc: 12 80 00 06 bne 200a4f4 <_Thread_Handler_initialization+0x44><== ALWAYS TAKEN
200a4e0: 80 a0 a0 00 cmp %g2, 0
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
200a4e4: 90 10 20 00 clr %o0
200a4e8: 92 10 20 01 mov 1, %o1
200a4ec: 7f ff f9 f8 call 2008ccc <_Internal_error_Occurred>
200a4f0: 94 10 20 0e mov 0xe, %o2
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
200a4f4: 22 80 00 05 be,a 200a508 <_Thread_Handler_initialization+0x58>
200a4f8: 03 00 80 78 sethi %hi(0x201e000), %g1
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
200a4fc: 9f c0 80 00 call %g2
200a500: d0 00 60 08 ld [ %g1 + 8 ], %o0 ! 201e008 <_RTEMS_Objects+0x1c>
_Thread_Dispatch_necessary = false;
200a504: 03 00 80 78 sethi %hi(0x201e000), %g1
200a508: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
200a50c: c0 28 60 18 clrb [ %g1 + 0x18 ]
_Thread_Executing = NULL;
200a510: c0 20 60 0c clr [ %g1 + 0xc ]
_Thread_Heir = NULL;
200a514: c0 20 60 10 clr [ %g1 + 0x10 ]
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
200a518: 03 00 80 76 sethi %hi(0x201d800), %g1
200a51c: c0 20 63 68 clr [ %g1 + 0x368 ] ! 201db68 <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
200a520: 03 00 80 76 sethi %hi(0x201d800), %g1
200a524: f8 20 63 70 st %i4, [ %g1 + 0x370 ] ! 201db70 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
200a528: 03 00 80 76 sethi %hi(0x201d800), %g1
200a52c: fa 20 62 50 st %i5, [ %g1 + 0x250 ] ! 201da50 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
200a530: 82 10 20 08 mov 8, %g1
200a534: 11 00 80 76 sethi %hi(0x201d800), %o0
200a538: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
200a53c: 90 12 23 f0 or %o0, 0x3f0, %o0
200a540: 92 10 20 01 mov 1, %o1
200a544: 94 10 20 01 mov 1, %o2
200a548: 96 10 20 01 mov 1, %o3
200a54c: 98 10 21 68 mov 0x168, %o4
200a550: 7f ff fb 67 call 20092ec <_Objects_Initialize_information>
200a554: 9a 10 20 00 clr %o5
200a558: 81 c7 e0 08 ret
200a55c: 81 e8 00 00 restore
0200a2b4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200a2b4: 9d e3 bf a0 save %sp, -96, %sp
200a2b8: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
200a2bc: c0 26 61 58 clr [ %i1 + 0x158 ]
200a2c0: c0 26 61 5c clr [ %i1 + 0x15c ]
extensions_area = NULL;
the_thread->libc_reent = NULL;
200a2c4: c0 26 61 54 clr [ %i1 + 0x154 ]
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
200a2c8: e0 07 a0 60 ld [ %fp + 0x60 ], %l0
200a2cc: e2 00 40 00 ld [ %g1 ], %l1
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
200a2d0: 80 a6 a0 00 cmp %i2, 0
200a2d4: 12 80 00 0d bne 200a308 <_Thread_Initialize+0x54>
200a2d8: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
200a2dc: 90 10 00 19 mov %i1, %o0
200a2e0: 40 00 02 12 call 200ab28 <_Thread_Stack_Allocate>
200a2e4: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
200a2e8: 80 a2 00 1b cmp %o0, %i3
200a2ec: 0a 80 00 6d bcs 200a4a0 <_Thread_Initialize+0x1ec>
200a2f0: 80 a2 20 00 cmp %o0, 0
200a2f4: 02 80 00 6b be 200a4a0 <_Thread_Initialize+0x1ec> <== NEVER TAKEN
200a2f8: 82 10 20 01 mov 1, %g1
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
200a2fc: f4 06 60 c0 ld [ %i1 + 0xc0 ], %i2
the_thread->Start.core_allocated_stack = true;
200a300: 10 80 00 04 b 200a310 <_Thread_Initialize+0x5c>
200a304: c2 2e 60 b0 stb %g1, [ %i1 + 0xb0 ]
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
200a308: c0 2e 60 b0 clrb [ %i1 + 0xb0 ]
200a30c: 90 10 00 1b mov %i3, %o0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
200a310: f4 26 60 b8 st %i2, [ %i1 + 0xb8 ]
the_stack->size = size;
200a314: d0 26 60 b4 st %o0, [ %i1 + 0xb4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
200a318: 80 a7 20 00 cmp %i4, 0
200a31c: 02 80 00 07 be 200a338 <_Thread_Initialize+0x84>
200a320: b6 10 20 00 clr %i3
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
200a324: 40 00 03 be call 200b21c <_Workspace_Allocate>
200a328: 90 10 20 88 mov 0x88, %o0
if ( !fp_area )
200a32c: b6 92 20 00 orcc %o0, 0, %i3
200a330: 22 80 00 4d be,a 200a464 <_Thread_Initialize+0x1b0>
200a334: b8 10 20 00 clr %i4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a338: 03 00 80 76 sethi %hi(0x201d800), %g1
200a33c: d0 00 63 70 ld [ %g1 + 0x370 ], %o0 ! 201db70 <_Thread_Maximum_extensions>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
200a340: f6 26 61 50 st %i3, [ %i1 + 0x150 ]
the_thread->Start.fp_context = fp_area;
200a344: f6 26 60 bc st %i3, [ %i1 + 0xbc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200a348: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
200a34c: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
200a350: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
200a354: c0 26 60 6c clr [ %i1 + 0x6c ]
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
200a358: 80 a2 20 00 cmp %o0, 0
200a35c: 02 80 00 08 be 200a37c <_Thread_Initialize+0xc8>
200a360: b8 10 20 00 clr %i4
extensions_area = _Workspace_Allocate(
200a364: 90 02 20 01 inc %o0
200a368: 40 00 03 ad call 200b21c <_Workspace_Allocate>
200a36c: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
200a370: b8 92 20 00 orcc %o0, 0, %i4
200a374: 02 80 00 3d be 200a468 <_Thread_Initialize+0x1b4>
200a378: b4 10 20 00 clr %i2
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
200a37c: 80 a7 20 00 cmp %i4, 0
200a380: 12 80 00 0a bne 200a3a8 <_Thread_Initialize+0xf4>
200a384: f8 26 61 60 st %i4, [ %i1 + 0x160 ]
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
200a388: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
200a38c: e4 2e 60 9c stb %l2, [ %i1 + 0x9c ]
the_thread->Start.budget_algorithm = budget_algorithm;
200a390: e0 26 60 a0 st %l0, [ %i1 + 0xa0 ]
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
200a394: 80 a4 20 02 cmp %l0, 2
200a398: 12 80 00 12 bne 200a3e0 <_Thread_Initialize+0x12c>
200a39c: c2 26 60 a4 st %g1, [ %i1 + 0xa4 ]
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a3a0: 10 80 00 0e b 200a3d8 <_Thread_Initialize+0x124>
200a3a4: 03 00 80 76 sethi %hi(0x201d800), %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 ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
200a3a8: 03 00 80 76 sethi %hi(0x201d800), %g1
200a3ac: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 201db70 <_Thread_Maximum_extensions>
200a3b0: 10 80 00 05 b 200a3c4 <_Thread_Initialize+0x110>
200a3b4: 82 10 20 00 clr %g1
the_thread->extensions[i] = NULL;
200a3b8: 87 28 60 02 sll %g1, 2, %g3
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
200a3bc: 82 00 60 01 inc %g1
the_thread->extensions[i] = NULL;
200a3c0: c0 21 00 03 clr [ %g4 + %g3 ]
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
200a3c4: 80 a0 40 02 cmp %g1, %g2
200a3c8: 28 bf ff fc bleu,a 200a3b8 <_Thread_Initialize+0x104>
200a3cc: c8 06 61 60 ld [ %i1 + 0x160 ], %g4
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
200a3d0: 10 bf ff ef b 200a38c <_Thread_Initialize+0xd8>
200a3d4: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a3d8: c2 00 62 50 ld [ %g1 + 0x250 ], %g1
200a3dc: c2 26 60 74 st %g1, [ %i1 + 0x74 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a3e0: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
200a3e4: c0 26 60 44 clr [ %i1 + 0x44 ]
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
200a3e8: c2 26 60 a8 st %g1, [ %i1 + 0xa8 ]
the_thread->current_state = STATES_DORMANT;
200a3ec: 82 10 20 01 mov 1, %g1
200a3f0: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
200a3f4: 03 00 80 73 sethi %hi(0x201cc00), %g1
200a3f8: c2 00 62 08 ld [ %g1 + 0x208 ], %g1 ! 201ce08 <_Scheduler+0x18>
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
200a3fc: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->real_priority = priority;
200a400: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
200a404: fa 26 60 ac st %i5, [ %i1 + 0xac ]
200a408: 9f c0 40 00 call %g1
200a40c: 90 10 00 19 mov %i1, %o0
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
200a410: b4 92 20 00 orcc %o0, 0, %i2
200a414: 02 80 00 15 be 200a468 <_Thread_Initialize+0x1b4>
200a418: 90 10 00 19 mov %i1, %o0
goto failed;
_Thread_Set_priority( the_thread, priority );
200a41c: 40 00 01 9b call 200aa88 <_Thread_Set_priority>
200a420: 92 10 00 1d mov %i5, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a424: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
200a428: c2 16 60 0a lduh [ %i1 + 0xa ], %g1
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
200a42c: c0 26 60 80 clr [ %i1 + 0x80 ]
200a430: c0 26 60 84 clr [ %i1 + 0x84 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200a434: 83 28 60 02 sll %g1, 2, %g1
200a438: f2 20 80 01 st %i1, [ %g2 + %g1 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200a43c: e2 26 60 0c st %l1, [ %i1 + 0xc ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
200a440: 90 10 00 19 mov %i1, %o0
200a444: 40 00 02 5d call 200adb8 <_User_extensions_Thread_create>
200a448: b0 10 20 01 mov 1, %i0
if ( extension_status )
200a44c: 80 8a 20 ff btst 0xff, %o0
200a450: 02 80 00 06 be 200a468 <_Thread_Initialize+0x1b4>
200a454: 01 00 00 00 nop
200a458: b0 0e 20 01 and %i0, 1, %i0
200a45c: 81 c7 e0 08 ret
200a460: 81 e8 00 00 restore
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
200a464: b4 10 20 00 clr %i2
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
200a468: 40 00 03 75 call 200b23c <_Workspace_Free>
200a46c: d0 06 61 54 ld [ %i1 + 0x154 ], %o0
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
200a470: 40 00 03 73 call 200b23c <_Workspace_Free>
200a474: d0 06 61 58 ld [ %i1 + 0x158 ], %o0
200a478: 40 00 03 71 call 200b23c <_Workspace_Free>
200a47c: d0 06 61 5c ld [ %i1 + 0x15c ], %o0
_Workspace_Free( extensions_area );
200a480: 40 00 03 6f call 200b23c <_Workspace_Free>
200a484: 90 10 00 1c mov %i4, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
200a488: 40 00 03 6d call 200b23c <_Workspace_Free>
200a48c: 90 10 00 1b mov %i3, %o0
#endif
_Workspace_Free( sched );
200a490: 40 00 03 6b call 200b23c <_Workspace_Free>
200a494: 90 10 00 1a mov %i2, %o0
_Thread_Stack_Free( the_thread );
200a498: 40 00 01 b4 call 200ab68 <_Thread_Stack_Free>
200a49c: 90 10 00 19 mov %i1, %o0
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
200a4a0: b0 10 20 00 clr %i0
_Workspace_Free( sched );
_Thread_Stack_Free( the_thread );
return false;
}
200a4a4: b0 0e 20 01 and %i0, 1, %i0
200a4a8: 81 c7 e0 08 ret
200a4ac: 81 e8 00 00 restore
0200ab68 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
200ab68: 9d e3 bf a0 save %sp, -96, %sp
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
200ab6c: c4 0e 20 b0 ldub [ %i0 + 0xb0 ], %g2
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
rtems_stack_free_hook stack_free_hook =
200ab70: 03 00 80 73 sethi %hi(0x201cc00), %g1
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
200ab74: 80 a0 a0 00 cmp %g2, 0
200ab78: 02 80 00 04 be 200ab88 <_Thread_Stack_Free+0x20> <== NEVER TAKEN
200ab7c: c2 00 61 2c ld [ %g1 + 0x12c ], %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.
*/
(*stack_free_hook)( the_thread->Start.Initial_stack.area );
200ab80: 9f c0 40 00 call %g1
200ab84: d0 06 20 b8 ld [ %i0 + 0xb8 ], %o0
200ab88: 81 c7 e0 08 ret
200ab8c: 81 e8 00 00 restore
0200a9d0 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200a9d0: 9d e3 bf 98 save %sp, -104, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
200a9d4: 80 a6 20 00 cmp %i0, 0
200a9d8: 02 80 00 19 be 200aa3c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
200a9dc: 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 ) {
200a9e0: fa 06 20 34 ld [ %i0 + 0x34 ], %i5
200a9e4: 80 a7 60 01 cmp %i5, 1
200a9e8: 12 80 00 15 bne 200aa3c <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
200a9ec: 01 00 00 00 nop
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
200a9f0: 7f ff df 35 call 20026c4 <sparc_disable_interrupts>
200a9f4: 01 00 00 00 nop
200a9f8: b8 10 00 08 mov %o0, %i4
200a9fc: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200aa00: 03 00 00 ef sethi %hi(0x3bc00), %g1
200aa04: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200aa08: 80 88 80 01 btst %g2, %g1
200aa0c: 02 80 00 0a be 200aa34 <_Thread_queue_Requeue+0x64> <== NEVER TAKEN
200aa10: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
200aa14: 92 10 00 19 mov %i1, %o1
200aa18: 94 10 20 01 mov 1, %o2
200aa1c: 40 00 0c b1 call 200dce0 <_Thread_queue_Extract_priority_helper>
200aa20: fa 26 20 30 st %i5, [ %i0 + 0x30 ]
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
200aa24: 90 10 00 18 mov %i0, %o0
200aa28: 92 10 00 19 mov %i1, %o1
200aa2c: 7f ff ff 50 call 200a76c <_Thread_queue_Enqueue_priority>
200aa30: 94 07 bf fc add %fp, -4, %o2
}
_ISR_Enable( level );
200aa34: 7f ff df 28 call 20026d4 <sparc_enable_interrupts>
200aa38: 90 10 00 1c mov %i4, %o0
200aa3c: 81 c7 e0 08 ret
200aa40: 81 e8 00 00 restore
0200aa44 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
200aa44: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200aa48: 90 10 00 18 mov %i0, %o0
200aa4c: 7f ff fd ed call 200a200 <_Thread_Get>
200aa50: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200aa54: c2 07 bf fc ld [ %fp + -4 ], %g1
200aa58: 80 a0 60 00 cmp %g1, 0
200aa5c: 12 80 00 09 bne 200aa80 <_Thread_queue_Timeout+0x3c> <== NEVER TAKEN
200aa60: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
200aa64: 40 00 0c d6 call 200ddbc <_Thread_queue_Process_timeout>
200aa68: 01 00 00 00 nop
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
200aa6c: 03 00 80 76 sethi %hi(0x201d800), %g1
200aa70: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
200aa74: 84 00 bf ff add %g2, -1, %g2
200aa78: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
200aa7c: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
200aa80: 81 c7 e0 08 ret
200aa84: 81 e8 00 00 restore
02018c9c <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
2018c9c: 9d e3 bf 88 save %sp, -120, %sp
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2018ca0: 27 00 80 f3 sethi %hi(0x203cc00), %l3
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2018ca4: a4 07 bf e8 add %fp, -24, %l2
2018ca8: aa 07 bf ec add %fp, -20, %l5
2018cac: b8 07 bf f4 add %fp, -12, %i4
2018cb0: b2 07 bf f8 add %fp, -8, %i1
2018cb4: ea 27 bf e8 st %l5, [ %fp + -24 ]
head->previous = NULL;
2018cb8: c0 27 bf ec clr [ %fp + -20 ]
tail->previous = head;
2018cbc: e4 27 bf f0 st %l2, [ %fp + -16 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2018cc0: f2 27 bf f4 st %i1, [ %fp + -12 ]
head->previous = NULL;
2018cc4: c0 27 bf f8 clr [ %fp + -8 ]
tail->previous = head;
2018cc8: f8 27 bf fc st %i4, [ %fp + -4 ]
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018ccc: b4 06 20 30 add %i0, 0x30, %i2
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
2018cd0: 29 00 80 f3 sethi %hi(0x203cc00), %l4
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
2018cd4: b6 06 20 68 add %i0, 0x68, %i3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2018cd8: a2 06 20 08 add %i0, 8, %l1
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2018cdc: a0 06 20 40 add %i0, 0x40, %l0
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
2018ce0: e4 26 20 78 st %l2, [ %i0 + 0x78 ]
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
2018ce4: c2 04 e2 78 ld [ %l3 + 0x278 ], %g1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
2018ce8: d2 06 20 3c ld [ %i0 + 0x3c ], %o1
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018cec: 90 10 00 1a mov %i2, %o0
2018cf0: 92 20 40 09 sub %g1, %o1, %o1
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
2018cf4: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018cf8: 40 00 11 97 call 201d354 <_Watchdog_Adjust_to_chain>
2018cfc: 94 10 00 1c mov %i4, %o2
2018d00: d0 1d 20 c8 ldd [ %l4 + 0xc8 ], %o0
2018d04: 94 10 20 00 clr %o2
2018d08: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018d0c: 40 00 4f 42 call 202ca14 <__divdi3>
2018d10: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
2018d14: d4 06 20 74 ld [ %i0 + 0x74 ], %o2
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
2018d18: 80 a2 40 0a cmp %o1, %o2
2018d1c: 08 80 00 07 bleu 2018d38 <_Timer_server_Body+0x9c>
2018d20: ba 10 00 09 mov %o1, %i5
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
2018d24: 92 22 40 0a sub %o1, %o2, %o1
2018d28: 90 10 00 1b mov %i3, %o0
2018d2c: 40 00 11 8a call 201d354 <_Watchdog_Adjust_to_chain>
2018d30: 94 10 00 1c mov %i4, %o2
2018d34: 30 80 00 06 b,a 2018d4c <_Timer_server_Body+0xb0>
} else if ( snapshot < last_snapshot ) {
2018d38: 1a 80 00 05 bcc 2018d4c <_Timer_server_Body+0xb0>
2018d3c: 90 10 00 1b mov %i3, %o0
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
2018d40: 92 10 20 01 mov 1, %o1
2018d44: 40 00 11 5c call 201d2b4 <_Watchdog_Adjust>
2018d48: 94 22 80 1d sub %o2, %i5, %o2
}
watchdogs->last_snapshot = snapshot;
2018d4c: fa 26 20 74 st %i5, [ %i0 + 0x74 ]
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
2018d50: d0 06 20 78 ld [ %i0 + 0x78 ], %o0
2018d54: 40 00 02 8c call 2019784 <_Chain_Get>
2018d58: 01 00 00 00 nop
if ( timer == NULL ) {
2018d5c: 92 92 20 00 orcc %o0, 0, %o1
2018d60: 02 80 00 0c be 2018d90 <_Timer_server_Body+0xf4>
2018d64: 01 00 00 00 nop
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2018d68: c2 02 60 38 ld [ %o1 + 0x38 ], %g1
2018d6c: 80 a0 60 01 cmp %g1, 1
2018d70: 02 80 00 05 be 2018d84 <_Timer_server_Body+0xe8>
2018d74: 90 10 00 1a mov %i2, %o0
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2018d78: 80 a0 60 03 cmp %g1, 3
2018d7c: 12 bf ff f5 bne 2018d50 <_Timer_server_Body+0xb4> <== NEVER TAKEN
2018d80: 90 10 00 1b mov %i3, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2018d84: 40 00 11 a6 call 201d41c <_Watchdog_Insert>
2018d88: 92 02 60 10 add %o1, 0x10, %o1
2018d8c: 30 bf ff f1 b,a 2018d50 <_Timer_server_Body+0xb4>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
2018d90: 7f ff de 98 call 20107f0 <sparc_disable_interrupts>
2018d94: 01 00 00 00 nop
if ( _Chain_Is_empty( insert_chain ) ) {
2018d98: c2 07 bf e8 ld [ %fp + -24 ], %g1
2018d9c: 80 a0 40 15 cmp %g1, %l5
2018da0: 12 80 00 0a bne 2018dc8 <_Timer_server_Body+0x12c> <== NEVER TAKEN
2018da4: 01 00 00 00 nop
ts->insert_chain = NULL;
2018da8: c0 26 20 78 clr [ %i0 + 0x78 ]
_ISR_Enable( level );
2018dac: 7f ff de 95 call 2010800 <sparc_enable_interrupts>
2018db0: 01 00 00 00 nop
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
2018db4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2018db8: 80 a0 40 19 cmp %g1, %i1
2018dbc: 12 80 00 06 bne 2018dd4 <_Timer_server_Body+0x138>
2018dc0: 01 00 00 00 nop
2018dc4: 30 80 00 18 b,a 2018e24 <_Timer_server_Body+0x188>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
2018dc8: 7f ff de 8e call 2010800 <sparc_enable_interrupts> <== NOT EXECUTED
2018dcc: 01 00 00 00 nop <== NOT EXECUTED
2018dd0: 30 bf ff c5 b,a 2018ce4 <_Timer_server_Body+0x48> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
2018dd4: 7f ff de 87 call 20107f0 <sparc_disable_interrupts>
2018dd8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2018ddc: fa 07 bf f4 ld [ %fp + -12 ], %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2018de0: 80 a7 40 19 cmp %i5, %i1
2018de4: 02 80 00 0d be 2018e18 <_Timer_server_Body+0x17c>
2018de8: 01 00 00 00 nop
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
2018dec: c2 07 40 00 ld [ %i5 ], %g1
head->next = new_first;
new_first->previous = head;
2018df0: f8 20 60 04 st %i4, [ %g1 + 4 ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
2018df4: c2 27 bf f4 st %g1, [ %fp + -12 ]
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
2018df8: c0 27 60 08 clr [ %i5 + 8 ]
_ISR_Enable( level );
2018dfc: 7f ff de 81 call 2010800 <sparc_enable_interrupts>
2018e00: 01 00 00 00 nop
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
2018e04: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
2018e08: d0 07 60 20 ld [ %i5 + 0x20 ], %o0
2018e0c: 9f c0 40 00 call %g1
2018e10: d2 07 60 24 ld [ %i5 + 0x24 ], %o1
}
2018e14: 30 bf ff f0 b,a 2018dd4 <_Timer_server_Body+0x138>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
2018e18: 7f ff de 7a call 2010800 <sparc_enable_interrupts>
2018e1c: 01 00 00 00 nop
2018e20: 30 bf ff b0 b,a 2018ce0 <_Timer_server_Body+0x44>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
2018e24: c0 2e 20 7c clrb [ %i0 + 0x7c ]
2018e28: 7f ff ff 19 call 2018a8c <_Thread_Dispatch_increment_disable_level>
2018e2c: 01 00 00 00 nop
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
2018e30: d0 06 00 00 ld [ %i0 ], %o0
2018e34: 40 00 0f f9 call 201ce18 <_Thread_Set_state>
2018e38: 92 10 20 08 mov 8, %o1
_Timer_server_Reset_interval_system_watchdog( ts );
2018e3c: 7f ff ff 1b call 2018aa8 <_Timer_server_Reset_interval_system_watchdog>
2018e40: 90 10 00 18 mov %i0, %o0
_Timer_server_Reset_tod_system_watchdog( ts );
2018e44: 7f ff ff 2d call 2018af8 <_Timer_server_Reset_tod_system_watchdog>
2018e48: 90 10 00 18 mov %i0, %o0
_Thread_Enable_dispatch();
2018e4c: 40 00 0d 99 call 201c4b0 <_Thread_Enable_dispatch>
2018e50: 01 00 00 00 nop
ts->active = true;
2018e54: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1>
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2018e58: 90 10 00 11 mov %l1, %o0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
2018e5c: c2 2e 20 7c stb %g1, [ %i0 + 0x7c ]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
2018e60: 40 00 11 c7 call 201d57c <_Watchdog_Remove>
2018e64: 01 00 00 00 nop
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
2018e68: 40 00 11 c5 call 201d57c <_Watchdog_Remove>
2018e6c: 90 10 00 10 mov %l0, %o0
2018e70: 30 bf ff 9c b,a 2018ce0 <_Timer_server_Body+0x44>
02018b48 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
2018b48: 9d e3 bf a0 save %sp, -96, %sp
if ( ts->insert_chain == NULL ) {
2018b4c: c2 06 20 78 ld [ %i0 + 0x78 ], %g1
2018b50: 80 a0 60 00 cmp %g1, 0
2018b54: 12 80 00 4f bne 2018c90 <_Timer_server_Schedule_operation_method+0x148>
2018b58: ba 10 00 19 mov %i1, %i5
#if defined ( __THREAD_DO_NOT_INLINE_DISABLE_DISPATCH__ )
void _Thread_Disable_dispatch( void );
#else
RTEMS_INLINE_ROUTINE void _Thread_Disable_dispatch( void )
{
_Thread_Dispatch_increment_disable_level();
2018b5c: 7f ff ff cc call 2018a8c <_Thread_Dispatch_increment_disable_level>
2018b60: 01 00 00 00 nop
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2018b64: c2 06 60 38 ld [ %i1 + 0x38 ], %g1
2018b68: 80 a0 60 01 cmp %g1, 1
2018b6c: 12 80 00 1f bne 2018be8 <_Timer_server_Schedule_operation_method+0xa0>
2018b70: 80 a0 60 03 cmp %g1, 3
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2018b74: 7f ff df 1f call 20107f0 <sparc_disable_interrupts>
2018b78: 01 00 00 00 nop
snapshot = _Watchdog_Ticks_since_boot;
2018b7c: 03 00 80 f3 sethi %hi(0x203cc00), %g1
2018b80: c4 00 62 78 ld [ %g1 + 0x278 ], %g2 ! 203ce78 <_Watchdog_Ticks_since_boot>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2018b84: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
2018b88: c8 06 20 3c ld [ %i0 + 0x3c ], %g4
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2018b8c: 86 06 20 34 add %i0, 0x34, %g3
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
2018b90: 80 a0 40 03 cmp %g1, %g3
2018b94: 02 80 00 08 be 2018bb4 <_Timer_server_Schedule_operation_method+0x6c>
2018b98: 88 20 80 04 sub %g2, %g4, %g4
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
2018b9c: f8 00 60 10 ld [ %g1 + 0x10 ], %i4
if (delta_interval > delta) {
2018ba0: 80 a7 00 04 cmp %i4, %g4
2018ba4: 08 80 00 03 bleu 2018bb0 <_Timer_server_Schedule_operation_method+0x68>
2018ba8: 86 10 20 00 clr %g3
delta_interval -= delta;
2018bac: 86 27 00 04 sub %i4, %g4, %g3
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
2018bb0: c6 20 60 10 st %g3, [ %g1 + 0x10 ]
}
ts->Interval_watchdogs.last_snapshot = snapshot;
2018bb4: c4 26 20 3c st %g2, [ %i0 + 0x3c ]
_ISR_Enable( level );
2018bb8: 7f ff df 12 call 2010800 <sparc_enable_interrupts>
2018bbc: 01 00 00 00 nop
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
2018bc0: 90 06 20 30 add %i0, 0x30, %o0
2018bc4: 40 00 12 16 call 201d41c <_Watchdog_Insert>
2018bc8: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2018bcc: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2018bd0: 80 a0 60 00 cmp %g1, 0
2018bd4: 12 80 00 2d bne 2018c88 <_Timer_server_Schedule_operation_method+0x140>
2018bd8: 01 00 00 00 nop
_Timer_server_Reset_interval_system_watchdog( ts );
2018bdc: 7f ff ff b3 call 2018aa8 <_Timer_server_Reset_interval_system_watchdog>
2018be0: 90 10 00 18 mov %i0, %o0
2018be4: 30 80 00 29 b,a 2018c88 <_Timer_server_Schedule_operation_method+0x140>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2018be8: 12 80 00 28 bne 2018c88 <_Timer_server_Schedule_operation_method+0x140>
2018bec: 01 00 00 00 nop
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
2018bf0: 7f ff df 00 call 20107f0 <sparc_disable_interrupts>
2018bf4: 01 00 00 00 nop
2018bf8: b8 10 00 08 mov %o0, %i4
2018bfc: 03 00 80 f3 sethi %hi(0x203cc00), %g1
2018c00: d0 18 60 c8 ldd [ %g1 + 0xc8 ], %o0 ! 203ccc8 <_TOD>
2018c04: 94 10 20 00 clr %o2
2018c08: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018c0c: 40 00 4f 82 call 202ca14 <__divdi3>
2018c10: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2018c14: c2 06 20 68 ld [ %i0 + 0x68 ], %g1
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
2018c18: c4 06 20 74 ld [ %i0 + 0x74 ], %g2
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2018c1c: 86 06 20 6c add %i0, 0x6c, %g3
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
2018c20: 80 a0 40 03 cmp %g1, %g3
2018c24: 02 80 00 0d be 2018c58 <_Timer_server_Schedule_operation_method+0x110>
2018c28: 80 a2 40 02 cmp %o1, %g2
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
2018c2c: 08 80 00 08 bleu 2018c4c <_Timer_server_Schedule_operation_method+0x104>
2018c30: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
2018c34: 88 22 40 02 sub %o1, %g2, %g4
if (delta_interval > delta) {
2018c38: 80 a0 c0 04 cmp %g3, %g4
2018c3c: 08 80 00 06 bleu 2018c54 <_Timer_server_Schedule_operation_method+0x10c><== NEVER TAKEN
2018c40: 84 10 20 00 clr %g2
delta_interval -= delta;
2018c44: 10 80 00 04 b 2018c54 <_Timer_server_Schedule_operation_method+0x10c>
2018c48: 84 20 c0 04 sub %g3, %g4, %g2
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
2018c4c: 84 00 c0 02 add %g3, %g2, %g2
delta_interval += delta;
2018c50: 84 20 80 09 sub %g2, %o1, %g2
}
first_watchdog->delta_interval = delta_interval;
2018c54: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
}
ts->TOD_watchdogs.last_snapshot = snapshot;
2018c58: d2 26 20 74 st %o1, [ %i0 + 0x74 ]
_ISR_Enable( level );
2018c5c: 7f ff de e9 call 2010800 <sparc_enable_interrupts>
2018c60: 90 10 00 1c mov %i4, %o0
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
2018c64: 90 06 20 68 add %i0, 0x68, %o0
2018c68: 40 00 11 ed call 201d41c <_Watchdog_Insert>
2018c6c: 92 07 60 10 add %i5, 0x10, %o1
if ( !ts->active ) {
2018c70: c2 0e 20 7c ldub [ %i0 + 0x7c ], %g1
2018c74: 80 a0 60 00 cmp %g1, 0
2018c78: 12 80 00 04 bne 2018c88 <_Timer_server_Schedule_operation_method+0x140>
2018c7c: 01 00 00 00 nop
_Timer_server_Reset_tod_system_watchdog( ts );
2018c80: 7f ff ff 9e call 2018af8 <_Timer_server_Reset_tod_system_watchdog>
2018c84: 90 10 00 18 mov %i0, %o0
}
}
_Thread_Enable_dispatch();
2018c88: 40 00 0e 0a call 201c4b0 <_Thread_Enable_dispatch>
2018c8c: 81 e8 00 00 restore
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
2018c90: f0 06 20 78 ld [ %i0 + 0x78 ], %i0
2018c94: 40 00 02 b0 call 2019754 <_Chain_Append>
2018c98: 81 e8 00 00 restore
0200c814 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
200c814: 82 10 00 08 mov %o0, %g1
uint32_t seconds = add->tv_sec;
200c818: d0 02 40 00 ld [ %o1 ], %o0
/* Add the basics */
time->tv_sec += add->tv_sec;
200c81c: c4 00 40 00 ld [ %g1 ], %g2
time->tv_nsec += add->tv_nsec;
200c820: c6 00 60 04 ld [ %g1 + 4 ], %g3
)
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
200c824: 84 00 80 08 add %g2, %o0, %g2
200c828: c4 20 40 00 st %g2, [ %g1 ]
time->tv_nsec += add->tv_nsec;
200c82c: c4 02 60 04 ld [ %o1 + 4 ], %g2
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
200c830: 09 31 19 4d sethi %hi(0xc4653400), %g4
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
200c834: 84 00 c0 02 add %g3, %g2, %g2
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
200c838: 88 11 22 00 or %g4, 0x200, %g4
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
200c83c: 07 0e e6 b2 sethi %hi(0x3b9ac800), %g3
{
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
200c840: c4 20 60 04 st %g2, [ %g1 + 4 ]
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
200c844: 10 80 00 07 b 200c860 <_Timespec_Add_to+0x4c>
200c848: 86 10 e1 ff or %g3, 0x1ff, %g3
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
200c84c: c4 20 60 04 st %g2, [ %g1 + 4 ] <== NOT EXECUTED
time->tv_sec++;
200c850: c4 00 40 00 ld [ %g1 ], %g2 <== NOT EXECUTED
seconds++;
200c854: 90 02 20 01 inc %o0 <== NOT EXECUTED
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
time->tv_sec++;
200c858: 84 00 a0 01 inc %g2 <== NOT EXECUTED
200c85c: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
200c860: c4 00 60 04 ld [ %g1 + 4 ], %g2
200c864: 80 a0 80 03 cmp %g2, %g3
200c868: 18 bf ff f9 bgu 200c84c <_Timespec_Add_to+0x38> <== NEVER TAKEN
200c86c: 84 00 80 04 add %g2, %g4, %g2
time->tv_sec++;
seconds++;
}
return seconds;
}
200c870: 81 c3 e0 08 retl
0200a5bc <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a5bc: 9d e3 bf a0 save %sp, -96, %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;
200a5c0: c6 06 40 00 ld [ %i1 ], %g3
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a5c4: 88 10 00 19 mov %i1, %g4
* 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;
200a5c8: 85 38 e0 1f sra %g3, 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;
200a5cc: de 06 00 00 ld [ %i0 ], %o7
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a5d0: b3 28 a0 03 sll %g2, 3, %i1
/*
* 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;
200a5d4: c2 06 20 04 ld [ %i0 + 4 ], %g1
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a5d8: b1 30 e0 1d srl %g3, 0x1d, %i0
200a5dc: bb 28 e0 03 sll %g3, 3, %i5
200a5e0: b8 16 00 19 or %i0, %i1, %i4
200a5e4: 9b 37 60 1b srl %i5, 0x1b, %o5
200a5e8: b1 2f 20 05 sll %i4, 5, %i0
200a5ec: b3 2f 60 05 sll %i5, 5, %i1
200a5f0: b0 13 40 18 or %o5, %i0, %i0
200a5f4: ba a6 40 1d subcc %i1, %i5, %i5
200a5f8: b8 66 00 1c subx %i0, %i4, %i4
200a5fc: 9b 37 60 1a srl %i5, 0x1a, %o5
200a600: b1 2f 20 06 sll %i4, 6, %i0
200a604: b3 2f 60 06 sll %i5, 6, %i1
200a608: b0 13 40 18 or %o5, %i0, %i0
200a60c: b2 a6 40 1d subcc %i1, %i5, %i1
200a610: b0 66 00 1c subx %i0, %i4, %i0
200a614: 86 86 40 03 addcc %i1, %g3, %g3
200a618: 84 46 00 02 addx %i0, %g2, %g2
200a61c: bb 30 e0 1e srl %g3, 0x1e, %i5
200a620: b1 28 a0 02 sll %g2, 2, %i0
200a624: b3 28 e0 02 sll %g3, 2, %i1
200a628: b0 17 40 18 or %i5, %i0, %i0
200a62c: 86 80 c0 19 addcc %g3, %i1, %g3
200a630: 84 40 80 18 addx %g2, %i0, %g2
200a634: bb 30 e0 1e srl %g3, 0x1e, %i5
200a638: b1 28 a0 02 sll %g2, 2, %i0
200a63c: b3 28 e0 02 sll %g3, 2, %i1
200a640: b0 17 40 18 or %i5, %i0, %i0
200a644: b2 80 c0 19 addcc %g3, %i1, %i1
right += rhs->tv_nsec;
200a648: d6 01 20 04 ld [ %g4 + 4 ], %o3
* 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;
200a64c: b0 40 80 18 addx %g2, %i0, %i0
200a650: 85 36 60 1e srl %i1, 0x1e, %g2
200a654: bb 2e 60 02 sll %i1, 2, %i5
200a658: b9 2e 20 02 sll %i0, 2, %i4
200a65c: 86 86 40 1d addcc %i1, %i5, %g3
200a660: b8 10 80 1c or %g2, %i4, %i4
200a664: 84 46 00 1c addx %i0, %i4, %g2
right += rhs->tv_nsec;
200a668: 95 3a e0 1f sra %o3, 0x1f, %o2
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a66c: b3 30 e0 17 srl %g3, 0x17, %i1
200a670: b9 28 a0 09 sll %g2, 9, %i4
200a674: bb 28 e0 09 sll %g3, 9, %i5
200a678: 84 16 40 1c or %i1, %i4, %g2
right += rhs->tv_nsec;
200a67c: 96 87 40 0b addcc %i5, %o3, %o3
200a680: 94 40 80 0a addx %g2, %o2, %o2
if ( right == 0 ) {
200a684: 80 92 80 0b orcc %o2, %o3, %g0
200a688: 32 80 00 06 bne,a 200a6a0 <_Timespec_Divide+0xe4> <== NEVER TAKEN
200a68c: b9 3b e0 1f sra %o7, 0x1f, %i4 <== NOT EXECUTED
*ival_percentage = 0;
200a690: c0 26 80 00 clr [ %i2 ]
*fval_percentage = 0;
200a694: c0 26 c0 00 clr [ %i3 ]
return;
200a698: 81 c7 e0 08 ret
200a69c: 81 e8 00 00 restore
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a6a0: 85 2f 20 03 sll %i4, 3, %g2 <== NOT EXECUTED
200a6a4: b3 2b e0 03 sll %o7, 3, %i1 <== NOT EXECUTED
200a6a8: 87 33 e0 1d srl %o7, 0x1d, %g3 <== NOT EXECUTED
200a6ac: b0 10 c0 02 or %g3, %g2, %i0 <== NOT EXECUTED
200a6b0: 85 36 60 1b srl %i1, 0x1b, %g2 <== NOT EXECUTED
200a6b4: 99 2e 20 05 sll %i0, 5, %o4 <== NOT EXECUTED
200a6b8: 9b 2e 60 05 sll %i1, 5, %o5 <== NOT EXECUTED
200a6bc: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED
200a6c0: b2 a3 40 19 subcc %o5, %i1, %i1 <== NOT EXECUTED
200a6c4: 85 36 60 1a srl %i1, 0x1a, %g2 <== NOT EXECUTED
200a6c8: b0 63 00 18 subx %o4, %i0, %i0 <== NOT EXECUTED
200a6cc: 9b 2e 60 06 sll %i1, 6, %o5 <== NOT EXECUTED
200a6d0: 99 2e 20 06 sll %i0, 6, %o4 <== NOT EXECUTED
200a6d4: 9a a3 40 19 subcc %o5, %i1, %o5 <== NOT EXECUTED
200a6d8: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED
200a6dc: 98 63 00 18 subx %o4, %i0, %o4 <== NOT EXECUTED
200a6e0: ba 83 40 0f addcc %o5, %o7, %i5 <== NOT EXECUTED
200a6e4: 85 37 60 1e srl %i5, 0x1e, %g2 <== NOT EXECUTED
200a6e8: b8 43 00 1c addx %o4, %i4, %i4 <== NOT EXECUTED
200a6ec: 9b 2f 60 02 sll %i5, 2, %o5 <== NOT EXECUTED
200a6f0: 99 2f 20 02 sll %i4, 2, %o4 <== NOT EXECUTED
200a6f4: ba 87 40 0d addcc %i5, %o5, %i5 <== NOT EXECUTED
200a6f8: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED
200a6fc: 85 37 60 1e srl %i5, 0x1e, %g2 <== NOT EXECUTED
200a700: b8 47 00 0c addx %i4, %o4, %i4 <== NOT EXECUTED
200a704: 9b 2f 60 02 sll %i5, 2, %o5 <== NOT EXECUTED
200a708: 99 2f 20 02 sll %i4, 2, %o4 <== NOT EXECUTED
200a70c: 9a 87 40 0d addcc %i5, %o5, %o5 <== NOT EXECUTED
200a710: 98 10 80 0c or %g2, %o4, %o4 <== NOT EXECUTED
200a714: 85 33 60 1e srl %o5, 0x1e, %g2 <== NOT EXECUTED
200a718: 98 47 00 0c addx %i4, %o4, %o4 <== NOT EXECUTED
200a71c: b3 2b 60 02 sll %o5, 2, %i1 <== NOT EXECUTED
200a720: b1 2b 20 02 sll %o4, 2, %i0 <== NOT EXECUTED
200a724: 86 83 40 19 addcc %o5, %i1, %g3 <== NOT EXECUTED
200a728: b0 10 80 18 or %g2, %i0, %i0 <== NOT EXECUTED
200a72c: 84 43 00 18 addx %o4, %i0, %g2 <== NOT EXECUTED
200a730: 89 28 e0 09 sll %g3, 9, %g4 <== NOT EXECUTED
200a734: b9 30 e0 17 srl %g3, 0x17, %i4 <== NOT EXECUTED
left += lhs->tv_nsec;
200a738: 92 81 00 01 addcc %g4, %g1, %o1 <== 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;
200a73c: bb 28 a0 09 sll %g2, 9, %i5 <== NOT EXECUTED
left += lhs->tv_nsec;
200a740: 91 38 60 1f sra %g1, 0x1f, %o0 <== 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;
200a744: 84 17 00 1d or %i4, %i5, %g2 <== NOT EXECUTED
left += lhs->tv_nsec;
200a748: 90 40 80 08 addx %g2, %o0, %o0 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a74c: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED
200a750: bb 2a 60 02 sll %o1, 2, %i5 <== NOT EXECUTED
200a754: 85 32 60 1e srl %o1, 0x1e, %g2 <== NOT EXECUTED
200a758: b8 10 80 01 or %g2, %g1, %i4 <== NOT EXECUTED
200a75c: 83 37 60 1b srl %i5, 0x1b, %g1 <== NOT EXECUTED
200a760: 9b 2f 60 05 sll %i5, 5, %o5 <== NOT EXECUTED
200a764: 99 2f 20 05 sll %i4, 5, %o4 <== NOT EXECUTED
200a768: ba a3 40 1d subcc %o5, %i5, %i5 <== NOT EXECUTED
200a76c: 98 10 40 0c or %g1, %o4, %o4 <== NOT EXECUTED
200a770: b8 63 00 1c subx %o4, %i4, %i4 <== NOT EXECUTED
200a774: 92 87 40 09 addcc %i5, %o1, %o1 <== NOT EXECUTED
200a778: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED
200a77c: 90 47 00 08 addx %i4, %o0, %o0 <== NOT EXECUTED
200a780: b3 2a 60 02 sll %o1, 2, %i1 <== NOT EXECUTED
200a784: b1 2a 20 02 sll %o0, 2, %i0 <== NOT EXECUTED
200a788: 92 82 40 19 addcc %o1, %i1, %o1 <== NOT EXECUTED
200a78c: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED
200a790: 83 32 60 1e srl %o1, 0x1e, %g1 <== NOT EXECUTED
200a794: 90 42 00 18 addx %o0, %i0, %o0 <== NOT EXECUTED
200a798: b3 2a 60 02 sll %o1, 2, %i1 <== NOT EXECUTED
200a79c: b1 2a 20 02 sll %o0, 2, %i0 <== NOT EXECUTED
200a7a0: 92 82 40 19 addcc %o1, %i1, %o1 <== NOT EXECUTED
200a7a4: b0 10 40 18 or %g1, %i0, %i0 <== NOT EXECUTED
200a7a8: 87 32 60 1b srl %o1, 0x1b, %g3 <== NOT EXECUTED
200a7ac: 90 42 00 18 addx %o0, %i0, %o0 <== NOT EXECUTED
200a7b0: 83 2a 60 05 sll %o1, 5, %g1 <== NOT EXECUTED
200a7b4: 85 2a 20 05 sll %o0, 5, %g2 <== NOT EXECUTED
200a7b8: 92 10 00 01 mov %g1, %o1 <== NOT EXECUTED
200a7bc: 40 00 3a 5c call 201912c <__udivdi3> <== NOT EXECUTED
200a7c0: 90 10 c0 02 or %g3, %g2, %o0 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200a7c4: 94 10 20 00 clr %o2 <== NOT EXECUTED
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a7c8: b8 10 00 08 mov %o0, %i4 <== NOT EXECUTED
200a7cc: ba 10 00 09 mov %o1, %i5 <== NOT EXECUTED
*ival_percentage = answer / 1000;
200a7d0: 40 00 3a 57 call 201912c <__udivdi3> <== NOT EXECUTED
200a7d4: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
*fval_percentage = answer % 1000;
200a7d8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200a7dc: d2 26 80 00 st %o1, [ %i2 ] <== NOT EXECUTED
*fval_percentage = answer % 1000;
200a7e0: 94 10 20 00 clr %o2 <== NOT EXECUTED
200a7e4: 92 10 00 1d mov %i5, %o1 <== NOT EXECUTED
200a7e8: 40 00 3b 25 call 201947c <__umoddi3> <== NOT EXECUTED
200a7ec: 96 10 23 e8 mov 0x3e8, %o3 <== NOT EXECUTED
200a7f0: d2 26 c0 00 st %o1, [ %i3 ] <== NOT EXECUTED
200a7f4: 81 c7 e0 08 ret <== NOT EXECUTED
200a7f8: 81 e8 00 00 restore <== NOT EXECUTED
0200c57c <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
200c57c: 9d e3 bf a0 save %sp, -96, %sp
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
200c580: d4 1e 40 00 ldd [ %i1 ], %o2
200c584: 80 92 80 0b orcc %o2, %o3, %g0
200c588: 32 80 00 06 bne,a 200c5a0 <_Timestamp64_Divide+0x24> <== ALWAYS TAKEN
200c58c: f8 1e 00 00 ldd [ %i0 ], %i4
*_ival_percentage = 0;
200c590: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*_fval_percentage = 0;
200c594: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
return;
200c598: 81 c7 e0 08 ret <== NOT EXECUTED
200c59c: 81 e8 00 00 restore <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200c5a0: 83 2f 20 02 sll %i4, 2, %g1
200c5a4: 89 37 60 1e srl %i5, 0x1e, %g4
200c5a8: 87 2f 60 02 sll %i5, 2, %g3
200c5ac: 84 11 00 01 or %g4, %g1, %g2
200c5b0: 83 30 e0 1b srl %g3, 0x1b, %g1
200c5b4: b1 28 a0 05 sll %g2, 5, %i0
200c5b8: b3 28 e0 05 sll %g3, 5, %i1
200c5bc: b0 10 40 18 or %g1, %i0, %i0
200c5c0: 92 a6 40 03 subcc %i1, %g3, %o1
200c5c4: 90 66 00 02 subx %i0, %g2, %o0
200c5c8: 92 82 40 1d addcc %o1, %i5, %o1
200c5cc: 83 32 60 1e srl %o1, 0x1e, %g1
200c5d0: 90 42 00 1c addx %o0, %i4, %o0
200c5d4: bb 2a 60 02 sll %o1, 2, %i5
200c5d8: b9 2a 20 02 sll %o0, 2, %i4
200c5dc: 92 82 40 1d addcc %o1, %i5, %o1
200c5e0: b8 10 40 1c or %g1, %i4, %i4
200c5e4: 83 32 60 1e srl %o1, 0x1e, %g1
200c5e8: 90 42 00 1c addx %o0, %i4, %o0
200c5ec: bb 2a 60 02 sll %o1, 2, %i5
200c5f0: b9 2a 20 02 sll %o0, 2, %i4
200c5f4: 92 82 40 1d addcc %o1, %i5, %o1
200c5f8: b8 10 40 1c or %g1, %i4, %i4
200c5fc: 87 32 60 1b srl %o1, 0x1b, %g3
200c600: 90 42 00 1c addx %o0, %i4, %o0
200c604: 83 2a 60 05 sll %o1, 5, %g1
200c608: 85 2a 20 05 sll %o0, 5, %g2
200c60c: 92 10 00 01 mov %g1, %o1
200c610: 40 00 3a 13 call 201ae5c <__divdi3>
200c614: 90 10 c0 02 or %g3, %g2, %o0
*_ival_percentage = answer / 1000;
200c618: 94 10 20 00 clr %o2
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
200c61c: b8 10 00 08 mov %o0, %i4
200c620: ba 10 00 09 mov %o1, %i5
*_ival_percentage = answer / 1000;
200c624: 40 00 3a 0e call 201ae5c <__divdi3>
200c628: 96 10 23 e8 mov 0x3e8, %o3
*_fval_percentage = answer % 1000;
200c62c: 90 10 00 1c mov %i4, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
*_ival_percentage = answer / 1000;
200c630: d2 26 80 00 st %o1, [ %i2 ]
*_fval_percentage = answer % 1000;
200c634: 94 10 20 00 clr %o2
200c638: 92 10 00 1d mov %i5, %o1
200c63c: 40 00 3a f3 call 201b208 <__moddi3>
200c640: 96 10 23 e8 mov 0x3e8, %o3
200c644: d2 26 c0 00 st %o1, [ %i3 ]
200c648: 81 c7 e0 08 ret
200c64c: 81 e8 00 00 restore
0200ac30 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
200ac30: 9d e3 bf a0 save %sp, -96, %sp
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
200ac34: 03 00 80 73 sethi %hi(0x201cc00), %g1
200ac38: 82 10 60 fc or %g1, 0xfc, %g1 ! 201ccfc <Configuration>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ac3c: 05 00 80 77 sethi %hi(0x201dc00), %g2
initial_extensions = Configuration.User_extension_table;
200ac40: f4 00 60 48 ld [ %g1 + 0x48 ], %i2
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
200ac44: f8 00 60 44 ld [ %g1 + 0x44 ], %i4
200ac48: 82 10 a0 c8 or %g2, 0xc8, %g1
200ac4c: 86 00 60 04 add %g1, 4, %g3
head->previous = NULL;
200ac50: c0 20 60 04 clr [ %g1 + 4 ]
tail->previous = head;
200ac54: c2 20 60 08 st %g1, [ %g1 + 8 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ac58: c6 20 a0 c8 st %g3, [ %g2 + 0xc8 ]
200ac5c: 05 00 80 76 sethi %hi(0x201d800), %g2
200ac60: 82 10 a2 f4 or %g2, 0x2f4, %g1 ! 201daf4 <_User_extensions_Switches_list>
200ac64: 86 00 60 04 add %g1, 4, %g3
head->previous = NULL;
200ac68: c0 20 60 04 clr [ %g1 + 4 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
200ac6c: c6 20 a2 f4 st %g3, [ %g2 + 0x2f4 ]
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
200ac70: 80 a6 a0 00 cmp %i2, 0
200ac74: 02 80 00 1b be 200ace0 <_User_extensions_Handler_initialization+0xb0><== NEVER TAKEN
200ac78: c2 20 60 08 st %g1, [ %g1 + 8 ]
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
200ac7c: 83 2f 20 02 sll %i4, 2, %g1
200ac80: b7 2f 20 04 sll %i4, 4, %i3
200ac84: b6 26 c0 01 sub %i3, %g1, %i3
200ac88: b6 06 c0 1c add %i3, %i4, %i3
200ac8c: b7 2e e0 02 sll %i3, 2, %i3
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200ac90: 40 00 01 71 call 200b254 <_Workspace_Allocate_or_fatal_error>
200ac94: 90 10 00 1b mov %i3, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200ac98: 94 10 00 1b mov %i3, %o2
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
200ac9c: ba 10 00 08 mov %o0, %i5
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
200aca0: 92 10 20 00 clr %o1
200aca4: 40 00 15 e1 call 2010428 <memset>
200aca8: b6 10 20 00 clr %i3
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200acac: 10 80 00 0b b 200acd8 <_User_extensions_Handler_initialization+0xa8>
200acb0: 80 a6 c0 1c cmp %i3, %i4
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
200acb4: 90 07 60 14 add %i5, 0x14, %o0
200acb8: 92 06 80 09 add %i2, %o1, %o1
200acbc: 40 00 15 9e call 2010334 <memcpy>
200acc0: 94 10 20 20 mov 0x20, %o2
_User_extensions_Add_set( extension );
200acc4: 90 10 00 1d mov %i5, %o0
200acc8: 40 00 0c 7d call 200debc <_User_extensions_Add_set>
200accc: b6 06 e0 01 inc %i3
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
200acd0: ba 07 60 34 add %i5, 0x34, %i5
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
200acd4: 80 a6 c0 1c cmp %i3, %i4
200acd8: 12 bf ff f7 bne 200acb4 <_User_extensions_Handler_initialization+0x84>
200acdc: 93 2e e0 05 sll %i3, 5, %o1
200ace0: 81 c7 e0 08 ret
200ace4: 81 e8 00 00 restore
0200c958 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200c958: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
_ISR_Disable( level );
200c95c: 7f ff da ec call 200350c <sparc_disable_interrupts>
200c960: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c964: c2 06 00 00 ld [ %i0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c968: b8 06 20 04 add %i0, 4, %i4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200c96c: 80 a0 40 1c cmp %g1, %i4
200c970: 02 80 00 20 be 200c9f0 <_Watchdog_Adjust+0x98>
200c974: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200c978: 02 80 00 1b be 200c9e4 <_Watchdog_Adjust+0x8c>
200c97c: b6 10 20 01 mov 1, %i3
200c980: 80 a6 60 01 cmp %i1, 1
200c984: 12 80 00 1b bne 200c9f0 <_Watchdog_Adjust+0x98> <== NEVER TAKEN
200c988: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200c98c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200c990: 10 80 00 07 b 200c9ac <_Watchdog_Adjust+0x54>
200c994: b4 00 80 1a add %g2, %i2, %i2
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
200c998: c4 00 60 10 ld [ %g1 + 0x10 ], %g2
200c99c: 80 a6 80 02 cmp %i2, %g2
200c9a0: 3a 80 00 05 bcc,a 200c9b4 <_Watchdog_Adjust+0x5c>
200c9a4: f6 20 60 10 st %i3, [ %g1 + 0x10 ]
_Watchdog_First( header )->delta_interval -= units;
200c9a8: b4 20 80 1a sub %g2, %i2, %i2
break;
200c9ac: 10 80 00 11 b 200c9f0 <_Watchdog_Adjust+0x98>
200c9b0: f4 20 60 10 st %i2, [ %g1 + 0x10 ]
} else {
units -= _Watchdog_First( header )->delta_interval;
200c9b4: b4 26 80 02 sub %i2, %g2, %i2
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
200c9b8: 7f ff da d9 call 200351c <sparc_enable_interrupts>
200c9bc: 01 00 00 00 nop
_Watchdog_Tickle( header );
200c9c0: 40 00 00 90 call 200cc00 <_Watchdog_Tickle>
200c9c4: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200c9c8: 7f ff da d1 call 200350c <sparc_disable_interrupts>
200c9cc: 01 00 00 00 nop
if ( _Chain_Is_empty( header ) )
200c9d0: c2 06 00 00 ld [ %i0 ], %g1
200c9d4: 80 a0 40 1c cmp %g1, %i4
200c9d8: 12 80 00 04 bne 200c9e8 <_Watchdog_Adjust+0x90>
200c9dc: 80 a6 a0 00 cmp %i2, 0
200c9e0: 30 80 00 04 b,a 200c9f0 <_Watchdog_Adjust+0x98>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200c9e4: 80 a6 a0 00 cmp %i2, 0
200c9e8: 32 bf ff ec bne,a 200c998 <_Watchdog_Adjust+0x40> <== ALWAYS TAKEN
200c9ec: c2 06 00 00 ld [ %i0 ], %g1
}
break;
}
}
_ISR_Enable( level );
200c9f0: 7f ff da cb call 200351c <sparc_enable_interrupts>
200c9f4: 91 e8 00 08 restore %g0, %o0, %o0
0200b058 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
200b058: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
200b05c: 7f ff dd 9a call 20026c4 <sparc_disable_interrupts>
200b060: ba 10 00 18 mov %i0, %i5
previous_state = the_watchdog->state;
200b064: f0 06 20 08 ld [ %i0 + 8 ], %i0
switch ( previous_state ) {
200b068: 80 a6 20 01 cmp %i0, 1
200b06c: 22 80 00 1e be,a 200b0e4 <_Watchdog_Remove+0x8c>
200b070: c0 27 60 08 clr [ %i5 + 8 ]
200b074: 0a 80 00 1d bcs 200b0e8 <_Watchdog_Remove+0x90>
200b078: 03 00 80 76 sethi %hi(0x201d800), %g1
200b07c: 80 a6 20 03 cmp %i0, 3
200b080: 18 80 00 1a bgu 200b0e8 <_Watchdog_Remove+0x90> <== NEVER TAKEN
200b084: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
200b088: 10 80 00 02 b 200b090 <_Watchdog_Remove+0x38>
200b08c: c2 07 40 00 ld [ %i5 ], %g1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
200b090: c0 27 60 08 clr [ %i5 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
200b094: c4 00 40 00 ld [ %g1 ], %g2
200b098: 80 a0 a0 00 cmp %g2, 0
200b09c: 02 80 00 07 be 200b0b8 <_Watchdog_Remove+0x60>
200b0a0: 05 00 80 76 sethi %hi(0x201d800), %g2
next_watchdog->delta_interval += the_watchdog->delta_interval;
200b0a4: c6 00 60 10 ld [ %g1 + 0x10 ], %g3
200b0a8: c4 07 60 10 ld [ %i5 + 0x10 ], %g2
200b0ac: 84 00 c0 02 add %g3, %g2, %g2
200b0b0: c4 20 60 10 st %g2, [ %g1 + 0x10 ]
if ( _Watchdog_Sync_count )
200b0b4: 05 00 80 76 sethi %hi(0x201d800), %g2
200b0b8: c4 00 a3 e4 ld [ %g2 + 0x3e4 ], %g2 ! 201dbe4 <_Watchdog_Sync_count>
200b0bc: 80 a0 a0 00 cmp %g2, 0
200b0c0: 22 80 00 07 be,a 200b0dc <_Watchdog_Remove+0x84>
200b0c4: c4 07 60 04 ld [ %i5 + 4 ], %g2
_Watchdog_Sync_level = _ISR_Nest_level;
200b0c8: 05 00 80 78 sethi %hi(0x201e000), %g2
200b0cc: c6 00 a0 28 ld [ %g2 + 0x28 ], %g3 ! 201e028 <_Per_CPU_Information+0x8>
200b0d0: 05 00 80 76 sethi %hi(0x201d800), %g2
200b0d4: c6 20 a3 84 st %g3, [ %g2 + 0x384 ] ! 201db84 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
200b0d8: c4 07 60 04 ld [ %i5 + 4 ], %g2
next->previous = previous;
200b0dc: c4 20 60 04 st %g2, [ %g1 + 4 ]
previous->next = next;
200b0e0: c2 20 80 00 st %g1, [ %g2 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
200b0e4: 03 00 80 76 sethi %hi(0x201d800), %g1
200b0e8: c2 00 63 e8 ld [ %g1 + 0x3e8 ], %g1 ! 201dbe8 <_Watchdog_Ticks_since_boot>
200b0ec: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
_ISR_Enable( level );
200b0f0: 7f ff dd 79 call 20026d4 <sparc_enable_interrupts>
200b0f4: 01 00 00 00 nop
return( previous_state );
}
200b0f8: 81 c7 e0 08 ret
200b0fc: 81 e8 00 00 restore
0200c2c8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
200c2c8: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
200c2cc: 7f ff db 6d call 2003080 <sparc_disable_interrupts>
200c2d0: b8 10 00 18 mov %i0, %i4
200c2d4: b0 10 00 08 mov %o0, %i0
printk( "Watchdog Chain: %s %p\n", name, header );
200c2d8: 11 00 80 76 sethi %hi(0x201d800), %o0
200c2dc: 94 10 00 19 mov %i1, %o2
200c2e0: 90 12 20 60 or %o0, 0x60, %o0
200c2e4: 7f ff e3 51 call 2005028 <printk>
200c2e8: 92 10 00 1c mov %i4, %o1
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
200c2ec: fa 06 40 00 ld [ %i1 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
200c2f0: b2 06 60 04 add %i1, 4, %i1
if ( !_Chain_Is_empty( header ) ) {
200c2f4: 80 a7 40 19 cmp %i5, %i1
200c2f8: 12 80 00 04 bne 200c308 <_Watchdog_Report_chain+0x40>
200c2fc: 92 10 00 1d mov %i5, %o1
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
200c300: 10 80 00 0d b 200c334 <_Watchdog_Report_chain+0x6c>
200c304: 11 00 80 76 sethi %hi(0x201d800), %o0
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
200c308: 40 00 00 0f call 200c344 <_Watchdog_Report>
200c30c: 90 10 20 00 clr %o0
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
200c310: fa 07 40 00 ld [ %i5 ], %i5
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
200c314: 80 a7 40 19 cmp %i5, %i1
200c318: 12 bf ff fc bne 200c308 <_Watchdog_Report_chain+0x40> <== NEVER TAKEN
200c31c: 92 10 00 1d mov %i5, %o1
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
200c320: 11 00 80 76 sethi %hi(0x201d800), %o0
200c324: 92 10 00 1c mov %i4, %o1
200c328: 7f ff e3 40 call 2005028 <printk>
200c32c: 90 12 20 78 or %o0, 0x78, %o0
200c330: 30 80 00 03 b,a 200c33c <_Watchdog_Report_chain+0x74>
} else {
printk( "Chain is empty\n" );
200c334: 7f ff e3 3d call 2005028 <printk>
200c338: 90 12 20 88 or %o0, 0x88, %o0
}
_ISR_Enable( level );
200c33c: 7f ff db 55 call 2003090 <sparc_enable_interrupts>
200c340: 81 e8 00 00 restore
02007968 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
2007968: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
200796c: 3b 00 80 7f sethi %hi(0x201fc00), %i5
2007970: 40 00 04 68 call 2008b10 <pthread_mutex_lock>
2007974: 90 17 62 bc or %i5, 0x2bc, %o0 ! 201febc <aio_request_queue>
if (fcntl (fildes, F_GETFD) < 0) {
2007978: 90 10 00 18 mov %i0, %o0
200797c: 40 00 1a ae call 200e434 <fcntl>
2007980: 92 10 20 01 mov 1, %o1
2007984: 80 a2 20 00 cmp %o0, 0
2007988: 16 80 00 08 bge 20079a8 <aio_cancel+0x40>
200798c: 80 a6 60 00 cmp %i1, 0
pthread_mutex_unlock(&aio_request_queue.mutex);
2007990: 40 00 04 81 call 2008b94 <pthread_mutex_unlock>
2007994: 90 17 62 bc or %i5, 0x2bc, %o0
rtems_set_errno_and_return_minus_one (EBADF);
2007998: 40 00 28 e6 call 2011d30 <__errno>
200799c: 01 00 00 00 nop
20079a0: 10 80 00 54 b 2007af0 <aio_cancel+0x188>
20079a4: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
20079a8: 32 80 00 35 bne,a 2007a7c <aio_cancel+0x114>
20079ac: f8 06 40 00 ld [ %i1 ], %i4
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
20079b0: 11 00 80 7f sethi %hi(0x201fc00), %o0
20079b4: 92 10 00 18 mov %i0, %o1
20079b8: 90 12 23 04 or %o0, 0x304, %o0
20079bc: 40 00 01 71 call 2007f80 <rtems_aio_search_fd>
20079c0: 94 10 20 00 clr %o2
if (r_chain == NULL) {
20079c4: b8 92 20 00 orcc %o0, 0, %i4
20079c8: 12 80 00 20 bne 2007a48 <aio_cancel+0xe0>
20079cc: b6 07 20 1c add %i4, 0x1c, %i3
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
20079d0: ba 17 62 bc or %i5, 0x2bc, %i5
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
20079d4: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
20079d8: 82 07 60 58 add %i5, 0x58, %g1
20079dc: 80 a0 80 01 cmp %g2, %g1
20079e0: 02 80 00 08 be 2007a00 <aio_cancel+0x98> <== NEVER TAKEN
20079e4: 92 10 00 18 mov %i0, %o1
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
20079e8: 90 07 60 54 add %i5, 0x54, %o0
20079ec: 40 00 01 65 call 2007f80 <rtems_aio_search_fd>
20079f0: 94 10 20 00 clr %o2
if (r_chain == NULL) {
20079f4: b8 92 20 00 orcc %o0, 0, %i4
20079f8: 12 80 00 08 bne 2007a18 <aio_cancel+0xb0>
20079fc: 01 00 00 00 nop
pthread_mutex_unlock(&aio_request_queue.mutex);
2007a00: 11 00 80 7f sethi %hi(0x201fc00), %o0
return AIO_ALLDONE;
2007a04: b0 10 20 02 mov 2, %i0
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock(&aio_request_queue.mutex);
2007a08: 40 00 04 63 call 2008b94 <pthread_mutex_unlock>
2007a0c: 90 12 22 bc or %o0, 0x2bc, %o0
return AIO_ALLDONE;
2007a10: 81 c7 e0 08 ret
2007a14: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2007a18: 40 00 0a cb call 200a544 <_Chain_Extract>
2007a1c: b6 07 20 1c add %i4, 0x1c, %i3
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
2007a20: 40 00 01 80 call 2008020 <rtems_aio_remove_fd>
2007a24: 90 10 00 1c mov %i4, %o0
pthread_mutex_destroy (&r_chain->mutex);
2007a28: 40 00 03 8c call 2008858 <pthread_mutex_destroy>
2007a2c: 90 10 00 1b mov %i3, %o0
pthread_cond_destroy (&r_chain->mutex);
2007a30: 40 00 02 ac call 20084e0 <pthread_cond_destroy>
2007a34: 90 10 00 1b mov %i3, %o0
free (r_chain);
2007a38: 7f ff f0 ca call 2003d60 <free>
2007a3c: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007a40: 10 80 00 0b b 2007a6c <aio_cancel+0x104>
2007a44: 90 10 00 1d mov %i5, %o0
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2007a48: 40 00 04 32 call 2008b10 <pthread_mutex_lock>
2007a4c: 90 10 00 1b mov %i3, %o0
2007a50: 40 00 0a bd call 200a544 <_Chain_Extract>
2007a54: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
2007a58: 40 00 01 72 call 2008020 <rtems_aio_remove_fd>
2007a5c: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&r_chain->mutex);
2007a60: 40 00 04 4d call 2008b94 <pthread_mutex_unlock>
2007a64: 90 10 00 1b mov %i3, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007a68: 90 17 62 bc or %i5, 0x2bc, %o0
2007a6c: 40 00 04 4a call 2008b94 <pthread_mutex_unlock>
2007a70: b0 10 20 00 clr %i0
return AIO_CANCELED;
2007a74: 81 c7 e0 08 ret
2007a78: 81 e8 00 00 restore
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
2007a7c: 80 a7 00 18 cmp %i4, %i0
2007a80: 12 80 00 17 bne 2007adc <aio_cancel+0x174>
2007a84: 90 17 62 bc or %i5, 0x2bc, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
2007a88: 11 00 80 7f sethi %hi(0x201fc00), %o0
2007a8c: 92 10 00 1c mov %i4, %o1
2007a90: 90 12 23 04 or %o0, 0x304, %o0
2007a94: 40 00 01 3b call 2007f80 <rtems_aio_search_fd>
2007a98: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2007a9c: b6 92 20 00 orcc %o0, 0, %i3
2007aa0: 32 80 00 1c bne,a 2007b10 <aio_cancel+0x1a8>
2007aa4: b8 06 e0 1c add %i3, 0x1c, %i4
2007aa8: ba 17 62 bc or %i5, 0x2bc, %i5
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007aac: c4 07 60 54 ld [ %i5 + 0x54 ], %g2
2007ab0: 82 07 60 58 add %i5, 0x58, %g1
2007ab4: 80 a0 80 01 cmp %g2, %g1
2007ab8: 02 bf ff d2 be 2007a00 <aio_cancel+0x98> <== NEVER TAKEN
2007abc: 92 10 00 1c mov %i4, %o1
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
2007ac0: 90 07 60 54 add %i5, 0x54, %o0
2007ac4: 40 00 01 2f call 2007f80 <rtems_aio_search_fd>
2007ac8: 94 10 20 00 clr %o2
if (r_chain == NULL) {
2007acc: 80 a2 20 00 cmp %o0, 0
2007ad0: 12 80 00 0b bne 2007afc <aio_cancel+0x194>
2007ad4: 90 02 20 08 add %o0, 8, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007ad8: 90 10 00 1d mov %i5, %o0
2007adc: 40 00 04 2e call 2008b94 <pthread_mutex_unlock>
2007ae0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one (EINVAL);
2007ae4: 40 00 28 93 call 2011d30 <__errno>
2007ae8: 01 00 00 00 nop
2007aec: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007af0: c2 22 00 00 st %g1, [ %o0 ]
2007af4: 81 c7 e0 08 ret
2007af8: 91 e8 3f ff restore %g0, -1, %o0
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2007afc: 40 00 01 5d call 2008070 <rtems_aio_remove_req>
2007b00: 92 10 00 19 mov %i1, %o1
2007b04: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007b08: 10 80 00 0b b 2007b34 <aio_cancel+0x1cc>
2007b0c: 90 10 00 1d mov %i5, %o0
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
2007b10: 40 00 04 00 call 2008b10 <pthread_mutex_lock>
2007b14: 90 10 00 1c mov %i4, %o0
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
2007b18: 92 10 00 19 mov %i1, %o1
2007b1c: 40 00 01 55 call 2008070 <rtems_aio_remove_req>
2007b20: 90 06 e0 08 add %i3, 8, %o0
2007b24: b0 10 00 08 mov %o0, %i0
pthread_mutex_unlock (&r_chain->mutex);
2007b28: 40 00 04 1b call 2008b94 <pthread_mutex_unlock>
2007b2c: 90 10 00 1c mov %i4, %o0
pthread_mutex_unlock (&aio_request_queue.mutex);
2007b30: 90 17 62 bc or %i5, 0x2bc, %o0
2007b34: 40 00 04 18 call 2008b94 <pthread_mutex_unlock>
2007b38: 01 00 00 00 nop
return result;
}
return AIO_ALLDONE;
}
2007b3c: 81 c7 e0 08 ret
2007b40: 81 e8 00 00 restore
02007b4c <aio_fsync>:
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
2007b4c: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
2007b50: 03 00 00 08 sethi %hi(0x2000), %g1
2007b54: 80 a6 00 01 cmp %i0, %g1
2007b58: 12 80 00 10 bne 2007b98 <aio_fsync+0x4c>
2007b5c: ba 10 20 16 mov 0x16, %i5
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
2007b60: d0 06 40 00 ld [ %i1 ], %o0
2007b64: 40 00 1a 34 call 200e434 <fcntl>
2007b68: 92 10 20 03 mov 3, %o1
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
2007b6c: 90 0a 20 03 and %o0, 3, %o0
2007b70: 90 02 3f ff add %o0, -1, %o0
2007b74: 80 a2 20 01 cmp %o0, 1
2007b78: 18 80 00 08 bgu 2007b98 <aio_fsync+0x4c>
2007b7c: ba 10 20 09 mov 9, %i5
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
2007b80: 7f ff f1 ad call 2004234 <malloc>
2007b84: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
2007b88: b0 92 20 00 orcc %o0, 0, %i0
2007b8c: 32 80 00 09 bne,a 2007bb0 <aio_fsync+0x64> <== ALWAYS TAKEN
2007b90: f2 26 20 14 st %i1, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2007b94: ba 10 20 0b mov 0xb, %i5 <== NOT EXECUTED
2007b98: 82 10 3f ff mov -1, %g1
2007b9c: fa 26 60 34 st %i5, [ %i1 + 0x34 ]
2007ba0: 40 00 28 64 call 2011d30 <__errno>
2007ba4: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
2007ba8: 10 80 00 06 b 2007bc0 <aio_fsync+0x74>
2007bac: fa 22 00 00 st %i5, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
2007bb0: 82 10 20 03 mov 3, %g1
2007bb4: c2 26 60 30 st %g1, [ %i1 + 0x30 ]
return rtems_aio_enqueue (req);
2007bb8: 40 00 01 4e call 20080f0 <rtems_aio_enqueue>
2007bbc: 81 e8 00 00 restore
}
2007bc0: 81 c7 e0 08 ret
2007bc4: 91 e8 3f ff restore %g0, -1, %o0
02008308 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
2008308: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
200830c: d0 06 00 00 ld [ %i0 ], %o0
2008310: 92 10 20 03 mov 3, %o1
2008314: 40 00 18 48 call 200e434 <fcntl>
2008318: ba 10 00 18 mov %i0, %i5
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
200831c: 80 8a 20 01 btst 1, %o0
2008320: 12 80 00 11 bne 2008364 <aio_read+0x5c>
2008324: b8 10 20 09 mov 9, %i4
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
2008328: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200832c: 80 a0 60 00 cmp %g1, 0
2008330: 22 80 00 04 be,a 2008340 <aio_read+0x38>
2008334: c2 06 20 08 ld [ %i0 + 8 ], %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
2008338: 10 80 00 0b b 2008364 <aio_read+0x5c>
200833c: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
2008340: 80 a0 60 00 cmp %g1, 0
2008344: 06 80 00 08 bl 2008364 <aio_read+0x5c>
2008348: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
200834c: 7f ff ef ba call 2004234 <malloc>
2008350: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
2008354: b0 92 20 00 orcc %o0, 0, %i0
2008358: 32 80 00 09 bne,a 200837c <aio_read+0x74> <== ALWAYS TAKEN
200835c: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
2008360: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED
2008364: 82 10 3f ff mov -1, %g1
2008368: f8 27 60 34 st %i4, [ %i5 + 0x34 ]
200836c: 40 00 26 71 call 2011d30 <__errno>
2008370: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
2008374: 10 80 00 06 b 200838c <aio_read+0x84>
2008378: f8 22 00 00 st %i4, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
200837c: 82 10 20 01 mov 1, %g1
2008380: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
return rtems_aio_enqueue (req);
2008384: 7f ff ff 5b call 20080f0 <rtems_aio_enqueue>
2008388: 81 e8 00 00 restore
}
200838c: 81 c7 e0 08 ret
2008390: 91 e8 3f ff restore %g0, -1, %o0
0200839c <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
200839c: 9d e3 bf a0 save %sp, -96, %sp
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
20083a0: d0 06 00 00 ld [ %i0 ], %o0
20083a4: 40 00 18 24 call 200e434 <fcntl>
20083a8: 92 10 20 03 mov 3, %o1
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
20083ac: ba 10 00 18 mov %i0, %i5
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
20083b0: 90 0a 20 03 and %o0, 3, %o0
20083b4: 90 02 3f ff add %o0, -1, %o0
20083b8: 80 a2 20 01 cmp %o0, 1
20083bc: 18 80 00 11 bgu 2008400 <aio_write+0x64>
20083c0: b8 10 20 09 mov 9, %i4
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
20083c4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20083c8: 80 a0 60 00 cmp %g1, 0
20083cc: 22 80 00 04 be,a 20083dc <aio_write+0x40>
20083d0: c2 06 20 08 ld [ %i0 + 8 ], %g1
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
20083d4: 10 80 00 0b b 2008400 <aio_write+0x64>
20083d8: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
20083dc: 80 a0 60 00 cmp %g1, 0
20083e0: 06 80 00 08 bl 2008400 <aio_write+0x64>
20083e4: b8 10 20 16 mov 0x16, %i4
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
20083e8: 7f ff ef 93 call 2004234 <malloc>
20083ec: 90 10 20 18 mov 0x18, %o0
if (req == NULL)
20083f0: b0 92 20 00 orcc %o0, 0, %i0
20083f4: 32 80 00 09 bne,a 2008418 <aio_write+0x7c> <== ALWAYS TAKEN
20083f8: fa 26 20 14 st %i5, [ %i0 + 0x14 ]
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
20083fc: b8 10 20 0b mov 0xb, %i4 <== NOT EXECUTED
2008400: 82 10 3f ff mov -1, %g1
2008404: f8 27 60 34 st %i4, [ %i5 + 0x34 ]
2008408: 40 00 26 4a call 2011d30 <__errno>
200840c: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
2008410: 10 80 00 06 b 2008428 <aio_write+0x8c>
2008414: f8 22 00 00 st %i4, [ %o0 ]
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
2008418: 82 10 20 02 mov 2, %g1
200841c: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
return rtems_aio_enqueue (req);
2008420: 7f ff ff 34 call 20080f0 <rtems_aio_enqueue>
2008424: 81 e8 00 00 restore
}
2008428: 81 c7 e0 08 ret
200842c: 91 e8 3f ff restore %g0, -1, %o0
02007584 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
2007584: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2007588: 80 a6 60 00 cmp %i1, 0
200758c: 02 80 00 24 be 200761c <clock_gettime+0x98>
2007590: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2007594: 12 80 00 14 bne 20075e4 <clock_gettime+0x60>
2007598: 80 a6 20 04 cmp %i0, 4
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
200759c: 40 00 08 19 call 2009600 <_TOD_Get_as_timestamp>
20075a0: 90 07 bf f8 add %fp, -8, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
20075a4: f8 1f bf f8 ldd [ %fp + -8 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20075a8: 94 10 20 00 clr %o2
20075ac: 90 10 00 1c mov %i4, %o0
20075b0: 92 10 00 1d mov %i5, %o1
20075b4: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20075b8: 40 00 53 ae call 201c470 <__divdi3>
20075bc: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20075c0: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20075c4: d2 26 40 00 st %o1, [ %i1 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20075c8: 94 10 20 00 clr %o2
20075cc: 92 10 00 1d mov %i5, %o1
20075d0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20075d4: 40 00 54 92 call 201c81c <__moddi3>
20075d8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
20075dc: 10 80 00 06 b 20075f4 <clock_gettime+0x70>
20075e0: d2 26 60 04 st %o1, [ %i1 + 4 ]
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
20075e4: 12 80 00 06 bne 20075fc <clock_gettime+0x78> <== ALWAYS TAKEN
20075e8: 80 a6 20 02 cmp %i0, 2
_TOD_Get_uptime_as_timespec( tp );
20075ec: 40 00 08 18 call 200964c <_TOD_Get_uptime_as_timespec>
20075f0: 90 10 00 19 mov %i1, %o0
return 0;
20075f4: 81 c7 e0 08 ret
20075f8: 91 e8 20 00 restore %g0, 0, %o0
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
20075fc: 02 bf ff fc be 20075ec <clock_gettime+0x68>
2007600: 80 a6 20 03 cmp %i0, 3
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
2007604: 12 80 00 06 bne 200761c <clock_gettime+0x98>
2007608: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
200760c: 40 00 25 3a call 2010af4 <__errno>
2007610: 01 00 00 00 nop
2007614: 10 80 00 05 b 2007628 <clock_gettime+0xa4>
2007618: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
200761c: 40 00 25 36 call 2010af4 <__errno>
2007620: 01 00 00 00 nop
2007624: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007628: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
200762c: 81 c7 e0 08 ret
2007630: 91 e8 3f ff restore %g0, -1, %o0
02025620 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2025620: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2025624: 80 a6 60 00 cmp %i1, 0
2025628: 02 80 00 4c be 2025758 <clock_settime+0x138> <== NEVER TAKEN
202562c: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2025630: 12 80 00 42 bne 2025738 <clock_settime+0x118>
2025634: 80 a6 20 02 cmp %i0, 2
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
2025638: c4 06 40 00 ld [ %i1 ], %g2
202563c: 03 08 76 b9 sethi %hi(0x21dae400), %g1
2025640: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff <RAM_END+0x1f9ae4ff>
2025644: 80 a0 80 01 cmp %g2, %g1
2025648: 08 80 00 44 bleu 2025758 <clock_settime+0x138>
202564c: 03 00 81 87 sethi %hi(0x2061c00), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2025650: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 2061f60 <_Thread_Dispatch_disable_level>
2025654: 84 00 a0 01 inc %g2
2025658: c4 20 63 60 st %g2, [ %g1 + 0x360 ]
return _Thread_Dispatch_disable_level;
202565c: c2 00 63 60 ld [ %g1 + 0x360 ], %g1
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
2025660: c6 06 40 00 ld [ %i1 ], %g3
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
2025664: 90 07 bf f8 add %fp, -8, %o0
const struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_Timestamp_Set(
2025668: 85 38 e0 1f sra %g3, 0x1f, %g2
Timestamp64_Control *_time,
Timestamp64_Control _seconds,
Timestamp64_Control _nanoseconds
)
{
*_time = _seconds * 1000000000L + _nanoseconds;
202566c: 83 28 a0 03 sll %g2, 3, %g1
2025670: bb 28 e0 03 sll %g3, 3, %i5
2025674: 89 30 e0 1d srl %g3, 0x1d, %g4
2025678: b7 2f 60 05 sll %i5, 5, %i3
202567c: b8 11 00 01 or %g4, %g1, %i4
2025680: 83 37 60 1b srl %i5, 0x1b, %g1
2025684: b5 2f 20 05 sll %i4, 5, %i2
2025688: ba a6 c0 1d subcc %i3, %i5, %i5
202568c: b4 10 40 1a or %g1, %i2, %i2
2025690: b7 2f 60 06 sll %i5, 6, %i3
2025694: b8 66 80 1c subx %i2, %i4, %i4
2025698: 83 37 60 1a srl %i5, 0x1a, %g1
202569c: b6 a6 c0 1d subcc %i3, %i5, %i3
20256a0: b5 2f 20 06 sll %i4, 6, %i2
20256a4: b4 10 40 1a or %g1, %i2, %i2
20256a8: b4 66 80 1c subx %i2, %i4, %i2
20256ac: 86 86 c0 03 addcc %i3, %g3, %g3
20256b0: 83 30 e0 1e srl %g3, 0x1e, %g1
20256b4: b7 28 e0 02 sll %g3, 2, %i3
20256b8: 84 46 80 02 addx %i2, %g2, %g2
20256bc: 86 80 c0 1b addcc %g3, %i3, %g3
20256c0: b5 28 a0 02 sll %g2, 2, %i2
20256c4: b7 28 e0 02 sll %g3, 2, %i3
20256c8: b4 10 40 1a or %g1, %i2, %i2
20256cc: 83 30 e0 1e srl %g3, 0x1e, %g1
20256d0: 84 40 80 1a addx %g2, %i2, %g2
20256d4: b6 80 c0 1b addcc %g3, %i3, %i3
20256d8: bb 2e e0 02 sll %i3, 2, %i5
20256dc: b5 28 a0 02 sll %g2, 2, %i2
20256e0: b4 10 40 1a or %g1, %i2, %i2
20256e4: 83 36 e0 1e srl %i3, 0x1e, %g1
20256e8: b4 40 80 1a addx %g2, %i2, %i2
20256ec: 86 86 c0 1d addcc %i3, %i5, %g3
20256f0: b9 2e a0 02 sll %i2, 2, %i4
20256f4: bb 30 e0 17 srl %g3, 0x17, %i5
20256f8: b8 10 40 1c or %g1, %i4, %i4
20256fc: 84 46 80 1c addx %i2, %i4, %g2
2025700: 89 28 a0 09 sll %g2, 9, %g4
2025704: 84 17 40 04 or %i5, %g4, %g2
2025708: fa 06 60 04 ld [ %i1 + 4 ], %i5
202570c: 83 28 e0 09 sll %g3, 9, %g1
2025710: b9 3f 60 1f sra %i5, 0x1f, %i4
2025714: 86 80 40 1d addcc %g1, %i5, %g3
2025718: 84 40 80 1c addx %g2, %i4, %g2
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
202571c: b0 10 20 00 clr %i0
&tod_as_timestamp,
tod_as_timespec->tv_sec,
tod_as_timespec->tv_nsec
);
_TOD_Set_with_timestamp( &tod_as_timestamp );
2025720: 40 00 04 82 call 2026928 <_TOD_Set_with_timestamp>
2025724: c4 3f bf f8 std %g2, [ %fp + -8 ]
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
2025728: 7f ff 91 ca call 2009e50 <_Thread_Enable_dispatch>
202572c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
2025730: 81 c7 e0 08 ret
2025734: 81 e8 00 00 restore
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
2025738: 02 80 00 04 be 2025748 <clock_settime+0x128>
202573c: 80 a6 20 03 cmp %i0, 3
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
2025740: 12 80 00 06 bne 2025758 <clock_settime+0x138>
2025744: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
2025748: 40 00 44 0d call 203677c <__errno>
202574c: 01 00 00 00 nop
2025750: 10 80 00 05 b 2025764 <clock_settime+0x144>
2025754: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
2025758: 40 00 44 09 call 203677c <__errno>
202575c: 01 00 00 00 nop
2025760: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2025764: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2025768: 81 c7 e0 08 ret
202576c: 91 e8 3f ff restore %g0, -1, %o0
0201a340 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
201a340: 9d e3 bf 90 save %sp, -112, %sp
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
201a344: 7f ff ff 68 call 201a0e4 <getpid>
201a348: 01 00 00 00 nop
201a34c: 80 a6 00 08 cmp %i0, %o0
201a350: 02 80 00 06 be 201a368 <killinfo+0x28>
201a354: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
201a358: 7f ff d5 b0 call 200fa18 <__errno>
201a35c: 01 00 00 00 nop
201a360: 10 80 00 a4 b 201a5f0 <killinfo+0x2b0>
201a364: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3>
/*
* Validate the signal passed.
*/
if ( !sig )
201a368: 32 80 00 03 bne,a 201a374 <killinfo+0x34>
201a36c: ba 06 7f ff add %i1, -1, %i5
201a370: 30 80 00 04 b,a 201a380 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201a374: 80 a7 60 1f cmp %i5, 0x1f
201a378: 28 80 00 06 bleu,a 201a390 <killinfo+0x50>
201a37c: 83 2e 60 02 sll %i1, 2, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
201a380: 7f ff d5 a6 call 200fa18 <__errno>
201a384: 01 00 00 00 nop
201a388: 10 80 00 9a b 201a5f0 <killinfo+0x2b0>
201a38c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
201a390: 85 2e 60 04 sll %i1, 4, %g2
201a394: 84 20 80 01 sub %g2, %g1, %g2
201a398: 03 00 80 78 sethi %hi(0x201e000), %g1
201a39c: 82 10 60 80 or %g1, 0x80, %g1 ! 201e080 <_POSIX_signals_Vectors>
201a3a0: 82 00 40 02 add %g1, %g2, %g1
201a3a4: c2 00 60 08 ld [ %g1 + 8 ], %g1
201a3a8: 80 a0 60 01 cmp %g1, 1
201a3ac: 02 80 00 9d be 201a620 <killinfo+0x2e0>
201a3b0: 80 a6 60 04 cmp %i1, 4
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
201a3b4: 02 80 00 06 be 201a3cc <killinfo+0x8c>
201a3b8: 80 a6 60 08 cmp %i1, 8
201a3bc: 02 80 00 04 be 201a3cc <killinfo+0x8c>
201a3c0: 80 a6 60 0b cmp %i1, 0xb
201a3c4: 12 80 00 08 bne 201a3e4 <killinfo+0xa4>
201a3c8: 82 10 20 01 mov 1, %g1
return pthread_kill( pthread_self(), sig );
201a3cc: 40 00 01 2d call 201a880 <pthread_self>
201a3d0: 01 00 00 00 nop
201a3d4: 40 00 00 f2 call 201a79c <pthread_kill>
201a3d8: 92 10 00 19 mov %i1, %o1
201a3dc: 81 c7 e0 08 ret
201a3e0: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201a3e4: f2 27 bf f4 st %i1, [ %fp + -12 ]
siginfo->si_code = SI_USER;
201a3e8: c2 27 bf f8 st %g1, [ %fp + -8 ]
if ( !value ) {
201a3ec: 80 a6 a0 00 cmp %i2, 0
201a3f0: 12 80 00 04 bne 201a400 <killinfo+0xc0>
201a3f4: bb 28 40 1d sll %g1, %i5, %i5
siginfo->si_value.sival_int = 0;
201a3f8: 10 80 00 04 b 201a408 <killinfo+0xc8>
201a3fc: c0 27 bf fc clr [ %fp + -4 ]
} else {
siginfo->si_value = *value;
201a400: c2 06 80 00 ld [ %i2 ], %g1
201a404: c2 27 bf fc st %g1, [ %fp + -4 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
201a408: 03 00 80 76 sethi %hi(0x201d800), %g1
201a40c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 201daf0 <_Thread_Dispatch_disable_level>
201a410: 84 00 a0 01 inc %g2
201a414: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ]
return _Thread_Dispatch_disable_level;
201a418: c2 00 62 f0 ld [ %g1 + 0x2f0 ], %g1
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
201a41c: 03 00 80 78 sethi %hi(0x201e000), %g1
201a420: d0 00 60 2c ld [ %g1 + 0x2c ], %o0 ! 201e02c <_Per_CPU_Information+0xc>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
201a424: c4 02 21 5c ld [ %o0 + 0x15c ], %g2
201a428: c4 00 a0 d0 ld [ %g2 + 0xd0 ], %g2
201a42c: 80 af 40 02 andncc %i5, %g2, %g0
201a430: 12 80 00 52 bne 201a578 <killinfo+0x238>
201a434: 03 00 80 78 sethi %hi(0x201e000), %g1
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
201a438: 05 00 80 78 sethi %hi(0x201e000), %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
201a43c: c2 00 62 0c ld [ %g1 + 0x20c ], %g1
201a440: 10 80 00 0a b 201a468 <killinfo+0x128>
201a444: 84 10 a2 10 or %g2, 0x210, %g2
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
201a448: 80 8f 40 04 btst %i5, %g4
201a44c: 12 80 00 4a bne 201a574 <killinfo+0x234>
201a450: c6 00 61 5c ld [ %g1 + 0x15c ], %g3
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
201a454: c6 00 e0 d0 ld [ %g3 + 0xd0 ], %g3
201a458: 80 af 40 03 andncc %i5, %g3, %g0
201a45c: 12 80 00 47 bne 201a578 <killinfo+0x238>
201a460: 90 10 00 01 mov %g1, %o0
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
201a464: c2 00 40 00 ld [ %g1 ], %g1
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
201a468: 80 a0 40 02 cmp %g1, %g2
201a46c: 32 bf ff f7 bne,a 201a448 <killinfo+0x108>
201a470: c8 00 60 30 ld [ %g1 + 0x30 ], %g4
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a474: 03 00 80 73 sethi %hi(0x201cc00), %g1
201a478: c6 08 61 48 ldub [ %g1 + 0x148 ], %g3 ! 201cd48 <rtems_maximum_priority>
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
201a47c: b8 10 20 02 mov 2, %i4
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201a480: 86 00 e0 01 inc %g3
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
201a484: 82 10 20 00 clr %g1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
201a488: 1b 00 80 76 sethi %hi(0x201d800), %o5
*/
RTEMS_INLINE_ROUTINE bool _States_Is_interruptible_by_signal (
States_Control the_states
)
{
return (the_states & STATES_INTERRUPTIBLE_BY_SIGNAL);
201a48c: 35 04 00 00 sethi %hi(0x10000000), %i2
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
201a490: 85 2f 20 02 sll %i4, 2, %g2
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
201a494: 88 13 62 54 or %o5, 0x254, %g4
201a498: c4 01 00 02 ld [ %g4 + %g2 ], %g2
201a49c: 80 a0 a0 00 cmp %g2, 0
201a4a0: 22 80 00 2f be,a 201a55c <killinfo+0x21c> <== NEVER TAKEN
201a4a4: b8 07 20 01 inc %i4 <== NOT EXECUTED
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
201a4a8: c4 00 a0 04 ld [ %g2 + 4 ], %g2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a4ac: b6 10 20 01 mov 1, %i3
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
201a4b0: d8 10 a0 10 lduh [ %g2 + 0x10 ], %o4
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a4b4: 10 80 00 26 b 201a54c <killinfo+0x20c>
201a4b8: d6 00 a0 1c ld [ %g2 + 0x1c ], %o3
the_thread = (Thread_Control *) object_table[ index ];
201a4bc: c4 02 c0 02 ld [ %o3 + %g2 ], %g2
if ( !the_thread )
201a4c0: 80 a0 a0 00 cmp %g2, 0
201a4c4: 22 80 00 22 be,a 201a54c <killinfo+0x20c>
201a4c8: b6 06 e0 01 inc %i3
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
201a4cc: c8 00 a0 14 ld [ %g2 + 0x14 ], %g4
201a4d0: 80 a1 00 03 cmp %g4, %g3
201a4d4: 38 80 00 1e bgu,a 201a54c <killinfo+0x20c>
201a4d8: b6 06 e0 01 inc %i3
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
201a4dc: f0 00 a1 5c ld [ %g2 + 0x15c ], %i0
201a4e0: f0 06 20 d0 ld [ %i0 + 0xd0 ], %i0
201a4e4: 80 af 40 18 andncc %i5, %i0, %g0
201a4e8: 22 80 00 19 be,a 201a54c <killinfo+0x20c>
201a4ec: b6 06 e0 01 inc %i3
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
201a4f0: 80 a1 00 03 cmp %g4, %g3
201a4f4: 2a 80 00 14 bcs,a 201a544 <killinfo+0x204>
201a4f8: 86 10 00 04 mov %g4, %g3
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
201a4fc: 80 a0 60 00 cmp %g1, 0
201a500: 22 80 00 13 be,a 201a54c <killinfo+0x20c> <== NEVER TAKEN
201a504: b6 06 e0 01 inc %i3 <== NOT EXECUTED
201a508: de 00 60 10 ld [ %g1 + 0x10 ], %o7
201a50c: 80 a3 e0 00 cmp %o7, 0
201a510: 22 80 00 0f be,a 201a54c <killinfo+0x20c> <== NEVER TAKEN
201a514: b6 06 e0 01 inc %i3 <== NOT EXECUTED
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201a518: f0 00 a0 10 ld [ %g2 + 0x10 ], %i0
201a51c: 80 a6 20 00 cmp %i0, 0
201a520: 22 80 00 09 be,a 201a544 <killinfo+0x204>
201a524: 86 10 00 04 mov %g4, %g3
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
201a528: 80 8b c0 1a btst %o7, %i2
201a52c: 32 80 00 08 bne,a 201a54c <killinfo+0x20c>
201a530: b6 06 e0 01 inc %i3
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
201a534: 80 8e 00 1a btst %i0, %i2
201a538: 22 80 00 05 be,a 201a54c <killinfo+0x20c>
201a53c: b6 06 e0 01 inc %i3
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
201a540: 86 10 00 04 mov %g4, %g3
201a544: 82 10 00 02 mov %g2, %g1
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201a548: b6 06 e0 01 inc %i3
201a54c: 80 a6 c0 0c cmp %i3, %o4
201a550: 08 bf ff db bleu 201a4bc <killinfo+0x17c>
201a554: 85 2e e0 02 sll %i3, 2, %g2
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
201a558: b8 07 20 01 inc %i4
201a55c: 80 a7 20 04 cmp %i4, 4
201a560: 12 bf ff cd bne 201a494 <killinfo+0x154>
201a564: 85 2f 20 02 sll %i4, 2, %g2
}
}
}
}
if ( interested ) {
201a568: 80 a0 60 00 cmp %g1, 0
201a56c: 02 80 00 0c be 201a59c <killinfo+0x25c>
201a570: 01 00 00 00 nop
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
201a574: 90 10 00 01 mov %g1, %o0
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
201a578: 92 10 00 19 mov %i1, %o1
201a57c: 40 00 00 36 call 201a654 <_POSIX_signals_Unblock_thread>
201a580: 94 07 bf f4 add %fp, -12, %o2
201a584: 80 8a 20 ff btst 0xff, %o0
201a588: 02 80 00 05 be 201a59c <killinfo+0x25c>
201a58c: 01 00 00 00 nop
_Thread_Enable_dispatch();
201a590: 7f ff bf 0f call 200a1cc <_Thread_Enable_dispatch>
201a594: b0 10 20 00 clr %i0 ! 0 <PROM_START>
201a598: 30 80 00 23 b,a 201a624 <killinfo+0x2e4>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
201a59c: 40 00 00 24 call 201a62c <_POSIX_signals_Set_process_signals>
201a5a0: 90 10 00 1d mov %i5, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
201a5a4: 83 2e 60 02 sll %i1, 2, %g1
201a5a8: b3 2e 60 04 sll %i1, 4, %i1
201a5ac: b2 26 40 01 sub %i1, %g1, %i1
201a5b0: 03 00 80 78 sethi %hi(0x201e000), %g1
201a5b4: 82 10 60 80 or %g1, 0x80, %g1 ! 201e080 <_POSIX_signals_Vectors>
201a5b8: c2 00 40 19 ld [ %g1 + %i1 ], %g1
201a5bc: 80 a0 60 02 cmp %g1, 2
201a5c0: 12 bf ff f4 bne 201a590 <killinfo+0x250>
201a5c4: 11 00 80 78 sethi %hi(0x201e000), %o0
psiginfo = (POSIX_signals_Siginfo_node *)
201a5c8: 7f ff b7 78 call 20083a8 <_Chain_Get>
201a5cc: 90 12 22 00 or %o0, 0x200, %o0 ! 201e200 <_POSIX_signals_Inactive_siginfo>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
201a5d0: ba 92 20 00 orcc %o0, 0, %i5
201a5d4: 12 80 00 0a bne 201a5fc <killinfo+0x2bc>
201a5d8: 92 07 bf f4 add %fp, -12, %o1
_Thread_Enable_dispatch();
201a5dc: 7f ff be fc call 200a1cc <_Thread_Enable_dispatch>
201a5e0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EAGAIN );
201a5e4: 7f ff d5 0d call 200fa18 <__errno>
201a5e8: 01 00 00 00 nop
201a5ec: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
201a5f0: c2 22 00 00 st %g1, [ %o0 ]
201a5f4: 81 c7 e0 08 ret
201a5f8: 91 e8 3f ff restore %g0, -1, %o0
}
psiginfo->Info = *siginfo;
201a5fc: 90 07 60 08 add %i5, 8, %o0
201a600: 7f ff d7 4d call 2010334 <memcpy>
201a604: 94 10 20 0c mov 0xc, %o2
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
201a608: 11 00 80 78 sethi %hi(0x201e000), %o0
201a60c: 92 10 00 1d mov %i5, %o1
201a610: 90 12 22 78 or %o0, 0x278, %o0
201a614: 7f ff b7 59 call 2008378 <_Chain_Append>
201a618: 90 02 00 19 add %o0, %i1, %o0
201a61c: 30 bf ff dd b,a 201a590 <killinfo+0x250>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
201a620: b0 10 20 00 clr %i0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
201a624: 81 c7 e0 08 ret
201a628: 81 e8 00 00 restore
0200c404 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
200c404: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
200c408: 80 a0 60 00 cmp %g1, 0
200c40c: 02 80 00 0f be 200c448 <pthread_attr_setschedpolicy+0x44>
200c410: 90 10 20 16 mov 0x16, %o0
200c414: c4 00 40 00 ld [ %g1 ], %g2
200c418: 80 a0 a0 00 cmp %g2, 0
200c41c: 02 80 00 0b be 200c448 <pthread_attr_setschedpolicy+0x44>
200c420: 80 a2 60 04 cmp %o1, 4
return EINVAL;
switch ( policy ) {
200c424: 38 80 00 09 bgu,a 200c448 <pthread_attr_setschedpolicy+0x44>
200c428: 90 10 20 86 mov 0x86, %o0
200c42c: 84 10 20 01 mov 1, %g2
200c430: 85 28 80 09 sll %g2, %o1, %g2
200c434: 80 88 a0 17 btst 0x17, %g2
200c438: 22 80 00 04 be,a 200c448 <pthread_attr_setschedpolicy+0x44><== NEVER TAKEN
200c43c: 90 10 20 86 mov 0x86, %o0 <== NOT EXECUTED
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
200c440: d2 20 60 14 st %o1, [ %g1 + 0x14 ]
200c444: 90 10 20 00 clr %o0
return 0;
default:
return ENOTSUP;
}
}
200c448: 81 c3 e0 08 retl
02007b58 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
2007b58: 9d e3 bf 90 save %sp, -112, %sp
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
2007b5c: 80 a6 20 00 cmp %i0, 0
2007b60: 12 80 00 04 bne 2007b70 <pthread_barrier_init+0x18>
2007b64: 80 a6 a0 00 cmp %i2, 0
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
2007b68: 81 c7 e0 08 ret
2007b6c: 91 e8 20 16 restore %g0, 0x16, %o0
* Error check parameters
*/
if ( !barrier )
return EINVAL;
if ( count == 0 )
2007b70: 22 80 00 1f be,a 2007bec <pthread_barrier_init+0x94>
2007b74: b0 10 20 16 mov 0x16, %i0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007b78: 80 a6 60 00 cmp %i1, 0
2007b7c: 32 80 00 06 bne,a 2007b94 <pthread_barrier_init+0x3c>
2007b80: c2 06 40 00 ld [ %i1 ], %g1
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
2007b84: 90 07 bf f8 add %fp, -8, %o0
2007b88: 7f ff ff bc call 2007a78 <pthread_barrierattr_init>
2007b8c: b2 07 bf f8 add %fp, -8, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2007b90: c2 06 40 00 ld [ %i1 ], %g1
2007b94: 80 a0 60 00 cmp %g1, 0
2007b98: 22 80 00 15 be,a 2007bec <pthread_barrier_init+0x94>
2007b9c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
switch ( the_attr->process_shared ) {
2007ba0: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007ba4: 80 a0 60 00 cmp %g1, 0
2007ba8: 32 80 00 11 bne,a 2007bec <pthread_barrier_init+0x94> <== NEVER TAKEN
2007bac: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007bb0: 03 00 80 7c sethi %hi(0x201f000), %g1
2007bb4: c4 00 61 00 ld [ %g1 + 0x100 ], %g2 ! 201f100 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
2007bb8: c0 27 bf f0 clr [ %fp + -16 ]
the_attributes.maximum_count = count;
2007bbc: f4 27 bf f4 st %i2, [ %fp + -12 ]
2007bc0: 84 00 a0 01 inc %g2
2007bc4: c4 20 61 00 st %g2, [ %g1 + 0x100 ]
return _Thread_Dispatch_disable_level;
2007bc8: c2 00 61 00 ld [ %g1 + 0x100 ], %g1
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
2007bcc: 39 00 80 7d sethi %hi(0x201f400), %i4
2007bd0: 40 00 08 67 call 2009d6c <_Objects_Allocate>
2007bd4: 90 17 20 b0 or %i4, 0xb0, %o0 ! 201f4b0 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
2007bd8: ba 92 20 00 orcc %o0, 0, %i5
2007bdc: 12 80 00 06 bne 2007bf4 <pthread_barrier_init+0x9c>
2007be0: 90 07 60 10 add %i5, 0x10, %o0
_Thread_Enable_dispatch();
2007be4: 40 00 0d 4c call 200b114 <_Thread_Enable_dispatch>
2007be8: b0 10 20 0b mov 0xb, %i0
2007bec: 81 c7 e0 08 ret
2007bf0: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
2007bf4: 40 00 05 d9 call 2009358 <_CORE_barrier_Initialize>
2007bf8: 92 07 bf f0 add %fp, -16, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007bfc: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007c00: b8 17 20 b0 or %i4, 0xb0, %i4
2007c04: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2007c08: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007c0c: 85 28 a0 02 sll %g2, 2, %g2
2007c10: fa 20 c0 02 st %i5, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2007c14: c0 27 60 0c clr [ %i5 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
2007c18: c2 26 00 00 st %g1, [ %i0 ]
_Thread_Enable_dispatch();
2007c1c: 40 00 0d 3e call 200b114 <_Thread_Enable_dispatch>
2007c20: b0 10 20 00 clr %i0
2007c24: 81 c7 e0 08 ret
2007c28: 81 e8 00 00 restore
02007448 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
2007448: 9d e3 bf a0 save %sp, -96, %sp
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
200744c: 80 a6 20 00 cmp %i0, 0
2007450: 02 80 00 13 be 200749c <pthread_cleanup_push+0x54>
2007454: 03 00 80 7a sethi %hi(0x201e800), %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007458: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 201e960 <_Thread_Dispatch_disable_level>
200745c: 84 00 a0 01 inc %g2
2007460: c4 20 61 60 st %g2, [ %g1 + 0x160 ]
return _Thread_Dispatch_disable_level;
2007464: c2 00 61 60 ld [ %g1 + 0x160 ], %g1
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
2007468: 40 00 11 d5 call 200bbbc <_Workspace_Allocate>
200746c: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
2007470: 92 92 20 00 orcc %o0, 0, %o1
2007474: 02 80 00 08 be 2007494 <pthread_cleanup_push+0x4c> <== NEVER TAKEN
2007478: 03 00 80 7b sethi %hi(0x201ec00), %g1
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
200747c: c2 00 62 9c ld [ %g1 + 0x29c ], %g1 ! 201ee9c <_Per_CPU_Information+0xc>
handler_stack = &thread_support->Cancellation_Handlers;
2007480: d0 00 61 5c ld [ %g1 + 0x15c ], %o0
handler->routine = routine;
2007484: f0 22 60 08 st %i0, [ %o1 + 8 ]
handler->arg = arg;
2007488: f2 22 60 0c st %i1, [ %o1 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
200748c: 40 00 06 21 call 2008d10 <_Chain_Append>
2007490: 90 02 20 e4 add %o0, 0xe4, %o0
}
_Thread_Enable_dispatch();
2007494: 40 00 0d 8a call 200aabc <_Thread_Enable_dispatch>
2007498: 81 e8 00 00 restore
200749c: 81 c7 e0 08 ret
20074a0: 81 e8 00 00 restore
02008420 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2008420: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
2008424: 80 a6 60 00 cmp %i1, 0
2008428: 32 80 00 05 bne,a 200843c <pthread_cond_init+0x1c>
200842c: c4 06 60 04 ld [ %i1 + 4 ], %g2
else the_attr = &_POSIX_Condition_variables_Default_attributes;
2008430: 33 00 80 78 sethi %hi(0x201e000), %i1
2008434: b2 16 60 94 or %i1, 0x94, %i1 ! 201e094 <_POSIX_Condition_variables_Default_attributes>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
2008438: c4 06 60 04 ld [ %i1 + 4 ], %g2
200843c: 80 a0 a0 01 cmp %g2, 1
2008440: 02 80 00 26 be 20084d8 <pthread_cond_init+0xb8> <== NEVER TAKEN
2008444: 82 10 20 16 mov 0x16, %g1
return EINVAL;
if ( !the_attr->is_initialized )
2008448: c4 06 40 00 ld [ %i1 ], %g2
200844c: 80 a0 a0 00 cmp %g2, 0
2008450: 02 80 00 22 be 20084d8 <pthread_cond_init+0xb8>
2008454: 01 00 00 00 nop
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2008458: 03 00 80 80 sethi %hi(0x2020000), %g1
200845c: c4 00 63 70 ld [ %g1 + 0x370 ], %g2 ! 2020370 <_Thread_Dispatch_disable_level>
2008460: 84 00 a0 01 inc %g2
2008464: c4 20 63 70 st %g2, [ %g1 + 0x370 ]
return _Thread_Dispatch_disable_level;
2008468: c2 00 63 70 ld [ %g1 + 0x370 ], %g1
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
200846c: 39 00 80 81 sethi %hi(0x2020400), %i4
2008470: 40 00 0a 10 call 200acb0 <_Objects_Allocate>
2008474: 90 17 23 b8 or %i4, 0x3b8, %o0 ! 20207b8 <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
2008478: ba 92 20 00 orcc %o0, 0, %i5
200847c: 32 80 00 06 bne,a 2008494 <pthread_cond_init+0x74>
2008480: c2 06 60 04 ld [ %i1 + 4 ], %g1
_Thread_Enable_dispatch();
2008484: 40 00 0e f5 call 200c058 <_Thread_Enable_dispatch>
2008488: 01 00 00 00 nop
return ENOMEM;
200848c: 10 80 00 13 b 20084d8 <pthread_cond_init+0xb8>
2008490: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc>
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
2008494: 90 07 60 18 add %i5, 0x18, %o0
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
2008498: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
200849c: 92 10 20 00 clr %o1
20084a0: 15 04 00 02 sethi %hi(0x10000800), %o2
20084a4: 96 10 20 74 mov 0x74, %o3
20084a8: 40 00 10 f0 call 200c868 <_Thread_queue_Initialize>
20084ac: c0 27 60 14 clr [ %i5 + 0x14 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20084b0: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20084b4: b8 17 23 b8 or %i4, 0x3b8, %i4
20084b8: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20084bc: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20084c0: 85 28 a0 02 sll %g2, 2, %g2
20084c4: fa 20 c0 02 st %i5, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
20084c8: c0 27 60 0c clr [ %i5 + 0xc ]
0
);
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
20084cc: 40 00 0e e3 call 200c058 <_Thread_Enable_dispatch>
20084d0: c2 26 00 00 st %g1, [ %i0 ]
return 0;
20084d4: 82 10 20 00 clr %g1
}
20084d8: 81 c7 e0 08 ret
20084dc: 91 e8 00 01 restore %g0, %g1, %o0
02008280 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
2008280: 82 10 00 08 mov %o0, %g1
if ( !attr || attr->is_initialized == false )
2008284: 80 a0 60 00 cmp %g1, 0
2008288: 02 80 00 08 be 20082a8 <pthread_condattr_destroy+0x28>
200828c: 90 10 20 16 mov 0x16, %o0
2008290: c4 00 40 00 ld [ %g1 ], %g2
2008294: 80 a0 a0 00 cmp %g2, 0
2008298: 02 80 00 04 be 20082a8 <pthread_condattr_destroy+0x28> <== NEVER TAKEN
200829c: 01 00 00 00 nop
return EINVAL;
attr->is_initialized = false;
20082a0: c0 20 40 00 clr [ %g1 ]
return 0;
20082a4: 90 10 20 00 clr %o0
}
20082a8: 81 c3 e0 08 retl
02007820 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
2007820: 9d e3 bf 58 save %sp, -168, %sp
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
2007824: 80 a6 a0 00 cmp %i2, 0
2007828: 02 80 00 8c be 2007a58 <pthread_create+0x238>
200782c: ba 10 20 0e mov 0xe, %i5
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
2007830: 80 a6 60 00 cmp %i1, 0
2007834: 32 80 00 05 bne,a 2007848 <pthread_create+0x28>
2007838: c2 06 40 00 ld [ %i1 ], %g1
200783c: 33 00 80 81 sethi %hi(0x2020400), %i1
2007840: b2 16 61 0c or %i1, 0x10c, %i1 ! 202050c <_POSIX_Threads_Default_attributes>
if ( !the_attr->is_initialized )
2007844: c2 06 40 00 ld [ %i1 ], %g1
2007848: 80 a0 60 00 cmp %g1, 0
200784c: 02 80 00 83 be 2007a58 <pthread_create+0x238>
2007850: ba 10 20 16 mov 0x16, %i5
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
2007854: c2 06 60 04 ld [ %i1 + 4 ], %g1
2007858: 80 a0 60 00 cmp %g1, 0
200785c: 02 80 00 07 be 2007878 <pthread_create+0x58>
2007860: 03 00 80 86 sethi %hi(0x2021800), %g1
2007864: c4 06 60 08 ld [ %i1 + 8 ], %g2
2007868: c2 00 62 5c ld [ %g1 + 0x25c ], %g1
200786c: 80 a0 80 01 cmp %g2, %g1
2007870: 2a 80 00 7b bcs,a 2007a5c <pthread_create+0x23c>
2007874: b0 10 00 1d mov %i5, %i0
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
2007878: c2 06 60 10 ld [ %i1 + 0x10 ], %g1
200787c: 80 a0 60 01 cmp %g1, 1
2007880: 02 80 00 06 be 2007898 <pthread_create+0x78>
2007884: 80 a0 60 02 cmp %g1, 2
2007888: 32 80 00 74 bne,a 2007a58 <pthread_create+0x238>
200788c: ba 10 20 16 mov 0x16, %i5
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
2007890: 10 80 00 09 b 20078b4 <pthread_create+0x94>
2007894: e2 06 60 14 ld [ %i1 + 0x14 ], %l1
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2007898: 03 00 80 8b sethi %hi(0x2022c00), %g1
200789c: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 2022d2c <_Per_CPU_Information+0xc>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
20078a0: 90 07 bf e4 add %fp, -28, %o0
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20078a4: d2 00 61 5c ld [ %g1 + 0x15c ], %o1
schedpolicy = api->schedpolicy;
20078a8: e2 02 60 84 ld [ %o1 + 0x84 ], %l1
schedparam = api->schedparam;
20078ac: 10 80 00 04 b 20078bc <pthread_create+0x9c>
20078b0: 92 02 60 88 add %o1, 0x88, %o1
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
20078b4: 90 07 bf e4 add %fp, -28, %o0
20078b8: 92 06 60 18 add %i1, 0x18, %o1
20078bc: 40 00 25 70 call 2010e7c <memcpy>
20078c0: 94 10 20 1c mov 0x1c, %o2
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
20078c4: c2 06 60 0c ld [ %i1 + 0xc ], %g1
20078c8: 80 a0 60 00 cmp %g1, 0
20078cc: 12 80 00 63 bne 2007a58 <pthread_create+0x238>
20078d0: ba 10 20 86 mov 0x86, %i5
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
20078d4: 40 00 18 e0 call 200dc54 <_POSIX_Priority_Is_valid>
20078d8: d0 07 bf e4 ld [ %fp + -28 ], %o0
20078dc: 80 8a 20 ff btst 0xff, %o0
20078e0: 02 80 00 5e be 2007a58 <pthread_create+0x238> <== NEVER TAKEN
20078e4: ba 10 20 16 mov 0x16, %i5
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
20078e8: 03 00 80 86 sethi %hi(0x2021800), %g1
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
20078ec: e4 07 bf e4 ld [ %fp + -28 ], %l2
20078f0: e6 08 62 58 ldub [ %g1 + 0x258 ], %l3
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
20078f4: 90 10 00 11 mov %l1, %o0
20078f8: 92 07 bf e4 add %fp, -28, %o1
20078fc: 94 07 bf dc add %fp, -36, %o2
2007900: 40 00 18 e0 call 200dc80 <_POSIX_Thread_Translate_sched_param>
2007904: 96 07 bf e0 add %fp, -32, %o3
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
2007908: ba 92 20 00 orcc %o0, 0, %i5
200790c: 32 80 00 54 bne,a 2007a5c <pthread_create+0x23c>
2007910: b0 10 00 1d mov %i5, %i0
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
2007914: 39 00 80 8a sethi %hi(0x2022800), %i4
2007918: 40 00 06 35 call 20091ec <_API_Mutex_Lock>
200791c: d0 07 20 80 ld [ %i4 + 0x80 ], %o0 ! 2022880 <_RTEMS_Allocator_Mutex>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
2007920: 11 00 80 8a sethi %hi(0x2022800), %o0
2007924: 40 00 08 d4 call 2009c74 <_Objects_Allocate>
2007928: 90 12 22 20 or %o0, 0x220, %o0 ! 2022a20 <_POSIX_Threads_Information>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
200792c: a0 92 20 00 orcc %o0, 0, %l0
2007930: 32 80 00 04 bne,a 2007940 <pthread_create+0x120>
2007934: c2 06 60 08 ld [ %i1 + 8 ], %g1
_RTEMS_Unlock_allocator();
2007938: 10 80 00 21 b 20079bc <pthread_create+0x19c>
200793c: d0 07 20 80 ld [ %i4 + 0x80 ], %o0
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
2007940: 05 00 80 86 sethi %hi(0x2021800), %g2
2007944: d6 00 a2 5c ld [ %g2 + 0x25c ], %o3 ! 2021a5c <rtems_minimum_stack_size>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
2007948: c0 27 bf d4 clr [ %fp + -44 ]
200794c: 97 2a e0 01 sll %o3, 1, %o3
2007950: 80 a2 c0 01 cmp %o3, %g1
2007954: 1a 80 00 03 bcc 2007960 <pthread_create+0x140>
2007958: d4 06 60 04 ld [ %i1 + 4 ], %o2
200795c: 96 10 00 01 mov %g1, %o3
2007960: 82 10 20 01 mov 1, %g1
2007964: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2007968: c2 07 bf dc ld [ %fp + -36 ], %g1
200796c: 9a 0c e0 ff and %l3, 0xff, %o5
2007970: c2 23 a0 60 st %g1, [ %sp + 0x60 ]
2007974: c2 07 bf e0 ld [ %fp + -32 ], %g1
2007978: c0 23 a0 68 clr [ %sp + 0x68 ]
200797c: c2 23 a0 64 st %g1, [ %sp + 0x64 ]
2007980: 82 07 bf d4 add %fp, -44, %g1
2007984: 39 00 80 8a sethi %hi(0x2022800), %i4
2007988: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
200798c: 90 17 22 20 or %i4, 0x220, %o0
2007990: 92 10 00 10 mov %l0, %o1
2007994: 98 10 20 01 mov 1, %o4
2007998: 40 00 0d db call 200b104 <_Thread_Initialize>
200799c: 9a 23 40 12 sub %o5, %l2, %o5
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
20079a0: 80 8a 20 ff btst 0xff, %o0
20079a4: 12 80 00 0a bne 20079cc <pthread_create+0x1ac>
20079a8: 90 17 22 20 or %i4, 0x220, %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
20079ac: 40 00 09 89 call 2009fd0 <_Objects_Free>
20079b0: 92 10 00 10 mov %l0, %o1
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
20079b4: 03 00 80 8a sethi %hi(0x2022800), %g1
20079b8: d0 00 60 80 ld [ %g1 + 0x80 ], %o0 ! 2022880 <_RTEMS_Allocator_Mutex>
20079bc: 40 00 06 21 call 2009240 <_API_Mutex_Unlock>
20079c0: ba 10 20 0b mov 0xb, %i5
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
20079c4: 81 c7 e0 08 ret
20079c8: 91 e8 00 1d restore %g0, %i5, %o0
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20079cc: f8 04 21 5c ld [ %l0 + 0x15c ], %i4
api->Attributes = *the_attr;
20079d0: 92 10 00 19 mov %i1, %o1
20079d4: 94 10 20 40 mov 0x40, %o2
20079d8: 40 00 25 29 call 2010e7c <memcpy>
20079dc: 90 10 00 1c mov %i4, %o0
api->detachstate = the_attr->detachstate;
20079e0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
20079e4: 92 07 bf e4 add %fp, -28, %o1
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
20079e8: c2 27 20 40 st %g1, [ %i4 + 0x40 ]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
20079ec: 94 10 20 1c mov 0x1c, %o2
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
20079f0: e2 27 20 84 st %l1, [ %i4 + 0x84 ]
api->schedparam = schedparam;
20079f4: 40 00 25 22 call 2010e7c <memcpy>
20079f8: 90 07 20 88 add %i4, 0x88, %o0
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
20079fc: 90 10 00 10 mov %l0, %o0
2007a00: 92 10 20 01 mov 1, %o1
2007a04: 94 10 00 1a mov %i2, %o2
2007a08: 96 10 00 1b mov %i3, %o3
2007a0c: 40 00 10 0a call 200ba34 <_Thread_Start>
2007a10: 98 10 20 00 clr %o4
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
2007a14: 80 a4 60 04 cmp %l1, 4
2007a18: 32 80 00 0a bne,a 2007a40 <pthread_create+0x220>
2007a1c: c2 04 20 08 ld [ %l0 + 8 ], %g1
_Watchdog_Insert_ticks(
2007a20: 40 00 10 2d call 200bad4 <_Timespec_To_ticks>
2007a24: 90 07 20 90 add %i4, 0x90, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007a28: 92 07 20 a8 add %i4, 0xa8, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007a2c: d0 27 20 b4 st %o0, [ %i4 + 0xb4 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2007a30: 11 00 80 8a sethi %hi(0x2022800), %o0
2007a34: 40 00 11 06 call 200be4c <_Watchdog_Insert>
2007a38: 90 12 20 98 or %o0, 0x98, %o0 ! 2022898 <_Watchdog_Ticks_chain>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
2007a3c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007a40: c2 26 00 00 st %g1, [ %i0 ]
_RTEMS_Unlock_allocator();
2007a44: 03 00 80 8a sethi %hi(0x2022800), %g1
2007a48: 40 00 05 fe call 2009240 <_API_Mutex_Unlock>
2007a4c: d0 00 60 80 ld [ %g1 + 0x80 ], %o0 ! 2022880 <_RTEMS_Allocator_Mutex>
return 0;
}
2007a50: 81 c7 e0 08 ret
2007a54: 91 e8 00 1d restore %g0, %i5, %o0
2007a58: b0 10 00 1d mov %i5, %i0
2007a5c: 81 c7 e0 08 ret
2007a60: 81 e8 00 00 restore
0201a79c <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
201a79c: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
201a7a0: 80 a6 60 00 cmp %i1, 0
201a7a4: 32 80 00 03 bne,a 201a7b0 <pthread_kill+0x14>
201a7a8: b6 06 7f ff add %i1, -1, %i3
201a7ac: 30 80 00 04 b,a 201a7bc <pthread_kill+0x20>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
201a7b0: 80 a6 e0 1f cmp %i3, 0x1f
201a7b4: 28 80 00 06 bleu,a 201a7cc <pthread_kill+0x30>
201a7b8: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
201a7bc: 7f ff d4 97 call 200fa18 <__errno>
201a7c0: 01 00 00 00 nop
201a7c4: 10 80 00 2c b 201a874 <pthread_kill+0xd8>
201a7c8: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
the_thread = _Thread_Get( thread, &location );
201a7cc: 7f ff be 8d call 200a200 <_Thread_Get>
201a7d0: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
201a7d4: c2 07 bf fc ld [ %fp + -4 ], %g1
201a7d8: 80 a0 60 00 cmp %g1, 0
201a7dc: 12 80 00 23 bne 201a868 <pthread_kill+0xcc> <== NEVER TAKEN
201a7e0: b8 10 00 08 mov %o0, %i4
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201a7e4: 85 2e 60 02 sll %i1, 2, %g2
201a7e8: 87 2e 60 04 sll %i1, 4, %g3
201a7ec: 86 20 c0 02 sub %g3, %g2, %g3
201a7f0: 05 00 80 78 sethi %hi(0x201e000), %g2
201a7f4: 84 10 a0 80 or %g2, 0x80, %g2 ! 201e080 <_POSIX_signals_Vectors>
201a7f8: 84 00 80 03 add %g2, %g3, %g2
201a7fc: c4 00 a0 08 ld [ %g2 + 8 ], %g2
201a800: 80 a0 a0 01 cmp %g2, 1
201a804: 12 80 00 06 bne 201a81c <pthread_kill+0x80>
201a808: c2 02 21 5c ld [ %o0 + 0x15c ], %g1
_Thread_Enable_dispatch();
201a80c: 7f ff be 70 call 200a1cc <_Thread_Enable_dispatch>
201a810: b0 10 20 00 clr %i0
201a814: 81 c7 e0 08 ret
201a818: 81 e8 00 00 restore
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a81c: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2
201a820: ba 10 20 01 mov 1, %i5
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a824: 92 10 00 19 mov %i1, %o1
201a828: b7 2f 40 1b sll %i5, %i3, %i3
201a82c: 94 10 20 00 clr %o2
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201a830: b6 10 80 1b or %g2, %i3, %i3
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
201a834: 7f ff ff 88 call 201a654 <_POSIX_signals_Unblock_thread>
201a838: f6 20 60 d4 st %i3, [ %g1 + 0xd4 ]
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201a83c: 03 00 80 78 sethi %hi(0x201e000), %g1
201a840: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
201a844: c4 00 60 08 ld [ %g1 + 8 ], %g2
201a848: 80 a0 a0 00 cmp %g2, 0
201a84c: 02 bf ff f0 be 201a80c <pthread_kill+0x70>
201a850: 01 00 00 00 nop
201a854: c4 00 60 0c ld [ %g1 + 0xc ], %g2
201a858: 80 a7 00 02 cmp %i4, %g2
201a85c: 22 bf ff ec be,a 201a80c <pthread_kill+0x70>
201a860: fa 28 60 18 stb %i5, [ %g1 + 0x18 ]
201a864: 30 bf ff ea b,a 201a80c <pthread_kill+0x70>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
201a868: 7f ff d4 6c call 200fa18 <__errno> <== NOT EXECUTED
201a86c: 01 00 00 00 nop <== NOT EXECUTED
201a870: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3> <== NOT EXECUTED
201a874: c2 22 00 00 st %g1, [ %o0 ]
}
201a878: 81 c7 e0 08 ret
201a87c: 91 e8 3f ff restore %g0, -1, %o0
02009a04 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
2009a04: 9d e3 bf 98 save %sp, -104, %sp
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2009a08: 92 07 bf fc add %fp, -4, %o1
2009a0c: 40 00 00 37 call 2009ae8 <_POSIX_Absolute_timeout_to_ticks>
2009a10: 90 10 00 19 mov %i1, %o0
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2009a14: d4 07 bf fc ld [ %fp + -4 ], %o2
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2009a18: 82 1a 20 03 xor %o0, 3, %g1
2009a1c: 80 a0 00 01 cmp %g0, %g1
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2009a20: ba 10 00 08 mov %o0, %i5
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2009a24: b8 60 3f ff subx %g0, -1, %i4
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
2009a28: 90 10 00 18 mov %i0, %o0
2009a2c: 7f ff ff b7 call 2009908 <_POSIX_Mutex_Lock_support>
2009a30: 92 10 00 1c mov %i4, %o1
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
2009a34: 80 a7 20 00 cmp %i4, 0
2009a38: 12 80 00 0c bne 2009a68 <pthread_mutex_timedlock+0x64>
2009a3c: b0 10 00 08 mov %o0, %i0
2009a40: 80 a2 20 10 cmp %o0, 0x10
2009a44: 12 80 00 09 bne 2009a68 <pthread_mutex_timedlock+0x64>
2009a48: 80 a7 60 00 cmp %i5, 0
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
2009a4c: 02 80 00 07 be 2009a68 <pthread_mutex_timedlock+0x64> <== NEVER TAKEN
2009a50: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2009a54: ba 07 7f ff add %i5, -1, %i5
2009a58: 80 a7 60 01 cmp %i5, 1
2009a5c: 18 80 00 03 bgu 2009a68 <pthread_mutex_timedlock+0x64> <== NEVER TAKEN
2009a60: b0 10 20 10 mov 0x10, %i0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
2009a64: b0 10 20 74 mov 0x74, %i0
}
return lock_status;
}
2009a68: 81 c7 e0 08 ret
2009a6c: 81 e8 00 00 restore
02007104 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
2007104: 82 10 00 08 mov %o0, %g1
if ( !attr )
2007108: 80 a0 60 00 cmp %g1, 0
200710c: 02 80 00 0b be 2007138 <pthread_mutexattr_gettype+0x34>
2007110: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
2007114: c4 00 40 00 ld [ %g1 ], %g2
2007118: 80 a0 a0 00 cmp %g2, 0
200711c: 02 80 00 07 be 2007138 <pthread_mutexattr_gettype+0x34>
2007120: 80 a2 60 00 cmp %o1, 0
return EINVAL;
if ( !type )
2007124: 02 80 00 05 be 2007138 <pthread_mutexattr_gettype+0x34> <== NEVER TAKEN
2007128: 01 00 00 00 nop
return EINVAL;
*type = attr->type;
200712c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
return 0;
2007130: 90 10 20 00 clr %o0
return EINVAL;
if ( !type )
return EINVAL;
*type = attr->type;
2007134: c2 22 40 00 st %g1, [ %o1 ]
return 0;
}
2007138: 81 c3 e0 08 retl
020095b8 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
20095b8: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
20095bc: 80 a0 60 00 cmp %g1, 0
20095c0: 02 80 00 0a be 20095e8 <pthread_mutexattr_setpshared+0x30>
20095c4: 90 10 20 16 mov 0x16, %o0
20095c8: c4 00 40 00 ld [ %g1 ], %g2
20095cc: 80 a0 a0 00 cmp %g2, 0
20095d0: 02 80 00 06 be 20095e8 <pthread_mutexattr_setpshared+0x30>
20095d4: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
20095d8: 18 80 00 04 bgu 20095e8 <pthread_mutexattr_setpshared+0x30><== NEVER TAKEN
20095dc: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
20095e0: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
20095e4: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
20095e8: 81 c3 e0 08 retl
02007170 <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
2007170: 82 10 00 08 mov %o0, %g1
if ( !attr || !attr->is_initialized )
2007174: 80 a0 60 00 cmp %g1, 0
2007178: 02 80 00 0a be 20071a0 <pthread_mutexattr_settype+0x30>
200717c: 90 10 20 16 mov 0x16, %o0
2007180: c4 00 40 00 ld [ %g1 ], %g2
2007184: 80 a0 a0 00 cmp %g2, 0
2007188: 02 80 00 06 be 20071a0 <pthread_mutexattr_settype+0x30> <== NEVER TAKEN
200718c: 80 a2 60 03 cmp %o1, 3
return EINVAL;
switch ( type ) {
2007190: 18 80 00 04 bgu 20071a0 <pthread_mutexattr_settype+0x30>
2007194: 01 00 00 00 nop
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
2007198: d2 20 60 10 st %o1, [ %g1 + 0x10 ]
return 0;
200719c: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
20071a0: 81 c3 e0 08 retl
02007eb0 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
2007eb0: 9d e3 bf 98 save %sp, -104, %sp
if ( !once_control || !init_routine )
2007eb4: 80 a6 60 00 cmp %i1, 0
2007eb8: 02 80 00 1c be 2007f28 <pthread_once+0x78>
2007ebc: ba 10 00 18 mov %i0, %i5
2007ec0: 80 a6 20 00 cmp %i0, 0
2007ec4: 22 80 00 17 be,a 2007f20 <pthread_once+0x70>
2007ec8: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !once_control->init_executed ) {
2007ecc: c2 06 20 04 ld [ %i0 + 4 ], %g1
2007ed0: 80 a0 60 00 cmp %g1, 0
2007ed4: 12 80 00 13 bne 2007f20 <pthread_once+0x70>
2007ed8: b0 10 20 00 clr %i0
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2007edc: 90 10 21 00 mov 0x100, %o0
2007ee0: 92 10 21 00 mov 0x100, %o1
2007ee4: 40 00 03 05 call 2008af8 <rtems_task_mode>
2007ee8: 94 07 bf fc add %fp, -4, %o2
if ( !once_control->init_executed ) {
2007eec: c2 07 60 04 ld [ %i5 + 4 ], %g1
2007ef0: 80 a0 60 00 cmp %g1, 0
2007ef4: 12 80 00 07 bne 2007f10 <pthread_once+0x60> <== NEVER TAKEN
2007ef8: d0 07 bf fc ld [ %fp + -4 ], %o0
once_control->is_initialized = true;
2007efc: 82 10 20 01 mov 1, %g1
2007f00: c2 27 40 00 st %g1, [ %i5 ]
once_control->init_executed = true;
(*init_routine)();
2007f04: 9f c6 40 00 call %i1
2007f08: c2 27 60 04 st %g1, [ %i5 + 4 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2007f0c: d0 07 bf fc ld [ %fp + -4 ], %o0
2007f10: 92 10 21 00 mov 0x100, %o1
2007f14: 94 07 bf fc add %fp, -4, %o2
2007f18: 40 00 02 f8 call 2008af8 <rtems_task_mode>
2007f1c: b0 10 20 00 clr %i0
2007f20: 81 c7 e0 08 ret
2007f24: 81 e8 00 00 restore
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
2007f28: b0 10 20 16 mov 0x16, %i0
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
2007f2c: 81 c7 e0 08 ret
2007f30: 81 e8 00 00 restore
02007fdc <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
2007fdc: 9d e3 bf 90 save %sp, -112, %sp
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
2007fe0: 80 a6 20 00 cmp %i0, 0
2007fe4: 12 80 00 04 bne 2007ff4 <pthread_rwlock_init+0x18>
2007fe8: 80 a6 60 00 cmp %i1, 0
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
2007fec: 81 c7 e0 08 ret
2007ff0: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2007ff4: 32 80 00 06 bne,a 200800c <pthread_rwlock_init+0x30>
2007ff8: c2 06 40 00 ld [ %i1 ], %g1
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
2007ffc: 90 07 bf f8 add %fp, -8, %o0
2008000: 40 00 01 b2 call 20086c8 <pthread_rwlockattr_init>
2008004: b2 07 bf f8 add %fp, -8, %i1
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2008008: c2 06 40 00 ld [ %i1 ], %g1
200800c: 80 a0 60 00 cmp %g1, 0
2008010: 22 80 00 14 be,a 2008060 <pthread_rwlock_init+0x84> <== NEVER TAKEN
2008014: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
switch ( the_attr->process_shared ) {
2008018: c2 06 60 04 ld [ %i1 + 4 ], %g1
200801c: 80 a0 60 00 cmp %g1, 0
2008020: 32 80 00 10 bne,a 2008060 <pthread_rwlock_init+0x84> <== NEVER TAKEN
2008024: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2008028: 03 00 80 89 sethi %hi(0x2022400), %g1
200802c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 20225f0 <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
2008030: c0 27 bf f4 clr [ %fp + -12 ]
2008034: 84 00 a0 01 inc %g2
2008038: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
200803c: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
2008040: 39 00 80 8a sethi %hi(0x2022800), %i4
2008044: 40 00 0a 72 call 200aa0c <_Objects_Allocate>
2008048: 90 17 20 20 or %i4, 0x20, %o0 ! 2022820 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
200804c: ba 92 20 00 orcc %o0, 0, %i5
2008050: 12 80 00 06 bne 2008068 <pthread_rwlock_init+0x8c>
2008054: 90 07 60 10 add %i5, 0x10, %o0
_Thread_Enable_dispatch();
2008058: 40 00 0f 90 call 200be98 <_Thread_Enable_dispatch>
200805c: b0 10 20 0b mov 0xb, %i0
2008060: 81 c7 e0 08 ret
2008064: 81 e8 00 00 restore
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
2008068: 40 00 08 d0 call 200a3a8 <_CORE_RWLock_Initialize>
200806c: 92 07 bf f4 add %fp, -12, %o1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2008070: c4 17 60 0a lduh [ %i5 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008074: b8 17 20 20 or %i4, 0x20, %i4
2008078: c6 07 20 1c ld [ %i4 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
200807c: c2 07 60 08 ld [ %i5 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008080: 85 28 a0 02 sll %g2, 2, %g2
2008084: fa 20 c0 02 st %i5, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2008088: c0 27 60 0c clr [ %i5 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
200808c: c2 26 00 00 st %g1, [ %i0 ]
_Thread_Enable_dispatch();
2008090: 40 00 0f 82 call 200be98 <_Thread_Enable_dispatch>
2008094: b0 10 20 00 clr %i0
2008098: 81 c7 e0 08 ret
200809c: 81 e8 00 00 restore
02008978 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2008978: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
200897c: 80 a6 20 00 cmp %i0, 0
2008980: 12 80 00 04 bne 2008990 <pthread_rwlock_timedrdlock+0x18>
2008984: 92 07 bf fc add %fp, -4, %o1
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
2008988: 81 c7 e0 08 ret
200898c: 91 e8 20 16 restore %g0, 0x16, %o0
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2008990: 40 00 19 9f call 200f00c <_POSIX_Absolute_timeout_to_ticks>
2008994: 90 10 00 19 mov %i1, %o0
2008998: d2 06 00 00 ld [ %i0 ], %o1
200899c: ba 10 00 08 mov %o0, %i5
20089a0: 94 07 bf f8 add %fp, -8, %o2
20089a4: 11 00 80 83 sethi %hi(0x2020c00), %o0
20089a8: 40 00 0b 14 call 200b5f8 <_Objects_Get>
20089ac: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 2020de0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
20089b0: c2 07 bf f8 ld [ %fp + -8 ], %g1
20089b4: 80 a0 60 00 cmp %g1, 0
20089b8: 32 80 00 21 bne,a 2008a3c <pthread_rwlock_timedrdlock+0xc4>
20089bc: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
20089c0: d2 06 00 00 ld [ %i0 ], %o1
20089c4: d6 07 bf fc ld [ %fp + -4 ], %o3
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
20089c8: 82 1f 60 03 xor %i5, 3, %g1
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
20089cc: 90 02 20 10 add %o0, 0x10, %o0
20089d0: 80 a0 00 01 cmp %g0, %g1
20089d4: 98 10 20 00 clr %o4
20089d8: b8 60 3f ff subx %g0, -1, %i4
20089dc: 40 00 07 8a call 200a804 <_CORE_RWLock_Obtain_for_reading>
20089e0: 94 10 00 1c mov %i4, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
20089e4: 40 00 0e b1 call 200c4a8 <_Thread_Enable_dispatch>
20089e8: 01 00 00 00 nop
if ( !do_wait ) {
20089ec: 80 a7 20 00 cmp %i4, 0
20089f0: 12 80 00 0e bne 2008a28 <pthread_rwlock_timedrdlock+0xb0>
20089f4: 03 00 80 84 sethi %hi(0x2021000), %g1
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
20089f8: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 202112c <_Per_CPU_Information+0xc>
20089fc: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008a00: 80 a0 60 02 cmp %g1, 2
2008a04: 32 80 00 0a bne,a 2008a2c <pthread_rwlock_timedrdlock+0xb4>
2008a08: 03 00 80 84 sethi %hi(0x2021000), %g1
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
2008a0c: 80 a7 60 00 cmp %i5, 0
2008a10: 22 80 00 0b be,a 2008a3c <pthread_rwlock_timedrdlock+0xc4><== NEVER TAKEN
2008a14: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2008a18: ba 07 7f ff add %i5, -1, %i5
2008a1c: 80 a7 60 01 cmp %i5, 1
2008a20: 08 80 00 07 bleu 2008a3c <pthread_rwlock_timedrdlock+0xc4><== ALWAYS TAKEN
2008a24: b0 10 20 74 mov 0x74, %i0
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
2008a28: 03 00 80 84 sethi %hi(0x2021000), %g1
2008a2c: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 202112c <_Per_CPU_Information+0xc>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2008a30: 40 00 00 38 call 2008b10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2008a34: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
2008a38: b0 10 00 08 mov %o0, %i0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2008a3c: 81 c7 e0 08 ret
2008a40: 81 e8 00 00 restore
02008a44 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
2008a44: 9d e3 bf 98 save %sp, -104, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
2008a48: 80 a6 20 00 cmp %i0, 0
2008a4c: 12 80 00 04 bne 2008a5c <pthread_rwlock_timedwrlock+0x18>
2008a50: 92 07 bf fc add %fp, -4, %o1
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
2008a54: 81 c7 e0 08 ret
2008a58: 91 e8 20 16 restore %g0, 0x16, %o0
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
2008a5c: 40 00 19 6c call 200f00c <_POSIX_Absolute_timeout_to_ticks>
2008a60: 90 10 00 19 mov %i1, %o0
2008a64: d2 06 00 00 ld [ %i0 ], %o1
2008a68: ba 10 00 08 mov %o0, %i5
2008a6c: 94 07 bf f8 add %fp, -8, %o2
2008a70: 11 00 80 83 sethi %hi(0x2020c00), %o0
2008a74: 40 00 0a e1 call 200b5f8 <_Objects_Get>
2008a78: 90 12 21 e0 or %o0, 0x1e0, %o0 ! 2020de0 <_POSIX_RWLock_Information>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2008a7c: c2 07 bf f8 ld [ %fp + -8 ], %g1
2008a80: 80 a0 60 00 cmp %g1, 0
2008a84: 32 80 00 21 bne,a 2008b08 <pthread_rwlock_timedwrlock+0xc4>
2008a88: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2008a8c: d2 06 00 00 ld [ %i0 ], %o1
2008a90: d6 07 bf fc ld [ %fp + -4 ], %o3
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
2008a94: 82 1f 60 03 xor %i5, 3, %g1
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2008a98: 90 02 20 10 add %o0, 0x10, %o0
2008a9c: 80 a0 00 01 cmp %g0, %g1
2008aa0: 98 10 20 00 clr %o4
2008aa4: b8 60 3f ff subx %g0, -1, %i4
2008aa8: 40 00 07 8a call 200a8d0 <_CORE_RWLock_Obtain_for_writing>
2008aac: 94 10 00 1c mov %i4, %o2
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2008ab0: 40 00 0e 7e call 200c4a8 <_Thread_Enable_dispatch>
2008ab4: 01 00 00 00 nop
if ( !do_wait &&
2008ab8: 80 a7 20 00 cmp %i4, 0
2008abc: 12 80 00 0e bne 2008af4 <pthread_rwlock_timedwrlock+0xb0>
2008ac0: 03 00 80 84 sethi %hi(0x2021000), %g1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
2008ac4: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 202112c <_Per_CPU_Information+0xc>
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
2008ac8: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008acc: 80 a0 60 02 cmp %g1, 2
2008ad0: 32 80 00 0a bne,a 2008af8 <pthread_rwlock_timedwrlock+0xb4>
2008ad4: 03 00 80 84 sethi %hi(0x2021000), %g1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
2008ad8: 80 a7 60 00 cmp %i5, 0
2008adc: 22 80 00 0b be,a 2008b08 <pthread_rwlock_timedwrlock+0xc4><== NEVER TAKEN
2008ae0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
2008ae4: ba 07 7f ff add %i5, -1, %i5
2008ae8: 80 a7 60 01 cmp %i5, 1
2008aec: 08 80 00 07 bleu 2008b08 <pthread_rwlock_timedwrlock+0xc4><== ALWAYS TAKEN
2008af0: b0 10 20 74 mov 0x74, %i0
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
2008af4: 03 00 80 84 sethi %hi(0x2021000), %g1
2008af8: c2 00 61 2c ld [ %g1 + 0x12c ], %g1 ! 202112c <_Per_CPU_Information+0xc>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
2008afc: 40 00 00 05 call 2008b10 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2008b00: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
2008b04: b0 10 00 08 mov %o0, %i0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2008b08: 81 c7 e0 08 ret
2008b0c: 81 e8 00 00 restore
0200929c <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
200929c: 82 10 00 08 mov %o0, %g1
if ( !attr )
20092a0: 80 a0 60 00 cmp %g1, 0
20092a4: 02 80 00 0a be 20092cc <pthread_rwlockattr_setpshared+0x30>
20092a8: 90 10 20 16 mov 0x16, %o0
return EINVAL;
if ( !attr->is_initialized )
20092ac: c4 00 40 00 ld [ %g1 ], %g2
20092b0: 80 a0 a0 00 cmp %g2, 0
20092b4: 02 80 00 06 be 20092cc <pthread_rwlockattr_setpshared+0x30>
20092b8: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
20092bc: 18 80 00 04 bgu 20092cc <pthread_rwlockattr_setpshared+0x30><== NEVER TAKEN
20092c0: 01 00 00 00 nop
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
20092c4: d2 20 60 04 st %o1, [ %g1 + 4 ]
return 0;
20092c8: 90 10 20 00 clr %o0
default:
return EINVAL;
}
}
20092cc: 81 c3 e0 08 retl
0200a2d4 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
200a2d4: 9d e3 bf 90 save %sp, -112, %sp
int rc;
/*
* Check all the parameters
*/
if ( !param )
200a2d8: 80 a6 a0 00 cmp %i2, 0
200a2dc: 02 80 00 40 be 200a3dc <pthread_setschedparam+0x108>
200a2e0: b6 10 20 16 mov 0x16, %i3
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
200a2e4: 90 10 00 19 mov %i1, %o0
200a2e8: 92 10 00 1a mov %i2, %o1
200a2ec: 94 07 bf f4 add %fp, -12, %o2
200a2f0: 40 00 17 63 call 201007c <_POSIX_Thread_Translate_sched_param>
200a2f4: 96 07 bf f8 add %fp, -8, %o3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
200a2f8: b6 92 20 00 orcc %o0, 0, %i3
200a2fc: 32 80 00 39 bne,a 200a3e0 <pthread_setschedparam+0x10c>
200a300: b0 10 00 1b mov %i3, %i0
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
200a304: 90 10 00 18 mov %i0, %o0
200a308: 40 00 0c 16 call 200d360 <_Thread_Get>
200a30c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200a310: c2 07 bf fc ld [ %fp + -4 ], %g1
200a314: 80 a0 60 00 cmp %g1, 0
200a318: 12 80 00 30 bne 200a3d8 <pthread_setschedparam+0x104>
200a31c: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200a320: fa 02 21 5c ld [ %o0 + 0x15c ], %i5
if ( api->schedpolicy == SCHED_SPORADIC )
200a324: c2 07 60 84 ld [ %i5 + 0x84 ], %g1
200a328: 80 a0 60 04 cmp %g1, 4
200a32c: 32 80 00 05 bne,a 200a340 <pthread_setschedparam+0x6c>
200a330: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
(void) _Watchdog_Remove( &api->Sporadic_timer );
200a334: 40 00 10 28 call 200e3d4 <_Watchdog_Remove>
200a338: 90 07 60 a8 add %i5, 0xa8, %o0
api->schedpolicy = policy;
200a33c: f2 27 60 84 st %i1, [ %i5 + 0x84 ]
api->schedparam = *param;
200a340: 90 07 60 88 add %i5, 0x88, %o0
200a344: 92 10 00 1a mov %i2, %o1
200a348: 40 00 24 2a call 20133f0 <memcpy>
200a34c: 94 10 20 1c mov 0x1c, %o2
the_thread->budget_algorithm = budget_algorithm;
200a350: c2 07 bf f4 ld [ %fp + -12 ], %g1
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
200a354: 80 a6 60 00 cmp %i1, 0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
200a358: c2 27 20 78 st %g1, [ %i4 + 0x78 ]
the_thread->budget_callout = budget_callout;
200a35c: c2 07 bf f8 ld [ %fp + -8 ], %g1
switch ( api->schedpolicy ) {
200a360: 06 80 00 1b bl 200a3cc <pthread_setschedparam+0xf8> <== NEVER TAKEN
200a364: c2 27 20 7c st %g1, [ %i4 + 0x7c ]
200a368: 80 a6 60 02 cmp %i1, 2
200a36c: 04 80 00 07 ble 200a388 <pthread_setschedparam+0xb4>
200a370: 03 00 80 8c sethi %hi(0x2023000), %g1
200a374: 80 a6 60 04 cmp %i1, 4
200a378: 12 80 00 15 bne 200a3cc <pthread_setschedparam+0xf8> <== NEVER TAKEN
200a37c: 01 00 00 00 nop
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
200a380: 10 80 00 0d b 200a3b4 <pthread_setschedparam+0xe0>
200a384: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a388: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200a38c: 90 10 00 1c mov %i4, %o0
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
200a390: c2 27 20 74 st %g1, [ %i4 + 0x74 ]
200a394: 03 00 80 88 sethi %hi(0x2022000), %g1
200a398: d2 08 62 c8 ldub [ %g1 + 0x2c8 ], %o1 ! 20222c8 <rtems_maximum_priority>
200a39c: c2 07 60 88 ld [ %i5 + 0x88 ], %g1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200a3a0: 94 10 20 01 mov 1, %o2
200a3a4: 92 22 40 01 sub %o1, %g1, %o1
200a3a8: 40 00 0a bc call 200ce98 <_Thread_Change_priority>
200a3ac: d2 27 20 18 st %o1, [ %i4 + 0x18 ]
the_thread,
the_thread->real_priority,
true
);
break;
200a3b0: 30 80 00 07 b,a 200a3cc <pthread_setschedparam+0xf8>
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
_Watchdog_Remove( &api->Sporadic_timer );
200a3b4: 90 07 60 a8 add %i5, 0xa8, %o0
200a3b8: 40 00 10 07 call 200e3d4 <_Watchdog_Remove>
200a3bc: c2 27 60 a4 st %g1, [ %i5 + 0xa4 ]
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
200a3c0: 90 10 20 00 clr %o0
200a3c4: 7f ff ff 7e call 200a1bc <_POSIX_Threads_Sporadic_budget_TSR>
200a3c8: 92 10 00 1c mov %i4, %o1
break;
}
_Thread_Enable_dispatch();
200a3cc: 40 00 0b d8 call 200d32c <_Thread_Enable_dispatch>
200a3d0: b0 10 00 1b mov %i3, %i0
200a3d4: 30 80 00 03 b,a 200a3e0 <pthread_setschedparam+0x10c>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
200a3d8: b6 10 20 03 mov 3, %i3
}
200a3dc: b0 10 00 1b mov %i3, %i0
200a3e0: 81 c7 e0 08 ret
200a3e4: 81 e8 00 00 restore
02007c00 <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
2007c00: 9d e3 bf a0 save %sp, -96, %sp
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
2007c04: 03 00 80 7b sethi %hi(0x201ec00), %g1
2007c08: 82 10 62 90 or %g1, 0x290, %g1 ! 201ee90 <_Per_CPU_Information>
2007c0c: c4 00 60 08 ld [ %g1 + 8 ], %g2
2007c10: 80 a0 a0 00 cmp %g2, 0
2007c14: 12 80 00 18 bne 2007c74 <pthread_testcancel+0x74> <== NEVER TAKEN
2007c18: 01 00 00 00 nop
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2007c1c: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2007c20: c4 00 61 5c ld [ %g1 + 0x15c ], %g2
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2007c24: 03 00 80 7a sethi %hi(0x201e800), %g1
2007c28: c6 00 61 60 ld [ %g1 + 0x160 ], %g3 ! 201e960 <_Thread_Dispatch_disable_level>
2007c2c: 86 00 e0 01 inc %g3
2007c30: c6 20 61 60 st %g3, [ %g1 + 0x160 ]
return _Thread_Dispatch_disable_level;
2007c34: c2 00 61 60 ld [ %g1 + 0x160 ], %g1
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2007c38: c2 00 a0 d8 ld [ %g2 + 0xd8 ], %g1
2007c3c: 80 a0 60 00 cmp %g1, 0
2007c40: 12 80 00 05 bne 2007c54 <pthread_testcancel+0x54> <== NEVER TAKEN
2007c44: ba 10 20 00 clr %i5
2007c48: c2 00 a0 e0 ld [ %g2 + 0xe0 ], %g1
2007c4c: 80 a0 00 01 cmp %g0, %g1
2007c50: ba 40 20 00 addx %g0, 0, %i5
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2007c54: 40 00 0b 9a call 200aabc <_Thread_Enable_dispatch>
2007c58: 01 00 00 00 nop
if ( cancel )
2007c5c: 80 8f 60 ff btst 0xff, %i5
2007c60: 02 80 00 05 be 2007c74 <pthread_testcancel+0x74>
2007c64: 03 00 80 7b sethi %hi(0x201ec00), %g1
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
2007c68: f0 00 62 9c ld [ %g1 + 0x29c ], %i0 ! 201ee9c <_Per_CPU_Information+0xc>
2007c6c: 40 00 17 18 call 200d8cc <_POSIX_Thread_Exit>
2007c70: 93 e8 3f ff restore %g0, -1, %o1
2007c74: 81 c7 e0 08 ret
2007c78: 81 e8 00 00 restore
020080f0 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
20080f0: 9d e3 bf 78 save %sp, -136, %sp
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
20080f4: 37 00 80 7f sethi %hi(0x201fc00), %i3
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
20080f8: ba 10 00 18 mov %i0, %i5
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
20080fc: 40 00 02 85 call 2008b10 <pthread_mutex_lock>
2008100: 90 16 e2 bc or %i3, 0x2bc, %o0
if (result != 0) {
2008104: b0 92 20 00 orcc %o0, 0, %i0
2008108: 02 80 00 06 be 2008120 <rtems_aio_enqueue+0x30> <== ALWAYS TAKEN
200810c: 01 00 00 00 nop
free (req);
2008110: 7f ff ef 14 call 2003d60 <free> <== NOT EXECUTED
2008114: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
2008118: 81 c7 e0 08 ret <== NOT EXECUTED
200811c: 81 e8 00 00 restore <== NOT EXECUTED
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
2008120: 40 00 04 8f call 200935c <pthread_self>
2008124: b6 16 e2 bc or %i3, 0x2bc, %i3
2008128: 92 07 bf e0 add %fp, -32, %o1
200812c: 40 00 03 9c call 2008f9c <pthread_getschedparam>
2008130: 94 07 bf e4 add %fp, -28, %o2
req->caller_thread = pthread_self ();
2008134: 40 00 04 8a call 200935c <pthread_self>
2008138: 01 00 00 00 nop
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
200813c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2008140: c6 07 bf e4 ld [ %fp + -28 ], %g3
2008144: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
2008148: d0 27 60 10 st %o0, [ %i5 + 0x10 ]
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
200814c: 84 20 c0 02 sub %g3, %g2, %g2
2008150: c4 27 60 0c st %g2, [ %i5 + 0xc ]
req->policy = policy;
2008154: c4 07 bf e0 ld [ %fp + -32 ], %g2
2008158: c4 27 60 08 st %g2, [ %i5 + 8 ]
req->aiocbp->error_code = EINPROGRESS;
200815c: 84 10 20 77 mov 0x77, %g2
2008160: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
2008164: c4 06 e0 68 ld [ %i3 + 0x68 ], %g2
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
2008168: c0 20 60 38 clr [ %g1 + 0x38 ]
if ((aio_request_queue.idle_threads == 0) &&
200816c: 80 a0 a0 00 cmp %g2, 0
2008170: 12 80 00 2e bne 2008228 <rtems_aio_enqueue+0x138> <== NEVER TAKEN
2008174: d2 00 40 00 ld [ %g1 ], %o1
2008178: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
200817c: 80 a0 60 04 cmp %g1, 4
2008180: 14 80 00 2b bg 200822c <rtems_aio_enqueue+0x13c>
2008184: 11 00 80 7f sethi %hi(0x201fc00), %o0
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
2008188: 90 06 e0 48 add %i3, 0x48, %o0
200818c: 7f ff ff 7d call 2007f80 <rtems_aio_search_fd>
2008190: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2008194: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
2008198: b8 10 00 08 mov %o0, %i4
if (r_chain->new_fd == 1) {
200819c: 80 a0 60 01 cmp %g1, 1
20081a0: 12 80 00 1d bne 2008214 <rtems_aio_enqueue+0x124>
20081a4: b4 02 20 08 add %o0, 8, %i2
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
20081a8: 92 10 00 1d mov %i5, %o1
20081ac: 40 00 08 ff call 200a5a8 <_Chain_Insert>
20081b0: 90 10 00 1a mov %i2, %o0
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
20081b4: 92 10 20 00 clr %o1
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
if (r_chain->new_fd == 1) {
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
20081b8: c0 27 20 18 clr [ %i4 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
20081bc: 40 00 01 fc call 20089ac <pthread_mutex_init>
20081c0: 90 07 20 1c add %i4, 0x1c, %o0
pthread_cond_init (&r_chain->cond, NULL);
20081c4: 92 10 20 00 clr %o1
20081c8: 40 00 00 fd call 20085bc <pthread_cond_init>
20081cc: 90 07 20 20 add %i4, 0x20, %o0
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
20081d0: 90 07 bf dc add %fp, -36, %o0
20081d4: 92 06 e0 08 add %i3, 8, %o1
20081d8: 15 00 80 1e sethi %hi(0x2007800), %o2
20081dc: 96 10 00 1c mov %i4, %o3
20081e0: 40 00 02 de call 2008d58 <pthread_create>
20081e4: 94 12 a3 c8 or %o2, 0x3c8, %o2
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
20081e8: ba 92 20 00 orcc %o0, 0, %i5
20081ec: 22 80 00 07 be,a 2008208 <rtems_aio_enqueue+0x118> <== ALWAYS TAKEN
20081f0: c2 06 e0 64 ld [ %i3 + 0x64 ], %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
20081f4: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
20081f8: 40 00 02 67 call 2008b94 <pthread_mutex_unlock> <== NOT EXECUTED
20081fc: b0 10 00 1d mov %i5, %i0 <== NOT EXECUTED
2008200: 81 c7 e0 08 ret <== NOT EXECUTED
2008204: 81 e8 00 00 restore <== NOT EXECUTED
return result;
}
++aio_request_queue.active_threads;
2008208: 82 00 60 01 inc %g1
200820c: 10 80 00 3a b 20082f4 <rtems_aio_enqueue+0x204>
2008210: c2 26 e0 64 st %g1, [ %i3 + 0x64 ]
}
else {
/* put request in the fd chain it belongs to */
pthread_mutex_lock (&r_chain->mutex);
2008214: b6 02 20 1c add %o0, 0x1c, %i3
2008218: 40 00 02 3e call 2008b10 <pthread_mutex_lock>
200821c: 90 10 00 1b mov %i3, %o0
rtems_aio_insert_prio (&r_chain->perfd, req);
2008220: 10 80 00 0c b 2008250 <rtems_aio_enqueue+0x160>
2008224: 90 10 00 1a mov %i2, %o0
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
2008228: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
200822c: 94 10 20 00 clr %o2
2008230: 7f ff ff 54 call 2007f80 <rtems_aio_search_fd>
2008234: 90 12 23 04 or %o0, 0x304, %o0
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
2008238: b8 92 20 00 orcc %o0, 0, %i4
200823c: 02 80 00 0d be 2008270 <rtems_aio_enqueue+0x180>
2008240: b6 07 20 1c add %i4, 0x1c, %i3
{
pthread_mutex_lock (&r_chain->mutex);
2008244: 40 00 02 33 call 2008b10 <pthread_mutex_lock>
2008248: 90 10 00 1b mov %i3, %o0
rtems_aio_insert_prio (&r_chain->perfd, req);
200824c: 90 07 20 08 add %i4, 8, %o0
2008250: 7f ff fe fc call 2007e40 <rtems_aio_insert_prio>
2008254: 92 10 00 1d mov %i5, %o1
pthread_cond_signal (&r_chain->cond);
2008258: 40 00 01 09 call 200867c <pthread_cond_signal>
200825c: 90 07 20 20 add %i4, 0x20, %o0
pthread_mutex_unlock (&r_chain->mutex);
2008260: 40 00 02 4d call 2008b94 <pthread_mutex_unlock>
2008264: 90 10 00 1b mov %i3, %o0
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
2008268: 10 80 00 24 b 20082f8 <rtems_aio_enqueue+0x208>
200826c: 11 00 80 7f sethi %hi(0x201fc00), %o0
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
2008270: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2008274: 11 00 80 7f sethi %hi(0x201fc00), %o0
2008278: d2 00 40 00 ld [ %g1 ], %o1
200827c: 90 12 23 10 or %o0, 0x310, %o0
2008280: 7f ff ff 40 call 2007f80 <rtems_aio_search_fd>
2008284: 94 10 20 01 mov 1, %o2
if (r_chain->new_fd == 1) {
2008288: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
200828c: b8 10 00 08 mov %o0, %i4
2008290: 92 10 00 1d mov %i5, %o1
if (r_chain->new_fd == 1) {
2008294: 80 a0 60 01 cmp %g1, 1
2008298: 12 80 00 0d bne 20082cc <rtems_aio_enqueue+0x1dc>
200829c: 90 02 20 08 add %o0, 8, %o0
20082a0: 40 00 08 c2 call 200a5a8 <_Chain_Insert>
20082a4: 01 00 00 00 nop
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
20082a8: 90 07 20 1c add %i4, 0x1c, %o0
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
20082ac: c0 27 20 18 clr [ %i4 + 0x18 ]
pthread_mutex_init (&r_chain->mutex, NULL);
20082b0: 40 00 01 bf call 20089ac <pthread_mutex_init>
20082b4: 92 10 20 00 clr %o1
pthread_cond_init (&r_chain->cond, NULL);
20082b8: 90 07 20 20 add %i4, 0x20, %o0
20082bc: 40 00 00 c0 call 20085bc <pthread_cond_init>
20082c0: 92 10 20 00 clr %o1
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
if (aio_request_queue.idle_threads > 0)
20082c4: 10 80 00 05 b 20082d8 <rtems_aio_enqueue+0x1e8>
20082c8: 11 00 80 7f sethi %hi(0x201fc00), %o0
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
20082cc: 7f ff fe dd call 2007e40 <rtems_aio_insert_prio>
20082d0: 01 00 00 00 nop
if (aio_request_queue.idle_threads > 0)
20082d4: 11 00 80 7f sethi %hi(0x201fc00), %o0
20082d8: 90 12 22 bc or %o0, 0x2bc, %o0 ! 201febc <aio_request_queue>
20082dc: c2 02 20 68 ld [ %o0 + 0x68 ], %g1
20082e0: 80 a0 60 00 cmp %g1, 0
20082e4: 24 80 00 05 ble,a 20082f8 <rtems_aio_enqueue+0x208> <== ALWAYS TAKEN
20082e8: 11 00 80 7f sethi %hi(0x201fc00), %o0
pthread_cond_signal (&aio_request_queue.new_req);
20082ec: 40 00 00 e4 call 200867c <pthread_cond_signal> <== NOT EXECUTED
20082f0: 90 02 20 04 add %o0, 4, %o0 ! 201fc04 <_PathLocale> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
20082f4: 11 00 80 7f sethi %hi(0x201fc00), %o0
20082f8: 40 00 02 27 call 2008b94 <pthread_mutex_unlock>
20082fc: 90 12 22 bc or %o0, 0x2bc, %o0 ! 201febc <aio_request_queue>
return 0;
}
2008300: 81 c7 e0 08 ret
2008304: 81 e8 00 00 restore
02007bc8 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
2007bc8: 9d e3 bf 78 save %sp, -136, %sp
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
2007bcc: 3b 00 80 7f sethi %hi(0x201fc00), %i5
2007bd0: ba 17 62 bc or %i5, 0x2bc, %i5 ! 201febc <aio_request_queue>
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007bd4: b4 07 60 58 add %i5, 0x58, %i2
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007bd8: b2 07 60 4c add %i5, 0x4c, %i1
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007bdc: a0 07 60 04 add %i5, 4, %l0
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
2007be0: b6 06 20 1c add %i0, 0x1c, %i3
2007be4: 40 00 03 cb call 2008b10 <pthread_mutex_lock>
2007be8: 90 10 00 1b mov %i3, %o0
if (result != 0)
2007bec: 80 a2 20 00 cmp %o0, 0
2007bf0: 12 80 00 91 bne 2007e34 <rtems_aio_handle+0x26c> <== NEVER TAKEN
2007bf4: 82 06 20 0c add %i0, 0xc, %g1
2007bf8: f8 06 20 08 ld [ %i0 + 8 ], %i4
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
2007bfc: 80 a7 00 01 cmp %i4, %g1
2007c00: 02 80 00 3b be 2007cec <rtems_aio_handle+0x124>
2007c04: 01 00 00 00 nop
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
2007c08: 40 00 05 d5 call 200935c <pthread_self>
2007c0c: 01 00 00 00 nop
2007c10: 92 07 bf d8 add %fp, -40, %o1
2007c14: 40 00 04 e2 call 2008f9c <pthread_getschedparam>
2007c18: 94 07 bf e4 add %fp, -28, %o2
param.sched_priority = req->priority;
2007c1c: c2 07 20 0c ld [ %i4 + 0xc ], %g1
pthread_setschedparam (pthread_self(), req->policy, ¶m);
2007c20: 40 00 05 cf call 200935c <pthread_self>
2007c24: c2 27 bf e4 st %g1, [ %fp + -28 ]
2007c28: d2 07 20 08 ld [ %i4 + 8 ], %o1
2007c2c: 40 00 05 d0 call 200936c <pthread_setschedparam>
2007c30: 94 07 bf e4 add %fp, -28, %o2
2007c34: 40 00 0a 44 call 200a544 <_Chain_Extract>
2007c38: 90 10 00 1c mov %i4, %o0
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
2007c3c: 40 00 03 d6 call 2008b94 <pthread_mutex_unlock>
2007c40: 90 10 00 1b mov %i3, %o0
switch (req->aiocbp->aio_lio_opcode) {
2007c44: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
2007c48: c4 00 60 30 ld [ %g1 + 0x30 ], %g2
2007c4c: 80 a0 a0 02 cmp %g2, 2
2007c50: 22 80 00 10 be,a 2007c90 <rtems_aio_handle+0xc8>
2007c54: c4 18 60 08 ldd [ %g1 + 8 ], %g2
2007c58: 80 a0 a0 03 cmp %g2, 3
2007c5c: 02 80 00 15 be 2007cb0 <rtems_aio_handle+0xe8> <== NEVER TAKEN
2007c60: 80 a0 a0 01 cmp %g2, 1
2007c64: 32 80 00 19 bne,a 2007cc8 <rtems_aio_handle+0x100> <== NEVER TAKEN
2007c68: f8 07 20 14 ld [ %i4 + 0x14 ], %i4 <== NOT EXECUTED
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
2007c6c: c4 18 60 08 ldd [ %g1 + 8 ], %g2
2007c70: d0 00 40 00 ld [ %g1 ], %o0
2007c74: d2 00 60 10 ld [ %g1 + 0x10 ], %o1
2007c78: d4 00 60 14 ld [ %g1 + 0x14 ], %o2
2007c7c: 96 10 00 02 mov %g2, %o3
2007c80: 40 00 2b 28 call 2012920 <pread>
2007c84: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
2007c88: 10 80 00 0d b 2007cbc <rtems_aio_handle+0xf4>
2007c8c: 80 a2 3f ff cmp %o0, -1
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
2007c90: d0 00 40 00 ld [ %g1 ], %o0
2007c94: d2 00 60 10 ld [ %g1 + 0x10 ], %o1
2007c98: d4 00 60 14 ld [ %g1 + 0x14 ], %o2
2007c9c: 96 10 00 02 mov %g2, %o3
2007ca0: 40 00 2b 5e call 2012a18 <pwrite>
2007ca4: 98 10 00 03 mov %g3, %o4
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
2007ca8: 10 80 00 05 b 2007cbc <rtems_aio_handle+0xf4>
2007cac: 80 a2 3f ff cmp %o0, -1
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
2007cb0: 40 00 1a 80 call 200e6b0 <fsync> <== NOT EXECUTED
2007cb4: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
2007cb8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2007cbc: 32 80 00 09 bne,a 2007ce0 <rtems_aio_handle+0x118> <== ALWAYS TAKEN
2007cc0: c2 07 20 14 ld [ %i4 + 0x14 ], %g1
req->aiocbp->return_value = -1;
2007cc4: f8 07 20 14 ld [ %i4 + 0x14 ], %i4 <== NOT EXECUTED
2007cc8: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED
req->aiocbp->error_code = errno;
2007ccc: 40 00 28 19 call 2011d30 <__errno> <== NOT EXECUTED
2007cd0: c2 27 20 38 st %g1, [ %i4 + 0x38 ] <== NOT EXECUTED
2007cd4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2007cd8: 10 bf ff c2 b 2007be0 <rtems_aio_handle+0x18> <== NOT EXECUTED
2007cdc: c2 27 20 34 st %g1, [ %i4 + 0x34 ] <== NOT EXECUTED
} else {
req->aiocbp->return_value = result;
2007ce0: d0 20 60 38 st %o0, [ %g1 + 0x38 ]
req->aiocbp->error_code = 0;
2007ce4: 10 bf ff bf b 2007be0 <rtems_aio_handle+0x18>
2007ce8: c0 20 60 34 clr [ %g1 + 0x34 ]
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
2007cec: 40 00 03 aa call 2008b94 <pthread_mutex_unlock>
2007cf0: 90 10 00 1b mov %i3, %o0
pthread_mutex_lock (&aio_request_queue.mutex);
2007cf4: 40 00 03 87 call 2008b10 <pthread_mutex_lock>
2007cf8: 90 10 00 1d mov %i5, %o0
if (rtems_chain_is_empty (chain))
2007cfc: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007d00: 80 a0 40 1c cmp %g1, %i4
2007d04: 12 80 00 48 bne 2007e24 <rtems_aio_handle+0x25c> <== NEVER TAKEN
2007d08: 92 07 bf dc add %fp, -36, %o1
{
clock_gettime (CLOCK_REALTIME, &timeout);
2007d0c: 40 00 01 c9 call 2008430 <clock_gettime>
2007d10: 90 10 20 01 mov 1, %o0
timeout.tv_sec += 3;
2007d14: c2 07 bf dc ld [ %fp + -36 ], %g1
timeout.tv_nsec = 0;
2007d18: c0 27 bf e0 clr [ %fp + -32 ]
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007d1c: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007d20: b8 06 20 20 add %i0, 0x20, %i4
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007d24: c2 27 bf dc st %g1, [ %fp + -36 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
2007d28: 90 10 00 1c mov %i4, %o0
2007d2c: 92 10 00 1d mov %i5, %o1
2007d30: 40 00 02 70 call 20086f0 <pthread_cond_timedwait>
2007d34: 94 07 bf dc add %fp, -36, %o2
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
2007d38: 80 a2 20 74 cmp %o0, 0x74
2007d3c: 12 80 00 3a bne 2007e24 <rtems_aio_handle+0x25c> <== NEVER TAKEN
2007d40: 01 00 00 00 nop
2007d44: 40 00 0a 00 call 200a544 <_Chain_Extract>
2007d48: 90 10 00 18 mov %i0, %o0
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
2007d4c: 40 00 02 c3 call 2008858 <pthread_mutex_destroy>
2007d50: 90 10 00 1b mov %i3, %o0
pthread_cond_destroy (&r_chain->cond);
2007d54: 40 00 01 e3 call 20084e0 <pthread_cond_destroy>
2007d58: 90 10 00 1c mov %i4, %o0
free (r_chain);
2007d5c: 7f ff f0 01 call 2003d60 <free>
2007d60: 90 10 00 18 mov %i0, %o0
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
2007d64: c2 07 60 54 ld [ %i5 + 0x54 ], %g1
2007d68: 80 a0 40 1a cmp %g1, %i2
2007d6c: 12 80 00 1b bne 2007dd8 <rtems_aio_handle+0x210>
2007d70: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
2007d74: 92 07 bf dc add %fp, -36, %o1
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
2007d78: 82 00 60 01 inc %g1
2007d7c: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
--aio_request_queue.active_threads;
2007d80: c2 07 60 64 ld [ %i5 + 0x64 ], %g1
clock_gettime (CLOCK_REALTIME, &timeout);
2007d84: 90 10 20 01 mov 1, %o0
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
2007d88: 82 00 7f ff add %g1, -1, %g1
clock_gettime (CLOCK_REALTIME, &timeout);
2007d8c: 40 00 01 a9 call 2008430 <clock_gettime>
2007d90: c2 27 60 64 st %g1, [ %i5 + 0x64 ]
timeout.tv_sec += 3;
2007d94: c2 07 bf dc ld [ %fp + -36 ], %g1
timeout.tv_nsec = 0;
2007d98: c0 27 bf e0 clr [ %fp + -32 ]
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007d9c: 82 00 60 03 add %g1, 3, %g1
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007da0: 90 10 00 10 mov %l0, %o0
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
2007da4: c2 27 bf dc st %g1, [ %fp + -36 ]
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
2007da8: 92 10 00 1d mov %i5, %o1
2007dac: 40 00 02 51 call 20086f0 <pthread_cond_timedwait>
2007db0: 94 07 bf dc add %fp, -36, %o2
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
2007db4: 80 a2 20 74 cmp %o0, 0x74
2007db8: 12 80 00 08 bne 2007dd8 <rtems_aio_handle+0x210> <== NEVER TAKEN
2007dbc: c2 07 60 68 ld [ %i5 + 0x68 ], %g1
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
pthread_mutex_unlock (&aio_request_queue.mutex);
2007dc0: 90 10 00 1d mov %i5, %o0
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
2007dc4: 82 00 7f ff add %g1, -1, %g1
pthread_mutex_unlock (&aio_request_queue.mutex);
2007dc8: 40 00 03 73 call 2008b94 <pthread_mutex_unlock>
2007dcc: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007dd0: 81 c7 e0 08 ret
2007dd4: 91 e8 20 00 restore %g0, 0, %o0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
2007dd8: f0 07 60 54 ld [ %i5 + 0x54 ], %i0
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
2007ddc: 82 00 7f ff add %g1, -1, %g1
2007de0: c2 27 60 68 st %g1, [ %i5 + 0x68 ]
++aio_request_queue.active_threads;
2007de4: c2 07 60 64 ld [ %i5 + 0x64 ], %g1
2007de8: 90 10 00 18 mov %i0, %o0
2007dec: 82 00 60 01 inc %g1
2007df0: 40 00 09 d5 call 200a544 <_Chain_Extract>
2007df4: c2 27 60 64 st %g1, [ %i5 + 0x64 ]
2007df8: c2 07 60 48 ld [ %i5 + 0x48 ], %g1
2007dfc: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
2007e00: c6 00 60 14 ld [ %g1 + 0x14 ], %g3
2007e04: 80 a0 c0 02 cmp %g3, %g2
2007e08: 16 80 00 04 bge 2007e18 <rtems_aio_handle+0x250>
2007e0c: 80 a0 40 19 cmp %g1, %i1
2007e10: 32 bf ff fc bne,a 2007e00 <rtems_aio_handle+0x238> <== ALWAYS TAKEN
2007e14: c2 00 40 00 ld [ %g1 ], %g1
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
2007e18: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007e1c: 40 00 09 e3 call 200a5a8 <_Chain_Insert>
2007e20: 92 10 00 18 mov %i0, %o1
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
2007e24: 40 00 03 5c call 2008b94 <pthread_mutex_unlock>
2007e28: 90 10 00 1d mov %i5, %o0
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
2007e2c: 10 bf ff 6e b 2007be4 <rtems_aio_handle+0x1c>
2007e30: b6 06 20 1c add %i0, 0x1c, %i3
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
2007e34: b0 10 20 00 clr %i0 <== NOT EXECUTED
2007e38: 81 c7 e0 08 ret <== NOT EXECUTED
2007e3c: 81 e8 00 00 restore <== NOT EXECUTED
02007ea0 <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
2007ea0: 9d e3 bf a0 save %sp, -96, %sp
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
2007ea4: 3b 00 80 7f sethi %hi(0x201fc00), %i5
2007ea8: 40 00 03 92 call 2008cf0 <pthread_attr_init>
2007eac: 90 17 62 c4 or %i5, 0x2c4, %o0 ! 201fec4 <aio_request_queue+0x8>
if (result != 0)
2007eb0: b0 92 20 00 orcc %o0, 0, %i0
2007eb4: 12 80 00 31 bne 2007f78 <rtems_aio_init+0xd8> <== NEVER TAKEN
2007eb8: 90 17 62 c4 or %i5, 0x2c4, %o0
return result;
result =
2007ebc: 40 00 03 99 call 2008d20 <pthread_attr_setdetachstate>
2007ec0: 92 10 20 00 clr %o1
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
2007ec4: 80 a2 20 00 cmp %o0, 0
2007ec8: 22 80 00 05 be,a 2007edc <rtems_aio_init+0x3c> <== ALWAYS TAKEN
2007ecc: 11 00 80 7f sethi %hi(0x201fc00), %o0
pthread_attr_destroy (&aio_request_queue.attr);
2007ed0: 40 00 03 7c call 2008cc0 <pthread_attr_destroy> <== NOT EXECUTED
2007ed4: 90 17 62 c4 or %i5, 0x2c4, %o0 <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
2007ed8: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
2007edc: 92 10 20 00 clr %o1
2007ee0: 40 00 02 b3 call 20089ac <pthread_mutex_init>
2007ee4: 90 12 22 bc or %o0, 0x2bc, %o0
if (result != 0)
2007ee8: 80 a2 20 00 cmp %o0, 0
2007eec: 22 80 00 06 be,a 2007f04 <rtems_aio_init+0x64> <== ALWAYS TAKEN
2007ef0: 11 00 80 7f sethi %hi(0x201fc00), %o0
pthread_attr_destroy (&aio_request_queue.attr);
2007ef4: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
2007ef8: 40 00 03 72 call 2008cc0 <pthread_attr_destroy> <== NOT EXECUTED
2007efc: 90 12 22 c4 or %o0, 0x2c4, %o0 ! 201fec4 <aio_request_queue+0x8><== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
2007f00: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
2007f04: 92 10 20 00 clr %o1
2007f08: 40 00 01 ad call 20085bc <pthread_cond_init>
2007f0c: 90 12 22 c0 or %o0, 0x2c0, %o0
if (result != 0) {
2007f10: b0 92 20 00 orcc %o0, 0, %i0
2007f14: 02 80 00 09 be 2007f38 <rtems_aio_init+0x98> <== ALWAYS TAKEN
2007f18: 03 00 80 7f sethi %hi(0x201fc00), %g1
pthread_mutex_destroy (&aio_request_queue.mutex);
2007f1c: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
2007f20: 40 00 02 4e call 2008858 <pthread_mutex_destroy> <== NOT EXECUTED
2007f24: 90 12 22 bc or %o0, 0x2bc, %o0 ! 201febc <aio_request_queue><== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
2007f28: 11 00 80 7f sethi %hi(0x201fc00), %o0 <== NOT EXECUTED
2007f2c: 40 00 03 65 call 2008cc0 <pthread_attr_destroy> <== NOT EXECUTED
2007f30: 90 12 22 c4 or %o0, 0x2c4, %o0 ! 201fec4 <aio_request_queue+0x8><== NOT EXECUTED
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007f34: 03 00 80 7f sethi %hi(0x201fc00), %g1 <== NOT EXECUTED
2007f38: 82 10 62 bc or %g1, 0x2bc, %g1 ! 201febc <aio_request_queue>
2007f3c: 84 00 60 4c add %g1, 0x4c, %g2
2007f40: c4 20 60 48 st %g2, [ %g1 + 0x48 ]
head->previous = NULL;
tail->previous = head;
2007f44: 84 00 60 48 add %g1, 0x48, %g2
2007f48: c4 20 60 50 st %g2, [ %g1 + 0x50 ]
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
2007f4c: 84 00 60 58 add %g1, 0x58, %g2
2007f50: c4 20 60 54 st %g2, [ %g1 + 0x54 ]
head->previous = NULL;
tail->previous = head;
2007f54: 84 00 60 54 add %g1, 0x54, %g2
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
2007f58: c0 20 60 4c clr [ %g1 + 0x4c ]
tail->previous = head;
2007f5c: c4 20 60 5c st %g2, [ %g1 + 0x5c ]
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
2007f60: c0 20 60 58 clr [ %g1 + 0x58 ]
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007f64: 05 00 00 2c sethi %hi(0xb000), %g2
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
2007f68: c0 20 60 64 clr [ %g1 + 0x64 ]
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007f6c: 84 10 a0 0b or %g2, 0xb, %g2
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
2007f70: c0 20 60 68 clr [ %g1 + 0x68 ]
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
2007f74: c4 20 60 60 st %g2, [ %g1 + 0x60 ]
return result;
}
2007f78: 81 c7 e0 08 ret
2007f7c: 81 e8 00 00 restore
02007e40 <rtems_aio_insert_prio>:
2007e40: c2 02 00 00 ld [ %o0 ], %g1
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2007e44: 86 02 20 04 add %o0, 4, %g3
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
2007e48: 80 a0 40 03 cmp %g1, %g3
2007e4c: 02 80 00 0e be 2007e84 <rtems_aio_insert_prio+0x44> <== NEVER TAKEN
2007e50: 84 10 00 09 mov %o1, %g2
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007e54: c8 00 60 14 ld [ %g1 + 0x14 ], %g4
while (req->aiocbp->aio_reqprio > prio &&
2007e58: da 02 60 14 ld [ %o1 + 0x14 ], %o5
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007e5c: c8 01 20 18 ld [ %g4 + 0x18 ], %g4
while (req->aiocbp->aio_reqprio > prio &&
2007e60: 10 80 00 04 b 2007e70 <rtems_aio_insert_prio+0x30>
2007e64: da 03 60 18 ld [ %o5 + 0x18 ], %o5
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
2007e68: c8 00 60 14 ld [ %g1 + 0x14 ], %g4 <== NOT EXECUTED
2007e6c: c8 01 20 18 ld [ %g4 + 0x18 ], %g4 <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
2007e70: 80 a3 40 04 cmp %o5, %g4
2007e74: 14 80 00 07 bg 2007e90 <rtems_aio_insert_prio+0x50> <== NEVER TAKEN
2007e78: 80 a0 40 03 cmp %g1, %g3
2007e7c: d0 00 60 04 ld [ %g1 + 4 ], %o0
2007e80: 92 10 00 02 mov %g2, %o1
2007e84: 82 13 c0 00 mov %o7, %g1
2007e88: 40 00 09 c8 call 200a5a8 <_Chain_Insert>
2007e8c: 9e 10 40 00 mov %g1, %o7
2007e90: 32 bf ff f6 bne,a 2007e68 <rtems_aio_insert_prio+0x28> <== NOT EXECUTED
2007e94: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
2007e98: 10 bf ff fa b 2007e80 <rtems_aio_insert_prio+0x40> <== NOT EXECUTED
2007e9c: d0 00 60 04 ld [ %g1 + 4 ], %o0 <== NOT EXECUTED
02008070 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
2008070: 9d e3 bf a0 save %sp, -96, %sp
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
2008074: fa 06 00 00 ld [ %i0 ], %i5
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
2008078: 82 06 20 04 add %i0, 4, %g1
if (rtems_chain_is_empty (chain))
200807c: 80 a7 40 01 cmp %i5, %g1
2008080: 12 80 00 09 bne 20080a4 <rtems_aio_remove_req+0x34>
2008084: b0 10 20 02 mov 2, %i0
2008088: 81 c7 e0 08 ret
200808c: 81 e8 00 00 restore
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
2008090: 80 a7 40 01 cmp %i5, %g1 <== NOT EXECUTED
2008094: 32 80 00 05 bne,a 20080a8 <rtems_aio_remove_req+0x38> <== NOT EXECUTED
2008098: c4 07 60 14 ld [ %i5 + 0x14 ], %g2 <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
200809c: 81 c7 e0 08 ret <== NOT EXECUTED
20080a0: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
20080a4: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
20080a8: 80 a0 80 19 cmp %g2, %i1
20080ac: 32 bf ff f9 bne,a 2008090 <rtems_aio_remove_req+0x20> <== NEVER TAKEN
20080b0: fa 07 40 00 ld [ %i5 ], %i5 <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
20080b4: 80 a7 40 01 cmp %i5, %g1
20080b8: 02 bf ff f4 be 2008088 <rtems_aio_remove_req+0x18> <== NEVER TAKEN
20080bc: b0 10 20 01 mov 1, %i0
20080c0: 40 00 09 21 call 200a544 <_Chain_Extract>
20080c4: 90 10 00 1d mov %i5, %o0
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
20080c8: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
20080cc: 84 10 20 8c mov 0x8c, %g2
20080d0: c4 20 60 34 st %g2, [ %g1 + 0x34 ]
current->aiocbp->return_value = -1;
20080d4: 84 10 3f ff mov -1, %g2
free (current);
20080d8: 90 10 00 1d mov %i5, %o0
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
20080dc: c4 20 60 38 st %g2, [ %g1 + 0x38 ]
free (current);
20080e0: 7f ff ef 20 call 2003d60 <free>
20080e4: b0 10 20 00 clr %i0
}
return AIO_CANCELED;
}
20080e8: 81 c7 e0 08 ret
20080ec: 81 e8 00 00 restore
02008530 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
2008530: 9d e3 bf 98 save %sp, -104, %sp
2008534: 30 80 00 08 b,a 2008554 <rtems_chain_get_with_wait+0x24>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
2008538: 92 10 20 00 clr %o1
200853c: 94 10 00 1a mov %i2, %o2
2008540: 7f ff fd 03 call 200794c <rtems_event_receive>
2008544: 96 07 bf fc add %fp, -4, %o3
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
2008548: 80 a2 20 00 cmp %o0, 0
200854c: 32 80 00 09 bne,a 2008570 <rtems_chain_get_with_wait+0x40><== ALWAYS TAKEN
2008550: fa 26 c0 00 st %i5, [ %i3 ]
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2008554: 40 00 01 88 call 2008b74 <_Chain_Get>
2008558: 90 10 00 18 mov %i0, %o0
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
200855c: ba 92 20 00 orcc %o0, 0, %i5
2008560: 02 bf ff f6 be 2008538 <rtems_chain_get_with_wait+0x8>
2008564: 90 10 00 19 mov %i1, %o0
2008568: 90 10 20 00 clr %o0
timeout,
&out
);
}
*node_ptr = node;
200856c: fa 26 c0 00 st %i5, [ %i3 ]
return sc;
}
2008570: 81 c7 e0 08 ret
2008574: 91 e8 00 08 restore %g0, %o0, %o0
0200a5dc <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)
{
200a5dc: 9d e3 bf a0 save %sp, -96, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
200a5e0: ba 10 20 01 mov 1, %i5
200a5e4: 80 a6 20 00 cmp %i0, 0
200a5e8: 02 80 00 0d be 200a61c <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
200a5ec: 35 00 80 81 sethi %hi(0x2020400), %i2
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
200a5f0: 83 2f 60 02 sll %i5, 2, %g1
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
200a5f4: 84 16 a1 34 or %i2, 0x134, %g2
200a5f8: c2 00 80 01 ld [ %g2 + %g1 ], %g1
200a5fc: f6 00 60 04 ld [ %g1 + 4 ], %i3
if ( !information )
200a600: 80 a6 e0 00 cmp %i3, 0
200a604: 12 80 00 0f bne 200a640 <rtems_iterate_over_all_threads+0x64>
200a608: b8 10 20 01 mov 1, %i4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200a60c: ba 07 60 01 inc %i5
200a610: 80 a7 60 04 cmp %i5, 4
200a614: 12 bf ff f8 bne 200a5f4 <rtems_iterate_over_all_threads+0x18>
200a618: 83 2f 60 02 sll %i5, 2, %g1
200a61c: 81 c7 e0 08 ret
200a620: 81 e8 00 00 restore
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
200a624: 83 2f 20 02 sll %i4, 2, %g1
200a628: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !the_thread )
200a62c: 80 a2 20 00 cmp %o0, 0
200a630: 02 80 00 04 be 200a640 <rtems_iterate_over_all_threads+0x64>
200a634: b8 07 20 01 inc %i4
continue;
(*routine)(the_thread);
200a638: 9f c6 00 00 call %i0
200a63c: 01 00 00 00 nop
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
200a640: c2 16 e0 10 lduh [ %i3 + 0x10 ], %g1
200a644: 80 a7 00 01 cmp %i4, %g1
200a648: 28 bf ff f7 bleu,a 200a624 <rtems_iterate_over_all_threads+0x48>
200a64c: c4 06 e0 1c ld [ %i3 + 0x1c ], %g2
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
200a650: 10 bf ff f0 b 200a610 <rtems_iterate_over_all_threads+0x34>
200a654: ba 07 60 01 inc %i5
02008de8 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
2008de8: 9d e3 bf a0 save %sp, -96, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
2008dec: 80 a6 20 00 cmp %i0, 0
2008df0: 02 80 00 39 be 2008ed4 <rtems_partition_create+0xec>
2008df4: 82 10 20 03 mov 3, %g1
return RTEMS_INVALID_NAME;
if ( !starting_address )
2008df8: 80 a6 60 00 cmp %i1, 0
2008dfc: 02 80 00 36 be 2008ed4 <rtems_partition_create+0xec>
2008e00: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !id )
2008e04: 80 a7 60 00 cmp %i5, 0
2008e08: 02 80 00 33 be 2008ed4 <rtems_partition_create+0xec> <== NEVER TAKEN
2008e0c: 80 a6 e0 00 cmp %i3, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
2008e10: 02 80 00 31 be 2008ed4 <rtems_partition_create+0xec>
2008e14: 82 10 20 08 mov 8, %g1
2008e18: 80 a6 a0 00 cmp %i2, 0
2008e1c: 02 80 00 2e be 2008ed4 <rtems_partition_create+0xec>
2008e20: 80 a6 80 1b cmp %i2, %i3
2008e24: 0a 80 00 2c bcs 2008ed4 <rtems_partition_create+0xec>
2008e28: 80 8e e0 07 btst 7, %i3
2008e2c: 12 80 00 2a bne 2008ed4 <rtems_partition_create+0xec>
2008e30: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
2008e34: 12 80 00 28 bne 2008ed4 <rtems_partition_create+0xec>
2008e38: 82 10 20 09 mov 9, %g1
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2008e3c: 03 00 80 89 sethi %hi(0x2022400), %g1
2008e40: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 20225f0 <_Thread_Dispatch_disable_level>
2008e44: 84 00 a0 01 inc %g2
2008e48: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
2008e4c: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
2008e50: 23 00 80 88 sethi %hi(0x2022000), %l1
2008e54: 40 00 06 ee call 200aa0c <_Objects_Allocate>
2008e58: 90 14 63 e4 or %l1, 0x3e4, %o0 ! 20223e4 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
2008e5c: a0 92 20 00 orcc %o0, 0, %l0
2008e60: 32 80 00 06 bne,a 2008e78 <rtems_partition_create+0x90>
2008e64: f8 24 20 1c st %i4, [ %l0 + 0x1c ]
_Thread_Enable_dispatch();
2008e68: 40 00 0c 0c call 200be98 <_Thread_Enable_dispatch>
2008e6c: 01 00 00 00 nop
return RTEMS_TOO_MANY;
2008e70: 10 80 00 19 b 2008ed4 <rtems_partition_create+0xec>
2008e74: 82 10 20 05 mov 5, %g1 ! 5 <PROM_START+0x5>
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2008e78: 92 10 00 1b mov %i3, %o1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
2008e7c: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
the_partition->length = length;
2008e80: f4 24 20 14 st %i2, [ %l0 + 0x14 ]
the_partition->buffer_size = buffer_size;
2008e84: f6 24 20 18 st %i3, [ %l0 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
2008e88: c0 24 20 20 clr [ %l0 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
length / buffer_size, buffer_size );
2008e8c: 40 00 46 6f call 201a848 <.udiv>
2008e90: 90 10 00 1a mov %i2, %o0
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2008e94: 92 10 00 19 mov %i1, %o1
length / buffer_size, buffer_size );
2008e98: 94 10 00 08 mov %o0, %o2
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
2008e9c: 96 10 00 1b mov %i3, %o3
2008ea0: b8 04 20 24 add %l0, 0x24, %i4
2008ea4: 40 00 04 58 call 200a004 <_Chain_Initialize>
2008ea8: 90 10 00 1c mov %i4, %o0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2008eac: c4 14 20 0a lduh [ %l0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008eb0: a2 14 63 e4 or %l1, 0x3e4, %l1
2008eb4: c6 04 60 1c ld [ %l1 + 0x1c ], %g3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
2008eb8: c2 04 20 08 ld [ %l0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2008ebc: 85 28 a0 02 sll %g2, 2, %g2
2008ec0: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2008ec4: f0 24 20 0c st %i0, [ %l0 + 0xc ]
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2008ec8: 40 00 0b f4 call 200be98 <_Thread_Enable_dispatch>
2008ecc: c2 27 40 00 st %g1, [ %i5 ]
return RTEMS_SUCCESSFUL;
2008ed0: 82 10 20 00 clr %g1
}
2008ed4: 81 c7 e0 08 ret
2008ed8: 91 e8 00 01 restore %g0, %g1, %o0
020164f4 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
20164f4: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
20164f8: 11 00 80 f2 sethi %hi(0x203c800), %o0
20164fc: 92 10 00 18 mov %i0, %o1
2016500: 90 12 23 74 or %o0, 0x374, %o0
2016504: 40 00 14 15 call 201b558 <_Objects_Get>
2016508: 94 07 bf fc add %fp, -4, %o2
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
201650c: c2 07 bf fc ld [ %fp + -4 ], %g1
2016510: 80 a0 60 00 cmp %g1, 0
2016514: 12 80 00 21 bne 2016598 <rtems_partition_return_buffer+0xa4>
2016518: ba 10 00 08 mov %o0, %i5
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
201651c: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
2016520: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2016524: 82 02 00 01 add %o0, %g1, %g1
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
2016528: 80 a6 40 01 cmp %i1, %g1
201652c: 18 80 00 0b bgu 2016558 <rtems_partition_return_buffer+0x64><== NEVER TAKEN
2016530: 82 10 20 00 clr %g1
2016534: 80 a6 40 08 cmp %i1, %o0
2016538: 0a 80 00 09 bcs 201655c <rtems_partition_return_buffer+0x68>
201653c: 80 a0 60 00 cmp %g1, 0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
2016540: d2 07 60 18 ld [ %i5 + 0x18 ], %o1
2016544: 40 00 58 56 call 202c69c <.urem>
2016548: 90 26 40 08 sub %i1, %o0, %o0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
201654c: 80 a0 00 08 cmp %g0, %o0
2016550: 10 80 00 02 b 2016558 <rtems_partition_return_buffer+0x64>
2016554: 82 60 3f ff subx %g0, -1, %g1
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
2016558: 80 a0 60 00 cmp %g1, 0
201655c: 02 80 00 0b be 2016588 <rtems_partition_return_buffer+0x94>
2016560: 90 07 60 24 add %i5, 0x24, %o0
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
2016564: 40 00 0c 7c call 2019754 <_Chain_Append>
2016568: 92 10 00 19 mov %i1, %o1
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
201656c: c2 07 60 20 ld [ %i5 + 0x20 ], %g1
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
2016570: b0 10 20 00 clr %i0
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
2016574: 82 00 7f ff add %g1, -1, %g1
_Thread_Enable_dispatch();
2016578: 40 00 17 ce call 201c4b0 <_Thread_Enable_dispatch>
201657c: c2 27 60 20 st %g1, [ %i5 + 0x20 ]
2016580: 81 c7 e0 08 ret
2016584: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2016588: 40 00 17 ca call 201c4b0 <_Thread_Enable_dispatch>
201658c: b0 10 20 09 mov 9, %i0
2016590: 81 c7 e0 08 ret
2016594: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2016598: 81 c7 e0 08 ret
201659c: 91 e8 20 04 restore %g0, 4, %o0
02032ed8 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
2032ed8: 9d e3 bf 98 save %sp, -104, %sp
2032edc: 11 00 81 8a sethi %hi(0x2062800), %o0
2032ee0: 92 10 00 18 mov %i0, %o1
2032ee4: 90 12 22 50 or %o0, 0x250, %o0
2032ee8: 7f ff 58 2e call 2008fa0 <_Objects_Get>
2032eec: 94 07 bf fc add %fp, -4, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2032ef0: c2 07 bf fc ld [ %fp + -4 ], %g1
2032ef4: 80 a0 60 00 cmp %g1, 0
2032ef8: 12 80 00 6a bne 20330a0 <rtems_rate_monotonic_period+0x1c8>
2032efc: ba 10 00 08 mov %o0, %i5
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
2032f00: 37 00 81 89 sethi %hi(0x2062400), %i3
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2032f04: c4 02 20 40 ld [ %o0 + 0x40 ], %g2
2032f08: b6 16 e0 90 or %i3, 0x90, %i3
2032f0c: c2 06 e0 0c ld [ %i3 + 0xc ], %g1
2032f10: 80 a0 80 01 cmp %g2, %g1
2032f14: 02 80 00 06 be 2032f2c <rtems_rate_monotonic_period+0x54>
2032f18: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2032f1c: 7f ff 5b cd call 2009e50 <_Thread_Enable_dispatch>
2032f20: b0 10 20 17 mov 0x17, %i0
2032f24: 81 c7 e0 08 ret
2032f28: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2032f2c: 12 80 00 0d bne 2032f60 <rtems_rate_monotonic_period+0x88>
2032f30: 01 00 00 00 nop
switch ( the_period->state ) {
2032f34: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2032f38: 80 a0 60 04 cmp %g1, 4
2032f3c: 18 80 00 05 bgu 2032f50 <rtems_rate_monotonic_period+0x78><== NEVER TAKEN
2032f40: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2032f44: 05 00 81 6e sethi %hi(0x205b800), %g2
2032f48: 84 10 a3 58 or %g2, 0x358, %g2 ! 205bb58 <CSWTCH.23>
2032f4c: f0 08 80 01 ldub [ %g2 + %g1 ], %i0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
2032f50: 7f ff 5b c0 call 2009e50 <_Thread_Enable_dispatch>
2032f54: 01 00 00 00 nop
2032f58: 81 c7 e0 08 ret
2032f5c: 81 e8 00 00 restore
return( return_value );
}
_ISR_Disable( level );
2032f60: 7f ff 3d 3c call 2002450 <sparc_disable_interrupts>
2032f64: 01 00 00 00 nop
2032f68: b4 10 00 08 mov %o0, %i2
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
2032f6c: f8 07 60 38 ld [ %i5 + 0x38 ], %i4
2032f70: 80 a7 20 00 cmp %i4, 0
2032f74: 12 80 00 15 bne 2032fc8 <rtems_rate_monotonic_period+0xf0>
2032f78: 80 a7 20 02 cmp %i4, 2
_ISR_Enable( level );
2032f7c: 7f ff 3d 39 call 2002460 <sparc_enable_interrupts>
2032f80: 01 00 00 00 nop
the_period->next_length = length;
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2032f84: 90 10 00 1d mov %i5, %o0
2032f88: 7f ff ff ba call 2032e70 <_Rate_monotonic_Initiate_statistics>
2032f8c: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
the_period->state = RATE_MONOTONIC_ACTIVE;
2032f90: 82 10 20 02 mov 2, %g1
2032f94: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2032f98: 03 00 80 cc sethi %hi(0x2033000), %g1
2032f9c: 82 10 60 ac or %g1, 0xac, %g1 ! 20330ac <_Rate_monotonic_Timeout>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2032fa0: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
2032fa4: c2 27 60 2c st %g1, [ %i5 + 0x2c ]
the_watchdog->id = id;
2032fa8: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
2032fac: c0 27 60 34 clr [ %i5 + 0x34 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2032fb0: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2032fb4: 11 00 81 88 sethi %hi(0x2062000), %o0
2032fb8: 92 07 60 10 add %i5, 0x10, %o1
2032fbc: 7f ff 5e f0 call 200ab7c <_Watchdog_Insert>
2032fc0: 90 12 20 08 or %o0, 8, %o0
2032fc4: 30 80 00 1b b,a 2033030 <rtems_rate_monotonic_period+0x158>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
2032fc8: 12 80 00 1e bne 2033040 <rtems_rate_monotonic_period+0x168>
2032fcc: 80 a7 20 04 cmp %i4, 4
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2032fd0: 7f ff ff 5f call 2032d4c <_Rate_monotonic_Update_statistics>
2032fd4: 90 10 00 1d mov %i5, %o0
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
2032fd8: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
2032fdc: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
2032fe0: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2032fe4: 7f ff 3d 1f call 2002460 <sparc_enable_interrupts>
2032fe8: 90 10 00 1a mov %i2, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
2032fec: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
2032ff0: c2 07 60 08 ld [ %i5 + 8 ], %g1
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2032ff4: 13 00 00 10 sethi %hi(0x4000), %o1
2032ff8: 7f ff 5d cd call 200a72c <_Thread_Set_state>
2032ffc: c2 22 20 20 st %g1, [ %o0 + 0x20 ]
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2033000: 7f ff 3d 14 call 2002450 <sparc_disable_interrupts>
2033004: 01 00 00 00 nop
local_state = the_period->state;
2033008: f4 07 60 38 ld [ %i5 + 0x38 ], %i2
the_period->state = RATE_MONOTONIC_ACTIVE;
203300c: f8 27 60 38 st %i4, [ %i5 + 0x38 ]
_ISR_Enable( level );
2033010: 7f ff 3d 14 call 2002460 <sparc_enable_interrupts>
2033014: 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 )
2033018: 80 a6 a0 03 cmp %i2, 3
203301c: 12 80 00 05 bne 2033030 <rtems_rate_monotonic_period+0x158>
2033020: 01 00 00 00 nop
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2033024: d0 06 e0 0c ld [ %i3 + 0xc ], %o0
2033028: 7f ff 5a aa call 2009ad0 <_Thread_Clear_state>
203302c: 13 00 00 10 sethi %hi(0x4000), %o1
_Thread_Enable_dispatch();
2033030: 7f ff 5b 88 call 2009e50 <_Thread_Enable_dispatch>
2033034: b0 10 20 00 clr %i0
2033038: 81 c7 e0 08 ret
203303c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
2033040: 12 bf ff b9 bne 2032f24 <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
2033044: b0 10 20 04 mov 4, %i0
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2033048: 7f ff ff 41 call 2032d4c <_Rate_monotonic_Update_statistics>
203304c: 90 10 00 1d mov %i5, %o0
_ISR_Enable( level );
2033050: 7f ff 3d 04 call 2002460 <sparc_enable_interrupts>
2033054: 90 10 00 1a mov %i2, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2033058: 82 10 20 02 mov 2, %g1
203305c: 92 07 60 10 add %i5, 0x10, %o1
2033060: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
the_period->next_length = length;
2033064: f2 27 60 3c st %i1, [ %i5 + 0x3c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2033068: f2 27 60 1c st %i1, [ %i5 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
203306c: 11 00 81 88 sethi %hi(0x2062000), %o0
2033070: 7f ff 5e c3 call 200ab7c <_Watchdog_Insert>
2033074: 90 12 20 08 or %o0, 8, %o0 ! 2062008 <_Watchdog_Ticks_chain>
2033078: d0 07 60 40 ld [ %i5 + 0x40 ], %o0
203307c: d2 07 60 3c ld [ %i5 + 0x3c ], %o1
2033080: 03 00 81 76 sethi %hi(0x205d800), %g1
2033084: c2 00 63 30 ld [ %g1 + 0x330 ], %g1 ! 205db30 <_Scheduler+0x34>
2033088: 9f c0 40 00 call %g1
203308c: b0 10 20 06 mov 6, %i0
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
2033090: 7f ff 5b 70 call 2009e50 <_Thread_Enable_dispatch>
2033094: 01 00 00 00 nop
2033098: 81 c7 e0 08 ret
203309c: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
20330a0: b0 10 20 04 mov 4, %i0
}
20330a4: 81 c7 e0 08 ret
20330a8: 81 e8 00 00 restore
020260b4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
20260b4: 9d e3 bf 38 save %sp, -200, %sp
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
20260b8: 80 a6 60 00 cmp %i1, 0
20260bc: 02 80 00 75 be 2026290 <rtems_rate_monotonic_report_statistics_with_plugin+0x1dc><== NEVER TAKEN
20260c0: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
20260c4: 13 00 81 63 sethi %hi(0x2058c00), %o1
20260c8: 9f c6 40 00 call %i1
20260cc: 92 12 61 b0 or %o1, 0x1b0, %o1 ! 2058db0 <_TOD_Days_per_month+0x68>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
20260d0: 90 10 00 18 mov %i0, %o0
20260d4: 13 00 81 63 sethi %hi(0x2058c00), %o1
20260d8: 9f c6 40 00 call %i1
20260dc: 92 12 61 d0 or %o1, 0x1d0, %o1 ! 2058dd0 <_TOD_Days_per_month+0x88>
(*print)( context, "--- Wall times are in seconds ---\n" );
20260e0: 90 10 00 18 mov %i0, %o0
20260e4: 13 00 81 63 sethi %hi(0x2058c00), %o1
20260e8: 9f c6 40 00 call %i1
20260ec: 92 12 61 f8 or %o1, 0x1f8, %o1 ! 2058df8 <_TOD_Days_per_month+0xb0>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
20260f0: 90 10 00 18 mov %i0, %o0
20260f4: 13 00 81 63 sethi %hi(0x2058c00), %o1
20260f8: 9f c6 40 00 call %i1
20260fc: 92 12 62 20 or %o1, 0x220, %o1 ! 2058e20 <_TOD_Days_per_month+0xd8>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
2026100: 90 10 00 18 mov %i0, %o0
2026104: 13 00 81 63 sethi %hi(0x2058c00), %o1
2026108: 9f c6 40 00 call %i1
202610c: 92 12 62 70 or %o1, 0x270, %o1 ! 2058e70 <_TOD_Days_per_month+0x128>
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2026110: 03 00 81 8a sethi %hi(0x2062800), %g1
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2026114: 39 00 81 63 sethi %hi(0x2058c00), %i4
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
2026118: 37 00 81 63 sethi %hi(0x2058c00), %i3
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
202611c: 35 00 81 63 sethi %hi(0x2058c00), %i2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
2026120: 21 00 81 68 sethi %hi(0x205a000), %l0
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2026124: fa 00 62 58 ld [ %g1 + 0x258 ], %i5
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2026128: b8 17 22 c0 or %i4, 0x2c0, %i4
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
202612c: b6 16 e2 d8 or %i3, 0x2d8, %i3
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
2026130: b4 16 a2 f8 or %i2, 0x2f8, %i2
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
2026134: 10 80 00 52 b 202627c <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
2026138: a0 14 23 80 or %l0, 0x380, %l0
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
202613c: 40 00 32 28 call 20329dc <rtems_rate_monotonic_get_statistics>
2026140: 92 07 bf c8 add %fp, -56, %o1
if ( status != RTEMS_SUCCESSFUL )
2026144: 80 a2 20 00 cmp %o0, 0
2026148: 32 80 00 4d bne,a 202627c <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
202614c: ba 07 60 01 inc %i5
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
2026150: 92 07 bf b0 add %fp, -80, %o1
2026154: 40 00 32 93 call 2032ba0 <rtems_rate_monotonic_get_status>
2026158: 90 10 00 1d mov %i5, %o0
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
202615c: d0 07 bf b0 ld [ %fp + -80 ], %o0
2026160: 92 10 20 05 mov 5, %o1
2026164: 7f ff a3 a5 call 200eff8 <rtems_object_get_name>
2026168: 94 07 bf a0 add %fp, -96, %o2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
202616c: d8 1f bf c8 ldd [ %fp + -56 ], %o4
2026170: 92 10 00 1c mov %i4, %o1
2026174: 90 10 00 18 mov %i0, %o0
2026178: 94 10 00 1d mov %i5, %o2
202617c: 9f c6 40 00 call %i1
2026180: 96 07 bf a0 add %fp, -96, %o3
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2026184: d2 07 bf c8 ld [ %fp + -56 ], %o1
2026188: 80 a2 60 00 cmp %o1, 0
202618c: 12 80 00 07 bne 20261a8 <rtems_rate_monotonic_report_statistics_with_plugin+0xf4>
2026190: 94 07 bf a8 add %fp, -88, %o2
(*print)( context, "\n" );
2026194: 90 10 00 18 mov %i0, %o0
2026198: 9f c6 40 00 call %i1
202619c: 92 10 00 10 mov %l0, %o1
continue;
20261a0: 10 80 00 37 b 202627c <rtems_rate_monotonic_report_statistics_with_plugin+0x1c8>
20261a4: ba 07 60 01 inc %i5
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
20261a8: 40 00 02 ef call 2026d64 <_Timespec_Divide_by_integer>
20261ac: 90 07 bf e0 add %fp, -32, %o0
(*print)( context,
20261b0: d0 07 bf d4 ld [ %fp + -44 ], %o0
20261b4: 40 00 a6 93 call 204fc00 <.div>
20261b8: 92 10 23 e8 mov 0x3e8, %o1
20261bc: a6 10 00 08 mov %o0, %l3
20261c0: d0 07 bf dc ld [ %fp + -36 ], %o0
20261c4: 40 00 a6 8f call 204fc00 <.div>
20261c8: 92 10 23 e8 mov 0x3e8, %o1
20261cc: c2 07 bf a8 ld [ %fp + -88 ], %g1
20261d0: a2 10 00 08 mov %o0, %l1
20261d4: d0 07 bf ac ld [ %fp + -84 ], %o0
20261d8: e8 07 bf d0 ld [ %fp + -48 ], %l4
20261dc: e4 07 bf d8 ld [ %fp + -40 ], %l2
20261e0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20261e4: 40 00 a6 87 call 204fc00 <.div>
20261e8: 92 10 23 e8 mov 0x3e8, %o1
20261ec: 96 10 00 13 mov %l3, %o3
20261f0: 98 10 00 12 mov %l2, %o4
20261f4: 9a 10 00 11 mov %l1, %o5
20261f8: 94 10 00 14 mov %l4, %o2
20261fc: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2026200: 92 10 00 1b mov %i3, %o1
2026204: 9f c6 40 00 call %i1
2026208: 90 10 00 18 mov %i0, %o0
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
202620c: d2 07 bf c8 ld [ %fp + -56 ], %o1
2026210: 94 07 bf a8 add %fp, -88, %o2
2026214: 40 00 02 d4 call 2026d64 <_Timespec_Divide_by_integer>
2026218: 90 07 bf f8 add %fp, -8, %o0
(*print)( context,
202621c: d0 07 bf ec ld [ %fp + -20 ], %o0
2026220: 40 00 a6 78 call 204fc00 <.div>
2026224: 92 10 23 e8 mov 0x3e8, %o1
2026228: a6 10 00 08 mov %o0, %l3
202622c: d0 07 bf f4 ld [ %fp + -12 ], %o0
2026230: 40 00 a6 74 call 204fc00 <.div>
2026234: 92 10 23 e8 mov 0x3e8, %o1
2026238: c2 07 bf a8 ld [ %fp + -88 ], %g1
202623c: a2 10 00 08 mov %o0, %l1
2026240: d0 07 bf ac ld [ %fp + -84 ], %o0
2026244: e8 07 bf e8 ld [ %fp + -24 ], %l4
2026248: e4 07 bf f0 ld [ %fp + -16 ], %l2
202624c: 92 10 23 e8 mov 0x3e8, %o1
2026250: 40 00 a6 6c call 204fc00 <.div>
2026254: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2026258: 92 10 00 1a mov %i2, %o1
202625c: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2026260: 94 10 00 14 mov %l4, %o2
2026264: 90 10 00 18 mov %i0, %o0
2026268: 96 10 00 13 mov %l3, %o3
202626c: 98 10 00 12 mov %l2, %o4
2026270: 9f c6 40 00 call %i1
2026274: 9a 10 00 11 mov %l1, %o5
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2026278: ba 07 60 01 inc %i5
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
202627c: 03 00 81 8a sethi %hi(0x2062800), %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 ;
2026280: c2 00 62 5c ld [ %g1 + 0x25c ], %g1 ! 2062a5c <_Rate_monotonic_Information+0xc>
2026284: 80 a7 40 01 cmp %i5, %g1
2026288: 08 bf ff ad bleu 202613c <rtems_rate_monotonic_report_statistics_with_plugin+0x88>
202628c: 90 10 00 1d mov %i5, %o0
2026290: 81 c7 e0 08 ret
2026294: 81 e8 00 00 restore
02008a88 <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
2008a88: 9d e3 bf a0 save %sp, -96, %sp
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
2008a8c: fa 06 20 30 ld [ %i0 + 0x30 ], %i5
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
2008a90: 90 10 00 19 mov %i1, %o0
2008a94: 92 10 00 1d mov %i5, %o1
2008a98: 40 00 44 f1 call 2019e5c <.urem>
2008a9c: b6 10 00 19 mov %i1, %i3
if (excess > 0) {
2008aa0: 80 a2 20 00 cmp %o0, 0
2008aa4: 02 80 00 05 be 2008ab8 <rtems_rbheap_allocate+0x30> <== ALWAYS TAKEN
2008aa8: 80 a6 c0 19 cmp %i3, %i1
value += alignment - excess;
2008aac: b6 06 40 1d add %i1, %i5, %i3 <== NOT EXECUTED
2008ab0: b6 26 c0 08 sub %i3, %o0, %i3 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
2008ab4: 80 a6 c0 19 cmp %i3, %i1 <== NOT EXECUTED
2008ab8: 0a 80 00 04 bcs 2008ac8 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
2008abc: 80 a6 60 00 cmp %i1, 0
2008ac0: 32 80 00 04 bne,a 2008ad0 <rtems_rbheap_allocate+0x48>
2008ac4: c2 06 00 00 ld [ %i0 ], %g1
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
2008ac8: 81 c7 e0 08 ret
2008acc: 91 e8 20 00 restore %g0, 0, %o0
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
2008ad0: 84 06 20 04 add %i0, 4, %g2
rtems_rbheap_chunk *big_enough = NULL;
2008ad4: 10 80 00 06 b 2008aec <rtems_rbheap_allocate+0x64>
2008ad8: ba 10 20 00 clr %i5
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
2008adc: 80 a0 c0 1b cmp %g3, %i3
2008ae0: ba 40 3f ff addx %g0, -1, %i5
2008ae4: ba 08 40 1d and %g1, %i5, %i5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
2008ae8: c2 00 40 00 ld [ %g1 ], %g1
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
2008aec: 80 a7 60 00 cmp %i5, 0
2008af0: 12 80 00 04 bne 2008b00 <rtems_rbheap_allocate+0x78>
2008af4: 80 a0 40 02 cmp %g1, %g2
2008af8: 32 bf ff f9 bne,a 2008adc <rtems_rbheap_allocate+0x54>
2008afc: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
2008b00: 80 a7 60 00 cmp %i5, 0
2008b04: 02 bf ff f1 be 2008ac8 <rtems_rbheap_allocate+0x40>
2008b08: 01 00 00 00 nop
uintptr_t free_size = free_chunk->size;
2008b0c: f4 07 60 1c ld [ %i5 + 0x1c ], %i2
if (free_size > aligned_size) {
2008b10: 80 a6 80 1b cmp %i2, %i3
2008b14: 28 80 00 14 bleu,a 2008b64 <rtems_rbheap_allocate+0xdc>
2008b18: c4 07 40 00 ld [ %i5 ], %g2
rtems_rbheap_chunk *new_chunk = get_chunk(control);
2008b1c: 7f ff ff 80 call 200891c <get_chunk>
2008b20: 90 10 00 18 mov %i0, %o0
if (new_chunk != NULL) {
2008b24: b8 92 20 00 orcc %o0, 0, %i4
2008b28: 02 bf ff e8 be 2008ac8 <rtems_rbheap_allocate+0x40> <== NEVER TAKEN
2008b2c: b4 26 80 1b sub %i2, %i3, %i2
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
2008b30: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
2008b34: f4 27 60 1c st %i2, [ %i5 + 0x1c ]
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
2008b38: f6 27 20 1c st %i3, [ %i4 + 0x1c ]
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
2008b3c: b4 06 80 01 add %i2, %g1, %i2
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
2008b40: c0 27 20 04 clr [ %i4 + 4 ]
2008b44: f4 27 20 18 st %i2, [ %i4 + 0x18 ]
2008b48: c0 27 00 00 clr [ %i4 ]
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
2008b4c: 90 06 20 18 add %i0, 0x18, %o0
2008b50: 40 00 06 a9 call 200a5f4 <_RBTree_Insert_unprotected>
2008b54: 92 07 20 08 add %i4, 8, %o1
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
2008b58: f0 07 20 18 ld [ %i4 + 0x18 ], %i0
2008b5c: 81 c7 e0 08 ret
2008b60: 81 e8 00 00 restore
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
2008b64: c2 07 60 04 ld [ %i5 + 4 ], %g1
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
2008b68: f0 07 60 18 ld [ %i5 + 0x18 ], %i0
next->previous = previous;
2008b6c: c2 20 a0 04 st %g1, [ %g2 + 4 ]
previous->next = next;
2008b70: c4 20 40 00 st %g2, [ %g1 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
2008b74: c0 27 60 04 clr [ %i5 + 4 ]
2008b78: c0 27 40 00 clr [ %i5 ]
}
}
}
return ptr;
}
2008b7c: 81 c7 e0 08 ret
2008b80: 81 e8 00 00 restore
02008cb4 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
2008cb4: 9d e3 bf a0 save %sp, -96, %sp <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
2008cb8: 7f ff ed 84 call 20042c8 <malloc> <== NOT EXECUTED
2008cbc: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
if (chunk != NULL) {
2008cc0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2008cc4: 02 80 00 07 be 2008ce0 <rtems_rbheap_extend_descriptors_with_malloc+0x2c><== NOT EXECUTED
2008cc8: 82 06 20 0c add %i0, 0xc, %g1 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2008ccc: c2 22 20 04 st %g1, [ %o0 + 4 ] <== NOT EXECUTED
before_node = after_node->next;
2008cd0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
after_node->next = the_node;
2008cd4: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED
the_node->next = before_node;
2008cd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
before_node->previous = the_node;
2008cdc: d0 20 60 04 st %o0, [ %g1 + 4 ] <== NOT EXECUTED
2008ce0: 81 c7 e0 08 ret <== NOT EXECUTED
2008ce4: 81 e8 00 00 restore <== NOT EXECUTED
02008b84 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
2008b84: 9d e3 bf 80 save %sp, -128, %sp
2008b88: b6 10 00 18 mov %i0, %i3
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
2008b8c: 80 a6 60 00 cmp %i1, 0
2008b90: 02 80 00 45 be 2008ca4 <rtems_rbheap_free+0x120>
2008b94: b0 10 20 00 clr %i0
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
2008b98: 90 07 bf e0 add %fp, -32, %o0
2008b9c: 92 10 20 00 clr %o1
2008ba0: 94 10 20 20 mov 0x20, %o2
2008ba4: 40 00 22 e6 call 201173c <memset>
2008ba8: b4 06 e0 18 add %i3, 0x18, %i2
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
2008bac: ba 10 20 00 clr %i5
2008bb0: f2 27 bf f8 st %i1, [ %fp + -8 ]
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
2008bb4: 10 80 00 12 b 2008bfc <rtems_rbheap_free+0x78>
2008bb8: f8 06 e0 1c ld [ %i3 + 0x1c ], %i4
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
2008bbc: 90 07 bf e8 add %fp, -24, %o0
2008bc0: 9f c0 40 00 call %g1
2008bc4: 92 10 00 1c mov %i4, %o1
if ( _RBTree_Is_equal( compare_result ) ) {
2008bc8: 80 a2 20 00 cmp %o0, 0
2008bcc: 12 80 00 07 bne 2008be8 <rtems_rbheap_free+0x64>
2008bd0: 83 3a 20 1f sra %o0, 0x1f, %g1
found = iter_node;
if ( the_rbtree->is_unique )
2008bd4: c2 0e a0 14 ldub [ %i2 + 0x14 ], %g1
2008bd8: 80 a0 60 00 cmp %g1, 0
2008bdc: 12 80 00 0c bne 2008c0c <rtems_rbheap_free+0x88> <== ALWAYS TAKEN
2008be0: ba 10 00 1c mov %i4, %i5
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
2008be4: 83 3a 20 1f sra %o0, 0x1f, %g1 <== NOT EXECUTED
2008be8: 90 20 40 08 sub %g1, %o0, %o0
2008bec: 91 32 20 1f srl %o0, 0x1f, %o0
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
2008bf0: 91 2a 20 02 sll %o0, 2, %o0
2008bf4: b8 07 00 08 add %i4, %o0, %i4
2008bf8: f8 07 20 04 ld [ %i4 + 4 ], %i4
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
2008bfc: 80 a7 20 00 cmp %i4, 0
2008c00: 32 bf ff ef bne,a 2008bbc <rtems_rbheap_free+0x38>
2008c04: c2 06 a0 10 ld [ %i2 + 0x10 ], %g1
2008c08: b8 10 00 1d mov %i5, %i4
return rtems_rbheap_chunk_of_node(
2008c0c: ba 07 3f f8 add %i4, -8, %i5
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
2008c10: 80 a7 7f f8 cmp %i5, -8
2008c14: 02 80 00 24 be 2008ca4 <rtems_rbheap_free+0x120>
2008c18: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
2008c1c: c4 07 3f f8 ld [ %i4 + -8 ], %g2
2008c20: 80 a0 a0 00 cmp %g2, 0
2008c24: 12 80 00 05 bne 2008c38 <rtems_rbheap_free+0xb4>
2008c28: 82 10 20 00 clr %g1
2008c2c: c2 07 60 04 ld [ %i5 + 4 ], %g1
2008c30: 80 a0 00 01 cmp %g0, %g1
2008c34: 82 60 3f ff subx %g0, -1, %g1
if (!rtems_rbheap_is_chunk_free(chunk)) {
2008c38: 80 a0 60 00 cmp %g1, 0
2008c3c: 02 80 00 1a be 2008ca4 <rtems_rbheap_free+0x120>
2008c40: b0 10 20 0e mov 0xe, %i0
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
2008c44: b8 07 60 08 add %i5, 8, %i4
2008c48: 92 10 20 00 clr %o1
2008c4c: 40 00 07 0f call 200a888 <_RBTree_Next_unprotected>
2008c50: 90 10 00 1c mov %i4, %o0
2008c54: 92 10 20 01 mov 1, %o1
2008c58: b2 10 00 08 mov %o0, %i1
2008c5c: 40 00 07 0b call 200a888 <_RBTree_Next_unprotected>
2008c60: 90 10 00 1c mov %i4, %o0
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
2008c64: 92 10 00 1a mov %i2, %o1
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
2008c68: 96 02 3f f8 add %o0, -8, %o3
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
2008c6c: 94 10 00 1d mov %i5, %o2
2008c70: 7f ff ff 02 call 2008878 <check_and_merge>
2008c74: 90 10 00 1b mov %i3, %o0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2008c78: c2 06 c0 00 ld [ %i3 ], %g1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2008c7c: f6 27 60 04 st %i3, [ %i5 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
2008c80: fa 26 c0 00 st %i5, [ %i3 ]
the_node->next = before_node;
2008c84: c2 27 40 00 st %g1, [ %i5 ]
before_node->previous = the_node;
2008c88: fa 20 60 04 st %i5, [ %g1 + 4 ]
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
2008c8c: 90 10 00 1b mov %i3, %o0
2008c90: 92 10 00 1a mov %i2, %o1
2008c94: 94 10 00 1d mov %i5, %o2
2008c98: 96 06 7f f8 add %i1, -8, %o3
2008c9c: 7f ff fe f7 call 2008878 <check_and_merge>
2008ca0: b0 10 20 00 clr %i0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
2008ca4: 81 c7 e0 08 ret
2008ca8: 81 e8 00 00 restore
02017a34 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
2017a34: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
2017a38: 80 a6 60 00 cmp %i1, 0
2017a3c: 02 80 00 35 be 2017b10 <rtems_signal_send+0xdc>
2017a40: 82 10 20 0a mov 0xa, %g1
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2017a44: 90 10 00 18 mov %i0, %o0
2017a48: 40 00 12 a7 call 201c4e4 <_Thread_Get>
2017a4c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
2017a50: c2 07 bf fc ld [ %fp + -4 ], %g1
2017a54: 80 a0 60 00 cmp %g1, 0
2017a58: 12 80 00 2d bne 2017b0c <rtems_signal_send+0xd8>
2017a5c: b8 10 00 08 mov %o0, %i4
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2017a60: fa 02 21 58 ld [ %o0 + 0x158 ], %i5
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2017a64: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2017a68: 80 a0 60 00 cmp %g1, 0
2017a6c: 02 80 00 24 be 2017afc <rtems_signal_send+0xc8>
2017a70: 01 00 00 00 nop
if ( asr->is_enabled ) {
2017a74: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
2017a78: 80 a0 60 00 cmp %g1, 0
2017a7c: 02 80 00 15 be 2017ad0 <rtems_signal_send+0x9c>
2017a80: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2017a84: 7f ff e3 5b call 20107f0 <sparc_disable_interrupts>
2017a88: 01 00 00 00 nop
*signal_set |= signals;
2017a8c: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
2017a90: b2 10 40 19 or %g1, %i1, %i1
2017a94: f2 27 60 14 st %i1, [ %i5 + 0x14 ]
_ISR_Enable( _level );
2017a98: 7f ff e3 5a call 2010800 <sparc_enable_interrupts>
2017a9c: 01 00 00 00 nop
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2017aa0: 03 00 80 f4 sethi %hi(0x203d000), %g1
2017aa4: 82 10 62 b0 or %g1, 0x2b0, %g1 ! 203d2b0 <_Per_CPU_Information>
2017aa8: c4 00 60 08 ld [ %g1 + 8 ], %g2
2017aac: 80 a0 a0 00 cmp %g2, 0
2017ab0: 02 80 00 0f be 2017aec <rtems_signal_send+0xb8>
2017ab4: 01 00 00 00 nop
2017ab8: c4 00 60 0c ld [ %g1 + 0xc ], %g2
2017abc: 80 a7 00 02 cmp %i4, %g2
2017ac0: 12 80 00 0b bne 2017aec <rtems_signal_send+0xb8> <== NEVER TAKEN
2017ac4: 84 10 20 01 mov 1, %g2
_Thread_Dispatch_necessary = true;
2017ac8: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
2017acc: 30 80 00 08 b,a 2017aec <rtems_signal_send+0xb8>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2017ad0: 7f ff e3 48 call 20107f0 <sparc_disable_interrupts>
2017ad4: 01 00 00 00 nop
*signal_set |= signals;
2017ad8: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
2017adc: b2 10 40 19 or %g1, %i1, %i1
2017ae0: f2 27 60 18 st %i1, [ %i5 + 0x18 ]
_ISR_Enable( _level );
2017ae4: 7f ff e3 47 call 2010800 <sparc_enable_interrupts>
2017ae8: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2017aec: 40 00 12 71 call 201c4b0 <_Thread_Enable_dispatch>
2017af0: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2017af4: 10 80 00 07 b 2017b10 <rtems_signal_send+0xdc>
2017af8: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
_Thread_Enable_dispatch();
2017afc: 40 00 12 6d call 201c4b0 <_Thread_Enable_dispatch>
2017b00: 01 00 00 00 nop
return RTEMS_NOT_DEFINED;
2017b04: 10 80 00 03 b 2017b10 <rtems_signal_send+0xdc>
2017b08: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2017b0c: 82 10 20 04 mov 4, %g1
}
2017b10: 81 c7 e0 08 ret
2017b14: 91 e8 00 01 restore %g0, %g1, %o0
0200f468 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200f468: 9d e3 bf a0 save %sp, -96, %sp
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200f46c: 80 a6 a0 00 cmp %i2, 0
200f470: 02 80 00 5a be 200f5d8 <rtems_task_mode+0x170>
200f474: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200f478: 03 00 80 78 sethi %hi(0x201e000), %g1
200f47c: f8 00 60 2c ld [ %g1 + 0x2c ], %i4 ! 201e02c <_Per_CPU_Information+0xc>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f480: c2 0f 20 70 ldub [ %i4 + 0x70 ], %g1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200f484: fa 07 21 58 ld [ %i4 + 0x158 ], %i5
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f488: 80 a0 00 01 cmp %g0, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f48c: c2 07 20 78 ld [ %i4 + 0x78 ], %g1
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200f490: b6 60 3f ff subx %g0, -1, %i3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200f494: 80 a0 60 00 cmp %g1, 0
200f498: 02 80 00 03 be 200f4a4 <rtems_task_mode+0x3c>
200f49c: b7 2e e0 08 sll %i3, 8, %i3
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200f4a0: b6 16 e2 00 or %i3, 0x200, %i3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200f4a4: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
200f4a8: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200f4ac: 7f ff f0 0d call 200b4e0 <_CPU_ISR_Get_level>
200f4b0: 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;
200f4b4: a1 2c 20 0a sll %l0, 0xa, %l0
200f4b8: 90 14 00 08 or %l0, %o0, %o0
old_mode |= _ISR_Get_level();
200f4bc: b6 12 00 1b or %o0, %i3, %i3
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200f4c0: 80 8e 61 00 btst 0x100, %i1
200f4c4: 02 80 00 06 be 200f4dc <rtems_task_mode+0x74>
200f4c8: f6 26 80 00 st %i3, [ %i2 ]
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
200f4cc: 83 36 20 08 srl %i0, 8, %g1
200f4d0: 82 18 60 01 xor %g1, 1, %g1
200f4d4: 82 08 60 01 and %g1, 1, %g1
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
200f4d8: c2 2f 20 70 stb %g1, [ %i4 + 0x70 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200f4dc: 80 8e 62 00 btst 0x200, %i1
200f4e0: 02 80 00 0b be 200f50c <rtems_task_mode+0xa4>
200f4e4: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
200f4e8: 80 8e 22 00 btst 0x200, %i0
200f4ec: 22 80 00 07 be,a 200f508 <rtems_task_mode+0xa0>
200f4f0: c0 27 20 78 clr [ %i4 + 0x78 ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200f4f4: 82 10 20 01 mov 1, %g1
200f4f8: c2 27 20 78 st %g1, [ %i4 + 0x78 ]
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200f4fc: 03 00 80 76 sethi %hi(0x201d800), %g1
200f500: c2 00 62 50 ld [ %g1 + 0x250 ], %g1 ! 201da50 <_Thread_Ticks_per_timeslice>
200f504: c2 27 20 74 st %g1, [ %i4 + 0x74 ]
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200f508: 80 8e 60 0f btst 0xf, %i1
200f50c: 02 80 00 06 be 200f524 <rtems_task_mode+0xbc>
200f510: 80 8e 64 00 btst 0x400, %i1
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
200f514: 90 0e 20 0f and %i0, 0xf, %o0
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200f518: 7f ff cc 6f call 20026d4 <sparc_enable_interrupts>
200f51c: 91 2a 20 08 sll %o0, 8, %o0
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
200f520: 80 8e 64 00 btst 0x400, %i1
200f524: 02 80 00 14 be 200f574 <rtems_task_mode+0x10c>
200f528: 88 10 20 00 clr %g4
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200f52c: c2 0f 60 08 ldub [ %i5 + 8 ], %g1
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
200f530: b1 36 20 0a srl %i0, 0xa, %i0
200f534: b0 1e 20 01 xor %i0, 1, %i0
200f538: b0 0e 20 01 and %i0, 1, %i0
if ( is_asr_enabled != asr->is_enabled ) {
200f53c: 80 a6 00 01 cmp %i0, %g1
200f540: 22 80 00 0e be,a 200f578 <rtems_task_mode+0x110>
200f544: 03 00 80 77 sethi %hi(0x201dc00), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200f548: 7f ff cc 5f call 20026c4 <sparc_disable_interrupts>
200f54c: f0 2f 60 08 stb %i0, [ %i5 + 8 ]
_signals = information->signals_pending;
200f550: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
200f554: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
information->signals_posted = _signals;
200f558: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200f55c: c4 27 60 18 st %g2, [ %i5 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200f560: 7f ff cc 5d call 20026d4 <sparc_enable_interrupts>
200f564: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200f568: c2 07 60 14 ld [ %i5 + 0x14 ], %g1
200f56c: 80 a0 00 01 cmp %g0, %g1
200f570: 88 40 20 00 addx %g0, 0, %g4
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
200f574: 03 00 80 77 sethi %hi(0x201dc00), %g1
200f578: c4 00 60 30 ld [ %g1 + 0x30 ], %g2 ! 201dc30 <_System_state_Current>
200f57c: 80 a0 a0 03 cmp %g2, 3
200f580: 12 80 00 16 bne 200f5d8 <rtems_task_mode+0x170>
200f584: 82 10 20 00 clr %g1
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
200f588: 07 00 80 78 sethi %hi(0x201e000), %g3
if ( are_signals_pending ||
200f58c: 80 89 20 ff btst 0xff, %g4
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
200f590: 86 10 e0 20 or %g3, 0x20, %g3
if ( are_signals_pending ||
200f594: 12 80 00 0a bne 200f5bc <rtems_task_mode+0x154>
200f598: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
200f59c: c6 00 e0 10 ld [ %g3 + 0x10 ], %g3
200f5a0: 80 a0 80 03 cmp %g2, %g3
200f5a4: 02 80 00 0d be 200f5d8 <rtems_task_mode+0x170>
200f5a8: 01 00 00 00 nop
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
200f5ac: c4 08 a0 70 ldub [ %g2 + 0x70 ], %g2
200f5b0: 80 a0 a0 00 cmp %g2, 0
200f5b4: 02 80 00 09 be 200f5d8 <rtems_task_mode+0x170> <== NEVER TAKEN
200f5b8: 01 00 00 00 nop
_Thread_Dispatch_necessary = true;
200f5bc: 84 10 20 01 mov 1, %g2 ! 1 <PROM_START+0x1>
200f5c0: 03 00 80 78 sethi %hi(0x201e000), %g1
200f5c4: 82 10 60 20 or %g1, 0x20, %g1 ! 201e020 <_Per_CPU_Information>
200f5c8: c4 28 60 18 stb %g2, [ %g1 + 0x18 ]
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
200f5cc: 7f ff ea ac call 200a07c <_Thread_Dispatch>
200f5d0: 01 00 00 00 nop
}
return RTEMS_SUCCESSFUL;
200f5d4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
}
200f5d8: 81 c7 e0 08 ret
200f5dc: 91 e8 00 01 restore %g0, %g1, %o0
0200bf54 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
200bf54: 9d e3 bf 98 save %sp, -104, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
200bf58: 80 a6 60 00 cmp %i1, 0
200bf5c: 02 80 00 08 be 200bf7c <rtems_task_set_priority+0x28>
200bf60: 80 a6 a0 00 cmp %i2, 0
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
200bf64: 03 00 80 84 sethi %hi(0x2021000), %g1
200bf68: c4 08 61 98 ldub [ %g1 + 0x198 ], %g2 ! 2021198 <rtems_maximum_priority>
200bf6c: 80 a6 40 02 cmp %i1, %g2
200bf70: 18 80 00 1e bgu 200bfe8 <rtems_task_set_priority+0x94>
200bf74: 82 10 20 13 mov 0x13, %g1
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
200bf78: 80 a6 a0 00 cmp %i2, 0
200bf7c: 02 80 00 1b be 200bfe8 <rtems_task_set_priority+0x94>
200bf80: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
200bf84: 90 10 00 18 mov %i0, %o0
200bf88: 40 00 09 8a call 200e5b0 <_Thread_Get>
200bf8c: 92 07 bf fc add %fp, -4, %o1
switch ( location ) {
200bf90: c2 07 bf fc ld [ %fp + -4 ], %g1
200bf94: 80 a0 60 00 cmp %g1, 0
200bf98: 12 80 00 14 bne 200bfe8 <rtems_task_set_priority+0x94>
200bf9c: 82 10 20 04 mov 4, %g1
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
200bfa0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
200bfa4: 80 a6 60 00 cmp %i1, 0
200bfa8: 02 80 00 0d be 200bfdc <rtems_task_set_priority+0x88>
200bfac: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
200bfb0: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
200bfb4: 80 a0 60 00 cmp %g1, 0
200bfb8: 02 80 00 06 be 200bfd0 <rtems_task_set_priority+0x7c>
200bfbc: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
200bfc0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
200bfc4: 80 a0 40 19 cmp %g1, %i1
200bfc8: 08 80 00 05 bleu 200bfdc <rtems_task_set_priority+0x88> <== ALWAYS TAKEN
200bfcc: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
200bfd0: 92 10 00 19 mov %i1, %o1
200bfd4: 40 00 08 45 call 200e0e8 <_Thread_Change_priority>
200bfd8: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
200bfdc: 40 00 09 68 call 200e57c <_Thread_Enable_dispatch>
200bfe0: 01 00 00 00 nop
200bfe4: 82 10 20 00 clr %g1 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200bfe8: 81 c7 e0 08 ret
200bfec: 91 e8 00 01 restore %g0, %g1, %o0
02018470 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
2018470: 9d e3 bf 98 save %sp, -104, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2018474: 11 00 80 f5 sethi %hi(0x203d400), %o0
2018478: 92 10 00 18 mov %i0, %o1
201847c: 90 12 22 f4 or %o0, 0x2f4, %o0
2018480: 40 00 0c 36 call 201b558 <_Objects_Get>
2018484: 94 07 bf fc add %fp, -4, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2018488: c2 07 bf fc ld [ %fp + -4 ], %g1
201848c: 80 a0 60 00 cmp %g1, 0
2018490: 12 80 00 0c bne 20184c0 <rtems_timer_cancel+0x50>
2018494: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
2018498: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
201849c: 80 a0 60 04 cmp %g1, 4
20184a0: 02 80 00 04 be 20184b0 <rtems_timer_cancel+0x40> <== NEVER TAKEN
20184a4: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
20184a8: 40 00 14 35 call 201d57c <_Watchdog_Remove>
20184ac: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
20184b0: 40 00 10 00 call 201c4b0 <_Thread_Enable_dispatch>
20184b4: b0 10 20 00 clr %i0
20184b8: 81 c7 e0 08 ret
20184bc: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20184c0: 81 c7 e0 08 ret
20184c4: 91 e8 20 04 restore %g0, 4, %o0
02018984 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2018984: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
2018988: 03 00 80 f5 sethi %hi(0x203d400), %g1
201898c: f8 00 63 34 ld [ %g1 + 0x334 ], %i4 ! 203d734 <_Timer_server>
if ( !timer_server )
2018990: 80 a7 20 00 cmp %i4, 0
2018994: 02 80 00 3c be 2018a84 <rtems_timer_server_fire_when+0x100>
2018998: 82 10 20 0e mov 0xe, %g1
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
201899c: 21 00 80 f3 sethi %hi(0x203cc00), %l0
20189a0: 82 14 20 c8 or %l0, 0xc8, %g1 ! 203ccc8 <_TOD>
20189a4: c4 08 60 14 ldub [ %g1 + 0x14 ], %g2
20189a8: 80 a0 a0 00 cmp %g2, 0
20189ac: 02 80 00 36 be 2018a84 <rtems_timer_server_fire_when+0x100><== NEVER TAKEN
20189b0: 82 10 20 0b mov 0xb, %g1
return RTEMS_NOT_DEFINED;
if ( !routine )
20189b4: 80 a6 a0 00 cmp %i2, 0
20189b8: 02 80 00 33 be 2018a84 <rtems_timer_server_fire_when+0x100>
20189bc: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
20189c0: 7f ff f3 82 call 20157c8 <_TOD_Validate>
20189c4: 90 10 00 19 mov %i1, %o0
20189c8: 80 8a 20 ff btst 0xff, %o0
20189cc: 02 80 00 2e be 2018a84 <rtems_timer_server_fire_when+0x100>
20189d0: 82 10 20 14 mov 0x14, %g1
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
20189d4: 7f ff f3 43 call 20156e0 <_TOD_To_seconds>
20189d8: 90 10 00 19 mov %i1, %o0
20189dc: b2 10 00 08 mov %o0, %i1
20189e0: d0 1c 20 c8 ldd [ %l0 + 0xc8 ], %o0
20189e4: 94 10 20 00 clr %o2
20189e8: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20189ec: 40 00 50 0a call 202ca14 <__divdi3>
20189f0: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
if ( seconds <= _TOD_Seconds_since_epoch() )
20189f4: 80 a6 40 09 cmp %i1, %o1
20189f8: 08 80 00 23 bleu 2018a84 <rtems_timer_server_fire_when+0x100>
20189fc: 82 10 20 14 mov 0x14, %g1
2018a00: 11 00 80 f5 sethi %hi(0x203d400), %o0
2018a04: 92 10 00 18 mov %i0, %o1
2018a08: 90 12 22 f4 or %o0, 0x2f4, %o0
2018a0c: 40 00 0a d3 call 201b558 <_Objects_Get>
2018a10: 94 07 bf fc add %fp, -4, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2018a14: c2 07 bf fc ld [ %fp + -4 ], %g1
2018a18: 80 a0 60 00 cmp %g1, 0
2018a1c: 12 80 00 19 bne 2018a80 <rtems_timer_server_fire_when+0xfc>
2018a20: ba 10 00 08 mov %o0, %i5
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2018a24: 40 00 12 d6 call 201d57c <_Watchdog_Remove>
2018a28: 90 02 20 10 add %o0, 0x10, %o0
2018a2c: d0 1c 20 c8 ldd [ %l0 + 0xc8 ], %o0
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
2018a30: 82 10 20 03 mov 3, %g1
2018a34: 94 10 20 00 clr %o2
2018a38: c2 27 60 38 st %g1, [ %i5 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2018a3c: c0 27 60 18 clr [ %i5 + 0x18 ]
the_watchdog->routine = routine;
2018a40: f4 27 60 2c st %i2, [ %i5 + 0x2c ]
the_watchdog->id = id;
2018a44: f0 27 60 30 st %i0, [ %i5 + 0x30 ]
the_watchdog->user_data = user_data;
2018a48: f6 27 60 34 st %i3, [ %i5 + 0x34 ]
2018a4c: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2018a50: 40 00 4f f1 call 202ca14 <__divdi3>
2018a54: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
2018a58: c2 07 20 04 ld [ %i4 + 4 ], %g1
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
2018a5c: 92 26 40 09 sub %i1, %o1, %o1
(*timer_server->schedule_operation)( timer_server, the_timer );
2018a60: 90 10 00 1c mov %i4, %o0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
2018a64: d2 27 60 1c st %o1, [ %i5 + 0x1c ]
(*timer_server->schedule_operation)( timer_server, the_timer );
2018a68: 9f c0 40 00 call %g1
2018a6c: 92 10 00 1d mov %i5, %o1
_Thread_Enable_dispatch();
2018a70: 40 00 0e 90 call 201c4b0 <_Thread_Enable_dispatch>
2018a74: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
2018a78: 10 80 00 03 b 2018a84 <rtems_timer_server_fire_when+0x100>
2018a7c: 82 10 20 00 clr %g1 ! 0 <PROM_START>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
2018a80: 82 10 20 04 mov 4, %g1
}
2018a84: 81 c7 e0 08 ret
2018a88: 91 e8 00 01 restore %g0, %g1, %o0
02007f44 <sched_get_priority_max>:
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
2007f44: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007f48: 80 a6 20 04 cmp %i0, 4
2007f4c: 18 80 00 06 bgu 2007f64 <sched_get_priority_max+0x20>
2007f50: 82 10 20 01 mov 1, %g1
2007f54: b1 28 40 18 sll %g1, %i0, %i0
2007f58: 80 8e 20 17 btst 0x17, %i0
2007f5c: 12 80 00 08 bne 2007f7c <sched_get_priority_max+0x38> <== ALWAYS TAKEN
2007f60: 03 00 80 86 sethi %hi(0x2021800), %g1
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007f64: 40 00 21 7f call 2010560 <__errno>
2007f68: b0 10 3f ff mov -1, %i0
2007f6c: 82 10 20 16 mov 0x16, %g1
2007f70: c2 22 00 00 st %g1, [ %o0 ]
2007f74: 81 c7 e0 08 ret
2007f78: 81 e8 00 00 restore
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
2007f7c: f0 08 62 58 ldub [ %g1 + 0x258 ], %i0
}
2007f80: 81 c7 e0 08 ret
2007f84: 91 ee 3f ff restore %i0, -1, %o0
02007f88 <sched_get_priority_min>:
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
2007f88: 9d e3 bf a0 save %sp, -96, %sp
switch ( policy ) {
2007f8c: 80 a6 20 04 cmp %i0, 4
2007f90: 18 80 00 06 bgu 2007fa8 <sched_get_priority_min+0x20>
2007f94: 82 10 20 01 mov 1, %g1
2007f98: 83 28 40 18 sll %g1, %i0, %g1
2007f9c: 80 88 60 17 btst 0x17, %g1
2007fa0: 12 80 00 06 bne 2007fb8 <sched_get_priority_min+0x30> <== ALWAYS TAKEN
2007fa4: b0 10 20 01 mov 1, %i0
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2007fa8: 40 00 21 6e call 2010560 <__errno>
2007fac: b0 10 3f ff mov -1, %i0
2007fb0: 82 10 20 16 mov 0x16, %g1
2007fb4: c2 22 00 00 st %g1, [ %o0 ]
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
2007fb8: 81 c7 e0 08 ret
2007fbc: 81 e8 00 00 restore
02007fc0 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
2007fc0: 9d e3 bf a0 save %sp, -96, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2007fc4: 80 a6 20 00 cmp %i0, 0
2007fc8: 02 80 00 0b be 2007ff4 <sched_rr_get_interval+0x34> <== NEVER TAKEN
2007fcc: 80 a6 60 00 cmp %i1, 0
2007fd0: 7f ff ef 8a call 2003df8 <getpid>
2007fd4: 01 00 00 00 nop
2007fd8: 80 a6 00 08 cmp %i0, %o0
2007fdc: 02 80 00 06 be 2007ff4 <sched_rr_get_interval+0x34>
2007fe0: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2007fe4: 40 00 21 5f call 2010560 <__errno>
2007fe8: 01 00 00 00 nop
2007fec: 10 80 00 07 b 2008008 <sched_rr_get_interval+0x48>
2007ff0: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3>
if ( !interval )
2007ff4: 12 80 00 08 bne 2008014 <sched_rr_get_interval+0x54>
2007ff8: 03 00 80 89 sethi %hi(0x2022400), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
2007ffc: 40 00 21 59 call 2010560 <__errno>
2008000: 01 00 00 00 nop
2008004: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2008008: c2 22 00 00 st %g1, [ %o0 ]
200800c: 81 c7 e0 08 ret
2008010: 91 e8 3f ff restore %g0, -1, %o0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
2008014: d0 00 63 50 ld [ %g1 + 0x350 ], %o0
2008018: 92 10 00 19 mov %i1, %o1
200801c: 40 00 0e 99 call 200ba80 <_Timespec_From_ticks>
2008020: b0 10 20 00 clr %i0
return 0;
}
2008024: 81 c7 e0 08 ret
2008028: 81 e8 00 00 restore
020086f0 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
20086f0: 9d e3 bf 88 save %sp, -120, %sp
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
20086f4: 03 00 80 89 sethi %hi(0x2022400), %g1
20086f8: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 20225f0 <_Thread_Dispatch_disable_level>
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
20086fc: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2008700: 84 00 a0 01 inc %g2
2008704: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
2008708: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
200870c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2008710: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2008714: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
Objects_Locations location;
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
2008718: b4 8e 62 00 andcc %i1, 0x200, %i2
200871c: 02 80 00 05 be 2008730 <sem_open+0x40>
2008720: b8 10 20 00 clr %i4
va_start(arg, oflag);
mode = va_arg( arg, mode_t );
value = va_arg( arg, unsigned int );
2008724: f8 07 a0 50 ld [ %fp + 0x50 ], %i4
size_t name_len;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
2008728: 82 07 a0 4c add %fp, 0x4c, %g1
200872c: c2 27 bf ec st %g1, [ %fp + -20 ]
const char *name,
Objects_Id *id,
size_t *len
)
{
return _POSIX_Name_to_id( &_POSIX_Semaphore_Information, name, id, len );
2008730: 37 00 80 8a sethi %hi(0x2022800), %i3
2008734: 92 10 00 18 mov %i0, %o1
2008738: 90 16 e0 e0 or %i3, 0xe0, %o0
200873c: 94 07 bf f0 add %fp, -16, %o2
2008740: 7f ff fe 7d call 2008134 <_POSIX_Name_to_id>
2008744: 96 07 bf fc add %fp, -4, %o3
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
2008748: ba 92 20 00 orcc %o0, 0, %i5
200874c: 22 80 00 0e be,a 2008784 <sem_open+0x94>
2008750: b2 0e 6a 00 and %i1, 0xa00, %i1
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
2008754: 80 a7 60 02 cmp %i5, 2
2008758: 12 80 00 04 bne 2008768 <sem_open+0x78>
200875c: 80 a6 a0 00 cmp %i2, 0
2008760: 12 80 00 20 bne 20087e0 <sem_open+0xf0>
2008764: d2 07 bf fc ld [ %fp + -4 ], %o1
_Thread_Enable_dispatch();
2008768: 40 00 0d cc call 200be98 <_Thread_Enable_dispatch>
200876c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
2008770: 40 00 24 82 call 2011978 <__errno>
2008774: 01 00 00 00 nop
2008778: fa 22 00 00 st %i5, [ %o0 ]
200877c: 81 c7 e0 08 ret
2008780: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
2008784: 80 a6 6a 00 cmp %i1, 0xa00
2008788: 12 80 00 0a bne 20087b0 <sem_open+0xc0>
200878c: d2 07 bf f0 ld [ %fp + -16 ], %o1
_Thread_Enable_dispatch();
2008790: 40 00 0d c2 call 200be98 <_Thread_Enable_dispatch>
2008794: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
2008798: 40 00 24 78 call 2011978 <__errno>
200879c: 01 00 00 00 nop
20087a0: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
20087a4: c2 22 00 00 st %g1, [ %o0 ]
20087a8: 81 c7 e0 08 ret
20087ac: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
sem_t *id,
Objects_Locations *location
)
{
return (POSIX_Semaphore_Control *)
20087b0: 94 07 bf f8 add %fp, -8, %o2
20087b4: 40 00 09 d4 call 200af04 <_Objects_Get>
20087b8: 90 16 e0 e0 or %i3, 0xe0, %o0
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
the_semaphore->open_count += 1;
20087bc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( (sem_t *) &the_semaphore_id, &location );
20087c0: d0 27 bf f4 st %o0, [ %fp + -12 ]
the_semaphore->open_count += 1;
20087c4: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
20087c8: 40 00 0d b4 call 200be98 <_Thread_Enable_dispatch>
20087cc: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
20087d0: 40 00 0d b2 call 200be98 <_Thread_Enable_dispatch>
20087d4: 01 00 00 00 nop
goto return_id;
20087d8: 10 80 00 0d b 200880c <sem_open+0x11c>
20087dc: f0 07 bf f4 ld [ %fp + -12 ], %i0
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
20087e0: 94 10 20 00 clr %o2
20087e4: 96 10 00 1c mov %i4, %o3
20087e8: 98 07 bf f4 add %fp, -12, %o4
20087ec: 40 00 19 8d call 200ee20 <_POSIX_Semaphore_Create_support>
20087f0: 90 10 00 18 mov %i0, %o0
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
20087f4: 40 00 0d a9 call 200be98 <_Thread_Enable_dispatch>
20087f8: ba 10 00 08 mov %o0, %i5
if ( status == -1 )
20087fc: 80 a7 7f ff cmp %i5, -1
2008800: 22 80 00 04 be,a 2008810 <sem_open+0x120> <== NEVER TAKEN
2008804: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
return (sem_t *)&the_semaphore->Object.id;
2008808: f0 07 bf f4 ld [ %fp + -12 ], %i0
200880c: b0 06 20 08 add %i0, 8, %i0
#endif
}
2008810: 81 c7 e0 08 ret
2008814: 81 e8 00 00 restore
02007f24 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
2007f24: 9d e3 bf a0 save %sp, -96, %sp
ISR_Level level;
if ( oact )
2007f28: 80 a6 a0 00 cmp %i2, 0
2007f2c: 02 80 00 0a be 2007f54 <sigaction+0x30>
2007f30: 83 2e 20 02 sll %i0, 2, %g1
*oact = _POSIX_signals_Vectors[ sig ];
2007f34: 85 2e 20 04 sll %i0, 4, %g2
2007f38: 82 20 80 01 sub %g2, %g1, %g1
2007f3c: 13 00 80 85 sethi %hi(0x2021400), %o1
2007f40: 90 10 00 1a mov %i2, %o0
2007f44: 92 12 62 a0 or %o1, 0x2a0, %o1
2007f48: 94 10 20 0c mov 0xc, %o2
2007f4c: 40 00 25 35 call 2011420 <memcpy>
2007f50: 92 02 40 01 add %o1, %g1, %o1
if ( !sig )
2007f54: 80 a6 20 00 cmp %i0, 0
2007f58: 32 80 00 03 bne,a 2007f64 <sigaction+0x40>
2007f5c: 82 06 3f ff add %i0, -1, %g1
2007f60: 30 80 00 06 b,a 2007f78 <sigaction+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2007f64: 80 a0 60 1f cmp %g1, 0x1f
2007f68: 18 80 00 04 bgu 2007f78 <sigaction+0x54>
2007f6c: 80 a6 20 09 cmp %i0, 9
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2007f70: 12 80 00 08 bne 2007f90 <sigaction+0x6c>
2007f74: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
2007f78: 40 00 22 df call 2010af4 <__errno>
2007f7c: 01 00 00 00 nop
2007f80: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007f84: c2 22 00 00 st %g1, [ %o0 ]
2007f88: 10 80 00 20 b 2008008 <sigaction+0xe4>
2007f8c: 82 10 3f ff mov -1, %g1
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2007f90: 02 80 00 1e be 2008008 <sigaction+0xe4> <== NEVER TAKEN
2007f94: 82 10 20 00 clr %g1
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
2007f98: 7f ff ea af call 2002a54 <sparc_disable_interrupts>
2007f9c: 01 00 00 00 nop
2007fa0: b8 10 00 08 mov %o0, %i4
if ( act->sa_handler == SIG_DFL ) {
2007fa4: c2 06 60 08 ld [ %i1 + 8 ], %g1
2007fa8: 3b 00 80 85 sethi %hi(0x2021400), %i5
2007fac: 80 a0 60 00 cmp %g1, 0
2007fb0: 12 80 00 0a bne 2007fd8 <sigaction+0xb4>
2007fb4: ba 17 62 a0 or %i5, 0x2a0, %i5
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
2007fb8: 83 2e 20 02 sll %i0, 2, %g1
2007fbc: 13 00 80 7c sethi %hi(0x201f000), %o1
2007fc0: b1 2e 20 04 sll %i0, 4, %i0
2007fc4: 92 12 60 d4 or %o1, 0xd4, %o1
2007fc8: b0 26 00 01 sub %i0, %g1, %i0
2007fcc: 90 07 40 18 add %i5, %i0, %o0
2007fd0: 10 80 00 09 b 2007ff4 <sigaction+0xd0>
2007fd4: 92 02 40 18 add %o1, %i0, %o1
} else {
_POSIX_signals_Clear_process_signals( sig );
2007fd8: 40 00 16 da call 200db40 <_POSIX_signals_Clear_process_signals>
2007fdc: 90 10 00 18 mov %i0, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2007fe0: 83 2e 20 02 sll %i0, 2, %g1
2007fe4: 92 10 00 19 mov %i1, %o1
2007fe8: b1 2e 20 04 sll %i0, 4, %i0
2007fec: 90 26 00 01 sub %i0, %g1, %o0
2007ff0: 90 07 40 08 add %i5, %o0, %o0
2007ff4: 40 00 25 0b call 2011420 <memcpy>
2007ff8: 94 10 20 0c mov 0xc, %o2
}
_ISR_Enable( level );
2007ffc: 7f ff ea 9a call 2002a64 <sparc_enable_interrupts>
2008000: 90 10 00 1c mov %i4, %o0
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
2008004: 82 10 20 00 clr %g1
}
2008008: 81 c7 e0 08 ret
200800c: 91 e8 00 01 restore %g0, %g1, %o0
0200846c <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
200846c: 9d e3 bf 90 save %sp, -112, %sp
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
2008470: 80 a6 20 00 cmp %i0, 0
2008474: 02 80 00 0e be 20084ac <sigtimedwait+0x40>
2008478: 80 a6 a0 00 cmp %i2, 0
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
200847c: 02 80 00 10 be 20084bc <sigtimedwait+0x50>
2008480: b6 10 20 00 clr %i3
if ( !_Timespec_Is_valid( timeout ) )
2008484: 40 00 0e e1 call 200c008 <_Timespec_Is_valid>
2008488: 90 10 00 1a mov %i2, %o0
200848c: 80 8a 20 ff btst 0xff, %o0
2008490: 02 80 00 07 be 20084ac <sigtimedwait+0x40>
2008494: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
2008498: 40 00 0e ee call 200c050 <_Timespec_To_ticks>
200849c: 90 10 00 1a mov %i2, %o0
if ( !interval )
20084a0: b6 92 20 00 orcc %o0, 0, %i3
20084a4: 12 80 00 07 bne 20084c0 <sigtimedwait+0x54> <== ALWAYS TAKEN
20084a8: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
20084ac: 40 00 23 5c call 201121c <__errno>
20084b0: 01 00 00 00 nop
20084b4: 10 80 00 64 b 2008644 <sigtimedwait+0x1d8>
20084b8: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
20084bc: 80 a6 60 00 cmp %i1, 0
20084c0: 22 80 00 02 be,a 20084c8 <sigtimedwait+0x5c>
20084c4: b2 07 bf f4 add %fp, -12, %i1
the_thread = _Thread_Executing;
20084c8: 21 00 80 86 sethi %hi(0x2021800), %l0
20084cc: a0 14 23 20 or %l0, 0x320, %l0 ! 2021b20 <_Per_CPU_Information>
20084d0: fa 04 20 0c ld [ %l0 + 0xc ], %i5
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
20084d4: 7f ff ea 3d call 2002dc8 <sparc_disable_interrupts>
20084d8: f8 07 61 5c ld [ %i5 + 0x15c ], %i4
20084dc: b4 10 00 08 mov %o0, %i2
if ( *set & api->signals_pending ) {
20084e0: c4 06 00 00 ld [ %i0 ], %g2
20084e4: c2 07 20 d4 ld [ %i4 + 0xd4 ], %g1
20084e8: 80 88 80 01 btst %g2, %g1
20084ec: 22 80 00 12 be,a 2008534 <sigtimedwait+0xc8>
20084f0: 03 00 80 87 sethi %hi(0x2021c00), %g1
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
20084f4: 7f ff ff c6 call 200840c <_POSIX_signals_Get_lowest>
20084f8: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals(
20084fc: 94 10 00 19 mov %i1, %o2
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
2008500: 92 10 00 08 mov %o0, %o1
2008504: d0 26 40 00 st %o0, [ %i1 ]
_POSIX_signals_Clear_signals(
2008508: 96 10 20 00 clr %o3
200850c: 90 10 00 1c mov %i4, %o0
2008510: 40 00 17 a7 call 200e3ac <_POSIX_signals_Clear_signals>
2008514: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
2008518: 7f ff ea 30 call 2002dd8 <sparc_enable_interrupts>
200851c: 90 10 00 1a mov %i2, %o0
the_info->si_code = SI_USER;
2008520: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
2008524: c0 26 60 08 clr [ %i1 + 8 ]
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
2008528: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
return the_info->si_signo;
200852c: 10 80 00 48 b 200864c <sigtimedwait+0x1e0>
2008530: fa 06 40 00 ld [ %i1 ], %i5
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
2008534: c2 00 61 74 ld [ %g1 + 0x174 ], %g1
2008538: 80 88 80 01 btst %g2, %g1
200853c: 22 80 00 12 be,a 2008584 <sigtimedwait+0x118>
2008540: 82 10 3f ff mov -1, %g1
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2008544: 7f ff ff b2 call 200840c <_POSIX_signals_Get_lowest>
2008548: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
200854c: 94 10 00 19 mov %i1, %o2
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
2008550: ba 10 00 08 mov %o0, %i5
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
2008554: 96 10 20 01 mov 1, %o3
2008558: 90 10 00 1c mov %i4, %o0
200855c: 92 10 00 1d mov %i5, %o1
2008560: 40 00 17 93 call 200e3ac <_POSIX_signals_Clear_signals>
2008564: 98 10 20 00 clr %o4
_ISR_Enable( level );
2008568: 7f ff ea 1c call 2002dd8 <sparc_enable_interrupts>
200856c: 90 10 00 1a mov %i2, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2008570: 82 10 20 01 mov 1, %g1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
2008574: fa 26 40 00 st %i5, [ %i1 ]
the_info->si_code = SI_USER;
2008578: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->si_value.sival_int = 0;
200857c: 10 80 00 34 b 200864c <sigtimedwait+0x1e0>
2008580: c0 26 60 08 clr [ %i1 + 8 ]
return signo;
}
the_info->si_signo = -1;
2008584: c2 26 40 00 st %g1, [ %i1 ]
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
2008588: 03 00 80 85 sethi %hi(0x2021400), %g1
200858c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2 ! 20215f0 <_Thread_Dispatch_disable_level>
2008590: 84 00 a0 01 inc %g2
2008594: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
2008598: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
200859c: 82 10 20 04 mov 4, %g1
20085a0: c2 27 60 34 st %g1, [ %i5 + 0x34 ]
the_thread->Wait.option = *set;
20085a4: c2 06 00 00 ld [ %i0 ], %g1
the_thread->Wait.return_argument = the_info;
20085a8: f2 27 60 28 st %i1, [ %i5 + 0x28 ]
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
20085ac: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
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;
20085b0: a2 10 20 01 mov 1, %l1
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
20085b4: 35 00 80 87 sethi %hi(0x2021c00), %i2
20085b8: b4 16 a1 0c or %i2, 0x10c, %i2 ! 2021d0c <_POSIX_signals_Wait_queue>
20085bc: f4 27 60 44 st %i2, [ %i5 + 0x44 ]
20085c0: e2 26 a0 30 st %l1, [ %i2 + 0x30 ]
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
20085c4: 7f ff ea 05 call 2002dd8 <sparc_enable_interrupts>
20085c8: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
20085cc: 90 10 00 1a mov %i2, %o0
20085d0: 92 10 00 1b mov %i3, %o1
20085d4: 15 00 80 2f sethi %hi(0x200bc00), %o2
20085d8: 40 00 0d 36 call 200bab0 <_Thread_queue_Enqueue_with_handler>
20085dc: 94 12 a2 1c or %o2, 0x21c, %o2 ! 200be1c <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
20085e0: 40 00 0b f1 call 200b5a4 <_Thread_Enable_dispatch>
20085e4: 01 00 00 00 nop
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
20085e8: d2 06 40 00 ld [ %i1 ], %o1
20085ec: 90 10 00 1c mov %i4, %o0
20085f0: 94 10 00 19 mov %i1, %o2
20085f4: 96 10 20 00 clr %o3
20085f8: 40 00 17 6d call 200e3ac <_POSIX_signals_Clear_signals>
20085fc: 98 10 20 00 clr %o4
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
2008600: c2 04 20 0c ld [ %l0 + 0xc ], %g1
2008604: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008608: 80 a0 60 04 cmp %g1, 4
200860c: 12 80 00 09 bne 2008630 <sigtimedwait+0x1c4>
2008610: 01 00 00 00 nop
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
2008614: fa 06 40 00 ld [ %i1 ], %i5
2008618: 82 07 7f ff add %i5, -1, %g1
200861c: a3 2c 40 01 sll %l1, %g1, %l1
2008620: c2 06 00 00 ld [ %i0 ], %g1
2008624: 80 8c 40 01 btst %l1, %g1
2008628: 12 80 00 09 bne 200864c <sigtimedwait+0x1e0>
200862c: 01 00 00 00 nop
errno = _Thread_Executing->Wait.return_code;
2008630: 40 00 22 fb call 201121c <__errno>
2008634: 01 00 00 00 nop
2008638: 03 00 80 86 sethi %hi(0x2021800), %g1
200863c: c2 00 63 2c ld [ %g1 + 0x32c ], %g1 ! 2021b2c <_Per_CPU_Information+0xc>
2008640: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
2008644: c2 22 00 00 st %g1, [ %o0 ]
return -1;
2008648: ba 10 3f ff mov -1, %i5
}
return the_info->si_signo;
}
200864c: 81 c7 e0 08 ret
2008650: 91 e8 00 1d restore %g0, %i5, %o0
0200a390 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
200a390: 9d e3 bf a0 save %sp, -96, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
200a394: 92 10 20 00 clr %o1
200a398: 90 10 00 18 mov %i0, %o0
200a39c: 7f ff ff 7f call 200a198 <sigtimedwait>
200a3a0: 94 10 20 00 clr %o2
if ( status != -1 ) {
200a3a4: 80 a2 3f ff cmp %o0, -1
200a3a8: 02 80 00 06 be 200a3c0 <sigwait+0x30>
200a3ac: 80 a6 60 00 cmp %i1, 0
if ( sig )
200a3b0: 32 80 00 09 bne,a 200a3d4 <sigwait+0x44> <== ALWAYS TAKEN
200a3b4: d0 26 40 00 st %o0, [ %i1 ]
*sig = status;
return 0;
200a3b8: 81 c7 e0 08 ret <== NOT EXECUTED
200a3bc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
}
return errno;
200a3c0: 40 00 22 2d call 2012c74 <__errno>
200a3c4: 01 00 00 00 nop
200a3c8: f0 02 00 00 ld [ %o0 ], %i0
200a3cc: 81 c7 e0 08 ret
200a3d0: 81 e8 00 00 restore
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
200a3d4: b0 10 20 00 clr %i0
}
return errno;
}
200a3d8: 81 c7 e0 08 ret
200a3dc: 81 e8 00 00 restore
0200720c <sysconf>:
*/
long sysconf(
int name
)
{
200720c: 9d e3 bf a0 save %sp, -96, %sp
if ( name == _SC_CLK_TCK )
2007210: 80 a6 20 02 cmp %i0, 2
2007214: 12 80 00 09 bne 2007238 <sysconf+0x2c>
2007218: 03 00 80 74 sethi %hi(0x201d000), %g1
return (TOD_MICROSECONDS_PER_SECOND /
200721c: 03 00 80 74 sethi %hi(0x201d000), %g1
2007220: d2 00 60 6c ld [ %g1 + 0x6c ], %o1 ! 201d06c <Configuration+0x10>
2007224: 11 00 03 d0 sethi %hi(0xf4000), %o0
2007228: 40 00 46 61 call 2018bac <.udiv>
200722c: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
2007230: 81 c7 e0 08 ret
2007234: 91 e8 00 08 restore %g0, %o0, %o0
rtems_configuration_get_microseconds_per_tick());
if ( name == _SC_OPEN_MAX )
2007238: 80 a6 20 04 cmp %i0, 4
200723c: 02 80 00 13 be 2007288 <sysconf+0x7c>
2007240: d0 00 61 b4 ld [ %g1 + 0x1b4 ], %o0
return rtems_libio_number_iops;
if ( name == _SC_GETPW_R_SIZE_MAX )
2007244: 80 a6 20 33 cmp %i0, 0x33
2007248: 02 80 00 10 be 2007288 <sysconf+0x7c>
200724c: 90 10 24 00 mov 0x400, %o0
return 1024;
if ( name == _SC_PAGESIZE )
2007250: 80 a6 20 08 cmp %i0, 8
2007254: 02 80 00 0d be 2007288 <sysconf+0x7c>
2007258: 11 00 00 04 sethi %hi(0x1000), %o0
return PAGE_SIZE;
if ( name == _SC_SYMLOOP_MAX )
200725c: 80 a6 20 4f cmp %i0, 0x4f
2007260: 02 80 00 0a be 2007288 <sysconf+0x7c> <== NEVER TAKEN
2007264: 90 10 20 20 mov 0x20, %o0
return RTEMS_FILESYSTEM_SYMLOOP_MAX;
#if defined(__sparc__)
if ( name == 515 ) /* Solaris _SC_STACK_PROT */
2007268: 80 a6 22 03 cmp %i0, 0x203
200726c: 02 80 00 07 be 2007288 <sysconf+0x7c> <== NEVER TAKEN
2007270: 90 10 20 00 clr %o0
return 0;
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
2007274: 40 00 22 ae call 200fd2c <__errno>
2007278: 01 00 00 00 nop
200727c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2007280: c2 22 00 00 st %g1, [ %o0 ]
2007284: 90 10 3f ff mov -1, %o0
}
2007288: b0 10 00 08 mov %o0, %i0
200728c: 81 c7 e0 08 ret
2007290: 81 e8 00 00 restore
02008818 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
2008818: 9d e3 bf a0 save %sp, -96, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
200881c: 80 a6 20 01 cmp %i0, 1
2008820: 12 80 00 13 bne 200886c <timer_create+0x54>
2008824: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
2008828: 02 80 00 11 be 200886c <timer_create+0x54>
200882c: 80 a6 60 00 cmp %i1, 0
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
2008830: 02 80 00 13 be 200887c <timer_create+0x64>
2008834: 03 00 80 89 sethi %hi(0x2022400), %g1
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
2008838: c2 06 40 00 ld [ %i1 ], %g1
200883c: 82 00 7f ff add %g1, -1, %g1
2008840: 80 a0 60 01 cmp %g1, 1
2008844: 28 80 00 03 bleu,a 2008850 <timer_create+0x38> <== ALWAYS TAKEN
2008848: c2 06 60 04 ld [ %i1 + 4 ], %g1
200884c: 30 80 00 08 b,a 200886c <timer_create+0x54> <== NOT EXECUTED
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
2008850: 80 a0 60 00 cmp %g1, 0
2008854: 32 80 00 03 bne,a 2008860 <timer_create+0x48> <== ALWAYS TAKEN
2008858: 82 00 7f ff add %g1, -1, %g1
200885c: 30 80 00 04 b,a 200886c <timer_create+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
2008860: 80 a0 60 1f cmp %g1, 0x1f
2008864: 28 80 00 06 bleu,a 200887c <timer_create+0x64> <== ALWAYS TAKEN
2008868: 03 00 80 89 sethi %hi(0x2022400), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
200886c: 40 00 24 43 call 2011978 <__errno>
2008870: 01 00 00 00 nop
2008874: 10 80 00 11 b 20088b8 <timer_create+0xa0>
2008878: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
200887c: c4 00 61 f0 ld [ %g1 + 0x1f0 ], %g2
2008880: 84 00 a0 01 inc %g2
2008884: c4 20 61 f0 st %g2, [ %g1 + 0x1f0 ]
return _Thread_Dispatch_disable_level;
2008888: c2 00 61 f0 ld [ %g1 + 0x1f0 ], %g1
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
200888c: 11 00 80 8a sethi %hi(0x2022800), %o0
2008890: 40 00 08 5f call 200aa0c <_Objects_Allocate>
2008894: 90 12 21 20 or %o0, 0x120, %o0 ! 2022920 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
2008898: 80 a2 20 00 cmp %o0, 0
200889c: 12 80 00 0a bne 20088c4 <timer_create+0xac>
20088a0: 82 10 20 02 mov 2, %g1
_Thread_Enable_dispatch();
20088a4: 40 00 0d 7d call 200be98 <_Thread_Enable_dispatch>
20088a8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EAGAIN );
20088ac: 40 00 24 33 call 2011978 <__errno>
20088b0: 01 00 00 00 nop
20088b4: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
20088b8: c2 22 00 00 st %g1, [ %o0 ]
20088bc: 81 c7 e0 08 ret
20088c0: 91 e8 3f ff restore %g0, -1, %o0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
20088c4: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
20088c8: 03 00 80 8a sethi %hi(0x2022800), %g1
20088cc: c2 00 63 6c ld [ %g1 + 0x36c ], %g1 ! 2022b6c <_Per_CPU_Information+0xc>
if ( evp != NULL ) {
20088d0: 80 a6 60 00 cmp %i1, 0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
20088d4: c2 00 60 08 ld [ %g1 + 8 ], %g1
if ( evp != NULL ) {
20088d8: 02 80 00 08 be 20088f8 <timer_create+0xe0>
20088dc: c2 22 20 38 st %g1, [ %o0 + 0x38 ]
ptimer->inf.sigev_notify = evp->sigev_notify;
20088e0: c2 06 40 00 ld [ %i1 ], %g1
20088e4: c2 22 20 40 st %g1, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
20088e8: c2 06 60 04 ld [ %i1 + 4 ], %g1
20088ec: c2 22 20 44 st %g1, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
20088f0: c2 06 60 08 ld [ %i1 + 8 ], %g1
20088f4: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
20088f8: c4 12 20 0a lduh [ %o0 + 0xa ], %g2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20088fc: 07 00 80 8a sethi %hi(0x2022800), %g3
2008900: c6 00 e1 3c ld [ %g3 + 0x13c ], %g3 ! 202293c <_POSIX_Timer_Information+0x1c>
}
ptimer->overrun = 0;
2008904: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
2008908: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
200890c: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
2008910: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
2008914: c0 22 20 58 clr [ %o0 + 0x58 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2008918: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
200891c: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
2008920: c0 22 20 30 clr [ %o0 + 0x30 ]
the_watchdog->user_data = user_data;
2008924: c0 22 20 34 clr [ %o0 + 0x34 ]
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
2008928: c2 02 20 08 ld [ %o0 + 8 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200892c: 85 28 a0 02 sll %g2, 2, %g2
2008930: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
2008934: c0 22 20 0c clr [ %o0 + 0xc ]
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
2008938: c2 26 80 00 st %g1, [ %i2 ]
_Thread_Enable_dispatch();
200893c: 40 00 0d 57 call 200be98 <_Thread_Enable_dispatch>
2008940: b0 10 20 00 clr %i0
return 0;
}
2008944: 81 c7 e0 08 ret
2008948: 81 e8 00 00 restore
02007404 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
2007404: 9d e3 bf 78 save %sp, -136, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
2007408: 80 a6 a0 00 cmp %i2, 0
200740c: 02 80 00 7c be 20075fc <timer_settime+0x1f8> <== NEVER TAKEN
2007410: 01 00 00 00 nop
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
2007414: 40 00 0f 55 call 200b168 <_Timespec_Is_valid>
2007418: 90 06 a0 08 add %i2, 8, %o0
200741c: 80 8a 20 ff btst 0xff, %o0
2007420: 02 80 00 77 be 20075fc <timer_settime+0x1f8>
2007424: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
2007428: 40 00 0f 50 call 200b168 <_Timespec_Is_valid>
200742c: 90 10 00 1a mov %i2, %o0
2007430: 80 8a 20 ff btst 0xff, %o0
2007434: 02 80 00 72 be 20075fc <timer_settime+0x1f8> <== NEVER TAKEN
2007438: 80 8e 7f fb btst -5, %i1
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
200743c: 12 80 00 70 bne 20075fc <timer_settime+0x1f8>
2007440: 90 07 bf f0 add %fp, -16, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
2007444: 92 10 00 1a mov %i2, %o1
2007448: 40 00 25 e4 call 2010bd8 <memcpy>
200744c: 94 10 20 10 mov 0x10, %o2
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
2007450: 80 a6 60 04 cmp %i1, 4
2007454: 12 80 00 1d bne 20074c8 <timer_settime+0xc4>
2007458: 11 00 80 7a sethi %hi(0x201e800), %o0
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
200745c: 40 00 06 5e call 2008dd4 <_TOD_Get_as_timestamp>
2007460: 90 07 bf e0 add %fp, -32, %o0
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
2007464: f8 1f bf e0 ldd [ %fp + -32 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007468: 94 10 20 00 clr %o2
200746c: 90 10 00 1c mov %i4, %o0
2007470: 92 10 00 1d mov %i5, %o1
2007474: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007478: 40 00 49 4d call 20199ac <__divdi3>
200747c: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007480: 94 10 20 00 clr %o2
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
2007484: d2 27 bf e8 st %o1, [ %fp + -24 ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
2007488: 90 10 00 1c mov %i4, %o0
200748c: 92 10 00 1d mov %i5, %o1
2007490: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
2007494: 40 00 4a 31 call 2019d58 <__moddi3>
2007498: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
200749c: 90 07 bf f8 add %fp, -8, %o0
20074a0: d2 27 bf ec st %o1, [ %fp + -20 ]
20074a4: 40 00 0f 43 call 200b1b0 <_Timespec_Less_than>
20074a8: 92 07 bf e8 add %fp, -24, %o1
20074ac: 80 8a 20 ff btst 0xff, %o0
20074b0: 12 80 00 53 bne 20075fc <timer_settime+0x1f8>
20074b4: 92 07 bf f8 add %fp, -8, %o1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
20074b8: 90 07 bf e8 add %fp, -24, %o0
20074bc: 40 00 0f 4d call 200b1f0 <_Timespec_Subtract>
20074c0: 94 10 00 09 mov %o1, %o2
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
20074c4: 11 00 80 7a sethi %hi(0x201e800), %o0
20074c8: 92 10 00 18 mov %i0, %o1
20074cc: 90 12 20 30 or %o0, 0x30, %o0
20074d0: 40 00 08 e1 call 2009854 <_Objects_Get>
20074d4: 94 07 bf dc add %fp, -36, %o2
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
20074d8: c2 07 bf dc ld [ %fp + -36 ], %g1
20074dc: 80 a0 60 00 cmp %g1, 0
20074e0: 12 80 00 47 bne 20075fc <timer_settime+0x1f8>
20074e4: b2 10 00 08 mov %o0, %i1
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
20074e8: c2 07 bf f8 ld [ %fp + -8 ], %g1
20074ec: 80 a0 60 00 cmp %g1, 0
20074f0: 12 80 00 14 bne 2007540 <timer_settime+0x13c>
20074f4: c2 07 bf fc ld [ %fp + -4 ], %g1
20074f8: 80 a0 60 00 cmp %g1, 0
20074fc: 12 80 00 11 bne 2007540 <timer_settime+0x13c>
2007500: 01 00 00 00 nop
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
2007504: 40 00 10 72 call 200b6cc <_Watchdog_Remove>
2007508: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
200750c: 80 a6 e0 00 cmp %i3, 0
2007510: 02 80 00 05 be 2007524 <timer_settime+0x120>
2007514: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2007518: 92 06 60 54 add %i1, 0x54, %o1
200751c: 40 00 25 af call 2010bd8 <memcpy>
2007520: 94 10 20 10 mov 0x10, %o2
/* The new data are set */
ptimer->timer_data = normalize;
2007524: 90 06 60 54 add %i1, 0x54, %o0
2007528: 92 07 bf f0 add %fp, -16, %o1
200752c: 40 00 25 ab call 2010bd8 <memcpy>
2007530: 94 10 20 10 mov 0x10, %o2
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2007534: 82 10 20 04 mov 4, %g1
2007538: 10 80 00 2d b 20075ec <timer_settime+0x1e8>
200753c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
2007540: 40 00 0f 3d call 200b234 <_Timespec_To_ticks>
2007544: 90 10 00 1a mov %i2, %o0
2007548: d0 26 60 64 st %o0, [ %i1 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
200754c: 40 00 0f 3a call 200b234 <_Timespec_To_ticks>
2007550: 90 07 bf f8 add %fp, -8, %o0
activated = _POSIX_Timer_Insert_helper(
2007554: d4 06 60 08 ld [ %i1 + 8 ], %o2
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
2007558: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
200755c: 17 00 80 1d sethi %hi(0x2007400), %o3
2007560: 90 06 60 10 add %i1, 0x10, %o0
2007564: 96 12 e2 14 or %o3, 0x214, %o3
2007568: 40 00 18 47 call 200d684 <_POSIX_Timer_Insert_helper>
200756c: 98 10 00 19 mov %i1, %o4
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
2007570: 80 8a 20 ff btst 0xff, %o0
2007574: 02 80 00 1e be 20075ec <timer_settime+0x1e8>
2007578: 80 a6 e0 00 cmp %i3, 0
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
200757c: 02 80 00 05 be 2007590 <timer_settime+0x18c>
2007580: 90 10 00 1b mov %i3, %o0
*ovalue = ptimer->timer_data;
2007584: 92 06 60 54 add %i1, 0x54, %o1
2007588: 40 00 25 94 call 2010bd8 <memcpy>
200758c: 94 10 20 10 mov 0x10, %o2
ptimer->timer_data = normalize;
2007590: 92 07 bf f0 add %fp, -16, %o1
2007594: 94 10 20 10 mov 0x10, %o2
2007598: 40 00 25 90 call 2010bd8 <memcpy>
200759c: 90 06 60 54 add %i1, 0x54, %o0
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
20075a0: 82 10 20 03 mov 3, %g1
struct timespec *tod_as_timespec
)
{
Timestamp_Control tod_as_timestamp;
_TOD_Get_as_timestamp( &tod_as_timestamp );
20075a4: 90 07 bf e0 add %fp, -32, %o0
20075a8: 40 00 06 0b call 2008dd4 <_TOD_Get_as_timestamp>
20075ac: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
_Timestamp_To_timespec( &tod_as_timestamp, tod_as_timespec );
20075b0: f8 1f bf e0 ldd [ %fp + -32 ], %i4
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20075b4: 94 10 20 00 clr %o2
20075b8: 90 10 00 1c mov %i4, %o0
20075bc: 92 10 00 1d mov %i5, %o1
20075c0: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20075c4: 40 00 48 fa call 20199ac <__divdi3>
20075c8: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20075cc: 90 10 00 1c mov %i4, %o0
static inline void _Timestamp64_implementation_To_timespec(
const Timestamp64_Control *_timestamp,
struct timespec *_timespec
)
{
_timespec->tv_sec = (time_t) (*_timestamp / 1000000000L);
20075d0: d2 26 60 6c st %o1, [ %i1 + 0x6c ]
_timespec->tv_nsec = (long) (*_timestamp % 1000000000L);
20075d4: 94 10 20 00 clr %o2
20075d8: 92 10 00 1d mov %i5, %o1
20075dc: 17 0e e6 b2 sethi %hi(0x3b9ac800), %o3
20075e0: 40 00 49 de call 2019d58 <__moddi3>
20075e4: 96 12 e2 00 or %o3, 0x200, %o3 ! 3b9aca00 <RAM_END+0x395aca00>
20075e8: d2 26 60 70 st %o1, [ %i1 + 0x70 ]
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
20075ec: 40 00 0c 46 call 200a704 <_Thread_Enable_dispatch>
20075f0: b0 10 20 00 clr %i0
20075f4: 81 c7 e0 08 ret
20075f8: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
20075fc: 40 00 23 30 call 20102bc <__errno>
2007600: b0 10 3f ff mov -1, %i0
2007604: 82 10 20 16 mov 0x16, %g1
2007608: c2 22 00 00 st %g1, [ %o0 ]
}
200760c: 81 c7 e0 08 ret
2007610: 81 e8 00 00 restore
020075d4 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
20075d4: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
20075d8: 3b 00 80 7f sethi %hi(0x201fc00), %i5
20075dc: ba 17 63 c8 or %i5, 0x3c8, %i5 ! 201ffc8 <_POSIX_signals_Ualarm_timer>
20075e0: c2 07 60 1c ld [ %i5 + 0x1c ], %g1
20075e4: 80 a0 60 00 cmp %g1, 0
20075e8: 12 80 00 0a bne 2007610 <ualarm+0x3c>
20075ec: b8 10 00 18 mov %i0, %i4
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20075f0: 03 00 80 1d sethi %hi(0x2007400), %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20075f4: c0 27 60 08 clr [ %i5 + 8 ]
the_watchdog->routine = routine;
20075f8: 82 10 61 a8 or %g1, 0x1a8, %g1
the_watchdog->id = id;
20075fc: c0 27 60 20 clr [ %i5 + 0x20 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007600: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2007604: c0 27 60 24 clr [ %i5 + 0x24 ]
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
2007608: 10 80 00 1b b 2007674 <ualarm+0xa0>
200760c: b0 10 20 00 clr %i0
if ( !the_timer->routine ) {
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
2007610: 40 00 0f f1 call 200b5d4 <_Watchdog_Remove>
2007614: 90 10 00 1d mov %i5, %o0
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
2007618: 90 02 3f fe add %o0, -2, %o0
200761c: 80 a2 20 01 cmp %o0, 1
2007620: 18 80 00 15 bgu 2007674 <ualarm+0xa0> <== NEVER TAKEN
2007624: b0 10 20 00 clr %i0
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
2007628: c2 07 60 0c ld [ %i5 + 0xc ], %g1
200762c: d0 07 60 14 ld [ %i5 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
2007630: 92 07 bf f8 add %fp, -8, %o1
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
2007634: 90 02 00 01 add %o0, %g1, %o0
2007638: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
200763c: 40 00 0e 83 call 200b048 <_Timespec_From_ticks>
2007640: 90 22 00 01 sub %o0, %g1, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
2007644: c2 07 bf f8 ld [ %fp + -8 ], %g1
remaining += tp.tv_nsec / 1000;
2007648: d0 07 bf fc ld [ %fp + -4 ], %o0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200764c: 85 28 60 03 sll %g1, 3, %g2
2007650: 87 28 60 08 sll %g1, 8, %g3
2007654: 84 20 c0 02 sub %g3, %g2, %g2
remaining += tp.tv_nsec / 1000;
2007658: 92 10 23 e8 mov 0x3e8, %o1
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200765c: b1 28 a0 06 sll %g2, 6, %i0
2007660: b0 26 00 02 sub %i0, %g2, %i0
remaining += tp.tv_nsec / 1000;
2007664: 40 00 4c 5b call 201a7d0 <.div>
2007668: b0 06 00 01 add %i0, %g1, %i0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
200766c: b1 2e 20 06 sll %i0, 6, %i0
remaining += tp.tv_nsec / 1000;
2007670: b0 02 00 18 add %o0, %i0, %i0
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
2007674: 80 a7 20 00 cmp %i4, 0
2007678: 02 80 00 19 be 20076dc <ualarm+0x108>
200767c: 3b 00 03 d0 sethi %hi(0xf4000), %i5
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2007680: 90 10 00 1c mov %i4, %o0
2007684: 40 00 4c 51 call 201a7c8 <.udiv>
2007688: 92 17 62 40 or %i5, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
200768c: 92 17 62 40 or %i5, 0x240, %o1
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2007690: d0 27 bf f8 st %o0, [ %fp + -8 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2007694: 40 00 4c f9 call 201aa78 <.urem>
2007698: 90 10 00 1c mov %i4, %o0
200769c: 85 2a 20 07 sll %o0, 7, %g2
20076a0: 83 2a 20 02 sll %o0, 2, %g1
20076a4: 82 20 80 01 sub %g2, %g1, %g1
20076a8: 90 00 40 08 add %g1, %o0, %o0
20076ac: 91 2a 20 03 sll %o0, 3, %o0
20076b0: d0 27 bf fc st %o0, [ %fp + -4 ]
ticks = _Timespec_To_ticks( &tp );
20076b4: 40 00 0e 7a call 200b09c <_Timespec_To_ticks>
20076b8: 90 07 bf f8 add %fp, -8, %o0
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
20076bc: 40 00 0e 78 call 200b09c <_Timespec_To_ticks>
20076c0: 90 07 bf f8 add %fp, -8, %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20076c4: 13 00 80 7f sethi %hi(0x201fc00), %o1
20076c8: 92 12 63 c8 or %o1, 0x3c8, %o1 ! 201ffc8 <_POSIX_signals_Ualarm_timer>
20076cc: d0 22 60 0c st %o0, [ %o1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20076d0: 11 00 80 7d sethi %hi(0x201f400), %o0
20076d4: 40 00 0f 68 call 200b474 <_Watchdog_Insert>
20076d8: 90 12 23 68 or %o0, 0x368, %o0 ! 201f768 <_Watchdog_Ticks_chain>
}
return remaining;
}
20076dc: 81 c7 e0 08 ret
20076e0: 81 e8 00 00 restore